Every article tag can be clicked to get a list of all articles in that category. Every article tag also has an RSS feed! You can customize an RSS feed too!
Is there a way to add (and use) new desktop/kde user ?
Page: 1/2»
  Go to:
Brunhylde Jul 27, 2022
Hello Linux lovers !

I would like to know if there is a way to log in desktop/kde with another user than the default user named "deck".

I can already create a new user with useradd command or kde panel configuration, either way.

But I don't know how to log in this new user in graphical mode (kde). I can connect it in the terminal (su new_user). How can I log out "deck" user from kde then log in with another user ?

P.S. : I'm a regular linux user so i can do basic linux stuff (cli command, vi editor, systemctl usage ...)

Thanks !
MiZoG Jul 28, 2022
At login screen you can scroll (horizontally) through registered users using the left and right arrows next to your user avatar. That's the way on vanilla KDE 5.20.5 on Debian Bullseye. Other distros may have their custom login screens.
Brunhylde Jul 29, 2022
Hi,

Thanks for answering, but, my concern is specific to SteamOS 3 on Steam Deck device. I should have explicit this on my first post. Sorry about that.
mr-victory Jul 30, 2022
1.
Quoting: BrunhyldeI can already create a new user
Don't. There is some stuff oriented around the "deck" user. I can't even understand how you created a new user since the filesystem is read only.
2. Probably autologin is enabled.
https://wiki.archlinux.org/title/SDDM#Autologin
3. Prepare to redo entire setup process.

Last edited by mr-victory on 30 July 2022 at 3:02 pm UTC
Brunhylde Aug 3, 2022
Hi,

The /home section is not read-only (it must be a place to save your personal data). I just define a password for "deck" user to access sudo command and type in "sudo useradd new_user". So, there is no need to disable the read-only protection to add a new user.

From the Steam Deck Faq :

QuoteHow do I run sudo commands?

The default deck user is shipped with no password. This is a secure setting that prevents access via ssh, and can't be used to run commands via sudo.

If you’d like to set a password in order to run sudo commands, open a terminal window and set a secure password using the passwd command. At that point you will be able to use sudo anywhere elevation is required.

Anyway, I think your right, "There is some stuff oriented around the "deck" user", so I prefer don't change anything by myself for now. I hoped someone more skilled than I am found a secure way to disable autologin or just change the user auto-logged (I guess in /etc/sddm.conf.d/autologin.conf).

Last edited by Brunhylde on 3 August 2022 at 12:48 pm UTC
NoiramSang Aug 20, 2022
I am uncertain if you are still trying to do this, but if anyone is looking for how to do this, I will just note that I did this directly after getting a Deck, and what I did. I made an account to reply, so hello!

My reasons for doing so were so that I and another person could both use the device, with our own desktop modes and separate files.

1. Set up a new user as usual. Either through Plasma or the terminal.
2. Add a password to the user "deck" . Either through Plasma or the terminal.
3. As was suggested, change the file /etc/sddm.conf.d/steamos.conf
4. Change "User=deck" to the user you just created.
5. Restart and/or logout (I recall both working, but restart definitely does)

Just change the user in the file to deck again to switch back. Only next time you will have to do so as the user "deck" in the terminal, if your new user is a regular user. I use vim, but to each their own.

A few notes...
1. This results in repeating the initial process you saw when first using your Steam Deck: you will have to add a Steam user, etc. I assume it can be the same account, but I only tested it with two separate Steam accounts. Like when you first turned on your deck, you will only need to do this once. This does not affect the deck user in any way I have noticed, but it weirded me out the first time, as I was not anticipating it.
2. If you mistype the username(s) or edit the file incorrectly, I am uncertain of what the Deck will do. So double-check before saving the file.
3. Although you might be able to simply disable auto-login, I never attempted it. It made more sense to me to allow both users to use the device in a way that matches the usual experience.
4. If you just want to share games, rather than having separate desktops, I would stick with just using multiple Steam accounts with a single Linux user.

Edit:
Just as a note, the only issue I noticed while the Steam Deck was running as a different user than deck, is one of the two default shortcuts on the desktop did not work (it points to the wrong location, as I recall). It is the Steam shortcut, and you can simply ignore it and run it through the start menu or terminal. Otherwise, I noticed zero issues, in large part because the Steam Deck seems to automatically make the changes to new users it does to the deck user on first login. So things like the gaming mode also work.

Also, I found dual-booting from an external SSD to be a better approach if using the Steam Deck heavily as a desktop computer. Everything works in Tumbleweed at least (unrelated to things affecting mobility, power consumption, etc), except for the audio (bluetooth and/or HDMI-out audio work fine), which I have heard claimed should work with the next kernel update.

Last edited by NoiramSang on 20 August 2022 at 3:55 pm UTC
Brunhylde Aug 20, 2022
Hi,

Thanks a lot for sharing your experience ! This is exactly what I wanted.

I'll try as soon as I can.
Brunhylde Aug 24, 2022
Hi,

It's work fine :)

To avoid mistake I made some files steamos.conf_deck, steamos.conf_user1, steamos.conf_user2 ... and when I want to switch to user N I just copy, in desktop mode, his steamos.conf_userN to /etc/sddm.conf.d/steamos.conf and logout. Of course, to go back on the standard setup, copy the initial steamos.conf. With a litlle script It will be even better.

About your note n°1, there is no need to log in steam you can just go directly to desktop. On the first user switch I just configure wifi and time.

Our Steam Decks becoming more like a real PC !

Thanks again !
Brunhylde Aug 26, 2022
Hi,

I made a little script to make the user switching easier from user1 to user2. The scipt is just copying the steamos.conf_user2 file for user2 on /etc/sddm.conf.d/steamos.conf.

steamos.conf_user2 :

[General]
DisplayServer=wayland

[Autologin]
Relogin=true
Session=gamescope-wayland.desktop
User=user2

[X11]
# Janky workaround for wayland sessions not stopping in sddm, kills
# all active sddm-helper sessions on teardown
DisplayStopCommand=/usr/bin/gamescope-wayland-teardown-workaround



Script :

#!/bin/sh

#*****************  Steam Deck : User Switch  ***********************

cp /home/user1/directory_of_your_choice/steamos.conf_user2 /etc/sddm.conf.d/steamos.conf


It's possible to add those lignes to initiate user1 logout.

sleep 1

qdbus org.kde.Shutdown /Shutdown org.kde.Shutdown.logout



To execute the script the user1 need to have write access on /etc/sddm.conf.d/steamos.conf. To fulfill that I use the existing "users" group. I add user1 to this group, changing the group of /etc/sddm.conf.d/steamos.conf then allow group "users" to write on this file.

For some reason, when I add user1, he's only part of a group named "user1". I delete this groupe.

sudo usermod -g users user1
sudo groupdel user1


Concerning the special "deck" user, I just add this guy to "users" group.

sudo -a -G users deck

Reboot the Steam Deck.

At the end we just need to allow members of the "users" group to write on /etc/sddm.conf.d/steamos.conf.

sudo chgrp users /etc/sddm.conf.d/steamos.conf
sudo chmod g+w /etc/sddm.conf.d/steamos.conf


Reboot the Steam Deck.

I'm not a all a security expert, and I don't know if it's secure or not to change the group of a file in /etc/. If you have comment on this don't hesitate !

To finish, it's then possible to create a desktop shortcut to switch user with one clic :).


To Do

It would be better if, after logout, the steam deck go directly in desktop mode instead of the big picture style interface.

Last edited by Brunhylde on 26 August 2022 at 7:08 am UTC
NoiramSang Aug 27, 2022
Very nice.

I did not use multiple desktops often enough to bother with scripting/automating it, but if you are doing it a lot, yes, the above seems much better.

As for security... personally, I do not concern myself with the internal security of the Deck as much as some might, because I would think, statistically, its #1 security problem is it is mobile, and is lacking in encryption options. Meaning, if you have sensitive data on the device, and it was stolen, that data would be accessible. So keeping things like banking information on it is, by default, not the best idea.

In comparison, a Chromebook is a mobile computer which encrypts your data by default. Cloud security issues notwithstanding.

So as long as it is reasonably secure internally, I think the biggest security factor is not using it where there is a higher risk of being stolen (example: not leaving it on the beach when you go swimming), and not putting sensitive information on it.

Someone else might know a reasonable method of encryption with the Steam Deck... but I never looked too much into it. At least yet.
bbkr Aug 28, 2022
I added user through regular System Settings but found out that KDE menu user switching is disabled in /etc/xdg/kdeglobals.

So I changed restrictions to:
[KDE Action Restrictions][$i]
# action/switch_user=false
# action/start_new_session=false
# action/lock_screen=false


Enabled SDDM control (same file):
[KDE Control Module Restrictions][$i]
# kcm_sddm.desktop=false


And... got stuck. After selecting "Switch user" from KDE menu it goes to SDDM lock screen but after clicking switch user there it throws error in journalctl -u sddm:

Aug 28 11:10:00 steamdeck sddm-helper[6964]: Starting X11 session: "/usr/bin/X -nolisten tcp -background none -seat seat0 -noreset -keeptty -novtswitch -verbose 3" "/usr/share/sddm/scripts/Xsession \"/usr/bin/startplasma-steamos-oneshot\""
Aug 28 11:10:00 steamdeck sddm-helper[6973]: Failed to take control of "/dev/tty1" ("deck"): Operation not permitted


There is custom session sentinel logic in /usr/bin/startplasma-steamos-oneshot and x11/wayland workarounds in /usr/bin/gamescope-wayland-teardown-workaround and probably more systemd TTY configs changed.

My goal is to have multiple users in Desktop mode with easier switching than editing /etc/sddm.conf.d/steamos.conf.
While you're here, please consider supporting GamingOnLinux on:

Reward Tiers: Patreon. Plain Donations: PayPal.

This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!

You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register


Or login with...
Sign in with Steam Sign in with Google
Social logins require cookies to stay logged in.