On Thu, Feb 27, 2020 at 09:39:35AM +0200, Ricky Tigg wrote: > Hey. Goal: scheduling tasks along with visual output in terminal. I > concieved it could be achieved under Linux. I had defined a use-case for > that purpose.. > > $ at -q c now + 1 minute > warning: commands will be executed using /bin/sh > at> dnf check-update --security | gnome-terminal > at> <EOT> > job 24 at Thu Feb 27 09:35:00 2020
On Thu, Feb 27, 2020 at 10:55:35AM +0200, Ricky Tigg wrote: > there is no track of comments here. See I Andreas Kusalananda K comment. > Not award of all previous comments. Otherwise X was not used; Wayland was > used. Anyway current bug list not appropriate to track software issues. So. You're using GNOME under Wayland, and you want cron or at (or both) to be able to open terminals on your logged-in display, and run commands in them. (I *assume* you want to run commands in these terminals, and not stuff pre-typed characters into the shell's input buffers, as your original messages seemed to be saying.) If it were X11, I might be able to suggest some sort of solution, but I know almost nothing about Wayland. You'll have to figure out how to arrange for your daemonized jobs (at/cron) to find and deliver the appropriate authentication tokens to Wayland in order to be permitted to access the display. You'll also have to figure out how to tell it the name of the correct display. Once you've got THAT part figured out, then you can attempt to launch the terminals which are rigged to run the commands you want them to run. It's also not clear whether you want these terminals to run a command and then freeze up, not closing but not accepting user input -- or to run the commands and then launch an interactive shell. The solutions to the former are highly terminal-emulator-specific. The solutions to the latter take two forms, one of which has already been presented earlier in this thread: (1) xterm -e bash --rcfile <(cat ~/.bashrc; echo "echo 'X-Y sucks'") (2) xterm -e sh -c 'echo "X-Y sucks"; exec bash' Conversion of those forms into gnome-terminal syntax is left as an exercise for the GNOME users. There is definitely no bash bug here. This was a request for help, and while bash is MARGINALLY involved, the primary issues are operating system ones. You'd be better served asking for help on a mailing list dedicated to Wayland, or to your operating system, or to the use of Wayland on your operating system, if such a specialized list exists. Finally, while it appears that English is not your native language, and I appreciate that you're struggling to communicate, taking a few moments to lay out the details of your request would help both you and the people trying to assist you. Basic background information: "I'm using Ubuntu 18.04" or "I'm using Debian 10.3" or whatever. "I'm using GNOME with Wayland." Basic problem statement: "I want cron to run gnome-terminal, and I want gnome-terminal to run a script I wrote." Nothing fancy. Just simple statements. >From there, we can dive into details. It matters whether the script runs forever, or terminates. If the script terminates, we need to know what you want the terminal to do after the script is finished. Do you want it to run an interactive shell, or hang around doing nothing forever, or hang around for a few seconds and then close, or simply close as soon as the script exits...? Other considerations: what happens if you are not logged in at the time cron starts the job? What happens if you're logged in to multiple Wayland sessions? Which one should it try to use? Or should it try to use all of them, in parallel? What happens if someone *else* is logged in on whatever Wayland's equivalent of "DISPLAY=:0" is?