Auto start SDDM on selected VT's?

As mentioned here, im making a new topic for this.

Does anyone know how to create systemd unit files, or drop-ins, to automatically start new sddm sessions on selected VT’s?
This would allow separate GUI login screens that you can switch between using the CTRL+ALT+Fn combo.

I only found this but it is not mentioning which VT it uses:

systemctl cat sddm                                                                                                                                                                                                                                                                                                   
# /usr/lib/systemd/system/sddm.service
[Unit]
Description=Simple Desktop Display Manager
Documentation=man:sddm(1) man:sddm.conf(5)
Conflicts=getty@tty1.service
After=systemd-user-sessions.service getty@tty1.service plymouth-quit.service systemd-logind.service

[Service]
ExecStart=/usr/bin/sddm
Restart=always

[Install]
Alias=display-manager.service

So it must be in some config file that sddm uses because i can see:

systemctl status sddm                                                                                                                                                                                                                                                                                                
● sddm.service - Simple Desktop Display Manager
     Loaded: loaded (/usr/lib/systemd/system/sddm.service; enabled; vendor preset: disabled)
     Active: active (running) since Mon 2020-10-12 08:53:05 +03; 4h 38min ago
       Docs: man:sddm(1)
             man:sddm.conf(5)
   Main PID: 1282 (sddm)
      Tasks: 3 (limit: 38400)
     Memory: 203.4M
     CGroup: /system.slice/sddm.service
             ├─1282 /usr/bin/sddm
             └─1354 /usr/lib/Xorg -nolisten tcp -auth /var/run/sddm/{456f1c0b-53bb-4150-a2ac-701f6a1e77a0} -background none -noreset -displayfd 17 -seat seat0 vt1

Eki 12 08:53:28 manjaro sddm-helper[1447]: [PAM] returning.
Eki 12 08:53:28 manjaro sddm-helper[1447]: pam_systemd_home(sddm:account): systemd-homed is not available: Unit dbus-org.freedesktop.home1.service not found.
Eki 12 08:53:28 manjaro sddm[1282]: Authenticated successfully
Eki 12 08:53:28 manjaro sddm-helper[1447]: pam_kwallet5(sddm:setcred): pam_kwallet5: pam_sm_setcred
Eki 12 08:53:28 manjaro sddm-helper[1447]: pam_unix(sddm:session): session opened for user trimoon(uid=1000) by (uid=0)
Eki 12 08:53:28 manjaro sddm-helper[1447]: pam_kwallet5(sddm:session): pam_kwallet5: pam_sm_open_session
Eki 12 08:53:28 manjaro sddm[1282]: Auth: sddm-helper exited successfully
Eki 12 08:53:28 manjaro sddm[1282]: Greeter stopped.
Eki 12 08:53:28 manjaro sddm-helper[1447]: Starting: "/usr/share/sddm/scripts/Xsession \"/usr/bin/startplasma-x11\""
Eki 12 08:53:28 manjaro sddm[1282]: Session started

Take note of the second process 1354

1 Like

Whenever you login as a new user there’s a new VT opened. So if you have, for example 3 users logged in at the same time, you change between sessions with CTRL+ALT+Fn. I’m not sure what you’re trying to do. Do you want to login as the same users in two different X sessions?

I want to enable user logins using the GUI not terminal on VT…
Ofcourse same user can’t login into multiple XSessions…

Ideally it would be real *nix style to have multiple keyboards and mouses with monitors all conected to same PC, but thats beyond this topic.
This topic is just for the GUI-Login that’s accessible via separate VT’s…

That might be tricky. What you can do is to “Change user” and then a new login session will open on a new VT (I mean a GUI one - SDDM).

Yes but thats not the same as real concurent user logins…

Yes it is. Try it. Create a new user, then change user and login with the new one. You’ll be able to switch between users with CTRL+AL+Fn.

If there’s a way to open concurrent SDDM login screen from boot, it will bee somewhere around
/usr/share/sddm/scripts/Xsetup
/usr/share/sddm/scripts/Xsession
/etc/X11/xinit/xinitrc.d/
/etc/X11/Xsession.d/

I’m not sure where. More research is needed.

  1. I don’t have a “Switch user” option.
  2. I don’t want to “suspend” a user session ala M$.

As i said i want concurrent GUI user sessions, eg. multiple XServers on one PC…

Maybe you’re looking for multiseat then. But you need two monitors, two keyboards two mice, etc.

EDIT: I’m still not sure of what you want.

Ugh ok let me try to be as verbal as posible then…

  1. When the PC starts you get a GUI to login to a grahical environment right?
    This is on VT1 CTR+ALT+F1
  2. Now some other user (or same person wanting to use a separate unix account) wants to be able to do CTR+ALT+F2 and login to another account.
  • All applications keep running on VT1’s GUI for (1) and at same time on VT2’s GUI for (2).
    The person at the PC can now freely switch between the two using CTR+ALT+F1/F2 without interrupting both.

It’s like an Remote Xsession, but this time on the same physical machine using the same monitor/keyboard/mouse.
This could be enhanced/customized later to have them display on different monitors and use different keyboard/mouse per VT/“seat”.
In this case both sessions could be used concurrently at same time using 1 PC…

One could replace that example using wireless Keyboard+Mouse and separate Monitors instead of VT’s to how many are wanted like in this scenario:

  • 1 Office with lets say 4 workers or a class with 4 students.
  • 1 Central PC with a Graphical card that has multiple output ports, or has multiple Graphic cards with separate outputs.
  • Each worker/student has their own monitor connected to this central PC and have their Keyboard+Mouse connected using wireless connection. (BlueTooth/Wifi)
  • Each session runs concurrently at same time, this is the Unix way of operations…

Do you understand now?
If not then just go drink some coffee and drop this topic :wink:

But those are two different situations. The first one is similar to switching between two logged in users. I know this because I have a PC at home with 3 accounts and I do that. You just need to set it not to lock the screen automatically, and you can have two jobs being done by two users and switch between them by switching VT. Like I already told you, when you login with a new user a new VT is created.

The second situation you describe is actually a multiseat setup.

So let me re-iterate:
You login to the GUI as usual, then you “Switch user” and login with another account.
At this point you have user1 at VT1 and user2 at VT2? :confused:
(PS: As i mentioned i don’t have the “Switch user” option with the default install)

Exactly!

The switch user option should appear once you have more than one account. It if doesn’t go to system settings and look for those settings. You can also customize which session control options appear in the menu, including switch user.

Hmmm interesting, i will try that sometime.
But i first need this issue fixed before i even try that :+1:

Sometimes Plasma logout screen gets corrupted for some reason, so a more reliable way to switch user is using respective Plasma applet added on a panel. It is always shown and works 100%