Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let's say I have a Firefox window downloading a big file that will take a lot of time. Now that it's running halfway and I want to switch to another DE (for example from GNOME to KDE), can I do that without interrupting the download?

EDIT: I'm not using GDM or KDM or any desktop manager, which may make the situation more difficult...

share|improve this question
up vote 8 down vote accepted

You have to leave the original X server running. You can start another X server on another tty. So, on a typical system, do ctrl+alt+f1, then log in and run startx -- :1. You should end up with another X session on reachable by ctrl+alt+f8.

Any number of X servers can be started by changing the number after the colon; if you use a number larger than 12, you can use chvt to change to it instead of the key combo.

If you want, you can setup special .xinitrc files that start different desktop environments. So you might have a .xinitrc-kde that starts a KDE session. In that file, you'd have something like exec startkde. And you'd start X like by doing startx ./.xinitrc-kde -- :1.

If you plan on running Firefox on both the sessions, there may be some issues. Look into the "no-remote" and "ProfileManager" command line options for Firefox.

share|improve this answer
+1 Cool. I see lots of other helpful uses for this. – Nathan Osman Jan 23 '11 at 23:54

If you've planned in advance that you want to access one application from several different X sessions, you can run it inside a virtual X server: the application displays inside the virtual X server, and the virtual X server appears as a window inside any number of real X servers.

One possibility for the virtual X server is VNC. Start the vncserver program; this creates a virtual X server and runs ~/.vnc/xstartup, which typically runs ~/.xinitrc like startx. Then call xvncviewer to show a window containing the virtual X server's display. The virtual server keeps running until the session exits or you run vncserver -kill; you can connect and disconnect viewers at will. You may need to specify a display number on the command line, e.g. vncserver :3 and xvncviewer :3. VNC sessions can be accessed from different machines if no firewall gets in the way: xvncviewer somehost:3. There are multiple implementations of VNC servers and viewers.

share|improve this answer

You can start a nested X server (Xnest or better Xephyr) and launch another graphic environment in it.

share|improve this answer

Yes you can. If you use GNOME, click on System->Log Out username, which will bring this dialogue:

alt text

Clicking on user Switch User takes me to a gdm window, which asks me which user I want to switch to. Once you are done with the login, you can always switch back to the original user with either CtrlAltF7 or by using the same sequence of commands I stated above.

share|improve this answer
Err, forgot to add that I'm not using a desktop manager. – phunehehe Jan 23 '11 at 16:41

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.