x11

Find a free X11 display number

廉价感情. 提交于 2020-01-22 17:54:19
问题 I have some unit tests that need an X11 display so I plan to start Xvfb before running them, but to start Xvfb I will need a free display number to connect it to. My best guess is to see what's free in /tmp/.X11-unix but I'm not sure how to handle the race if many tests try to start simultaneously. sshd must do this, does anyone know how? 回答1: With full credit to this answer to the related question How high do X11 display numbers go?: Recent X servers as of version 1.13 ( Xvfb , too) support

Find a free X11 display number

廉价感情. 提交于 2020-01-22 17:54:05
问题 I have some unit tests that need an X11 display so I plan to start Xvfb before running them, but to start Xvfb I will need a free display number to connect it to. My best guess is to see what's free in /tmp/.X11-unix but I'm not sure how to handle the race if many tests try to start simultaneously. sshd must do this, does anyone know how? 回答1: With full credit to this answer to the related question How high do X11 display numbers go?: Recent X servers as of version 1.13 ( Xvfb , too) support

Find the name of the X window manager

╄→尐↘猪︶ㄣ 提交于 2020-01-21 03:45:58
问题 How do I find the name of the running X window window manager from a program? If I start another window manager when one is already running, then an error occurs, so there must be a way for the other window manager to detect the first one. How does it work? 回答1: By the EWMH spec, a compliant window manager will set the _NET_SUPPORTING_WM_CHECK property on the root window to a window ID. If the _NET_SUPPORTING_WM_CHECK property exists and contains the ID of an existing window, then a ICCCM2.0

X11 is not available in R

醉酒当歌 提交于 2020-01-21 02:58:26
问题 Problem I'm following along some code and get an error related to X11. To recreate my error, I ran x11() and got the following: > x11() Error in x11() : X11 is not available I have definitely plotted things in R that loaded the XQuartz program to display. What I tried I did ?x11() and saw that it is from the {grDevices} package. I loaded that library, tried again, but got the same error. I read that X11 is related to XQuartz. I re-installed XQuartz 2.7.8. I have R 3.2.3 and am running OSX El

CMake , GLFW: X11 Included but 'XConvertSelection' Not Found

旧巷老猫 提交于 2020-01-17 03:51:06
问题 Ubuntu 14.04 , GLFW 3.2.1 , OpenGL 4.5.0 NVIDIA 367.57 I am trying to build the "Hello Triangle" OpenGL Example found at http://antongerdelan.net/opengl/hellotriangle.html but I am running into trouble. I downloaded the GLFW source and built out-of-source and installed with no extra flags or options. Below is the src/CMakeLists.txt file for Hello Triangle that is assembled from both the GLFW and from SO answers. After wrestling with linking order for a bit, the build process only gives me one

X11 - XChangeProperty _NET_WM_ICON

我的梦境 提交于 2020-01-17 02:30:08
问题 I load an image, and then turn it to ARGB data. I use XChangeProperty , instead of making data be unsigned_char i made it long , when i copy paste and run this code from firefox scratchpad, environment > browser, i get a value of 1 for XChangeProperty meaning success, but the icon didn't change. I tested it on Mint 17.1 Cinnamon, and Ubuntu 14.04 with default window manager and also icewm. Is there anything wrong with this code? Does XChangeProperty not work on cinammon and ubuntu? Thanks

[GUI] Linux中的图形管理

你说的曾经没有我的故事 提交于 2020-01-16 10:01:55
做了一段时间linux下与QT事件相关的工作,经常会遇到X11,总是苦于无法完全理解其与linux以及QT事件之间的关系,所以用两篇文章来简单总结下linux中的图形管理和QT事件与X11的关系。 <1> linux 中的图形管理 <2> QT 事件与 X11 的关系 我们先来几个基础概念,相关概念的起源和发展可以百度或谷歌查看。 X11 X11(X Window System Protocol,Version 11),也称X Window,是一种在*nix系统的位图显示视窗系统,为GUI环境构建提供基本的框架,可以在屏幕上绘图、移动窗口、鼠标和键盘操作等,仅为X server和X client之间提供通信协议。X server是xfree86/xorg驱动下的显示设备、鼠标、键盘等外设的统称,X client通过X11协议和xfree86/xorg实现的X server通信,比如X client告诉X server画一个左上角坐标为(x, y)、宽为w、高为h的窗口,xfree86就点亮显示器的一些像素点,绘制一个请求的窗口。 X client的实现用 Xlib 来封装,其头文件一般位于 /usr/include/X11/ 下。 XFree86 一个实现X server的免费服务器软件。 Gnome Gnome(GNU Network Object Model

Swap Buffers and Clear Back using windowing system (GLX)

我只是一个虾纸丫 提交于 2020-01-16 01:55:28
问题 When swapping between back and front buffers the content in the back buffer becomes undefined. I´d like to define it using the "windowing system", such as GLX, EGL, WGL. Using "native" renderer such as OpenGL (glClear) is my backup plan, don´t bother mentioning it. The reason it is backup is because I don´t want to mess with native rendering contexts. I´ll stick to X/GLX for this question but if you feel inclined to describe how to do it in other Environments then go ahead. From the Xlib

Create hidden, non visible window in X?

拈花ヽ惹草 提交于 2020-01-15 04:24:27
问题 Is it possible in X to create a window that is not visible? I looked at the XCreateSimpleWindow API but did not find any attributes to make it hidden. Is there a way? Thanks 回答1: You may be looking for an InputOnly window. You can specify the class as InputOnly when using XCreateWindow. 来源: https://stackoverflow.com/questions/7856768/create-hidden-non-visible-window-in-x

Fonts in a multi-platform environment

江枫思渺然 提交于 2020-01-15 04:11:25
问题 What is the best way to deal with fonts in a multi-platform distributed system? If I want to use a common font across all systems to show to the user, what's the best way to do this. From the little I've been reading each platform looks to have fonts that are of the same family (ie serif, sans-serif) but with different names. CSS looks to have the functionality baked in where it will make the best selection it can of font on the users machine. Is there similar functionality either in system