What is Xinerama?
Xinerama is an extension to the X Window System that enables X applications and window managers to use two or more physical displays as one large virtual display.
It allows to specify the screen layout that X11 client application will see.
For more information see Xinerama (wikipedia)
Fake xinerama allows us to tell X11 client applications running on the xpra server that the display is in fact made of multiple screens whose geometry can be made to match that of the client exactly, despite the fact that the virtual display that we start (usually Xdummy) only has one virtual screen defined.
It is shared library that we preload into each child application that we start, so that it will use our fake version instead of the standard Xinerama library supplied with the system.
In order to support multiple virtual screens under the same user, the original code was modified to lookup its configuration file as
.$DISPLAY-fakexinerama instead of just
.fakexinerama, though it will use the latter as fallback.
We also build it under a different name to prevent conflicting with the real
Xpra version 0.12 onwards will try to find this library at runtime in the usual library paths (
LD_LIBRARY_PATH followed by
So that's where you should place it.
We do provide binary
RPMs for various distributions based on this spec file: libfakeXinerama.spec
Xpra will automatically generate this file when a new client connects.
Any application started from within the context of an xpra "
start-child" process will inherit the preload environment variable and should "just work".
To use it without Xpra, simply run:
LD_PRELOAD trick only tells the application how to query for Xinerama screen information, it does not and cannot tell the application when it should refresh this data. Unfortunately, this means that many applications will only query this data once and cache the results.
Xpra solves this by always re-setting the display dimensions using RandR, which is usually enough to make the application re-query Xinerama, but not always.
If you have SELinux enabled, you may need to relabel the library after installation (but packaged versions ought to have taken care of that for you already):
/sbin/restorecon -v /usr/lib64/libfakeXinerama.so*
Configuration File Format
.$DISPLAY-fakexinerama is a simple text file using the following format:
\n" is the end of line character
- use "
#" at the beginning of a line for comments
- the first line that is not a comment MUST contain the number of screens defined in the file
- the number of screens MUST be a valid positive number between 1 and 10
- each of the following lines that are not comments MUST define each of the screens
- all screens MUST be defined
- each screen MUST consist of four numeric values separated by a single space: x y w h, this defines the area of the display that belongs to the given screen
Here is an example configuration file for a two screen setup:
# 2 monitors: 2 # DISPLAY1 0 0 1600 900 # DISPLAY2 1600 0 1600 900