start a script from another tty


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting start a script from another tty
# 1  
Old 05-04-2008
Error 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 Smilie

how would i go about doing this?

thanks alot
moka
moka
# 2  
Old 05-05-2008
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Systemd cant start my script

Hi, systemd cant start my script, but it work, at command prompt. Code and execute at command prompt #cat collector.sh #!/bin/bash case $1 in start) /home/postgres/scripts/pgwatch2/pgwatch2.sh /home/postgres/scripts/pgwatch2/pgwatch2_UI.sh ;; ... (7 Replies)
Discussion started by: kvaikla
7 Replies

2. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

3. Shell Programming and Scripting

Script to start process

Hi I want to create a script to be able to check if a process is running and act on it. Essentially I want to: Check acc process status /opt/ca/APMCommandCenterController./apmccctrl.sh status If process found not to be running Execute start command... (6 Replies)
Discussion started by: simpsa27
6 Replies

4. Shell Programming and Scripting

Start up init d script

Hi All, I'm trying to build a start up script, wud be gr8 if any one can explain what the below field means and how can i check it for my script. DAEMON_PATH="/home/wes/Development/projects/myapp" DAEMON=myapp DAEMONOPTS="-my opts" NAME=myapp DESC="My daemon description"... (4 Replies)
Discussion started by: Karthick N
4 Replies

5. Shell Programming and Scripting

Linux csh script going to Suspended (tty output) when running with & (bg)

i have strange behavior i have csh file that run java process something like this : run_server.csh #!/usr/bin/tcsh java -Dtest=testparam -cp ${TEST}/lib/device.jar:${TEST}/conf:${TEST}/lib/commons-logging-1.1.1.jar com.device.server when i run it like this :... (7 Replies)
Discussion started by: umen
7 Replies

6. Shell Programming and Scripting

Use Webpage to Start Script

I apologize if this is in the incorrect section, I'm not quite sure which section it should go in. Anyways... I've got a script that I'd like to be able to start with a webpage, something that just has a button that says "Start this Bot", which will start the bot and put it in the background.... (4 Replies)
Discussion started by: JoeGazz84
4 Replies

7. Shell Programming and Scripting

Start program in background (or start crontab ahead of time)

Hey! I'm working on a script that will add a user, create some configfiles, and add a crontab for the user. The crontab looks like the following: @reboot /home/user/program config.conf & I would like for this process to start at the end of my script under the corresponding username by... (0 Replies)
Discussion started by: noratx
0 Replies

8. Shell Programming and Scripting

Trying to run a script over ssh, having issues with tty assignment

Hey folks! I'm trying to run a tcpdump command that monitors for possible malicious traffic. I want to be able to run this on any of several remote boxes that I monitor which all have different capture interfaces. I've gotten the script to the point where it logs into the box and attempts to run... (8 Replies)
Discussion started by: JASI
8 Replies

9. Shell Programming and Scripting

Start up script

Hello, I have a script that starts a type of web server that I need to get to start up at startup, I would like to keep the current script in its directory and not stick it in the rc directorys. So really I want a shell script that will execute the web server script at startup. I dont really... (1 Reply)
Discussion started by: Mr Pink
1 Replies

10. UNIX for Dummies Questions & Answers

Start Up Script

guys/gals...does anyone have a startup shell script for oracle/sybase...meaning at shutdown the databases stop themselves and at start up they start automatically...thanks much... (3 Replies)
Discussion started by: suntan
3 Replies
Login or Register to Ask a Question