At 08:51 PM 12/27/2001 +0100, you wrote:
>On Wed 26 December 2001 08:03, you (Wendy Nexcom) wrote:
> > In MS Windows, if I still have queue in printer spool and I restart
> > computer, a dialog box will appear "there are still jobs in printer spool:
> > yes, no, cancel?"
> >
> > Is there any program in RH that have this feature (rather than type lpq and
> > lrpm)?
>
>You may write it yourself.
>Create a script that checks the status of your favourite print daemon, if
>there are no jobs it executes the shutdown command. If there are some jobs,
>it asks for confirmation, and depending on the answer executes the shutdown
>or quits.

If shutdown is run from a gdm or kdm login screen, then you would need to 
use something like xmessage, gmessage, or Xdialog to ask the user about 
pending print jobs.

But suppose X is misbehaving and the user accessed a console using 
Ctrl-Alt-F1. Then the script would have to get the user's input via the 
console.

I don't have a X box handy, but it may be possible to test for the 
existence of the $DISPLAY environment variable and have the script use the 
appropriate tool to prompt the user and get input.


Tony
-- 
Anthony E. Greene <[EMAIL PROTECTED]>
PGP Key: 0x6C94239D
AOL/Yahoo Chat: TonyG05
Linux. the choice of a GNU generation. <http://www.linux.org/>



_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to