Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old November 22nd, 2007   #1
bodhi.zazen
Ubuntu Guru
 
bodhi.zazen's Avatar
 
Join Date: Apr 2006
Location: Montana
My beans are hidden!
Xubuntu Karmic Koala (testing)
Send a message via Yahoo to bodhi.zazen
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

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

Code:
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)

Code:
DISPLAY=:1.0
  • 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

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

Code:
DISPLAY=:1.0
Forward a xterm:

Code:
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

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

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


=========================


Enjoy,

bodhi.zazen
__________________
A person with ubuntu is open and available to others, affirming of others, does not feel threatened that others are able and good, for he or she has a proper self-assurance that comes from knowing that he or she belongs in a greater whole and is diminished when others are humiliated or diminished, when others are tortured or oppressed. ~ Archbishop Desmond Tutu, 1999


Last edited by bodhi.zazen; November 24th, 2007 at 01:13 AM.. Reason: Added re-direct for error messages
bodhi.zazen is online now   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:19 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry