You are not logged in.
I am setting up a kiosk system using cage.
I followed this guide: https://github.com/cage-kiosk/cage/wiki … th-systemd
However, when starting cage, it'll not display the GUI application on the requested tty.
Instead, it will just freeze the tty's screen, such that I have a black screen with a permanently visible (non-blinking) underscore at the top left corner.
I then cannot swap TTYs with Ctrl+Alt+Fx even when I add the -s flag to cage.
Here's the systemd unit:
0 ✓ 12 ~ $ cat /etc/systemd/system/cage@.service
# This is a system unit for launching Cage with auto-login as the
# user configured here. For this to work, wlroots must be built
# with systemd logind support.
[Unit]
Description=Cage Wayland compositor on %I
# Make sure we are started after logins are permitted. If Plymouth is
# used, we want to start when it is on its way out.
After=systemd-user-sessions.service plymouth-quit-wait.service
# Since we are part of the graphical session, make sure we are started
# before it is complete.
Before=graphical.target
# On systems without virtual consoles, do not start.
ConditionPathExists=/dev/tty0
# D-Bus is necessary for contacting logind, which is required.
Wants=dbus.socket systemd-logind.service
After=dbus.socket systemd-logind.service
# Replace any (a)getty that may have spawned, since we log in
# automatically.
Conflicts=getty@%i.service
After=getty@%i.service
[Service]
Type=simple
ExecStart=/usr/bin/cage -ds -- /usr/bin/gtk3-widget-factory
Restart=always
User=digsig
# Log this user with utmp, letting it show up with commands 'w' and
# 'who'. This is needed since we replace (a)getty.
UtmpIdentifier=%I
UtmpMode=user
# A virtual terminal is needed.
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
# Fail to start if not controlling the virtual terminal.
StandardInput=tty-fail
# Set up a full (custom) user session for the user, required by Cage.
PAMName=cage
[Install]
WantedBy=graphical.target
DefaultInstance=tty7
And the PAM config:
0 ✓ 12 ~ $ cat /etc/pam.d/cage
auth required pam_unix.so nullok
account required pam_unix.so
session required pam_unix.so
session required pam_systemd.so
The journal is very quiet:
0 ✓ 12 ~ $ journalctl -au cage@tty7.service -b
Jul 14 13:54:59 12 systemd[1]: Started Cage Wayland compositor on tty7.
Jul 14 13:54:59 12 (cage)[376]: pam_unix(cage:session): session opened for user digsig(uid=993) by (uid=0)
0 ✓ 12 ~ $
Another issue is, that I cannot stop or restart cage once it is started:
0 ✓ 12 ~ $ systemctl restart cage@tty7.service # <-- hangs indefinitely
Any insights are greatly appreciated.
Solution
Goddammit. Every time I post here, I find the solution after a few minutes myself.
It turned out that /usr/bin/Xwayland was missing, which caused all of this.
Installing the package xorg-xwayland solved it.
Sheesh.
Last edited by schard (2023-07-14 12:20:56)
Inofficial first vice president of the Rust Evangelism Strike Force
Offline