3

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.

1 Answer 1

1

I think you can do that using CTRL+ALT+F1 to F7 to change TTY, but I think that you already know if I understood you right...

Once you are in another TTY log with the other user, this should do:

startx -- :1

I tested it and it worked. I had to login again in my original session only once and I did not have to login again when switching or use 'root' to start it.

Give it a try again.

Cheers!

1
  • Thanks for your time. That is what I already did. Although I already had the default session on screen :1, so I was using :2 or :3. I think I got a workaround, without fully understand it. I updated my Question.
    – SIGO
    Commented Apr 29, 2020 at 7:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .