Ask Your Question

Revision history [back]

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.

#!/bin/sh
#
# ~/.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"
  done
  unset f
fi

exec gnome-session

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) 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.

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.

#!/bin/sh
#
# ~/.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"
  done
  unset f
fi

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) 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.

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.

#!/bin/sh
#
# ~/.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"
  done
  unset f
fi

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) 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.