Start process in shellscript at other terminal

A programming running in tty0 crashes.

In a second terminal I kill all the processes.

Can i start the program again from this terminal?

Yes, I can, but it starts in tty1, and when i close the terminal, the program closes.

Now I want to start the program from tty1 in tty0, so i can close the tty1 and i doesn't closes the program!

Thx for helping!

Ben

If your questions means that when you exit your shell the scripts needs to stay running, you can use the command nohup

like:

>> nohup /dir/your-script

when you start a script this way you can exit your shell without terminating your script

Thx for your help... it works with nohup, i just added the &-sign and now it get started!

But it starts with the user root, because the script is started as root, and it should stay that way...

Is it possible to start it as another user?

Thx for helping!

Ben

Does your script needs root permission?

NO, just login as a other user and start your script the same way, or use

"
Example 3 Executing command with user bin's Environment and Permissions
To execute command with the temporary environment and permissions of user bin, type:
"

example% su - bin -c "command args"

Where can repalce user BIN with your account

>> su - <your account> -c "nohup <your script> & "

see also

Thx for helping, Janr!