Results 1 to 10 of 18

Thread: Xswitch - a script to easily run applications in another xserver

Threaded View

  1. #1
    Join Date
    Feb 2006
    Beans
    143

    Xswitch - easily run applications in another xserver

    This script tries to make it as easy as possible to run applications in another xserver - just add "xswitch" before a program's name - up to eleven at a time - and it will be automatically started in a new xserver. Plus, when the program exits you won't be stranded in the grey void of an empty xserver - you'll be prompted as to how to get back to your original desktop.

    It also has the ability to shut down the old xserver after starting the new, making it useful for setting up minimal gaming desktops. For example, the command
    Code:
    xswitch -s gnome-terminal metacity nautilus
    starts up a terminal, window manager and file-manager and then, because of the -s flag, shuts down the original xserver.

    You can also run more then two xservers - the "-d" flag to specifies which display they are started on. "1" is the first display after you current desktop (tty 7), "2" the second and so on.

    To install, grab the script, download it to your home directory, and enter the following command in a terminal:

    Code:
    sudo tar -xvvzf xswitch_0.9.tar.gz -C /usr/bin/
    You'll also need to have zenity installed, so if you haven't,
    Code:
    sudo apt-get install zenity
    A word of thanks - credit for this goes to cogadh, as this script is largely an automated version of his discoveries in this thread .

    ############
    # Other stuff #
    ############

    If you use a program with either spaces in the name or command line arguments, surround it in quotes, like this -
    Code:
    xswitch "winefix -d 1 /home/jack/.wine/drive_c/Program Files/df_suba/dwarfort.exe" metacity
    If a program is using the one after it as a command line argument, add two quotes ( "" ) between them.

    When the script is first started, unless you've run multiple xservers before, the first thing you'll see is this:



    Answer yes and the script will change a line in /etc/X11/Xwrapper.config that allows xservers to be started without root permissions, and then immediately changes it back after a xserver is launched. If you never want to be bothered by it again, though, just edit the file yourself and change the line "allowed_users=console" to "allowed_users=anybody".
    If you answer no, you will still be able to launch xservers - just as root. The other method is recommend.

    Let me know if there are any bugs or problems.

    Full command line options:
    [CODE]-c Specify a custom xorg.conf to use with new xservers.
    -d Specify the tty used to display the new xserver.
    -s Set to stop the display manager after a new xserver
    is executed. Supports both GDM and KDM.
    -u Display this usage message.

    #############
    # Useful apps #
    #############

    If you experience screen flickering or would like to move windows around, add a window manager:
    metacity
    xfwm4

    If you'd like to bring theme settings along:
    gnome-settings-daemon
    xfce-mcs-manager

    Light file managers:
    thunar
    pcmanfm

    Screens:
    1) Geany and Metacity - Oh, the wild abandon!
    2) Compiz, terminal, and a random Wine app.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by deadlydeathcone; June 15th, 2008 at 04:49 AM. Reason: New version 0.9

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •