I can already open a Gnome-Session on TTY2 by default but I also want one on TTY3 to quickly switch between different user sessions.
I googled this topic and got a plethora of solutions. Some were targeted at old Ubuntu Versions, some seemed really complicated to setup. All I want is to have TTY3 behave the same as TTY2. Easier said than done, I guess.
Here's what seem to work:
startx -- :2
<-- This starts a new session but I have to enter my password every time I switch away and back again. Almost the same as, when I switch to TTY1. I get the login screen every time.
sudo startx
<-- Creates a session as root and I don't have to enter my credentials, but that is not what I want and it's a big security risk.
I have read, that somehow systemd is involved in managing the gnome-sessions. I tried to find any how tos to configure a second gnome-session, but with no luck.
So now I am here and ask the question: How do I start a session on TTY3 as a different user, that behaves the same, as when I go through the default login screen?
Update1:
I found a workaround, although I don't know why this works.
First I run startx -- :3
and get a black screen. The mouse cursor pop up for about 3 seconds, then I'm thrown back into the CLI. When I run startx -- :3
a second time, the Gnome-Shell starts and I get a GUI.
I guess some processes are startet on the first startx
that enable the GUI on the second run. I have to investigate it a little further.
Update2:
When I run startx -- :3 && gnome-shell
I get a GUI immediately, but I still don't know whether this is the correct way to start another gnome session.