Giter VIP home page Giter VIP logo

fakexrandr's Introduction

FakeXRandR

This is a counterpart to fakexinerama, but for XRandR. It hooks into libXrandr and replaces a certain, configurable monitor configuration with two virtual monitors, each of half the original's size.

Licensing

You may use, redistribute and modify this program under the terms of the GNU General Public License (GPL) Version 3, in the version available under the URL http://www.gnu.org/licenses/gpl.html#.

Authors

  • Phillip Berndt
  • Geoffrey 'gnif' McRae
  • Gerry Demaret
  • Audrius Butkevicius

Use cases

You'll want to use this library if you have a multi-head setup, but a crappy video driver which tells RandR that there is only one big monitor, resulting in wrong window placement by window managers. Matrox Tripple Head 2 Go et al. are other candidates, where there really is only one big monitor, but you'd want to split it anyway.

With slight modifications, this library is also suited for developers willing to test multi-head behaviour without multiple monitors. Keep in mind that this library right now can not do more than split the monitor vertically in half.

Installation

In most cases, simply run make, then install using make install. This will create a configuration which splits a monitor with the largest possible resolution that xrandr outputs at compile time into two virtual monitors. Pay attention to any warnings/errors from the configure script. To compile the library, you will need the XRandR and X11 development packages for your distribution. To split the monitor into more than two screens, edit the EXTRA_SCREENS variable in the created config.h file.

For Arch Linux, there is a PKGBUILD (git) by Philipp Schmitt.

Manual installation

If you need FakeXRandR for another use case or the automated building does not work for you, here are some details:

The configure script runs xrandr and creates a config.h header with the resolution of the monitor to split, the path to the system's real libXrandr.so file and a path which preceeds that of the real library in the ld search path, where the FakeXRandR should be placed. You can use ldconfig -v to get a list of suitable directories, if configure should fail to determine one.

The libXrandr.c file only contains a initialization function which loads the symbols from the real library and implementations of the functions that we actually override and which require more than replacement of XIDs for fake screens with real the one's. All other functions are automatically generated by make_skeleton.py from the default Xrandr header file.

FAQ

  • How can I see if it's working?
    Run ldd xrandr. libXrandr.so should show up in /usr/local/lib. Then, start xrandr. The screen which is set to the resolution supplied in config.h should show up twice, with the duplicate having an appended ~1 in the end. After you restarted your X11 session, fullscreening applications using Xrandr (e.g. GTK apps) should fullscreen to the virtual screen, not the physical one.
  • Changing settings of the fake screen doesn't have any effect?!
    XRandR is only used to communicate information on the resolution and output settings between X11 server, graphics driver and applications. It is up to the graphics driver to actually apply any settings. Since FakeXRandR only hooks into the X11 โ†” application communication, attempts to change settings for fake screens won't have any effect.
  • My two screens are mirrored. Does this library help?
    No. See the FAQ in the Gist for FakeXinerama (see "See also" section).

To do

  • Make this run-time configurable, allow more than one split, allow horizontal and not-in-half splits

See also

fakexrandr's People

Contributors

audriusbutkevicius avatar gerryd avatar phillipberndt avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.