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
|TODO: lightdm is not used anymore, add tinydm guide|
Replace the automatic login with lightdm-mobile-greeter to get a separate login screen, which allows to choose the UI. Install the package:
$ sudo apk add lightdm-mobile-greeter
/usr/share/lightdm/lightdm.conf.d/99-mobile-greeter.conf file with the following contents.
user-session is the interface selected by default.
[Seat:*] autologin-user= greeter-session=lightdm-mobile-greeter user-session=phosh
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
- 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