HOWTO: Have another X session in a window

Share your own howto's etc. Not for support questions!

HOWTO: Have another X session in a window

Postby ajdlinux » 2006-04-27 01:52

GNOME 2.14 has this feature already, it's in the Desktop menu.

KDE 3.5 has a feature to start another X session (though not in a window) as well, choose Start New Session under Switch User in the K menu.

OK. Make sure you have the xnest package installed before you start,

Create a script called 'start-new-session' or whatever you want to call it. Open it with an editor and put in:

Xnest :1 & DISPLAY=:1 startkde (NOTE: swap startkde for whatever DE you want)

Run chmod 755 on it. Run the script.

Limitations: you can only run one of these sessions at a time because it always uses display 1. If anyone has a patch for this please tell me. Also I have had some trouble getting it to work using su or sudo.

Posts: 2480
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

Postby anaximander » 2006-04-27 12:58

You could do something like this to allow more than one nested X session:
Code: Select all
#! /bin/bash
Xnest :$disp -query $host -geometry 1024x704 -name $host -kb &

Then just invoke it as start-new-session 2 hostname , etc. Could also parameterize the geometry in the same way.
Posts: 13
Joined: 2006-04-23 13:02

Return to Docs, Howtos, Tips & Tricks

Who is online

Users browsing this forum: No registered users and 10 guests