switchscreen

Current version: 0.1.1


General info

switchscreen is a command-line utility that moves the X mouse cursor to a given point on a given screen. I wrote it because I could find no other program that can define both the mouse position and screen number.

switchscreen allows one to make a dualhead system behave as two completely separate desktops, which still share the mouse and keyboard. As opposed to moving from one desktop to another by moving the mouse over the edge of the screen, a hotkey can be defined which uses switchscreen to toggle the screen. This allows using a pager along with a dualhead setup.

switchscreen is distributed under the GNU General Public License.


Configuration

The following steps are necessary to make a dualhead X system function as two separate desktops (XFree86 system assumed, X.Org untested):

  1. Configure your X server for dualhead support without Xinerama.

  2. Define in the ServerLayout section the second screen's position to be farther away than the first screen's width. For example, if your first screen has a resolution of 1600x1200, you might define

          Screen "Default Screen"         # 1600x1200
          Screen "Secondary Screen" Relative "Default Screen" 1700 0

    This stops the mouse cursor from moving from the edge of the first screen to the second screen.

  3. Configure your startup scripts to start a window manager on both screens (normally screens :0.0 and :0.1).

    Note that some window managers and/or desktops may have problems running two sessions for the same user at the same time. Sawfish+GNOME seems to work out-of-the-box as long as both screens have the same configuration options.

  4. Configure both window managers to run the script togglescreen.sh (included in the package) when you hit some hotkey, e.g. alt-tab. The script toggles the mouse cursor between screens 0 and 1, while remembering the position where the cursor previously was.


Download

NOTE: Version 0.1.1 includes a patch from Javeed Shaikh which should fix a window focusing problem. I have not tested the new version, and suggest you test which version works better for you.

Source:
switchscreen-0.1.1.tar.gz (10 kB)
switchscreen-0.1.0.tar.gz (10 kB)


Contact

You can contact me at . All feedback is appreciated.

Valid XHTML 1.0! Valid CSS!