x11

Drawing on the X root window

I'd like to be able to draw on the root window in Linux. I.e. make an OSD. I'm using Gnome. Code samples or links to them would be appreciated. ...

how to make an X11 window in freeglut api un-movable/un-draggable and un-resizable

Hi, I am using the freeglut OpenGL api to create an opengl context. The window that is created is through the glutCreateWindow() function.. I want that somehow the resulting window is made un-movable/un-draggable and un-resizable.. any way to achieve this? Thanks. ...

What do I need to do to link with xlib?

I am using GCC, what switches do I need to add to link with Xlib? After searching, all I could find was -lX11, but that gave me ld: library not found for -lX11 I am using a mac (10.6), but I would not like anything that is Mac specific. ...

Rendering OpenGL FBO Texture to GLXPixmap

I'm writing some code which is intended to: 1. Render into an OpenGL texture using an FBO. 2. Draw from the FBO texture to a GLXPixmap, which is attached to an X Pixmap. 3. Draw the X Pixmap to a window on the screen. Step 3 works great, and step 2 works fine if I replace the FBO texture with normal OpenGL drawing. But if I do what's a...

How to programmatically switch to a specific window in compiz?

Is there a command to tell compiz that we want to bring in front and set focus to a specific window? How should we identify the window in that command? The reason behind this question is the following use-case: Suppose we have a wiki to keep notes of anything interesting we find out. It would be very convenient to have a keyboard short...

Redirecting only graphics of a X client to another X server?

Hi, all Support I have two computers. Each computer has a X server running. And one of the computers also have some GUI applications running on it. Now I want to keep the GUI applications still running on the same computer, and they're still getting keyboard and mouse input from the same computer, while redirect their display content ...

Checkpointing and restarting X11 applications

My task is to checkpoint and restart X11 applications. Therefore I use the BLCR (Berkeley Lab Checkpoint/Restart (BLCR)) tool. Due to the fact that BLCR is not able (without modifications) to reinitiate the connection to the X-Server, I used an interposition library to log all Xlib function calls with their parameters to a text file. ...

Ignore auto repeat in X11 applications

If you press and hold a key in X11 while AutoRepeat is enabled, you continuously receive KeyPress and KeyRelease events. I know that AutoRepeat can be disabled using the function XAutoRepeatOff(), but this changes the setting for the whole X server. Is there a way to either disable AutoRepeat for a single application or to ignore repea...

Raster graphics in xterm?

No, not ASCII graphics, see the screenshot here: http://en.wikipedia.org/wiki/W3m How is that even possible? I checked the source and it only prints character sequences. However, I am unable to find any reference to graphic drawing or image embedding escape sequences in xterm documentation or elsewhere. w3m also seems to be the only ...

How to check which program runs inside gnome-terminal

I want to write a program which prints the current focused window name and if it is a gnome-terminal, then prints out the running program inside the current gnome-terminal tab (for example vim, if a vim session is running). To get the currently focused window name, I used: xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)" ...

Moving a window between workspaces/virtual desktops

Hi all, I have a Linux-only wxPython application with a wxFrame that acts as a menu/toolbar, it can open up new windows that are independent of the toolbar itself. Since the user can move any of these windows to any virtual workspace, I'm looking for a way to move the toolbar to the current workspace whenever the user activates a window....

How to get Xvfb display number

How can I get the display number that used while running Xvfb? For example somebody run ./Xvfb :14 I need somehow to get the used display number 14. Thanks in advance ...

Python DBUS SESSION_BUS - X11 dependency

I've got running sample python code which is fine in Ubuntu desktop: import dbus, gobject from dbus.mainloop.glib import DBusGMainLoop from dbus.mainloop.glib import threads_init import subprocess from subprocess import call gobject.threads_init() threads_init() dbus.mainloop.glib.DBusGMainLoop( set_as_default = True ) p = subprocess....

Fatal IO error 0 (Success) on X server

What does the error "Fatal IO error 0 (Success) on X server" mean? The error is produced when an X client tries to call XvCreateImage(), and it results in the client terminating. X.0.log shows the following version information: X.Org X Server 1.6.4 Release Date: 2009-9-27 X Protocol Version 11, Revision 0 Build Operating System: Linux...

X throws out errors when forkpty is called. (C++)

Hello, all. When my program gets to this line,: pid_t nPid = forkpty( &m_nMasterFD, NULL, NULL, NULL ); it outputs this: X Error: BadIDChoice (invalid resource ID chosen for this connection) 14 Extension: 148 (RENDER) Minor opcode: 17 (RenderCreateGlyphSet) Resource id: 0x3600002 <unknown>: Fatal IO error 4 (Interrupted sys...

Is a fullscreen 8 bit framebuffer possible in X11, and if so, what am I doing wrong?

I'm trying to get a fullscreen 8 bit depth framebuffer but I can't find any visual to work with. I want 8 bit truecolor, where 3 bits are red, 3 bits are green and 2 bits are blue. I'm using XF86 to go fullscreen. // pass int found = XMatchVisualInfo(l_display, l_screen, 24, TrueColor, &visual); // all of these fail found = XMatchVisu...

Error initializing XGCValues

Hi. I was following this tutorial, bit stuck here: This code doesn't compile, and the error message is c:35: error: invalid initializer I'm not sure what's wrong with the line XGCValues valu=CapButt|JoinBevel; infact, I copied it from the said tutorial. Here's the full code I have: #include <stdio.h> #include <X11/Xlib.h> #includ...

Java Swing display stops updating until X event generated

EDIT: additional info at the end I've got a (large) Java Swing application that's demonstrating some very strange behavior. If the computer running it is left idle (no mouse or keyboard input) for a sufficiently long time (varies between an hour or so and a couple of days), the Swing display sometimes stops updating totally (we've got,...

What might make "Xclients" be executed twice when boot system?

For some special purpose, I modified /etc/X11/xinit/Xclients to start firefox instead of start Desktop Environment. # Argh! Nothing good is installed. Fall back to twm { # gosh, neither fvwm95 nor fvwm2 is available; # fall back to failsafe settings [ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45' # if [ -x...

Java keyPress/keyRelease issue under Linux/X11

I'm developing a small 2D game engine in Java, after playing around with my demo game in a VirtualBox VM hosting Ubuntu, I found a strange bug that would sometimes cause the game to ignore the fact that a key is pressed. So you're running to the left until you suddenly stop moving. Now under a real Ubuntu I found the cause of the proble...