Re: [Hampshire] Using at command with xmessage

Top Page

Reply to this message
Author: Bob Dunlop
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] Using at command with xmessage
On Mon, Jun 18 at 05:08, Clive Woodfine wrote:
> I am trying to send myself an alarm call in a few minutes time. If I
> run 'xmessage "Wake Up"' from the command line in Bash a little window
> pops up showing Wake Up.
>
> If I run 'at now + 2 minutes' then press enter I get
> at>          At which point I enter 'xmessage '"Wake Up"' and press
> enter which gives
> at>          I then do Ctrl D and get
> at> <EOT>
> job 42 at 2007-06-18 16:38
> [clive@Core ~]$

>
> The at command seems to work as I get a mail saying
> Error: Can't open display:


Try
DISPLAY=":0.0" xmessage "Wake Up"

but this will only work if your default display is still writeable by
the user when the at job runs.

At doesn't normally preserve the DISPLAY environment variable, hence
the error message.
-- 
        Bob Dunlop