I just tried this on
Fedora 10, and it worked there so I could have a KDE session on tty7 and a GNOME session on tty8 for me (i.e., a single user).
First, I looked at
/etc/X11/Xclients to see how the
startx command decided which type of session to start.
Seeing that, on Fedora, it read
/etc/sysconfig/desktop to set the $SESSION variable, I changed that file to look like this (well, sort of - this was my default):
Code:
$ cat /etc/sysconfig/desktop
#!/bin/bash
DISPLAYMANAGER=KDE
DESKTOP=KDE
#DESKTOP=GNOME
Then I edited the file to comment out the
DESKTOP=KDE and uncomment the GNOME one.
Finally, I did a
startx -- :1 to start a new X session on tty8.
Voila! One KDE session, one GNOME session with a <ctrl>-<alt>-<F[78]> to switch between them.
(By the way, KDE has a "Switch User" menu item that did this in KDE 3.5, but it does not work (on Fedora) under KDE 4.1.)
Since I find it sometimes useful to have both types of sessions open, I think I'll write a script to "automate" the editing of the
desktop file. (Probably just a simple
sudo mv from a KDE and GNOME version.)
Note: A simple
startx -- :1 opens (again, on Fedora 10) a simple
xterm window with no decorations, etc. Similar, I believe, to what the OP was discussing.
<edit>
If you have two monitors, the
startx syntax would be, I believe,
startx -- 1:0 for the first screen on the second monitor. It might be
-- 1:1 to get
tty8 to connect to the second screen. Since I have only one monitor, I can't check the syntax for different
tty's on different screens. What I described before this edit was different screens on the same monitor.
</edit>