start a script from another tty

Hello all,

im quite new to linux and was wonder if there was a way to start a script e.g. ./script1 on another tty

for example im on /dev/pts/0 and i want to start a script called ./script1 on /dev/pts/1 but without actually typing directly into pts1 only into pts0 :slight_smile:

how would i go about doing this?

thanks alot
moka

I don't think you can do that, the shell which is connected to pts1 is not going to read commands from anywhere else. Possibly you could run a small server on pts1 which listens to incoming connections at a particular address (simple script really, but think about security implications!). What are you trying to accomplish? Perhaps something like screen(1) could help, or perhaps you just want the job to run without any tty? Look at background or cron jobs if so.