x11

X11: move an existing window via command line?

Given an X client window ID, is there a way to move that window or change its geometry from the command line? $ xlsclients -a Window 0x3000001: Machine: ohm Name: Terminal Icon Name: foo Command: foo Instance/Class: foo/bar $ xmovewindow -id 0x3000001 --geometry +100+200 <-- this is what I would like to do ...

Can I render to several displays from the same JVM?

I have 4 Java applications rendering some AWT graphics. They all render to different X displays, which we configure at JVM startup time. I would like to have them run from the same JVM. This way, I launch one Java app, and it will open up four screens, which render their stuff to different displays. Is that possible in Java? ...

Transparent windows with Linux

I am trying to find a cross linux distribution solution to the problem of making a program have transparent windows. I now there is some methods out there, that take screen shots of the windows underneath and then print them as the background of the image. I would prefer not to uses that method because it likely that i would have video...

How to avoid tearing with pygame on Linux/X11

I've been playing with pygame (on Debian/Lenny). It seems to work nicely, except for annoying tearing of blits (fullscreen or windowed mode). I'm using the default SDL X11 driver. Googling suggests that it's a known issue with SDL that X11 provides no vsync facility (even with a display created with FULLSCREEN|DOUBLEBUF|HWSURFACE flags...

What is wrong with my X11 code?

I am attempting to get the X Window at a certain location on screen. When I asked people for a function to do this, they said you would just call XQueryTree recursively. This is the code snippet which I think is somehow wrong. When I debug it, it seems to work perfectly. The only problem is that the output it gives seems a little str...

Failed to free a colormap entry in Xlib with XFreeColors()

I allocate a color entry with the next code, then I use it to draw correctly: char *color_name = "red"; XColor color, exact; XAllocNamedColor(display, colormap, color_name, &color, &exact); Then, when I don't need anymore the color entry, I try to free it: XFreeColors(display, colormap, &color.pixel, 1, 0); This call generates the...

"Unresolved text symbol" -- how do I find the right library

Please pardon the newbie question, my C is very, very rusty. Trying to build xrunclient from http://www.leftfield.org/~dd/sw.html, on IRIX64, I'm confronted with: ld32: ERROR: 33 : Unresolved text symbol "XOpenDisplay" I figure this is because it can't find the proper library, but it finds the header files without complaint. How can I ...

X11 changing value of whitepixel

I have hardware which has an overlay buffer as fb and another buffer which renders video (analog video in like TV). z order with first video and on top of it fb rendered through cairo, agg library based application. The overlay buffer take one color key which is made transparent. I want to make my White pixel to be that color (say I con...

How to get the glyph size of a font?

Under Solaris 8, CDE, I want to write a script that displays two or more applications on a screen, with a 5% margin. The method depends on the -geometry argument, which we're ok with. This needs to be able to be resolution independent, and that's turning out to be a problem. Some of the applications (dtterm/xterm), measure the -geometry...

X11: run a gnome app as another user

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? ...

How to convert a X11 window id to a process id

I'm working on a small application and I need to find the PID of a process given it's X11 window ID of it's 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 ...

Intercept WM_DELETE_WINDOW on X11?

I'd like to intercept the WM_DELETE_WINDOW message that is posted to a certain selection of windows that an application I'm writing (AllTray), so that I can act on it instead of the application receiving it. I'm currently looking at trying this at the GDK level via gdk_display_add_client_message_filter if possible, but I'd be happy with...

Protecting against X11 Crashes in Java Applications that have a Swing Component

Is this possible? ...

Where do I start making a linux input hack?

When you hold "shift" and scroll with your mouse on a mac, it interprets your vertical scroll motion into horizontal scroll actions. This is my most missed feature when working on linux, and I would love to bring it to linux (since I have looked thoroughly and nobody else seems to have done so yet). I hope this can be done with some sor...

How can I start X11 window with no display associated

I'd like to start Firefox for example with no display associated and eventually take a screenshot with import. Can I in fact make it periodically with cronjobs? I'm now making a ssh -X connection, take the xwininfo for the window started in background and everything's OK. But I'd like to automate it. ...

How to attach additional information to a Pixmap?

In Windows' and MacOS's metafiles (WMF/EMF and PICT/PDF) you can attach any information that goes along with the metafile - it can be something specific for you application. How can I achieve same result on Linux? I'm not using GDK or Qt - just "plain" XLib, Xt and Motif. The idea is that I want to copy and send something from my applic...

How to identify top-level X11 windows using xlib?

I'm trying to get a list of all top level desktop windows in an X11 session. Basically, I want to get a list of all windows that are shown in the window managers application-switching UI (commonly opened when the user presses ALT+TAB). I've never done any X11 programming before, but so far I've managed to enumerate through the entire wi...

XtAppAddInput hangs on reading from a file

Maybe third time's the charm. I've been working on retrofiting an existing libxt program to use input from a MIDI USB on Linux. I first tried it using oss_usb on CentOS, only to find that it doesn't work like that. Now, I'm trying it on a Debian system, and am writing an Xt app for it. Only problem is that in my code, I'm trying to call...

Standard Menu Item Location on Linux

Where should I put a .desktop file in order to ensure that most desktop environments find it? Is there such a location? In addition, is there any standard place to put it in the user's home directory so that only that user sees it? ...

Is it possible to port an X11 server to the iPhone?

I'm looking for an X11 server on the iPhone to be able to use the NX protocol. There are RDP clients, Citrix clients, VNC clients, but no X11 server... Do you think it is possible to port (or create ?) an X11 server (by example kdrive modified for Cocoa) for the iPhone? Does it have enough CPU-power or memory for that? How would you do ...