Re: at based alarm.
On Tue 13 Feb 2018 at 08:47:56 (-0800), peter@xxxxxxxxxxx wrote:
> Test the function.
> peter@computer:~$ wake
> Yes, it works .
> Test the function with xterm.
> peter@computer:~$ xterm -e wake
> The xterm window opens and immediately closes. A function
> is not an acceptable option?
> Try the alarm using the working script.
> peter@computer:~$ echo "xterm -display :0 -e ./wake" | at 6:30
> The xterm window doesn't open but there is no error message
> to the originating terminal or to syslog.
> I need to understand why "xterm -display :0 -e ./wake" fails for at
> but works interactively.
Because .bashrc wasn't called. This might work for a bash function:
xterm -display :0 -e bash -c . .bashrc ; wake