Client Implementation of Hotkey Display Device Switch

This work has been integrated to build 101.

Downloads

Download the binary, unzip it, and change the permission to 755. Either simply run the binary (possibly with options) in  background, or copy it to /usr/X11/bin/dispswitch,  add the path to gnome's preferece->Session, and restart gnome.

(1) Usage: dispswtch [options]

   where options are:

  • -display <display> or -d <display>
  • -key <keysym> or -k <keysym>
  • -mod <modifier> or -m <modifier>
  • -help
  • -nosideview
  • -verbose or -v
  • -testrun

The default hotkey (without -key and -mod options) is 'Shift + F5'. -key <keysym> -mod <modifier> will let you define your hotkey:  
 <keysym> is any keysym defined in /usr/X11/include/keysymdef.h, with prefix XK_ removed, such as F5, F8, Escape.             
 <modifier> is any or combination of modifiers on your system. You can run /usr/X11/bin/xmodmap to find all available modifiers on your system.  They can be none, shift, control, mod1, mod3, mod4, mod5, any.   Examples:

    o -key Escape -mod shift  defines the hotkey to be 'shift + Esc'
    o -key F2 -mod "shift+control" defines the hotkey to be 'shift + control + F2'
  • -nosideview option skips side-by-side states in two devices rotating.
  • -testrun option lets you switch repeatedly without hotkey strokes
  • -verbose or -v option prints debug messages

(2) Features

The tool lets you rotate on/off of display devices for up to 3 devices. Side-by-side view is included when two devices are connected.

When only one device is turned on, either the resolution before switching or the highest resolution of the monitor will be used for display. When 2 devices are turned on, the largest common resolution is used.

If a key stroke is hit 5 seconds or longer after the previous hit, display devices are re-probed so that any changes such as adding or removing devices,  can be detected and adapted to.

(3) Notes

It works with all drivers that support RandR1.2, including ati, nv 2D (G80 chipsets or above), intel , etc, but not nvidia 3D.

If you add a new display device whose resolution is larger that the one you started X server with, or you get into a twin view state that needs a larger resolution to cover both screens, you need to allocate a larger virtual screen size during X server startup. You can do it by adding the attached xorg.conf file to /etc/X11 (and changing the "Driver" name accordingly).

last modified by admin on 2009/10/26 12:28
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.