-   Linux - Desktop (
-   -   Is it possible to run two Desktops at the same time? (

catkin 08-22-2009 09:15 AM

Is it possible to run two Desktops at the same time?
Hello :)

I would like to have both Gnome and Xfce Desktops running at the same time. This would allow running the proven production environment (Gnome) while setting up and experimenting with Xfce.

Is it possible to run both at the same time?

Linux provides multiple virtual terminals accessed via Ctrl+Alt+F[1-7] with the graphical session on number 7. Perhaps X and gdm (or whatever) can be configured to run a graphical session on number 6 as well as number 7.



ThinkFree 08-22-2009 09:18 AM

Yes, possible. But don't know how :p

bathory 08-22-2009 09:21 AM

Just run:

startx -- :1

jschiwal 08-22-2009 09:28 AM

There are multi-seat setups where one desktop is used for 4 or 5 seats.

If you mean that you want to press [CTRL]-[ALT]-F8 to switch to another desktop, you can select "switch user" from the desktop. You could also run from a vt: "xinit -- :1.0" to bring up another X screen with (the default) xterm running. From there you can start a window manager or desktop environment. Pressing [CTRL]-[ALT]-[F7] brings you back to your original desktop environment. If you have a dual-head video card, you could use "xinit -- :0.1" instead. However, for an independent display and different desktop, you would need 2 keyboards & mice as well. This would be a two seat setup.

GrapefruiTgirl 08-22-2009 09:32 AM

You might find these links interesting, *if* this describes the situation you want.


catkin 08-22-2009 11:00 AM

Wow! Thanks all :) So many responses and so quickly! Thanks jschiwal for the detailed suggestions.

Multi-seat is very interesting but not what I'm looking for right now -- which is hot-key switching to another Desktop (I need to learn to ask clear questions!).

First choice was "Switch User". It gave a graphical login screen and ps -ef showed

root    17261 17257  1 20:38 tty8    00:00:00 /usr/bin/X :20 -br -audit 0 -auth /var/lib/gdm/:20.Xauth -nolisten tcp vt8
I selected an Xfce session and entered username-and-password. On pressing Enter, the graphical screen disappeared and tty7 re-appeared. ps did not show anything on tty8. Log files last updated were Xorg.20.log acpid Xorg.0.log syslog daemon.log. Most relevant (?) messages not from the X logs but duplicated in the others:

Aug 22 20:40:41 CW8 gdm[7591]: DEBUG: Got XPID == 0
Aug 22 20:40:42 CW8 gdm[17257]: DEBUG: ConsoleKit: Unlocking session for c on :0
Aug 22 20:40:42 CW8 gdm[17257]: DEBUG: ConsoleKit: session /org/freedesktop/ConsoleKit/Session2 has DISPLAY :0
Aug 22 20:40:42 CW8 gdm[17257]: DEBUG: ConsoleKit: Unlocking session /org/freedesktop/ConsoleKit/Session2
Aug 22 20:40:42 CW8 gdm[17257]: DEBUG: Attempting to parse key string: debug/Enable=false
Aug 22 20:40:42 CW8 gdm[17257]: DEBUG: Sending MIGRATE == <secret> for slave 17257
Aug 22 20:40:42 CW8 gdm[7591]: DEBUG: Attempting to parse key string: debug/Enable=false
Aug 22 20:40:42 CW8 gdm[7591]: DEBUG: Handling message: 'MIGRATE 17257 :0'
Aug 22 20:40:42 CW8 gdm[7591]: DEBUG: Got MIGRATE :0
Aug 22 20:40:42 CW8 gdm[17257]: DEBUG: gdm_slave_quick_exit: Will kill everything from the display

Second choice was logging on at tty6 and running

xinit -- :1.0 &
ps -ef showed

root    17877 17876  1 20:53 tty8    00:00:00 X :1.0
tty8 showed an X screen with xterm. Running startxfce4 from the xterm started Xfce Desktop. Yay!

That's "good enough" for present purposes except that the cursor is permanently "busy" -- that's the whirly thing. Any ideas?

It would be nice to streamline the process and make it more robust, especially "nohup" didn't work so closing the xterm or logging out on tty6 both kill the Xfce Desktop. Starting Xfce directly on display :1.0 rather than xterm and thence startxfce4 would be nice ...

Thanks again,


jschiwal 08-23-2009 10:56 PM

I use SuSE which supports installing and using different desktops. If I select "switch user" from the log out popup, I can start another desktop on vt/8. Pressing [CTRL]-[ALT]-F7 brings me back to the first desktop. I've also used the second method, ssh'ing into my desktop and starting xfce4 (lighter weight for an ssh session).

You can also have a desktop session running in a window. It used to be called Xnest, but I don't remember the details now. If you are behind a nat router and are the only user on your network, you can enable xdmcp. Enabling it in your desktop manager config file ( e.g. kdmrc) and opening port 277 will allow you to log into any computer on your network (that has it enabled as well) and use it as if it were local. This is similar to ssh -X without the overhead ( and the security ).

catkin 08-24-2009 01:51 AM

Thanks again jschiwal :)

The need is all on the local machine so no need for the networked solutions. "Switch User" ought to work and would be tidiest but it's not important enough to troubleshoot; I only want to do this while migrating between Desktops.



mushroomboy 08-24-2009 09:02 AM

There is another way to run 2 different desktops/WMs I do that a lot, it makes gimp more manageable.

aus9 08-24-2009 10:08 AM


I am a pussy cat so rather than set up another X...I do all my testing in virtualbox

86bender 08-10-2010 04:45 AM

Hi! I have recently found new soft for making 8 work station by using 1 PC. Does any body check this out.It is available here Can you recommend another soft like this (cheaper or free:))))

GrapefruiTgirl 08-10-2010 05:17 AM

Check out this page:

There's some interesting reading there, and on some links connected from that page, such as "Userful" multi-seat. The link's at the bottom of the page in the 'External Links' section.

Unfortunately, it doesn't look like any of the multi-seat solutions are free of $$$ to get a working version for more than 2 seats.

johnsfine 08-10-2010 06:16 AM

Do you want Windows multi-seat or Linux multi-seat?

You don't need a commercial product for Linux multi-seat. Linux is inherently a multi user OS. You can easily run separate desktops on separate monitors. I don't think there is any significant extra complication to having them logged in as different users. There is only a little extra complication to having them use separate keyboards and mouses.

There have been a few threads here at LQ discussing the details. IIRC, one inconvenience is that Linux isn't consistent on boot up in assigning identities to multiple USB input devices. So on reboot the association of input devices to monitors might be scrambled and need to be manually sorted out.

Eight seats is a bit questionable. Simple reasonably priced extra hardware would let you connect eight pairs of USB input devices to one PC. But eight monitors is beyond what you could connect to an ordinary PC with ordinary extra video cards (typically two monitors per card).

jheengut 08-10-2010 11:42 AM

Hi, I wanted to express that I didn't find anyone giving catkin a good solution.

Well, I can do what catkin asked with kdm. I first start a new session with kdm(as root or init 4), then lock this session and start another new session. Up to six sessions can be accessed with C^ + M^ (F7 - F12).

gdm can start new sessions as well but I don't how (I could never do it).

I'm a slacker so this conf is easy but I'm not so sure with other Flavours doing it well , especially Ubuntu and other `easy` linux desktop as their console is started at 80x15. Its preferable to use X in vesa mode (to start with at first) not the accelerated video driver, its more stable and the switch won't produce glitchers.

i92guboj 08-11-2010 05:39 AM

The graphical login managers should provide a way to launch multiple desktops and select which kind of desktop (session) you want to run on the current login.

I don't use graphical login managers, so can't comment on the methodology. I just use custom scripts to launch whatever desktop I want at a given moment. The behaviour of the startx script is controlled usually via the ~/.xinitrc file, so you can just modify it to start whatever desktop you want. But doing that each time you use "startx -- :<display:number>" is not the most convenient way. So, what I do is the following.

I have a ~/bin/ directory which is in my path, so I copy /usr/bin/startx there, then I modify it as follows:


--- /usr/bin/startx    2010-08-03 01:53:07.143999999 +0200
+++ bin/      2010-08-11 12:34:23.638999994 +0200
@@ -14,8 +14,26 @@
+if [ "$(basename $0)" == "" ]; then
+      echo "Usage instructions:"
+      echo
+      echo "This script is not meant to be run directly. To use this"
+      echo "script, create a symlink to it, with a given <name>, then"
+      echo "create an xinitrc file with the same exact name under"
+      echo "$HOME/.config/xinitrc/"
+      echo
+      echo "That file will be used at the initrc file for that symlink"
+      echo "which allows you to launch as many different wm's as you"
+      echo "want by just creating a symlink and an xinitrc for each"
+      echo "one, then just launch the wanted wm using your link."
+      echo
+      echo "This is just a modification of the vanilla startx script"
+      echo "that Gentoo ships."
+      echo
+      exit 0
+userclientrc=$HOME/.config/xinitrc/$(basename $0)

The script should be self-explanative. The basic thing is, you put the modified startx in some path that's in the directory, it can be called anything, I name it ~/bin/, then I just cd into ~/bin and make a symlink to that file, for example:


cd ~/bin
ln -s openbox_



cd ~
mkdir -p .config/xinitrc/

Now, you just create an xinitrc file for openbox by putting this inside ~/.config/xinitrc/openbox_


exec openbox
You can easily create custom xinitrc files to start many wm's without any problem, then you just call:


openbox_ -- :0.1
Or whatever. You only need to create a symlink and an xinitrc file for each wm or desktop you want to run, and that's it. This is very flexible, as I can as well have another script with custom commands/programs I want to run on all the desktops I use, and then just use "source" to "include" then into whatever xinitrc file I want.

All times are GMT -5. The time now is 07:32 AM.