diff options
author | Simon Rettberg | 2022-07-18 16:30:33 +0200 |
---|---|---|
committer | Simon Rettberg | 2022-07-18 16:30:33 +0200 |
commit | 71617f0af22a1845dc470b3480677864e0a0548f (patch) | |
tree | f375ca2fbb97b409d83f3dbcd44a3cc351188681 /core/modules/run-virt/data/opt | |
parent | [idleaction/xscreensaver] Disllow locking for exam mode/browser logins (diff) | |
download | mltk-71617f0af22a1845dc470b3480677864e0a0548f.tar.gz mltk-71617f0af22a1845dc470b3480677864e0a0548f.tar.xz mltk-71617f0af22a1845dc470b3480677864e0a0548f.zip |
[run-virt] Add forced logout option to pvs toolbar
If a VM session freezes hard, there is no trivial way to end the
session. For normal sessions, this is not the end of the world, since
the user can simply reboot the machine. For remote sessions however, you
need to rely on the idle timeout of abandoned sessions, which is all but
obvious to the user.
Closes #3911
Diffstat (limited to 'core/modules/run-virt/data/opt')
-rw-r--r-- | core/modules/run-virt/data/opt/openslx/pvs2/addons/90-force-logout | 6 | ||||
-rwxr-xr-x | core/modules/run-virt/data/opt/openslx/pvs2/force-logout.sh | 12 |
2 files changed, 18 insertions, 0 deletions
diff --git a/core/modules/run-virt/data/opt/openslx/pvs2/addons/90-force-logout b/core/modules/run-virt/data/opt/openslx/pvs2/addons/90-force-logout new file mode 100644 index 00000000..9d2b996e --- /dev/null +++ b/core/modules/run-virt/data/opt/openslx/pvs2/addons/90-force-logout @@ -0,0 +1,6 @@ +[General] +exec=/opt/openslx/pvs2/force-logout.sh +caption=Sitzung beenden +tooltip=Sitzung sofort beenden +type=menu +async=true diff --git a/core/modules/run-virt/data/opt/openslx/pvs2/force-logout.sh b/core/modules/run-virt/data/opt/openslx/pvs2/force-logout.sh new file mode 100755 index 00000000..a3fe56e5 --- /dev/null +++ b/core/modules/run-virt/data/opt/openslx/pvs2/force-logout.sh @@ -0,0 +1,12 @@ +#!/bin/sh + +xmessage -buttons "Abbrechen:0,Sitzung beenden:7" "Diese Sitzung sofort beenden? +Nicht gespeicherte Daten gehen verloren." +[ $? = 7 ] || exit 1 + +loginctl terminate-session $XDG_SESSION_ID +sleep 2 +loginctl kill-session $XDG_SESSION_ID +sleep 2 +loginctl terminate-seat $XDG_SEAT +exit 0 |