Conversation
Notices
-
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 00:56:07 JST
matoken
Linux でいい感じにロックできる physlock
"muennich/physlock: Lightweight linux console locking tool" https://github.com/muennich/physlock
こんな感じで叩くとコンソールもXもロックされてMagickSysrq も無効に出来るしKernel message も抑制される
$ physlock -s -m -p "lock!"
でもスクリーンセーバーとか画面スリープとか出来ないのでどうにかしたい-
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 00:57:00 JST
matoken
physlock 実行前後に任意のコマンドが実行できる感じのPR が来ていた
"Allow running of arbitrary commands before and after authentication by DexterLB · Pull Request #79 · muennich/physlock" https://github.com/muennich/physlock/pull/79In conversation permalink Attachments
-
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 00:57:41 JST
matoken
これを使えばスクリーンセーバーを動かしたりできそう In conversation permalink -
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 00:58:21 JST
matoken
てことでsource 入手してPR のpatch 当てる
$ sudo apt-get build-dep physlock
$ git clone https://github.com/muennich/physlock
$ cd physlock
$ wget https://github.com/muennich/physlock/pull/79.patch
$ patch -p1 < ./79.patch
$ make
$ sudo chown root.root ./physlock
$ sudo chmod u+s ./physlock
$ ./physlock -h
usage: physlock [-dhLlmsbanv] [-p MSG]In conversation permalink Attachments
-
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 00:59:16 JST
matoken
-b, -a, -n が増えている
$ git diff README.md
diff --git a/README.md b/README.md
index bc25ca3..563e734 100644
--- a/README.md
+++ b/README.md
@@ -57,6 +57,9 @@ The following command-line arguments are supported:
-l only lock console switching
-L only enable console switching
-m mute kernel messages on console while physlock is running
+ -b CMD execute CMD before the password prompt
+ -a CMD execute CMD after successfully authenticating
+ -n don't actually authenticate: just execute commands
-p MSG Display MSG before the password prompt
-s disable sysrq key while physlock is running
-v print version information and exitIn conversation permalink -
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 01:00:00 JST
matoken
てことでスクリーンセーバーとか
$ ./physlock -b 'xscreensaver-command -demo 8'
画面スリープとか
$ ./physlock -b 'xset dpms force standby'
うまく動かない(◞‸◟)In conversation permalink -
matoken (matoken@gnusocial.matoken.org)'s status on Saturday, 06-Jul-2019 01:01:07 JST
matoken
多分画面がphyslock に乗っ取られていてしまっている In conversation permalink
-