Configure postmarketOS for multiple UIs or users
When installing postmarketOS, you get exactly one User Interface, and a single-user system. This article explains how to modify such an installation to start a display manager with a greeter on boot, where it is possible to choose between multiple UIs (and possibly multiple users if supported by the greeter).
Install a second UI
|TODO: identify duplicate packages that do not need to be installed and troubleshoot current process|
postmarketos-ui-* package (find them in the main dir of pmaports.git). You probably also want everything listed in
_pmb_recommends of the
APKBUILD, these are the packages pmbootstrap installs in addition to the UI package (but they are not depends of the UI package, so the user can uninstall them). As of writing, for Plasma Mobile:
$ sudo apk add postmarketos-ui-plasma-mobile \ breeze-gtk \ discover \ firefox-esr \ font-noto \ font-noto-emoji \ index \ kaccounts-providers \ kclock \ kde-gtk-config \ kirigami-gallery \ koko \ kpeoplesink \ kpeoplevcard \ megapixels \ mobile-config-firefox \ neochat \ plasma-angelfish \ plasma-dialer \ plasma-phonebook \ postmarketos-artwork-wallpapers \ postmarketos-hidden-desktop-entries \ qmlkonsole \ spacebar \ ttf-droid-nonlatin \ xdg-user-dirs
Change tinydm session
For Wayland sessions
$ sudo tinydm-set-session -f -s /usr/share/wayland-sessions/session.desktop
For X11 sessions
$ sudo tinydm-set-session -f -s /usr/share/xsessions/session.desktop
Add a user for SXMO postmarketOS
Add user, set a password, add to groups, copy configs over. Replace myuser with your username, mypassword with your password.
$ sudo useradd -d /home/myuser -m myuser $ echo -e "mypassword\nmypassword" | sudo passwd myuser $ sudo usermod -G audio,input,video,netdev,plugdev,wheel,seat -a myuser $ rsync -a /home/user/.config/ /home/myuser/.config/
Check your user ID and edit a file. Upon reboot it should login with your new user.
$ sudo cat /etc/passwd $ sudo vim /etc/conf.d/tinydm
In my case I had to change 10000 to 10001 in the last line of /etc/conf.d/tinydm. If you forget to add yourself to groups, sxmo won't start.
You can delete the default account with its homedir using
$ sudo userdel user -r