View Single Post
Old 2022-08-02, 11:26   #8
paulunderwood
 
paulunderwood's Avatar
 
Sep 2002
Database er0rr

111916 Posts
Default

Quote:
Originally Posted by EdH View Post

I'm trying to get a script to run when the system powers up and the math userid becomes active, with a visible terminal existing in the GUI when I bring it up remotely via an SSH VNC session, since these machines are headless. I do have a script that runs a gnome-terminal that in turn runs the script I'm ultimately interested in. The issue is just getting it to run when it is powered up.
I see this as two problems: Firstly getting something to run at boot and secondly getting something to run when logging in.

For the first use @reboot su math-user -c "X" (in sudo crontab -e) where X is uses the screen command to run your program.

Secondly, use the xterm command (or whatever) with the screen command again to see the status of your process. This command string can be put into your .bashrc file on the target machine.

Last fiddled with by paulunderwood on 2022-08-02 at 11:31
paulunderwood is online now   Reply With Quote