x11

How to get started writing a compositing WM?

僤鯓⒐⒋嵵緔 提交于 2019-12-03 05:26:01
问题 I would like to write a basic hardware-accelerated window manager, so I've been looking for some documentation on how to get started, but I've only managed to find this tutorial, which uses an outdated version of Clutter and won't build with any version currently available. Are there any other good resources for how to do this, or alternatively, a really bare-bones compositing WM to look at the source of? 回答1: There are two parts in your question: 1) How to write WM 2) how to write composite

How to query X11 display resolution?

五迷三道 提交于 2019-12-03 05:11:45
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? Check out display macros and screen macros from the Xlib manual . Specifically: From the first link : ScreenCount() , ScreenOfDisplay() From the second link : WidthOfScreen() , HeightOfScreen() This might be helpfull for cli and scripting xwininfo -root But xRandR might be more accurate, especially, when there is multiple monitor environment: xrandr For modern X servers, there's also the XRandR extension, which provides the most up-to-date model of multi screen

Resizing an Xvfb display

女生的网名这么多〃 提交于 2019-12-03 05:08:29
Simple Question: Is there a way to resize a Xvfb display? I tried with RandR but it seems that the RandR extension is not supported by Xvfb. Are there other ways to resize the screen? Thanks for your help! edigu You can use the server-args command line argument to specify a custom resolution for the virtual frame buffer being created, but this does not change the resolution of an existing virtual frame buffer: xvfb-run --server-args="-screen 0, 1024x768x24" ... Most distributions now ship a version of Xvfb with randr support. The code as committed in late 2015 vfb: add randr support (v2) . To

How to programmatically switch to a specific window in compiz?

本小妞迷上赌 提交于 2019-12-03 04:57:35
问题 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 shortcut to bring the browser window with our Wiki page in front and start typing immediately then with another key combination switch to the application we were

Play a video with VLC in X11 from remote terminal

隐身守侯 提交于 2019-12-03 04:35:28
问题 I've got a problem, I hope you can help me. I've got some slim terminals with Linux where a little script it's launched every time they boot. This script has a single cvlc command line which it's the following: cvlc --quiet --fullscreen --no-osd --loop playlist.xspf This works OK because the terminals start the X11 environment and then the script it's launched from autostart; the video it's played and rendered nicely y an LCD. My problem comes when for a reason or another, I need to kill the

How can I launch an x-window from emacs ess when running R on a server?

狂风中的少年 提交于 2019-12-03 03:45:36
I am using emacs-snapshot with the ssh.el package, following the instructions from the ess manual. There are a few ways to open an R session, but this is how I do it: open emacs C-x C-f /server:dir/file.R this puts me in ESS [S] mode Type 'plot(1)' C-c C-n to run emacs asks for starting directory, and I choose the /server:dir/ I would like for a figure to pop up but it wont. This also doesn't work when using ess-remote in shell or tramp mode, but it does work if I set the starting directory to my local desktop. Any advice much appreciated. My current workaround is to print the file to pdf and

Linux X11 - Global Keyboard Hook

和自甴很熟 提交于 2019-12-03 03:10:28
问题 Is it possible (or how) to create a mechanism (in Linux X11, C++) that works like a global hook in windows (SetWindowsHookEx())? I would like to be able to catch the key event but with the possibility of further propagation . I'm trying to use a XGrabKey solution (like in xbindkeys) but when I set capturing the key event, this event is "consumed". Requirements for this mechanism are the following: Global / system-wide - catching events regardless of the window that has focus The possibility

How can Python access the X11 clipboard?

别说谁变了你拦得住时间么 提交于 2019-12-03 02:55:48
I want my Python script to be able to copy and paste to/from the clipboard via x11 (so that it will work on Linux). Can anyone point me to specific resources I can look at, or the concepts I would have to master? Is this possible to do with the Python X library at http://python-xlib.sourceforge.net ? Cameron Laird I favor a Tkinter-based solution over one which requires pygtk, simply because of the potential the latter has for installation challenges. Given this, my recommendation to Alvin Smith is to read: Tkinter Clipboard Access Cut & Paste Text Between Tkinter Widgets Tkinter-based

Genymotion - /usr/lib64/libX11.so.6: undefined symbol: xcb_wait_for_reply64

穿精又带淫゛_ 提交于 2019-12-03 02:18:58
I installed Genymotion on openSUSE Leap 42.1 and don't have success to execute. I'm getting the following error: genymotion/genymotion: symbol lookup error: /usr/lib64/libX11.so.6: undefined symbol: xcb_wait_for_reply64 I have no idea what may have caused the problem. Anyone else seen this? To solve this problem, navigate to extracted folder (/opt/genymobile/genymotion in my case) and remove the libxcb.so.1 file. In my case i had to remove to files: libxcb.so.1 and libdrm.so.2. I'm using Kali Rolling. In my case, I'm using Debian Stretch, I had to remove from the genymotion directory the

X11/GLX - Fullscreen mode?

白昼怎懂夜的黑 提交于 2019-12-03 02:07:36
I am trying to create a Linux application - a screensaver, in this case - and it is proving remarkably difficult to find information on the simple task of making a window full-screen. Even the code of existing screensavers makes no mention of how they manage it, and I've yet to see any obvious function like XRemoveDecoration() . After much fumbling around, I did manage to create a window that's the same size as the desktop, with this: Window win = DefaultRootWindow(disp); XWindowAttributes getWinAttr; XGetWindowAttributes(disp, win, &getWinAttr); win = XCreateWindow(disp, win, 0, 0, getWinAttr