x11

Getting X window id for GLUT program? or, How to remote control a GLUT program on X?

I want to send a keystroke to a GLUT program on X11, but I can't find there's an X11 client attached to the GLUT program. I do this, using the most excellent demo program for the chipmunk 2d physics package: xlsclients -a|sort >aa chipmunk_demos (in another window) xlsclients -a|sort >bb diff aa bb and there's no difference. My eve...

Can I make an X11 window OpenGL capable after it has been created?

Specifically, I want to be able to render to an X Window given just its id. In this case I have a window created in python by gtk. I can get the window ID of a gtk.Drawable and pass it into my C python module, but can I then make OpenGL calls render to it? I am aware of gtkglext, but would rather not use it if possible. Thanks in adv...

Porting OpenGL Application to Mac OS: X11, Cocoa, or Another Alternative?

Apologies if this a newbish question, but I'm new to Mac programming, and thought I'd try porting my app to Mac OS. Basically my question boils down to what are my options and the trade-offs to programming in OpenGL on the Mac? In doing my own research, I seemingly have come to the conclusion that I have the choice of: a) Programming ...

Touch screens for kiosk applications

I'm developing a kiosk-style touchscreen application in Qt. Currently I'm using an Elo Touch surface acoustic wave touchmonitor which works well except for one thing: drag performance is way too poor to provide a good user experience. As this is the case for the cursor in X as well as in my application, it seems to be either the fault of...

Using desktop as canvas on linux

Hello everybody, i was wondering if somebody could help me out. I have a plan of making clone of geek tools for linux. But i have no idea if you can somehow use linux desktop as canvas for drawing text etc. I tried to google it up but i found nothing. What i need to do is basically be able to draw text on certain parts of desktop so it ...

Remotely run command in local X session?

I have an HTPC (with an HDTV as the monitor) running Ubuntu Karmic, and various other computers in the house. Sometimes I want to run X11 applications (usually, but not always, XBMC) on the HTPC displayed on the HDTV, but I don't want to have to physically go to the HTPC to do so; I want to do so from another computer in the house. If I...

Troubleshooting segmentation Fault

I am getting a segmentation fault in some C code, and I cannot figure out how to read this so I can figure out the problem.. Does anyone have any techniques that can help me? Does anything jump out to you? Here is gdb output: GNU gdb 6.8 for GNAT Pro 6.2.1 (20090115) [rev:143235] Copyright (C) 2008 Free Software Foundation, Inc. Lic...

How to disable the automatic middle-click mouse events in X (Xlib)?

I am currently implementing a program in X11 using C. I got the program to handle right- and left-click events, however middle-clicking poses a problem. It seems my window manager (Gnome on Ubuntu 9.10) thinks it's better if, instead of having a single middle-click, I should have a series of other clicks instead. I assume it's got someth...

Change X11 window title after emacs started

When I start emacs, I can use the --title= option to control the title of the x-window that holds the emacs application. Is it possible to change the title after emacs starts from elisp? ...

Dump X clipboard data with GTK+ or PyGTK

How do I paste HTML data from the X clipboard using PyGTK/GTK+? I would need something like xclip, but with the ability to output clipboard data as HTML, not just as plain text. I'm using PyGTK, but I am not afraid of plain GTK+ in C. I've read GtkClipboard and PyGTK's gtk.Clipboard references, and I've found this question, but I would...

xlib integrated debugging (Tracing)

Hello Is there any debugging options built-in in the Xlib (libX11.so)? Can I get list of X11 lib calls? I want to get full trace of xlib function calls from heavy-multithreaded, closed-source program. It is one not-public embedded platform, so I can't use gdb for multithreaded debugging and there is no ltrace on the platform. Also, thi...

Create Invisible Window in GTK#?

I'm looking to create an invisible window for the processing of certain X events (sort of like NativeWindow in Winforms). Is this possible in GTK#? Or do I need to manually create such a window using P/Invoke to the X libraries? ...

Global Hotkey in Mono and Gtk#

I'm trying to get a global hotkey working in Linux using Mono. I found the signatures of XGrabKey and XUngrabKey, but I can't seem to get them working. Whenever I try to invoke XGrabKey, the application crashes with a SIGSEGV. This is what I have so far: using System; using Gtk; using System.Runtime.InteropServices; namespace GTKTes...

Launching an X application from a locally running Apache web server using PHP

I have Apache and PHP running on my local Linux desktop. My PHP script launches "xcalc", and looks like this: <?php shell_exec("xcalc"); ?> When I execute the PHP script using the PHP binary, I see xcalc running on the desktop. When I execute the same script through Apache, I see nothing happening on the screen. I can't figure out...

Length of String8(ListOfCARD8) in X11 protocol

Hello. I'm working on a proxy server for X11, that will also do some slight data manipulation(color depth, watermarking and some more) on certain data. I've got the connection up and running, and I'm manipulating the server ip in the connection on 177/UDP so the client connects correctly through the proxy instead of calling the server in...

problem with dead keys (acute, diaeresis, etc) c++

Hi everyone: I'm currently writing my own virtual keyboard for linux using the X11 lib and i just can't find the way to simulate a KeyPress event of any dead keys. I'd tried , for example, to write "á" using the asigned macro, which is XK_aacute, and nothing happens. later i'd tried to send XK_acute (the acute accent macro) and then XK...

Is it possible to get active window & executable names in X11/Xlib?

After looking at RescueTime for windows/mac, it seems that there's a version for linux but doesn't seem up to date. Also, it's the weekends and I want to spend time playing with X11.. I'm thinking of making a simple productivity-polling app, that every short interval polls the active windows, and intercepts (and passes along) mouse and ...

How to set cursor position in C on linux?

Hi all, how can I set the mouse cursor position in an X window using a C program under Linux? thanks :) (like setcursorpos() in WIN) EDIT: I've tried this code, but doesn't work: #include <curses.h> main(){ move(100, 100); refresh(); } ...

can dbxtool run more than one instance under the same user account?

At work we tend to all use the same useraccount on a development system - this means we can only have one instance of dbxtool running at a time! If you run as a different user then you are unable to attach to running processes that belong to the main user account. Apart from habitually running dbxtool as root, is there a way to force m...

Memory allocation in Xvfb

Hi, I have following this blog in setting Xvfb in my ubuntu environment: http://corpocrat.com/2008/08/19/how-to-install-xvfb-x11-server-in-linux-server/ So I did this: Xvfb :1 -screen 0 800x600x24& My question is does Xvfb only allocate memory during initialization? i.e. just enough for a display of 800x600x24? So as I have more and ...