x11

Using conemu terminal with Xming

北城余情 提交于 2019-12-05 08:26:40
问题 I am using ConEmu which is a great terminal for Windows. I am also using MobaXterm which has a built in X server to allow me to run Linux applications have have their GUIs run on my Windows machine. What I would love is to be able to achieve the same thing with ConEmu. Is it possible to forward X via SSH on ConEmu and have this work with Xming? I tried loading Xming and logging into my linux machine via SSH from a standard windows cmd.exe terminal in ConEmu but it doesn't work. Perhaps this

System.exit is not thread-safe on Linux?

怎甘沉沦 提交于 2019-12-05 05:57:49
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:46) at java.lang.Shutdown.runHooks(Shutdown.java:123) at java.lang.Shutdown.sequence(Shutdown.java:167

Why is XGetWindowProperty returning null?

蹲街弑〆低调 提交于 2019-12-05 04:04:40
问题 I'm using the following to get the names of all X windows: Atom nameAtom = XInternAtom(dpy,"_NET_WM_NAME",false); Atom type; int format; unsigned long nitems, after; unsigned char *data = 0; if (Success == XGetWindowProperty(dpy, window, nameAtom, 0, 65536, false, XA_ATOM, &type, &format, &nitems, &after, &data)) { if (data) { Atom windowName = *(Atom*)data; const char* name = XGetAtomName(dpy, windowName); log.debug("Name: %s", name); XFree(data); } } But in my log I'm just getting (null)

Any efficient way of converting XImage data to pixel map (e.g. array of RGB quads)?

末鹿安然 提交于 2019-12-05 03:55:52
问题 I'm trying to capture images with XGetImage. Everything fine but I need to send the data to a module which expects an array of RGB quads. Calling XGetPixel for every pixel in the image is very slow (0.5 seconds on a i5 for 1440x900 resolution). I've looked up the XGetPixel source code in xlib and the reason is obvious, a lot of computations are done for each pixel. Is there any efficient (or maybe completely different) way of doing this? 回答1: With the MIT Shared Memory Extension you can store

How to run CUDA/OpenGL interop (particle) sample from a remote machine

丶灬走出姿态 提交于 2019-12-05 02:24:35
问题 I am trying to run the CUDA particle sample on a remote Ubuntu machine from a host ubuntu machine. I followed this tutorial: http://devblogs.nvidia.com/parallelforall/remote-application-development-nvidia-nsight-eclipse-edition/ and it runs on my host, but not on my remote machine. I get the following output in Nsight: CUDA Particles Simulation Starting... grid: 64 x 64 x 64 = 262144 cells particles: 16384 No protocol specified freeglut (/users/path/particles/Debug/particles): failed to open

Touchscreen Kivy app for Raspberry Pi

扶醉桌前 提交于 2019-12-05 01:54:42
问题 Here's the scenario: I've written a gui using the python framework Kivy, and I want to run it on a raspberry pi with this touchscreen. I've done the installation fine, and TSLIB_FBDEVICE=/dev/fb1 TSLIB_TSDEVICE=/dev/input/touchscreen FRAMEBUFFER=/dev/fb1 nohup startx & gets the xwindow desktop gui running fine. I've been unable to get my kivy gui working, though. I was able to get a test tkinter application working ok, by setting the DISPLAY environment variable. I tried putting the following

Mac OSX Lion/X11/CImg Library

*爱你&永不变心* 提交于 2019-12-05 01:46:40
So I'm trying to incorporate the CImg image writing library into my XCode project However, the header file for the library contains the following include and XCode gives this error warning: #include <X11/Xlib.h> Error: File not found My laptop is running OSX Lion 10.8.2 and apparently, apple took away X11 for Lion, so I went on this site and downloaded XQuartz because that's what it said to do on the Apple Support page . So after the installation, I restarted my computer and tried to run my XCode project, but I'm still getting the same exact error on that include. So I'm not sure what I should

Load image onto a window using xlib

≯℡__Kan透↙ 提交于 2019-12-05 01:20:40
问题 I've created window class and i want to insert an image as a background of that window. File formats need to be png. I used XImage of magick++ to load an image. but don't know how to make its as a background of my window. Any idea how to do it? 回答1: Create an Pixmap using Pixmap XCreatePixmap(display, d, width, height, depth) Display *display; // The display Drawable d; // The Window for which to set the background Create a Graphics Context for the Pixmap GC XCreateGC(display, d, valuemask,

Window position in Xlib

痴心易碎 提交于 2019-12-05 00:35:51
问题 How to get top-level window position relative to root window (i.e. whole screen) using plain ol' xlib (or brand new XCB)? 回答1: The x,y components of the structure returned by XGetWindowAttributes are relative to the origin of the window's parent. That's not the same as relative to the top left of the screen. Calling XTranslateCoordinates passing the root window and 0,0 gives coordinates of the window relative to the screen. I found that if I write: int x, y; Window child; XWindowAttributes

Python: tell X to reserve screen space for application

末鹿安然 提交于 2019-12-04 23:47:21
问题 I am trying to solve the issue of reserving space on the screen for an application with X Window Manager (i.e. Linux platforms). I have seen this issue addressed and solved for Gtk and I asked the prompted the same question using Qt. Since no one reacted to the Qt-specific question (which I also addressed in other forums), I thought I'd generalise my question: Is there a universal, pythonic way to tell X to reserve screen space for an application? Thanks, Benjamin 回答1: After some research i