-
Notifications
You must be signed in to change notification settings - Fork 141
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Disable user switching if logind says it isn't supported
This should work now that seat_local_get_active_session returns the proper value for non-seat0 seats. Note: systemd-logind v245 and older erroneously report CanMultiSession=no on non-seat0 seats even when it is supported. This change will break those users. See <systemd/systemd#15337>.
- Loading branch information
1 parent
c84feb0
commit e520b32
Showing
5 changed files
with
97 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# | ||
# Check that logging out from a CanMultiSession=false seat activates greeter on | ||
# that seat. | ||
# | ||
|
||
[Seat:*] | ||
user-session=default | ||
|
||
#?*START-DAEMON | ||
#?RUNNER DAEMON-START | ||
|
||
# seat0 starts | ||
#?XSERVER-0 START VT=7 SEAT=seat0 | ||
#?*XSERVER-0 INDICATE-READY | ||
#?XSERVER-0 INDICATE-READY | ||
#?XSERVER-0 ACCEPT-CONNECT | ||
#?GREETER-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_SESSION_CLASS=greeter | ||
#?LOGIN1 ACTIVATE-SESSION SESSION=c0 | ||
#?XSERVER-0 ACCEPT-CONNECT | ||
#?GREETER-X-0 CONNECT-XSERVER | ||
#?GREETER-X-0 CONNECT-TO-DAEMON | ||
#?GREETER-X-0 CONNECTED-TO-DAEMON | ||
|
||
# Add seat1 | ||
#?*ADD-SEAT ID=seat1 CAN-MULTI-SESSION=FALSE | ||
#?XSERVER-1 START SEAT=seat1 | ||
#?*SEAT-CAN-SWITCH PATH=/org/freedesktop/DisplayManager/Seat1 | ||
#?RUNNER SEAT-CAN-SWITCH PATH=/org/freedesktop/DisplayManager/Seat1 CAN-SWITCH=FALSE | ||
#?*XSERVER-1 INDICATE-READY | ||
#?XSERVER-1 INDICATE-READY | ||
#?XSERVER-1 ACCEPT-CONNECT | ||
#?GREETER-X-1 START XDG_SEAT=seat1 XDG_SESSION_CLASS=greeter | ||
#?LOGIN1 ACTIVATE-SESSION SESSION=c1 | ||
#?XSERVER-1 ACCEPT-CONNECT | ||
#?GREETER-X-1 CONNECT-XSERVER | ||
#?GREETER-X-1 CONNECT-TO-DAEMON | ||
#?GREETER-X-1 CONNECTED-TO-DAEMON | ||
|
||
# Log in seat0 so that its active session is not a greeter (in case there is a | ||
# cross-seat bug). | ||
#?*GREETER-X-0 AUTHENTICATE USERNAME=no-password1 | ||
#?GREETER-X-0 AUTHENTICATION-COMPLETE USERNAME=no-password1 AUTHENTICATED=TRUE | ||
#?*GREETER-X-0 START-SESSION | ||
#?GREETER-X-0 TERMINATE SIGNAL=15 | ||
#?SESSION-X-0 START XDG_SEAT=seat0 XDG_VTNR=7 XDG_GREETER_DATA_DIR=.*/no-password1 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password1 | ||
#?LOGIN1 ACTIVATE-SESSION SESSION=c2 | ||
#?XSERVER-0 ACCEPT-CONNECT | ||
#?SESSION-X-0 CONNECT-XSERVER | ||
|
||
# Log in seat1 | ||
#?*GREETER-X-1 AUTHENTICATE USERNAME=no-password2 | ||
#?GREETER-X-1 AUTHENTICATION-COMPLETE USERNAME=no-password2 AUTHENTICATED=TRUE | ||
#?*GREETER-X-1 START-SESSION | ||
#?GREETER-X-1 TERMINATE SIGNAL=15 | ||
#?SESSION-X-1 START XDG_SEAT=seat1 XDG_GREETER_DATA_DIR=.*/no-password2 XDG_SESSION_TYPE=x11 XDG_SESSION_DESKTOP=default USER=no-password2 | ||
#?LOGIN1 ACTIVATE-SESSION SESSION=c3 | ||
#?XSERVER-1 ACCEPT-CONNECT | ||
#?SESSION-X-1 CONNECT-XSERVER | ||
|
||
# Logout seat1 | ||
#?*SESSION-X-1 LOGOUT | ||
#?XSERVER-1 TERMINATE SIGNAL=15 | ||
|
||
# Ensure that the X server and greeter for seat1 are not restarted until after | ||
# the user logs out. WAIT is not needed here because XSERVER-1 cannot terminate | ||
# and start concurrently. | ||
#?*FENCE | ||
|
||
#?XSERVER-1 START SEAT=seat1 | ||
#?*XSERVER-1 INDICATE-READY | ||
#?XSERVER-1 INDICATE-READY | ||
#?XSERVER-1 ACCEPT-CONNECT | ||
#?GREETER-X-1 START XDG_SEAT=seat1 XDG_SESSION_CLASS=greeter | ||
#?LOGIN1 ACTIVATE-SESSION SESSION=c4 | ||
#?XSERVER-1 ACCEPT-CONNECT | ||
#?GREETER-X-1 CONNECT-XSERVER | ||
#?GREETER-X-1 CONNECT-TO-DAEMON | ||
#?GREETER-X-1 CONNECTED-TO-DAEMON | ||
|
||
# Cleanup | ||
#?*STOP-DAEMON | ||
#?SESSION-X-0 TERMINATE SIGNAL=15 | ||
#?XSERVER-0 TERMINATE SIGNAL=15 | ||
#?GREETER-X-1 TERMINATE SIGNAL=15 | ||
#?XSERVER-1 TERMINATE SIGNAL=15 | ||
#?RUNNER DAEMON-EXIT STATUS=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
./src/dbus-env ./src/test-runner multi-seat-no-multi-session test-gobject-greeter |