Results 1 to 10 of 49

Thread: How to Xephyr ~ AKA Multiple, nested X sessions

Threaded View

  1. #1
    Join Date
    Apr 2006
    Kubuntu Development Release

    Thumbs down How to Xephyr ~ AKA Multiple, nested X sessions

    How to Xephyr

    Click to enlarge

    What is Xephyr ?

    Xephyr is a X server that runs as a small window within your current X session.

    What is it good for ?

    There are multiple potential uses for Xephyr:
    • Development. You can ssh into a chroot and forward X sessions.
    • Forward X over ssh without VNC.

    Example: Normally if you ssh -X you can forward x applications. This is not a problem if you are forwarding a single application from a single server. But if you forward multiple applications from multiple servers or a whole desktop, it gets messy (to say the least). You can start a new X session ( Virtual X ), but then you have to Ctl-Al-F7 and Ctrl-Alt-F8 between them.

    1. Install Xephyr

    sudo apt-get install xserver-xephyr
    2. Start Xephyr

    Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 &
    • The ":1" = your display (displays are numbered starting with 0)
    • -ac = disable access control restrictions= allow you to forward X
    • -screen 1280x1024 = screen size
    • -br = black background
    • -reset -terminate= Xephyr should automatically close when the last X client is killed, does not always work.
    • 2> /dev/null redirects error messages.

    3. Set your display (for X)

    • Don't forget to set it back after you establish a ssh connection ( DISPLAY=0.0 )


    4. Forward single apps / separate window for each server.

    Start Xephyr

    Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :1 &
    Change your $Display

    Forward a xterm:

    ssh -XfC -c blowfish user@server xterm
    • -X = forward X
    • -f = puts your ssh session into the background
    • -C = use compression -c blowfish = use blowfish (I am told this is the fastest)

    Click to enlarge

    Any X apps for that server will start in that window.


    5. Desktop:

    Start Xephyr

    Xephyr -ac -screen 1280x1024 -br -reset -terminate 2> /dev/null :2 &
    2. ssh into the chroot/server

    ssh -XfC -c blowfish user@server xfce4-session
    • Substitute your window manager for "xfce4-session"



    Last edited by bodhi.zazen; November 24th, 2007 at 06:13 AM. Reason: Added re-direct for error messages
    There are two mistakes one can make along the road to truth...not going all the way, and not starting.
    --Prince Gautama Siddharta

    #ubuntuforums web interface


Posting Permissions

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