xdg-screensaver requires a windowid to suspend it. Once that window disappears, gnome-screensaver automatically resumes.
I was having a problem with mplayer not inhibiting gnome-screensaver, so I wrote this bash alias to inhibit it for mplayer:
alias xdg-screensaver-mplayer-suspend="xdg-screensaver suspend $(wmctrl -l | sed -nr 's/^(0x[0-9a-f]+).+mplayer.*/\1/p')"
Obviously, you also need wmctrl installed to use it. Whenever I have mplayer running, I just run xdg-screensaver-mplayer-suspend
You could do the same thing with skype:
alias xdg-screensaver-skype-suspend="xdg-screensaver suspend $(wmctrl -l | sed -nr 's/^(0x[0-9a-f]+).+skype.*/\1/ip')"
Or, if you have YouTube in a separate window:
alias xdg-screensaver-youtube-suspend="xdg-screensaver suspend $(wmctrl -l | sed -nr 's/^(0x[0-9a-f]+).+youtube.*/\1/ip')"
You would just put the command you want into ~/.bashrc
Yes, this is a big hassle, and gnome-screensaver-command should be fixed to support inhibit again, but it's a usable workaround for the time being.
xdg-screensaver requires a windowid to suspend it. Once that window disappears, gnome-screensaver automatically resumes.
I was having a problem with mplayer not inhibiting gnome-screensaver, so I wrote this bash alias to inhibit it for mplayer:
alias xdg-screensaver -mplayer- suspend= "xdg-screensave r suspend $(wmctrl -l | sed -nr 's/^(0x[ 0-9a-f] +).+mplayer. */\1/p' )"
Obviously, you also need wmctrl installed to use it. Whenever I have mplayer running, I just run xdg-screensaver -mplayer- suspend
You could do the same thing with skype: -skype- suspend= "xdg-screensave r suspend $(wmctrl -l | sed -nr 's/^(0x[ 0-9a-f] +).+skype. */\1/ip' )"
alias xdg-screensaver
Or, if you have YouTube in a separate window: -youtube- suspend= "xdg-screensave r suspend $(wmctrl -l | sed -nr 's/^(0x[ 0-9a-f] +).+youtube. */\1/ip' )"
alias xdg-screensaver
You would just put the command you want into ~/.bashrc
Yes, this is a big hassle, and gnome-screensav er-command should be fixed to support inhibit again, but it's a usable workaround for the time being.