x

(Ruby || Python) window manager.

I want to make a window manager in either of these languages (Preferably ruby). I honestly have no idea where to start except that I will need some kind of X module to load. So if anyone has a clue it would be great if you could point me in the right direction. Thanks ...

XLookupString returning a UTF-8 code (Latin-1 to UTF-8)

Hello. I'm trying to use the function XLookupString. According to the documentation, it is supposed to return a Latin-1 code. How could I convert it or what should I use instead this function so I get a UTF-8 code? Thanks. ...

How to query X11 display resolution?

It seems like an simple problem, but I can't find the answer: How do you query (via X11) what monitors exist and their resolutions? ...

get mouse deltas under linux (xorg)

Is there a convenient way to get mouse deltas (e.g. mickeys) under X/linux? I know that I could read from /dev/input/mice but that requires root access and seems a bit to low level for me. Any idea? ...

How to use colors in Motif

I'm new to GUI programming in C and Linux, and I'm having a hard time with it. It seems like a fairly simple/straightforward thing, but I can't find any answers googling. I want to add a background color to a widget. XmNbackground seems to be what I want to use, but I don't understand what I set it to, like a simple color blue, how do I ...

X events: find out which device generated an event

Hello, I've got a mouse with scroll and a keyboard with scroll. Both devices are connected using USB, both scrolls send the same event ("mouse button 4/5 press/release"). I'd like to map up/down arrow keys to the keyboard scroll, but not the mouse scroll. Any ideas of how to do this programatically? I think I have to do this at the X s...

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

How to scale GdkPixmap or XPixmap via X server?

I'm interested in offloading X client from heavy computations. As far as I understand I can do it using XRender in some way. But I do no found how. ...

What pixel format does X server use?

What pixel format (RGBA, ARBG, BGRA) does the X server use? If any specific format at all. Update: I'm specifically looking for information about the color component order and bit patterns. ...

Flot not displaying x axis labels correctly

I have to display a graph with date on the X axis and Amt on the Y axis. There will be 8 lines (series) each with n months data. When I plot the graph I am sending in 6 months data for sure.( one line's data is shown below) [1251701950000, 34.50553] [1254294030000, 27.014463] [1256972350000, 26.7805] [1259567970000, 33.08871] [12622464...

SSRS: Report loading external images, image not found, can I hide the image control

My SSRS report loads logo images for each customer from a customer number specific folder on the report server. I write an expression, to form my URL to the image based on th customer number. ..."http://localhost/images/" + iCustomerNumber.ToString() + "/logo.gif" I am able to get this working, but the problem I face is, when a parti...

Linux: run an application fullscreen (not in a window)

Hello, I want to run a program in linux without the X borders. It's a c++ program that uses a graphical library called GRX and when it is launched it runs inside a window. Is there any way to "force" an app not to run in windowed mode? An exec, comand or something? Cheers ...

BASH- Run MPlayer if either there are no users on display :0 or if there is more than one argument

This is the script I currently have- #!/bin/bash if["$#" == "2" OR who | grep ":0" == ""] export DISPLAY=:0 xset dpms force on mplayer -fs $1.mp4 fi It doesn't work. Thanks for your help. ...

Bash: infinite sleep

I use startx to start X which will evaluate my .xinitrc. In my .xinitrc I start my window manager using /usr/bin/mywm. Now, if I kill my WM (in order to f.e. test some other WM), X will terminate too because the .xinitrc script reached EOF. So I added this at the end of my .xinitrc: while true; do sleep 10000; done This way X won't te...

How to capture any key in X?

Hi, I am building an application for which I need to periodically get information about users keyboard. It is going to be user idle detection application. I have a fairly simple solution to periodically check if the mouse has been moved. But I can't figure any reasonable non root way to detect if the keyboard has been pressed. I was thi...

Simulate mouse movement in Ubuntu

Problem Am looking to automatically move the mouse cursor and simulate mouse button clicks from the command-line using an external script. Am not looking to: Record mouse movement and playback (e.g., xnee, xmacro) Instantly move the mouse from one location to another (e.g., xdotool, Python's warp_pointer) Ideal Solution What I'd li...

How can I get a screenshot from a not visible window of a application which uses OpenGL under X?

I am trying to make a screenshot of a not visible window under X. My first attempt was to capture the window using xwd or import (from ImageMagick). Unfortunately when window is under some other windows the hidden parts are black. What's even worse is that when window is not on the current desktop I get a BadMatch error. The next thoug...

X Windows Documentation

I am planning to develop a couple of small applications using X on Ubuntu 10.4. Does anyone know where I might find any documentation on the subject, including the widget set Ubuntu uses (I'm used to Motif, and they don't look like Motif widgets to me)? Also, does anyone know where I might find some tools to help out with this (somethin...

How to disable x paste in emacs

Every single time I highlight something in emacs, it copies it. Is there any way to disable this annoying behavior? Im on ubuntu. ...

Xlib getting events of a child window

I am writing a simple window manager using xlib. The code reparents client windows into a window slightly larger than the client window called frame window. I am trying to implement a click to focus policy. I am getting buttonpress events when the mouse button is pressed in the frame window and am able to raise the frame window on button...