Skip to content

Commit ffce50e

Browse files
committed
let lightdm handle logouts
calling both gnome-session-quit as the user and then restarting lightdm causes a segfault in ft-init, which handles the logout for lightdm normally. Just restarting lightdm does not cause a segfault, and logs the user out properly too. Let's remove the redundant call to gnome and let lightdm handle everything.
1 parent 90bb729 commit ffce50e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

systemd/system/codam-web-greeter-idler.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,7 @@ while IFS= read -r line; do
2121
IDLE_TIME=$(/usr/bin/sudo -u "$USERNAME" DISPLAY="$DISPLAY" /usr/bin/xprintidle)
2222
# Check if session has been idle for over 42 minutes
2323
if [ "$IDLE_TIME" -gt 2520000 ]; then
24-
/usr/bin/echo "Session for user $USERNAME has been idle for over 42 minutes (idletime $IDLE_TIME ms), forcing logout now"
25-
/usr/bin/systemd-run --wait --user --machine "$USERNAME@.host" /usr/bin/gnome-session-quit --force
26-
# Restart lightdm to prevent a new user session from being created in X-server :1
27-
# We only want to use :0 for user sessions, as the logout hook identifies the lock screen by X-server :1
28-
/usr/bin/sleep 5
24+
/usr/bin/echo "Session for user $USERNAME has been idle for over 42 minutes (idletime $IDLE_TIME ms), forcing logout now by restarting lightdm"
2925
/usr/bin/systemctl restart lightdm
3026
else
3127
/usr/bin/echo "Session for $USERNAME has been idle for $((IDLE_TIME / 1000)) seconds"

0 commit comments

Comments
 (0)