xpra icon
Bug tracker and wiki

Version 5 (modified by Antoine Martin, 6 years ago) (diff)

--

Xdummy


[[Image(...)]] About

Xdummy was originally developed by Karl Runge to allow a standard X11 server to be used by non-root users with the dummy video driver "xf86-video-dummy". The problem with that approach is that it is a hack using LD_SO_PRELOAD tricks to fool the X11 server process, and therefore not suitable for deployment in many environments.


In the context of Xpra, Xdummy allows us to use a better, more up to date X11 display server, one that supports more extensions, especially the RandR and GL extensions (it may also be faster for some X11 operations - though not all, see Xvfb-vs-Xorg-x11perf.txt). For many display bugs (ie: #1, #2) this is the only workable solution: it allows Xpra to resize the virtual display to match the client's resolution so as to prevent windows and menus from overflowing beyond the edge of the screen. (see also fake Xinerama)

[[Image(...)]] Status

Versions Required

Most recent distributions now ship compatible packages though some may have issues with non world-readable binaries (see below), for those that ship outdated versions there are two changes to core Xorg code which are needed:

If your distribution ships older versions of those packages, you may want to try one of our patched binary packages (no warranties given or implied)

non-suid binary

If you distribution ships the newer version but only installs a suid Xorg binary, Xpra should have installed the xpra_Xdummy wrapper script and configured xpra.conf to use it instead of the regular Xorg binary. This script takes care of copying the Xorg binary to a non-suid executable before running it. Note: in some cases, you may need to make the Xorg executable world-readable so that the wrapper can make the non-suid copy when needed:

sudo chmod +r /usr/bin/Xorg

[[Image(...)]] Usage

Xdummy standlone

With this new xserver, you can start a new display using the dummy driver without needing any special privileges whilst still specifying your own log and config files:

Xorg -noreset +extension GLX +extension RANDR +extension RENDER -logfile ./10.log -config ./xorg.conf :10

You can find a sample configuration file for dummy here: xorg.conf. (It contains many of the most common resolutions you are likely to need, including those found on phones and tablets. However if your client uses unusual resolutions, for instance multiple screens of differing sizes, you may want to add new Modelines to match your specific resolution)

Xdummy with Xpra

With Xpra, this should all have been configured automatically for you by your package manager (whenever possible..). You can specify this virtual framebuffer alternative using the --xvfb switch:

xpra --xvfb="Xorg -dpi 96 -noreset -nolisten tcp \
			+extension GLX +extension RANDR +extension RENDER \
			-logfile ${HOME}/.xpra/Xvfb-10.log -config ${HOME}/xorg.conf" \
			start :10

or more simply by setting the xvfb option in your /etc/xpra/xpra.conf:

xvfb=Xorg -dpi 96 -noreset -nolisten tcp \
			+extension GLX +extension RANDR +extension RENDER \
			-logfile ${HOME}/.xpra/Xvfb-10.log -config ${HOME}/xorg.conf

(the -noreset option is only needed if the window manager is not the first application started on the display, for example if you use the --start-child= option, or if you want the display to survive once the window manager exits - generally, this is a good idea since xpra could crash and when it exits cleanly via "xpra stop" it takes care of shutting down the X11 server anyway)

Attachments (1)

Download all attachments as: .zip