Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3567

Graphical Environments & Desktops • howto start xscreensaver from commandline ?

$
0
0
Hello Fabien,
sorry for the wrong tags. In pastebin i can't upload a gz file and i won't do something wrong so i will copy / paste the script here.

Code:

#!/usr/bin/env bashpidof xscreensaver && { echo "xscreensaver already running, exit" exit 1; }xscreensaver &                               ### run xscreensaver in the backgrounddeclare -i XSSPID=$?                         ### xscreensaver PIDsleep 1                                      ### wait xscreensaver initialisationxscreensaver-command --lock                  ### lock the screenwhile IFS='' read -r STATE; do               ### wait unlock   [[ "$STATE" == UNBLANK\ * ]] && breakdone < <(xscreensaver-command --watch)kill $XSSPID                                 ### kill xscreensaver PID

Statistics: Posted by oida — 2024-02-12 13:57 — Replies 6 — Views 151



Viewing all articles
Browse latest Browse all 3567

Trending Articles