Ask Your Question

How can I switch from one environment to another without logging out? [closed]

asked 2014-02-09 05:19:04 -0500

mohanprakash gravatar image

updated 2014-02-10 07:58:52 -0500

FranciscoD_ gravatar image

Suppose I am using GNOME desktop. Can I switch to another environment without logging out?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by NickTux
close date 2014-07-12 15:16:40.810169


If you have many desktop installed you can select the desktop you want to use un your logging screan

williamjmorenor gravatar imagewilliamjmorenor ( 2014-02-09 13:10:02 -0500 )edit

you mean switch users ? you may have two logins , or switch env with same login ?

sergiomb gravatar imagesergiomb ( 2014-02-10 20:51:28 -0500 )edit

3 Answers

Sort by ยป oldest newest most voted

answered 2014-02-10 11:32:26 -0500

NickTux gravatar image

updated 2014-02-10 11:51:14 -0500

As multiple shells are available in Linux (TTY1 , TTY2 ..etc) you can login to another shell and run startx there. Lets take an example here.

I have Cinnamon desktop that by default starts in TTY1. I also have gnome shell in my Fedora 20. So, I want gnome shell to run simultaneously in TTY2 and without the need to log out or change user I can work there too.

Be aware that you want an .xinitrc file in your home directory in order for startx to work properly. Lets create one.

We said before that Cinnamon (at my example) is the default desktop in TTY1 , so I need an .xinitrc file that will start gnome-session.

# ~/.xinitrc
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  unset f

exec gnome-session

Save above content as .xinitrc inside your user's home directory.

Now lets make it executable (probably this is not needed) .

chmod +x .xinitrc

Now lets log in to TTY2 and issue the following command

startx --:1

Wait for some seconds (20-30 maybe more) until startx intializes the gnome shell.

Now you can switch from Cinnamon to Gnome Shell with CTRL+ALT+F1 = Cinnamon , CTRL+ALT+F2 = Gnome Shell.

Same user, different login shells, different Desktop environments , simultaneously.

edit flag offensive delete link more


Doesn't two different desktops using the same files and configuration directories cause mess ups?

FranciscoD_ gravatar imageFranciscoD_ ( 2014-02-11 20:57:18 -0500 )edit

As far I have seen (because I tested this before I post) no. Everything was working quite good. Same user , different desktop environments (different login shells).

NickTux gravatar imageNickTux ( 2014-02-11 21:03:43 -0500 )edit

That is a great answer. Thank you very much NikTh. I am overwhelmed at the support from all of you.

mohanprakash gravatar imagemohanprakash ( 2014-02-11 22:17:00 -0500 )edit

When I try this from a tty console I get a fatal server error, no screens found (FC 20)

W7CCE gravatar imageW7CCE ( 2014-07-12 11:35:40 -0500 )edit

answered 2014-02-09 10:47:58 -0500

mether gravatar image

updated 2014-02-10 14:26:17 -0500

Not without logging out. If you have multiple desktop environments installed, you can switch between them when you are logging in by entering your username and password. You will have another option below to choose your desktop environment as well. It might be possible to switch between users, each with their own desktop environment however.

edit flag offensive delete link more



I think OP means without logging out (but I'm not very sure).

NickTux gravatar imageNickTux ( 2014-02-09 11:24:21 -0500 )edit

Yes can I change my desktop environment without logging out?

mohanprakash gravatar imagemohanprakash ( 2014-02-10 00:48:24 -0500 )edit

You cannot. It's like asking "How can I switch to windows from Fedora without rebooting?".

FranciscoD_ gravatar imageFranciscoD_ ( 2014-02-10 07:58:01 -0500 )edit

answered 2014-02-10 08:28:34 -0500

Cobra gravatar image

You can do this - but you cannot do it for the same user. If you want to have multiple log-ins active at the same time with different desktop environments, then add a second user for yourself.

When you're logged in as one user, when you lock the screen you can opt to start a new session off (there is a button for it) which will take you to the log-in page. Once the second user is logged in you can switch between the user screens by selecting different terminals (CTRL-ALT-F1, etc.)

There are limitations to this; the new user won't automatically get all your favourites and browser shortcuts, you'd have to add them again.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-02-09 05:19:04 -0500

Seen: 3,371 times

Last updated: Jul 12 '14