Add script to switch sessions
This commit is contained in:
parent
383eb1a728
commit
b62098c5b1
8
switchsession
Executable file
8
switchsession
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
which busctl > /dev/null 2>&1
|
||||
# Get the current Seat
|
||||
SEAT=$(busctl get-property org.freedesktop.login1 /org/freedesktop/login1/session/auto org.freedesktop.login1.Session Seat | awk '{print $2}' | tr -d '"' | sed 's/^./\U&/')
|
||||
# Call out to switch the current session
|
||||
busctl call org.freedesktop.DisplayManager "/org/freedesktop/DisplayManager/${SEAT}" org.freedesktop.DisplayManager.Seat SwitchToGreeter
|
Loading…
x
Reference in New Issue
Block a user