[RC5] dnetc from xscreensaver

Peter Cordes peter at llama.nslug.ns.ca
Sat Jan 22 18:21:10 EST 2000

On Fri, Jan 21, 2000 at 09:12:28PM -0600, Chris Frost wrote:
> On Thu, Jan 20, 2000 at 11:31:33PM -0500, chicks at chicks.net wrote:
> > Has anyone gotten the DNET client working under linux so that it comes on
> > when the xscreensaver is activated?  My friend wants to run it, but she
> > has to shut it down every time she wants to play Quake 3.  :-)  I don't
> > mind doing it on mine, but she won't futz with it.
> I haven't used xscreensaver enough to know whether you can do program
> execution at startup/shutdown, but you could write a simple little script
> to check running processes every n minutes, then rm or touch the dnetc's
> pause file.

 Just checked xscreensaver(1), and came up with a good (IMHO:) idea:
set the resource xscreensaver.programs (or the programs entry it
~~/.xscreensaver) from (example from man page):
programs: \
	qix -root                          \n\
	ico -r -faces -sleep 1 -obj ico    \n\
	xdaliclock -builtin2 -root         \n\
	xv -root -rmode 5 image.gif -quit  \n


programs: \
	run-dnetc-until-exit.sh qix -root                          \n\
	run-dnetc-until-exit.sh ico -r -faces -sleep 1 -obj ico    \n\
	run-dnetc-until-exit.sh xdaliclock -builtin2 -root         \n\
	run-dnetc-until-exit.sh xv -root -rmode 5 image.gif -quit  \n

Or, better, set
bourneShell:  run-dnetc-until-exit.sh

run-dnetc-until-exit.sh might look like this:

dnetc -quiet  # fork off dnetc
trap 'dnetc -kill' EXIT  # arrange to stop dnetc when we exit, e.g. by SIGTERM
"$@"  # run our arguments

This will stop and restart dnetc whenever xscreensaver switches to another
screensaver.  Not a big problem, though.

 You might have to do something to get dnetc to keep running when DPMS power
saving shuts down the display, since xscreensaver notices this and doesn't
run a program while the display is DPMS blanked.  I don't have any ideas
there.  (except to get the source for xscreensaver and change it so it
starts dnetc instead of running a screensaver, and stops dnetc instead of
stopping the screensaver.  You could clean out a bunch of unneeded code, I'm

 If you simply want dnetc to run and have a blank screen then use
programs:  dnetc

A probably-superior option would be to use quake.sh:

trap 'dnetc -unpause' EXIT  # restart dnetc when we're done
dnetc -pause
quake3 ... "$@"
# dnetc unpaused by trap, and will still happen if terminated by a catchable
# signal

 Warning, all the shell scripts and stuff above are completely untested, and
probably need some debugging.  If you want to use them but they don't work
and you're not a shell wizard, I can help you fix them :)

#define X(x,y) x##y
DUPS Secretary ; http://is2.dal.ca/~dups/
Peter Cordes ;  e-mail: X(peter at cordes.phys. , dal.ca)

"The gods confound the man who first found out how to distinguish the hours!
 Confound him, too, who in this place set up a sundial, to cut and hack
 my day so wretchedly into small pieces!" -- Plautus, 200 BCE

To unsubscribe, send 'unsubscribe rc5' to majordomo at lists.distributed.net
rc5-digest subscribers replace rc5 with rc5-digest

More information about the rc5 mailing list