A task/script scheduled with
at (AFAIK) can not run inside a specific terminal: it can only print the output (through redirection) of a task/script to a specific terminal.
Instead, I would like to schedule a command which should run in an already open terminal, as if I were typing the command there and then pressing Enter.
Is this possible at all?
I'm running Ubuntu 22.04, but if there's a solution I wish it is not dependent on the specific Linux version.
Some more details: I can run a script when I log into or I open the terminal, to print the current
tty in a file. So the terminal is assumed to be always available.
The job should ignore the work I'm doing and just run, printing its output where the cursor is (if it overlaps with what I'm visualizing, it is ok). It does not need to acquire any input from the user: it just has a text output.