![]() |
seeking HOWTO inhibit screen saver from command-line
I'd like to know (1) some command, or (2) some programming that will let me disable-enable the screen saver from a command line. More specifically, I'd like something that I can add to shell scripts.
While running a Gnome desktop, I open a console window and run a command. The command runs a spews to stdout because I want to watch things run. In spite of all of this "running" the screen-saver kicks thinking things are idle without key droppings or mouse droppings. While I'm asking for help... How can a script discover if it is running in a kernel console, or xterm-konsole, or backgrounded? Thanks, ~~~ 0;-Dan |
I'm assuming your system is using gnome-screensaver? If you can't find any documentation for cli control of the screensaver program itself (and I couldn't find any on my system) then you should be able to bludgeon it into submission with
Code:
killall -STOP gnome-screensaverFor your 2nd question, I'm not sure of a definitive answer, but the command "tty" will return something like "/dev/tty2" when running in a vt, and "/dev/pts/1" if running in a gui terminal or other non-vt environment. |
Gnome screensaver doesn't work
I have searched for a solution to this problem but no luck. I am running FC 11 and out of the box gnome. At first the screensaver worked normally, shutting off the screen after 5 mins. Now it does not work. I found the following command line suggestion in the forums, and it looks like that may point to a problem -- the screensaver is inactive, but how to make it active? I am happy with command line, but have no idea what the command to use would be. I may be misunderstanding the term inactive, of course. Logically, the screensaver would have to be inactive if I am typing a command -- but the forum post where I saw this command showed "The screensaver is active" ??
home/rdn/Music% gnome-screensaver-command --query The screensaver is inactive The screensaver is not inhibited I tried this command (from another post): home/rdn/Music% killall -CONT gnome-screensaver But the query returns the same thing as before. The only thing I can think of that might be an issue is that using the "appearances" background facility I added a couple dozen pictures that I thought I might use as screen background. Not long after that I discovered that my screen did not go black after 5 mins as expected. Not sure this correlation has any causal meaning, however. I then tried various things, finally returning to the plain (blue) default. That seemed to fix it for a short while, then after a couple of days, the bad or non-behavior returned -- the screensaver does not work. Any help will be appreciated. My system runs all the time, but I don't want the screen to be on all the time. Roger |
search 'screensaver inhibit' Among the hits:
https://wiki.ubuntu.com/InhibitingGnomeScreensaver |
Much of the replies so far assume you're using gnome-screensaver (and maybe you are..) but just incase you're interested, and are using xscreensaver, try below:
To disable xscreensaver from commandline or script, do (sometimes you need to do this twice): shell$ xscreensaver-command -exit and to re-activate the screensaver and background it, do (assuming the default display of :0.0): shell$ xscreensaver -display :0.0 -nosplash & Sasha |
Quote:
|
Quote:
|
| All times are GMT -5. The time now is 08:31 PM. |