Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #201286

Re: Disable and Enable Screensaver via Bash Script

From <tomas@tuxteam.de>
Newsgroups linux.debian.user
Subject Re: Disable and Enable Screensaver via Bash Script
Date 2018-10-16 09:20 +0200
Message-ID <wJrO1-1dS-1@gated-at.bofh.it> (permalink)
References <wJkWd-5nC-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Mon, Oct 15, 2018 at 11:51:48PM +0000, Matthew Crews wrote:
> Hi all,
> 
> Currently I am running Stretch with XFCE (window manager is XFWM4). I
> presently use Xscreensaver for my screen saver. Caffeine indicator
> doesn't work with XFCE as far as I've been able to tell, so if I want to
> temporarily disable the screensaver I need to do so manually, and
> re-enable it manually.
> 
> I'm wondering, is there a way to perform this feature with a bash
> script? What I'm looking for is a bash script that does the following,
> in sequence:
> 
> 1. Disable Xscreensaver
> 2. Run a given application
> 3. When the application closes, re-enable Xscreensaver

"One" way to do it would be to issue periodically "xscreensaver-command -deactivate"
while your application is running [1].

Here [2] is a practical example, for video players.

Enjoy

[1] https://www.jwz.org/xscreensaver/man3.html
[2] https://www.jwz.org/xscreensaver/faq.html#dvd
-- tomás

Back to linux.debian.user | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Disable and Enable Screensaver via Bash Script Matthew Crews <mailinglists@mattcrews.com> - 2018-10-16 02:00 +0200
  Re: Disable and Enable Screensaver via Bash Script <tomas@tuxteam.de> - 2018-10-16 09:20 +0200
    Re: Disable and Enable Screensaver via Bash Script Cindy-Sue Causey <butterflybytes@gmail.com> - 2018-10-16 13:20 +0200
      Re: Disable and Enable Screensaver via Bash Script Étienne Mollier <etienne.mollier@mailoo.org> - 2018-10-16 23:00 +0200
    Re: Disable and Enable Screensaver via Bash Script Matthew Crews <mailinglists@mattcrews.com> - 2018-10-17 20:50 +0200
      Re: Disable and Enable Screensaver via Bash Script "tomas@tuxteam.de" <tomas@tuxteam.de> - 2018-10-17 22:00 +0200

csiph-web