x11

How to use shm pixmap with xcb?

不问归期 提交于 2019-12-07 06:04:36
问题 I try to learn how to use shared memory pixmaps in the xcb library. Did any of you have experience with this and want to share example codes and/or information? This would be very helpful. Thanks 回答1: After some research I found out how to use shared memory pixmaps in xcb. Here is my testcode: #include <stdlib.h> #include <stdio.h> #include <sys/ipc.h> #include <sys/shm.h> #include <xcb/xcb.h> #include <xcb/shm.h> #include <xcb/xcb_image.h> #define WID 512 #define HEI 512 int main(){ xcb

Sending X11 click event doesn't work with some windows

主宰稳场 提交于 2019-12-07 05:48:38
问题 The following snippet of code works most of the time, except in certain windows. For instance, under the latest Ubuntu it does not work for selecting folders in the file explorer. It seems to work just about everywhere else, but this gap is significant. I suspect it has to do with how I am using XQueryPointer, but I've tried nearly every example I can find. If I use the computer's mouse instead, it work's fine. FYI: I've already tried the answers to these questions: Sending Programmatic

Accessing the X Display for Ubuntu GDM login screen [closed]

孤者浪人 提交于 2019-12-07 04:46:46
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 7 years ago . Overall I am trying to inject key presses into the Ubuntu login screen from a separate shell. I have the machine (running Ubuntu 10.04) at the standard login screen and I am SSH'd into the machine as well. I've tried the following (from the SSH shell): $ ps ax | grep X 2844 tty8 Ss+ 0:01 /usr/bin/X :0 -br

System.exit is not thread-safe on Linux?

两盒软妹~` 提交于 2019-12-07 03:56:31
问题 I've just switched from Oracle JDK 1.6, to Open JDK 1.7.0_03, and I've hit a rather remarkable deadlock on exit: java.lang.Thread.State: WAITING (on object monitor) at java.lang.Object.wait(Native Method) at java.lang.Thread.join(Thread.java:1258) - locked <0x8608dda0> (a sun.awt.X11.XToolkit$1$1) at java.lang.Thread.join(Thread.java:1332) at java.lang.ApplicationShutdownHooks.runHooks(ApplicationShutdownHooks.java:106) at java.lang.ApplicationShutdownHooks$1.run(ApplicationShutdownHooks.java

Output from 'choice' in R's kml

冷暖自知 提交于 2019-12-06 14:49:46
I'm having trouble getting 'choice' to create output. When the graphical interface launches, I am selecting a partition with the space bar. This creates a black circle around the partition, indicating it has been selected. When I click 'return', nothing happens. I checked my working directory to look for the output files, but they are not there. I used getwd() to ensure that I have the correct setwd(). No dice. There was a similar question posted: Exporting result from kml package in R ; however, the answer does not work for me. Any suggestions? I am using R 3.1.0 GUI Mavericks build(6734) and

Releasing all keys after disabling the keyboard in X11/Linux using xinput?

£可爱£侵袭症+ 提交于 2019-12-06 14:25:54
问题 On Linux when using X11/Xorg, when you use xinput to disable they keyboard (e.g. xinput set-prop $ID "Device Enabled" 0 ) the 'key-up' event is not send (because you've disabled the keyboard). This is noticable if you enter that command on the command line, it'll act like you're holding 'enter' down. This is because the command (which disables the keyboard) runs before you lift your finger off the enter key. This is discussed in this bug ( https://bugs.launchpad.net/ubuntu/+source/xserver

Opening sockets to the Xserver directly

江枫思渺然 提交于 2019-12-06 13:38:08
I'm looking to understand how Linux Desktop Environments work with Xserver. I was reading that most window managers don't open sockets directly, instead they use either Xlib bindings for which ever language the WM is being written or you can use higher level bindings XCB; but i would like to know What are the advantages to opening a socket directly to the Xserver? The question should rather be "What are the advantages of using Xlib instead of a graphical toolkit like gtk"? Even to master Xlib, you have to spent months or years! It's so intricate that almost every app that has graphical content

Using ghostscript as x11 viewer (gs x11 viewport positioning)?

房东的猫 提交于 2019-12-06 12:35:51
问题 I already know about Ghostscript front end viewers; but I was wondering how gs itself could be used for viewing PDF documents? The closest I could get to, is to specify explicitly x11 window as output device, specify width and height of the window via -g , and specify rasterization resolution via -r ; or, a command line like this: gs -sDevice=x11 -g500x500 -r150x150 -dFirstPage=3 fontspec.pdf ... which results with something like: ... which is, in fact, all good - except, it starts at lower

pyplot while using X11 forwarding

点点圈 提交于 2019-12-06 12:34:45
问题 I'm trying to setup my remote working environment so that I can use matplotlib.pyplot under ipython. My local machine and remote machine are both MAC OSX Mavericks. I've tried xeyes and it works properly so I think my X11 forwarding works fine. However, when I try functions in matplotlib.pyplot it didn't show any error message but I didn't see any figure either. I know it's about which backend to use and I've tried using ipython --pylab=tk but didn't work. Tried to install pygtk but can't

X11 modal dialog

霸气de小男生 提交于 2019-12-06 11:53:35
How can I create a modal dialog in X11 using Xlib? A modal dialog is a a window that stays on top of other windows of the app (like transient windows do) and also refuses to give focus to other windows of the app. In Windows, modality is also signaled by flashing the titlebar of the modal window when trying to steal the focus from it. Thanks. You need to set _NET_WM_STATE property (which is of type "atom list") to include _NET_WM_STATE, see references to _NET_WM_STATE in EWMP spec (also need to set WM_TRANSIENT_FOR correctly) 来源: https://stackoverflow.com/questions/31779316/x11-modal-dialog