Sample Header Ad - 728x90

How can Linux "at" be used to open a gnome-terminal window?

0 votes
0 answers
69 views
Using "at" to execute a shell command that writes to a file works. Using it to open a gnome-terminal does not work. OS: Ubuntu 20.04 A file containing a command to write the date to a file was created and made executable. date-file.sh: date > date.txt This line was entered. at now -f date-file.sh As expected, the file date.txt was created and contained the date string. The (redacted) output of sudo systemctl status atd showed
May 16 05:25:25 - atd: pam_unix(atd:session): session opened for user - by (uid=1)
May 16 05:25:25 - atd: pam_unix(atd:session): session closed for user -
A file containing a command to open a gnome-terminal was created and made executable. open-term.sh: /usr/bin/gnome-terminal This line was entered. at now -f open-term.sh No error was reported in the terminal, but nothing seemed to happen. No gnome-terminal window opened. The (redacted) output of sudo systemctl status atd showed
May 16 05:31:32 - atd: pam_unix(atd:session): session opened for user - by (uid=1)
May 16 05:31:32 - atd: pam_unix(atd:session): session closed for user -
May 16 05:31:32 - atd: Exec failed for mail command: No such file or directory
Both command files are in the current directory, and the gnome-terminal command is given with an absolute path, so I don't understand the cause of the "No such file or directory" error. Can the "at" command be used to open a terminal window? Thank you for any help.
Asked by bac-cab (1 rep)
May 16, 2023, 10:28 PM