Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

HOWTO: Have another X session in a window

Share your HowTo, Documentation, Tips and Tricks. Not for support questions!.
Post Reply
Message
Author
ajdlinux
Posts: 2452
Joined: 2006-04-23 09:37
Location: Port Macquarie, NSW, Australia

HOWTO: Have another X session in a window

#1 Post by ajdlinux »

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:

#!/bin/bash
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.

andrew

anaximander
Posts: 13
Joined: 2006-04-23 13:02

#2 Post by anaximander »

You could do something like this to allow more than one nested X session:

Code: Select all

#! /bin/bash
disp=${1:?Display?}
host=${2:?Host?}
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.

Post Reply