NAME

show_comics - Show comics, distributed over a time interval


SYNOPSIS

show_netcomics [-c cmd] [-d dir] [-f rcfile] [-l|-t hh:mm] [-p [cmd]] [-D cmd] [-k lockfile|-K] [-s <hh:mm>]


DESCRIPTION

show_comics is used to display comics downloaded by netcomics. It first pops up a window to ask you what time you plan on leaving (in 24 hour time). Using the time you entered, it will evenly distribute the comics to be displayed from the time the script is run to the time you specified you will leave.

Specify the comics you want to have displayed in a file called ~/.comics. You may specify an alternate file on the command line. If no file exists, all comics will be displayed (all files that end with .gif, .jpg, or .jpeg in the directory).

If you don't have perlTk installed, use -l to specify the time and to make show_comics not try to pop up a window.

Use the -w option to have show_comics sleep until the specified allowed start time. This is useful for having it wait until your netcomics cronjob will have most likely have finished so that it doesn't try to display yesterday's comics. If it does wait, it will go ahead and first ask for the time you're going to leave.

In a UNIX environment, you can utilize the lockfile mechanism to run show_comics from many different places an not have to worry about checking to make sure it is already running. For example, you can run show_comics from your .xinitrc or .xsession as well as from a crontab. If netcomics is run in the morning, say at 7:00 by a crontab, then you could run show_comics from a cron job at 7:30, assuming netcomics will take no more than 1/2 hour. Then, in your .xinitrc file, you could also run show_comics if the time is greater than 7:30 (see -s). Therefore, if you have logged into your computer before 7:30, show_comics won't run from your .xinitrc file, but once 7:30 has come around, it will be run by your cron job. If you log into your computer after 7:30, then show_comics will fail to run at 7:30 (assuming the program show_comics uses to check to see if the display is available failed), and then show_comics will be run by your .xinitrc file.


OPTIONS

-c command
Use the specified command to display each comic instead of the default: ``nice -19 display''. The command can include the following template strings: %f - filename of comic; %d - comic directory; %% - translates to %. If the command string does not include %f or %d, the comic dir/ filename will be appended to the command.

-d dir
Use the specified location of the comics to be displayed instead of using the default directory: /var/spool/netcomics.

-D command
The specified command is used to read the directory of comics instead of using the built-in perl code for reading a directory accessible via the computer's filesystem.

-f filename
Use the specified file instead of ~/.comics for the list of comics to be displayed

-k filename
Specify the lock file's name. Default is ~/.show_comics_lock.

-l hh:mm
Don't pop up a window and use the specified time as the time to leave.

-p [cmd]
Check to make sure the display is available and if not, quit. Optional argument is the name of the program to use. A non-zero return code from this program indicates a failure to open the display. The default program used is xdpyinfo.

-s hh:mm
Specify a time that if show_comics is run before during the day, it will just exit.

-t hh:mm
Specify the default time to be put in the pop-up window.

-w
Wait until the specified start time intead of exiting if the current time is before the start time.

-v

Output verbose messages.


EXAMPLES

show_comics -w -d \\\$HOME/www/comics -c 'ssh -T user@host display' -D 'ssh -T user@host ls www/comics'
If you have a null-password ssh key pair installed, this will use the command from the -D option to get the list of comics in the directory on the remote host, and the command from the -c option and the directory specified from the -d option to display a comic. The -w option tells show_comics to wait until the default start time to actually start displaying comics if run prior to the start time.


FILES

~/.comics
Contains the a list of comics you want displayed, one per line.

/var/spool/netcomics
Default directory where comics and the web page are placed by netcomics.

~/.show_comics_lock
Default lock file used to make sure only one instance of show_comics is run


SEE ALSO

netcomics(1)


AUTHOR

Netcomics Maintainers <netcomics-maintainers@lists.sf.net>