Re: Problem with script

2021-11-19 Thread Paul Smith
Fixed now! I had to put the following line in the script: export DISPLAY=:0 Paul On Fri, Nov 19, 2021 at 8:30 PM Ulf Volmer wrote: > > On 19.11.21 20:54, Cameron Simpson wrote: > > On 19Nov2021 20:42, Ulf Volmer wrote: > >> gxmessage relays on an X11 display. You have none in a session starte

Re: Problem with script

2021-11-19 Thread Ulf Volmer
On 19.11.21 20:54, Cameron Simpson wrote: On 19Nov2021 20:42, Ulf Volmer wrote: gxmessage relays on an X11 display. You have none in a session started via atd. You're confusing this with cron. At preserves your environment. If he's still logging into his X11 session this should work. Yes, a

Re: Problem with script

2021-11-19 Thread Paul Smith
Thanks, Ulf and Garry. Ulf seems to be right, as the following echo "XAUTHORITY=/run/user/1000/gdm/Xauthority DISPLAY=:0 gxmessage \"hello\"" | at 7:52PM -M while echo "gxmessage \"hello\"" | at 7:52PM -M does not. Should I put XAUTHORITY=/run/user/1000/gdm/Xauthority DISPLAY=:0 in the sc

Re: Problem with script

2021-11-19 Thread Cameron Simpson
On 19Nov2021 20:42, Ulf Volmer wrote: >gxmessage relays on an X11 display. You have none in a session started >via atd. You're confusing this with cron. At preserves your environment. If he's still logging into his X11 session this should work. Cheers, Cameron Simpson

Re: Problem with script

2021-11-19 Thread Garry T. Williams
On Friday, November 19, 2021 1:04:44 PM EST Paul Smith wrote: > I am trying to run a script with the following command: > > echo "~/scripts/teste.sh" | at 5:59PM > > but nothing happens. That's because there is no tilde expansion inside of quotes. Lose the quotes and all will be well. -- Garr

Re: Problem with script

2021-11-19 Thread Paul Smith
Thanks, Joe. I put echo xxx in the second line of the script and nothing was printed. The log mentions the creation of a new session, which is closed when (apparently) the execution of the script finishes. Paul On Fri, Nov 19, 2021 at 7:30 PM Joe Zeff wrote: > > Adding echo or print statement

Re: Problem with script

2021-11-19 Thread Ulf Volmer
On 19.11.21 19:04, Paul Smith wrote: echo "~/scripts/teste.sh" | at 5:59PM [...] gxmessage -center \ gxmessage relays on an X11 display. You have none in a session started via atd. Assuming, you are running gnome and your uid is 1000, XAUTHORITY=/run/user/1000/gdm/Xauthority DISPLAY=:0

Re: Problem with script

2021-11-19 Thread Joe Zeff
Adding echo or print statements to a program or script for debugging is such an old technique that most people have either forgotten it or never learned it. On 11/19/21 12:11 PM, Paul Smith wrote: Nov 19 19:07:00 localhost atd[45263]: Exec failed for mail command: No such file or directory I

Re: Problem with script

2021-11-19 Thread Paul Smith
Thanks, Clifford. No, they are not scheduled to start later -- I have just checked that with atq. Moreover, the log tells that the script is run at the specified time. Paul On Fri, Nov 19, 2021 at 7:19 PM Clifford Snow wrote: > > Also check at -l, or atq to see if it is scheduled to run later. >

Re: Problem with script

2021-11-19 Thread Clifford Snow
Also check at -l, or atq to see if it is scheduled to run later. On Fri, Nov 19, 2021 at 11:12 AM Paul Smith wrote: > On Fri, Nov 19, 2021 at 7:09 PM Joe Zeff wrote: > > > > > I am trying to run a script with the following command: > > > > > > echo "~/scripts/teste.sh" | at 5:59PM > > > > > >

Re: Problem with script

2021-11-19 Thread Paul Smith
On Fri, Nov 19, 2021 at 7:09 PM Joe Zeff wrote: > > > I am trying to run a script with the following command: > > > > echo "~/scripts/teste.sh" | at 5:59PM > > > > but nothing happens. > > Try putting some echo commands into the script, redirected to a file so > that you can see if the script runs

Re: Problem with script

2021-11-19 Thread Joe Zeff
On 11/19/21 11:04 AM, Paul Smith wrote: Dear All, I am trying to run a script with the following command: echo "~/scripts/teste.sh" | at 5:59PM but nothing happens. Try putting some echo commands into the script, redirected to a file so that you can see if the script runs at all, and if so,