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
Install a postmarketos-ui-*
package (find them in the main dir of pmaports.git). You probably also want everything listed in _pmb_recommends
of the APKBUILD
, there is a tool to automate that process: install also postmarketos-install-recommends
package. Some UIs (plasma-mobile) also have associated -extras package.
Then for plasma-mobile example commands will look like:
$ sudo apk add postmarketos-ui-plasma-mobile postmarketos-ui-plasma-mobile-extras
$ install-recommends postmarketos-ui-plasma-mobile
For phosh:
$ sudo apk add postmarketos-ui-phosh
$ install-recommends postmarketos-ui-phosh
Change tinydm session
For Wayland sessions
$ sudo tinydm-set-session -f -s /usr/share/wayland-sessions/phosh.desktop
or
$ sudo tinydm-set-session -f -s /usr/share/wayland-sessions/plasma-mobile.desktop
For X11 sessions, e.g. xfce4
$ sudo tinydm-set-session -f -s /usr/share/xsessions/xfce.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
Related
- pmaports#601: ui paсkage conflicts
- pmaports!1630: main/postmarketos-ui-phosh: re-enable autologin (with reasoning why we don't want a greeter by default)
- pmaports!1750: feedbackd: Configure haptic feedback per device