x11

What does (~0L) mean?

纵饮孤独 提交于 2019-12-03 12:21:41
I'm doing some X11 ctypes coding, I don't know C but need some help understanding this. In the C code below (might be C++ im not sure) we see (~0L) what does that mean? In Javascript and Python ~0 means -1 . 812 int result = GetProperty(window, property_name, 813 (~0L), // (all of them) 814 &type, &format, &num_items, &properties); Thanks 0L is a long integer value with all the bits set to zero - that's generally the definition of 0 . The ~ means to invert all the bits, which leaves you with a long integer with all the bits set to one. In two's complement arithmetic (which is almost universal)

Genymotion - /usr/lib64/libX11.so.6: undefined symbol: xcb_wait_for_reply64

纵饮孤独 提交于 2019-12-03 11:53:22
问题 I installed Genymotion on openSUSE Leap 42.1 and don't have success to execute. I'm getting the following error: genymotion/genymotion: symbol lookup error: /usr/lib64/libX11.so.6: undefined symbol: xcb_wait_for_reply64 I have no idea what may have caused the problem. Anyone else seen this? 回答1: To solve this problem, navigate to extracted folder (/opt/genymobile/genymotion in my case) and remove the libxcb.so.1 file. 回答2: In my case i had to remove to files: libxcb.so.1 and libdrm.so.2. I'm

Xt error: Can't open display, if using default DISPLAY

流过昼夜 提交于 2019-12-03 11:14:10
Overview I'm attempting to get XQuartz to work on OSX so I can do X11 forwarding via Docker. I'm following the instructions here . I believe my question may be answered by just the first part, but just in case (to avoid the XY problem), I've provided the second part as well. Installation I've installed it via homebrew, via brew cask install xquartz . Then I open -a XQuartz to start it. Local xterms Testing it out, if I try to open an xterm , it does not work: MacBook-Pro:opencv-gui csaftoiu$ xterm xterm: Xt error: Can't open display: /private/tmp/com.apple.launchd.3wncZULdXC/org.macosforge

embedding an application (in this case a terminal) within a QT application

寵の児 提交于 2019-12-03 07:53:01
I am writing a QT application and I need to embed a terminal (we say,xterm) within a QDialog, like some KDE application (see kdevelop/kate/...). I've been trying with: - QX11EmbedContainer placed into the QLayout of my QDialog - QProcess for the program I want to excecute I expect the QProcess running within the QX11EmbedContainer, but it does not work. The problem is that I can't put the xterm into the QX11EmbedContainer, the only thing I obtain is an xterm window (unfortunately separated from my QDialog). Does anybody got the same problem? Sorry, I've tried your solution before posting oh

Convert HEX to closest X11 Color Number

喜欢而已 提交于 2019-12-03 07:42:35
问题 I'm looking for a Algorithm/Way to convert given HEX (e.g. #111111 R:0x11, G:0x11, B:0x11) to the closest X11 color number (Terminal is either 88 or 256 colors) using either Python, PHP, or VIM script and I was wondering if someone here knows a way or point me to a direction to do this. Thanks in Advance. 回答1: I had the same issue (taking an existing vim colorscheme with gvim hex colors and filling in the terminal color values). Here's the script I used (although the ColorDist function would

Open applications in different workspaces in Gnome

主宰稳场 提交于 2019-12-03 06:52:59
问题 Given I'm a lazy bastard, I tried to write a Bash script that opens at once some daily apps in different desktops. This script should work in Gnome. I've written that so far: #!/bin/bash firefox & thunderbird & /usr/bin/netbeans --locale en & amsn & gnome-terminal & sleep 2 wmctrl -r firefox -t 0 && wmctrl -r netbeans -t 1 && wmctrl -r gnome-terminal -t 2 && wmctrl -r amsn -t 6 && wmctrl -r thunderbird -t 7 But, it doesn't work. My apps open, but they won't be assigned to the desktops I

How to convert a X11 window id to a process id

十年热恋 提交于 2019-12-03 06:39:19
I'm working on a small application and I need to find the PID of a process given the X11 window ID of its main window or child windows. I saw examples for doing such a conversion using _NET_WM_PID , but I cannot figure out how to do it without using it. The reason for not using _NET_WM_PID is that it's not implemented in all the available window managers and my application needs to work on any one of them (or at least on most of them). Could somebody help me please and give me some suggestion/directions on how to solve this issue? Thank you! In general, it's not possible to find out the PID of

How does X11 clipboard handle multiple data formats?

本小妞迷上赌 提交于 2019-12-03 06:22:49
问题 It probably happened to you as well - sometimes when you copy a text from some web page into your rich-text e-mail draft in your favorite webmail client, you dislike the fact that the pasted piece has a different font/size/weight.. it somehow remembers the style (often images, when selected). How is it than that if you paste the same into your favorite text editor like Vim, there's no HTML, just the plain text? It seems that clipboard maintains the selected data in various formats. How can

X11: run a gnome app as another user

我怕爱的太早我们不能终老 提交于 2019-12-03 05:51:33
问题 I have ubuntu + x11 + gnome. I want to run a graphical application as another user. However, when I start it from the command line using sudo -u otheruser app I get the error "No protocol specified". How can I work arround this? 回答1: Use xdg-su -u user -c command 回答2: xhost '+si:localuser:USERNAME' 回答3: Execute this command first: $ sudo xhost + Then run the command you want as the other user: $ sudo -i -u username $ command you want to run When you are done: $ sudo xhost - 回答4: You probably

how to add the missing RANDR extension

旧巷老猫 提交于 2019-12-03 05:33:35
问题 I have setup the xvfb server on my headless server and when I m running the DISPLAY=:99 firefox I am getting this exception missing RANDR extension Many of them said to disable some xinerna from the xorg.conf file but this file is not getting created in my case. So I am searching for how to add the missing RANDR extension. 回答1: First off, Xvfb doesn't read configuration from xorg.conf. Xvfb is a variant of the KDrive X servers and like all members of that family gets its configuration from