= [[Image(http://xpra.org/icons/X11.png)]] Fake Xinerama = {{{#!div class="box" == 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.'' In the context of xpra, it is the library that client applications running on the xpra server may use to inquire about the layout of the display in multiple screen configurations. For more information see [http://en.wikipedia.org/wiki/Xinerama Xinerama] (wikipedia) }}} {{{#!div class="box" == Fake? == 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 [/wiki/Xdummy 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. }}} {{{#!div class="box" == Source Code == Since the upstream version no longer seems to exist, we carry the source code here: [/browser/xpra/trunk/src/fakexinerama src/fakexinerama]. 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 {{{libXinerama}}} library. }}} {{{#!div class="box" == Installation == Xpra version 0.12 onwards will try to find this library at runtime in the usual library paths ({{{LD_LIBRARY_PATH}}} followed by {{{/usr/lib[64]}}}). So that's where you should place it. We do provide binary {{{RPM}}}s for various distributions based on this spec file: [/browser/xpra/trunk/src/fakexinerama/libfakeXinerama.spec libfakeXinerama.spec] }}} {{{#!div class="box" == Usage == 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=/path/to/libfakeXinerama.so.1 your-x11-client-application }}} }}} {{{#!div class="box" == Caveats == The {{{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 [http://en.wikipedia.org/wiki/RandR RandR], which is usually enough to make the application re-query Xinerama. }}} {{{#!div class="box" == Configuration File Format == The {{{.$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 [[BR]] Here is an example configuration file for a two screen setup: {{{ # 2 monitors: 2 # DISPLAY1 0 0 1600 900 # DISPLAY2 1600 0 1600 900 }}} }}}