-
Notifications
You must be signed in to change notification settings - Fork 201
Open
Description
Hi,
When I run logactivewin.sh in Xfce I get the following error: no saver status on root window., and only __LOCKEDSCREEN is logged.
I assume it is a problem of when it checks the screensaver (I had to install xscreensaver in the first place, as it wouldn't work otherwise; and I don't see why this should be required).
I have seen here a similar problem related to the gnome-screensaver: #24
I am not familiar with the language, so I'm not of much help. Does anybody know what needs to be fixed?
I assume it would be here?
do
islocked=true
# Try to figure out which Desktop Manager is running and set the
# screensaver commands accordingly.
if [[ $GDMSESSION == 'xfce' ]]; then
# Assume XFCE folks use xscreensaver (the default).
screensaverstate=$(xscreensaver-command -time | cut -f2 -d: | cut -f2-3 -d' ')
if [[ $screensaverstate =~ "screen non-blanked" ]]; then islocked=false; fi
elif [[ $GDMSESSION == 'ubuntu' || $GDMSESSION == 'ubuntu-2d' || $GDMSESSION == 'gnome-shell' || $GDMSESSION == 'gnome-classic' || $GDMSESSION == 'gnome-fallback' || $GDMSESSION == 'cinnamon' ]]; then
# Assume the GNOME/Ubuntu/cinnamon folks are using gnome-screensaver.
screensaverstate=$(gnome-screensaver-command -q 2>&1 /dev/null)
if [[ $screensaverstate =~ .*inactive.* ]]; then islocked=false; fi
elif [[ $XDG_SESSION_DESKTOP == 'KDE' ]]; then
islocked=$(qdbus org.kde.screensaver /ScreenSaver org.freedesktop.ScreenSaver.GetActive)
else
# If we can't find the screensaver, assume it's missing.
islocked=false
fi
if [ $islocked = true ]; then
curtitle="__LOCKEDSCREEN"
else
id=$(xdotool getactivewindow)
curtitle=$(wmctrl -lpG | while read -a a; do w=${a[0]}; if (($((16#${w:2}))==id)) ; then echo "${a[@]:8}"; break; fi; done)
fi
perform_write=falseHere is xscreensaver-command as possible reference: https://github.com/danfuzz/xscreensaver/blob/master/driver/xscreensaver-command.c
Thank you!
Metadata
Metadata
Assignees
Labels
No labels