xserver

How does GUI output work from application to hardware level?

女生的网名这么多〃 提交于 2019-11-30 06:57:09
I am getting into GUI programming and did some research. Now not everything is clear to me. If I would use GTK+ as toolkit, how does it communicate with the graphics card? On a Linux system I suppose it would be GTK --> X Server --(OpenGL)--> graphics card. Is this right? I read that some GUIs directly draw OpenGL (e.g. Blender3D), so how do other apps draw their GUIs? If the only APIs (that i know of) for graphics cards is Direct3D and OpenGL, what is the distinction between software rendering and hardware acceleration? Can software that does "software rendering" directly write to the

How to change the Monitor brightness on Linux?

会有一股神秘感。 提交于 2019-11-29 22:24:31
How do I programmatically change the monitor brightness on Linux? I'm using SLES 11. christof You can always use xrandr --output LVDS1 --brightness 0.9 You can try using xbacklight. xbacklight -set 100 artemis_clyde For me it works perfectly with xbacklight . If you for example wish to set up a key binding, you can use bindsym $SUPER+Shift+plus exec xbacklight -inc 10 bindsym $SUPER+Shift+minus exec xbacklight -dec 10 in your window managers config (I use i3) to regulate your screen's brightness level. I wouldn't recommend xrandr for this since it doesn't stop at 100% brightness automatically.

How to check if X server is running?

五迷三道 提交于 2019-11-29 22:04:23
Is there any way to find out if the current session user is running an Xserver (under Linux) ? I'v started off with things like: ps -e | grep X but this doesn't work always and one more thing I tried is checking the $DISPLAY variable Are there any other ways to check this? EDIT: Some people suggested using the $DISPLAY variables but what if the user fiddles with this variable ? what if he tries to do something and changes this variable and then when I check it, it no longer reflects an accurate state of the system. Is there no specific way to do this that will always return a correct answer ?

How to get the list of open windows from xserver

泄露秘密 提交于 2019-11-27 18:08:06
Anyone got an idea how to get from an Xserver the list of all open windows? From the CLI you can use xwininfo -tree -root If you need to do this within your own code then you need to use the XQueryTree function from the Xlib library. You can also take a look at the _NET_CLIENT_LIST value of the root window. This is set by most modern window managers: xprop -root|grep ^_NET_CLIENT_LIST That value can easily be obtained programmatically, see your Xlib documentation! 来源: https://stackoverflow.com/questions/252906/how-to-get-the-list-of-open-windows-from-xserver

How to get the list of open windows from xserver

北城以北 提交于 2019-11-26 19:18:10
问题 Anyone got an idea how to get from an Xserver the list of all open windows? 回答1: From the CLI you can use xwininfo -tree -root If you need to do this within your own code then you need to use the XQueryTree function from the Xlib library. 回答2: You can also take a look at the _NET_CLIENT_LIST value of the root window. This is set by most modern window managers: xprop -root|grep ^_NET_CLIENT_LIST That value can easily be obtained programmatically, see your Xlib documentation! 来源: https:/

wkhtmltopdf: cannot connect to X server

心不动则不痛 提交于 2019-11-26 04:05:37
问题 I have been using wkthmltopdf to convert html to pdf documents on-the-fly on my linux web server. The program originally needed X11 or similar X server to run correctly, but through many requests by developers to have this run on servers without GUI, I am pretty sure it runs a virtual X server in the static version. I have been using the static (stand-alone) version of the program and it works great! I would put the executable file in a folder, and run: ./wkhtmltopdf file1.html file2.pdf