Start process in shellscript at other terminal

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Start process in shellscript at other terminal
# 1  
Old 08-30-2002
Question 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!

# 2  
Old 08-30-2002
Question If your question means

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


>> nohup /dir/your-script

when you start a script this way you can exit your shell without terminating your script
# 3  
Old 09-02-2002
to start with other user

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!

# 4  
Old 09-02-2002
Tools try this

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
# 5  
Old 09-02-2002
Hammer & Screwdriver Thx

Thx for helping, Janr!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Process on a specified Terminal and Socket Port does not start

Hi, I new to AIX, and I have been using Rocket UniData in it. I had to set up a Process for Data Exchange by assigning a unique Terminal and a Socket Port to that process. I ran the process for the first time and it was successful and after use I stopped the process. Now when I want to run it... (3 Replies)
Discussion started by: BejoyS
3 Replies

2. Windows & DOS: Issues & Discussions

Start X Server without starting a terminal

when I run C:\cygwin\bin\run C:\cygwin\bin\startxwin.exe it fires up a terminal by default. Can I eliminate that terminal and start the x server as a service silently and sits in my status bar just there? Thanks Jack (0 Replies)
Discussion started by: lucky7456969
0 Replies

3. Shell Programming and Scripting

Put Script on Start-up the sh Terminal

Hi all I want to put this script on start-up the sh Terminal to save history of output: if ; then logdir=$HOME/terminal-logs if ; then mkdir $logdir fi gzip -q $logdir/*.log logfile=$logdir/$(date +%F_%T).$$.log ... (12 Replies)
Discussion started by: Rahim_T
12 Replies

4. OS X (Apple)

Terminal autorunning commands at start

How do I make terminal autorun commands at start up? For example, I have several windows of terminal, I want one to automatically run 'top' and a couple others autorun 'man' pages. Is there any way I can do this? (1 Reply)
Discussion started by: randomtypos
1 Replies

5. OS X (Apple)

How to start a new terminal from command line?

Dear All, Anyone knows how to start a new bash terminal from command line? Another question: when I use "open" command (open test.pdf) to open a pdf file, the PDF reader will start up, but cannot associate with that file. Anyone knows why? (1 Reply)
Discussion started by: andrewust
1 Replies

6. Solaris

Start process independent from TERMINAL (or also with PPID 1)

Hi *, please, I need fast tip (help). I have a process starting through /etc/rc3.d/xxxx script. However, sometimes (mostly because of testing reasons) I need to stop the process, change something and then start it again. But: 1) when I start it in terminal, the process dies when I leave the... (2 Replies)
Discussion started by: freeangel
2 Replies

7. UNIX for Dummies Questions & Answers

Script to start background process and then kill process

What I need to learn is how to use a script that launches background processes, and then kills those processes as needed. The script successfully launches the script. But how do I check to see if the job exists before I kill it? I know my problem is mostly failure to understand parameter... (4 Replies)
Discussion started by: holocene
4 Replies

8. Shell Programming and Scripting

Script - How to automatically start another process when the previous process ends?

Hi all, I'm doing automation task for my team and I just started to learn unix scripting so please shed some light on how to do this: 1) I have 2 sets of datafiles - datafile A and B. These datafiles must be loaded subsequently and cannot be loaded concurrently. 2) So I loaded datafile A... (10 Replies)
Discussion started by: luna_soleil
10 Replies

9. UNIX for Dummies Questions & Answers

Terminal doesnt start

Hi everyone, I'm pretty new using UNIX, but a friend of mine was helping me configure the unix terminal on my mac, and he changed some stuff on the bash profile .bash_profile. Everything was going well until I shut my computer and restarted it. When I opened the terminal this time this is what... (1 Reply)
Discussion started by: thefloydpink
1 Replies

10. Shell Programming and Scripting

how to start a process and make it sleep for 5 mins and then kill that process

how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies
Login or Register to Ask a Question