x11

why qt can run without x server and gtk cant

蓝咒 提交于 2019-12-08 13:27:08
问题 I am developing a gstreamer based app on AM335x starter kit running arago linux. "gst-launch"(with a test pipeline) gives proper command line output (serial) but shows nothing on the screen. BTW the screen by default shows a qt demo app. Killing this demo app makes the gst-launch fail. I compiled a "hello world" gtk app, which gives "Gtk-WARNING **: cannot open display:" error. BTW there is no X here. But when I ran a Qt "hello world" app, a pop up window was displayed on top of the demo app.

Output from 'choice' in R's kml

Deadly 提交于 2019-12-08 09:48:28
问题 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;

Cygwin XWin server randomly loses connection

微笑、不失礼 提交于 2019-12-08 09:36:26
问题 I am using cygwin to ssh into a remote linux box and am using the cygwin XWin server to display gui applications. When I first connect to the remote machine, the following warnings are displayed: Warning: untrusted X11 forwarding setup failed: xauth key data not generated Warning: No xauth data; using fake authentication data for X11 forwarding. Regardless of the warnings, XWin seems to work perfectly at first. After a while (usually about 15 min) it will inevitably lose connection. The

Create window without title bar

夙愿已清 提交于 2019-12-08 09:10:43
I am trying to create a simple panel for Openbox in Arch Linux using c++, but I cannot figure out how to remove the title bar from a window. I am creating the window with XCreateWindow(...) , and that gives a window with the correct size, but it contains a title bar, and the window also opens in the top-left corner of the screen, no matter what offset coordinates I specify. I read here that both of these problems are probably caused by the window manager (Openbox), which overrides the window attributes I specified in XCreateWindow(..., &window_attributes) . This could be solved by adding

How to draw an image from file on window with Xlib

*爱你&永不变心* 提交于 2019-12-08 07:59:45
问题 This is my code: int main() { Display *d = XOpenDisplay(0); unsigned int bitmap_width, bitmap_height; int x, y; Pixmap bitmap; if ( d ) { Window w = XCreateWindow(d, DefaultRootWindow(d), 0, 0, 400, 400, 0, CopyFromParent, CopyFromParent,CopyFromParent, 0, 0); GC gc = XCreateGC ( d, w, 0 , NULL ); int rc = XReadBitmapFile(d, w, "1.bmp", &bitmap_width, &bitmap_height, &bitmap, &x, &y); XCopyPlane(d, bitmap, w, gc,0, 0, bitmap_width, bitmap_height,0, 0, 1); XMapWindow(d, w); XFlush(d); sleep(10

How to draw an image from file on window with Xlib

孤人 提交于 2019-12-08 07:02:30
This is my code: int main() { Display *d = XOpenDisplay(0); unsigned int bitmap_width, bitmap_height; int x, y; Pixmap bitmap; if ( d ) { Window w = XCreateWindow(d, DefaultRootWindow(d), 0, 0, 400, 400, 0, CopyFromParent, CopyFromParent,CopyFromParent, 0, 0); GC gc = XCreateGC ( d, w, 0 , NULL ); int rc = XReadBitmapFile(d, w, "1.bmp", &bitmap_width, &bitmap_height, &bitmap, &x, &y); XCopyPlane(d, bitmap, w, gc,0, 0, bitmap_width, bitmap_height,0, 0, 1); XMapWindow(d, w); XFlush(d); sleep(10); } return 0; } But window is clear. I do not understand why it is not working. Where did I make

Create window without title bar

霸气de小男生 提交于 2019-12-08 06:44:51
问题 I am trying to create a simple panel for Openbox in Arch Linux using c++, but I cannot figure out how to remove the title bar from a window. I am creating the window with XCreateWindow(...) , and that gives a window with the correct size, but it contains a title bar, and the window also opens in the top-left corner of the screen, no matter what offset coordinates I specify. I read here that both of these problems are probably caused by the window manager (Openbox), which overrides the window

Paramiko X11 mode with python programming

▼魔方 西西 提交于 2019-12-08 06:19:22
问题 I do not manage to use the Paramiko python module passing through its ssh X11 management functionality. I would like to use it as if I used the ssh -X option. I have tried several solution but nothing work on my system. Here is the code I tried: client = paramiko.SSHClient() client.set_missing_host_key_policy(AutoAddPolicy()) client.connect(machineName, username=xxx, password=xxx) t = client.get_transport () chan = t.open_session () chan.request_x11 () chan.set_combine_stderr (True) chan.exec

How to create semi transparent white window in XLib

老子叫甜甜 提交于 2019-12-08 04:28:08
问题 I would like to create a semi transparent white window in XLib, but the window is not semi translucent, it remains fully opaque. I use the compton compositor and there are transparent windows in the system, so the problem is in the code: #include <X11/Xlib.h> #include <X11/Xutil.h> #include <stdio.h> int main(int argc, char* argv[]) { Display* display = XOpenDisplay(NULL); XVisualInfo vinfo; XMatchVisualInfo(display, DefaultScreen(display), 32, TrueColor, &vinfo); XSetWindowAttributes attr;

How to construct Qt::Key out of KeySym or KeyCode?

女生的网名这么多〃 提交于 2019-12-08 03:54:25
问题 I have a low-level key logger that receives scan codes, without QKeyEvent's since the QApplication doesn't have focus. The scan codes can be converted into key syms using system specific library calls. Scan codes correspond to Qt's QKeyEvent->nativeScanCode() and key syms correspond to QKeyEvent->nativeVirtualKey(), but Qt's Qt::Key values seems independently mapped. I would like to either take a given Qt::Key and convert to either sym key or scan code, or construct a Qt::Key out of a sym key