xorg

Does xlib have an active window event?

狂风中的少年 提交于 2019-11-29 23:50:38
问题 I am trying to write a program that tracks when the active window changes using Xlib. I am have trouble figuring out the best way to do this. These are my ideas so far: Every second use _NET_ACTIVE_WINDOW to get the active window and if it has changed then running the related code for the event. Get a list of all windows and listen to their focus in event. I would have to figure out how to keep an up to date list of open windows though. Is their an easier/better way? I am new to programming

Sending keycode to Xorg + wine with bash script

匆匆过客 提交于 2019-11-29 23:33:27
问题 How do I send keycode to currently running application in linux which is running under wine? I would like the it to be under bash for simplicity. 回答1: Use package called xvkbd . It should be within every linux distribution. Syntax is simple: xvkbd -text [line of keycodes] For example running Warcraft 3 game with automatic Battle.net login would be: #!/bin/bash cd ~/.wine/drive_c/Program\ Files/Warcraft3/ wine euroloader.exe -opengl > /dev/null 2> /dev/null & # run W3 sleep 5; # wait until

How to create a callback for “monitor plugged” on an intel graphics?

梦想与她 提交于 2019-11-29 20:11:43
I've got an eeepc with an intel graphics. I'd like to hook a script to the event of a monitor plugged via VGA. How to do that? Andy As a crude solution, you may be able to poll on sysfs. On my laptop I have: $ cat /sys/class/drm/card0-LVDS-1/status connected $ cat /sys/class/drm/card0-VGA-1/status disconnected I'm guessing this requires kernel DRM and possibly KMS. To see if you can trigger something automatically, you could run udevadm monitor --property , and watch while you are (dis-)connecting the monitor to see if events are reported. With my radeon, I get an event the first time I

A function callback every time a key is pressed (regardless of which window has focus)?

血红的双手。 提交于 2019-11-29 07:32:49
I want to write a programme (in python) on Linux (Ubuntu Linux 9.10) that will keep track of how many key presses per second/minute I make. This includes normal letter keys, and control/shift/space/etc. Is there some way to hook into X so that I can say "when a key is pressed call this function?". Since I want to have this running in the background while I work normally, this function call will have to be able to be aware of all key presses for all programmes. I suppose it's a bit like a keylogger. This is only a personal thing, so I don't care about making it work on Windows/OSX, and I don't

Hardware acceleration without X

心不动则不痛 提交于 2019-11-29 05:10:46
I was wondering if it would be possible to get graphical hardware acceleration without Xorg and its DDX driver, only with kernel module and the rest of userspace driver. I'm asking this because I'm starting to develop on an embedded platform (something like beagleboard or more roughly a Texas instruments ARM chip with integrated GPU), and I would get hardware acceleration without the overhead of a graphical server (that is not needed). If yes, how? I was thinking about OpenGL or OpengGLES implementations, or Qt embedded http://harmattan-dev.nokia.com/docs/library/html/qt4/qt-embeddedlinux

Scripts launched from udev do not have DISPLAY access anymore?

浪子不回头ぞ 提交于 2019-11-29 03:51:21
I have a script that runs from udev when I plug in my external drive. It always worked. But after upgrading from Linux 3.8/Xorg 1.12/Mint 14 ( Ubuntu 12.10 compatible) to Linux 3.11/Xorg 1.14/Mint 16 ( Ubuntu 13.10 compatible), it doesn't work anymore. The script still runs, but none of the commands that require the display work. I figured that out by quitting the udev daemon and manually run udevd --debug for verbose output (more below). This script used to work in Mint 14/12.10 : export DISPLAY=:0 UUID=$1 DEV=$2 notify-send -t 700 "mounting $DEV ($UUID)" gnome-terminal -t "Backing up home...

How do I obtain, and synchronize, a complete list of all X11 windows?

对着背影说爱祢 提交于 2019-11-28 16:55:06
I want to monitor all the open windows under X11. Currently, I'm doing this as follows: Initially walking the whole tree by recursively calling XQueryTree from the root window Listening for substructure changes on the whole desktop: XSelectInput( display, root_window, SubstructureNotifyMask | PropertyChangeMask ) Handling all MapNotify, UnmapNotify and DestroyNotify events, updating my own list of windows in the process I'm mainly worried about point 1. During the recursion, XQueryTree will be called multiple times. Is there any way to ensure that the tree does not change in the meantime? In

Programmatically determining individual screen widths/heights in Linux (w/Xinerama, TwinView, and/or BigDesktop)

风格不统一 提交于 2019-11-28 09:30:31
I'm developing a little side-project to display multiple wallpapers on multiple screens under GNOME (something that apparently can't be done by GNOME itself or anything else). I've figured out how to do the main part of it (using the ImageMagick components, for the curious); I'm trying to automate the configuration system. To do that, I need a way to determine the dimensions of the individual screens are. Can anyone give me a hint where to look for that? I presume the X server itself has the information, but I'm not sure how my program can ask for it. It looks like there's a libXinerama API

A function callback every time a key is pressed (regardless of which window has focus)?

旧城冷巷雨未停 提交于 2019-11-28 01:15:09
问题 I want to write a programme (in python) on Linux (Ubuntu Linux 9.10) that will keep track of how many key presses per second/minute I make. This includes normal letter keys, and control/shift/space/etc. Is there some way to hook into X so that I can say "when a key is pressed call this function?". Since I want to have this running in the background while I work normally, this function call will have to be able to be aware of all key presses for all programmes. I suppose it's a bit like a

Hardware acceleration without X

生来就可爱ヽ(ⅴ<●) 提交于 2019-11-27 22:34:15
问题 I was wondering if it would be possible to get graphical hardware acceleration without Xorg and its DDX driver, only with kernel module and the rest of userspace driver. I'm asking this because I'm starting to develop on an embedded platform (something like beagleboard or more roughly a Texas instruments ARM chip with integrated GPU), and I would get hardware acceleration without the overhead of a graphical server (that is not needed). If yes, how? I was thinking about OpenGL or OpengGLES