Shell script problem...

Code junkies hangout here

Moderators: ChrisThornett, LXF moderators

Shell script problem...

Postby Bazza » Fri Mar 15, 2013 1:33 pm

Hi guys and gals...

I can't find anything relevant from thw WWW...

Bash question:-

Is it possible to open a new Terminal tab or Window and launch a shell script inside this new Terminal from a shell script running in the original Terminal?

Just answer Yes or No...

If it is possible then I will attempt at finding and doing it.

TIA...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby Dutch_Master » Fri Mar 15, 2013 2:26 pm

Theoretically: yes. In practice you'll need an X11 environment (obviously :P) and some experiments... Perhaps echo the required command to the child terminal in the create command of said terminal. (bit of C++ programming perhaps?)
Dutch_Master
LXF regular
 
Posts: 2440
Joined: Tue Mar 27, 2007 1:49 am

Postby Ram » Fri Mar 15, 2013 3:14 pm

man screen

DESCRIPTION
Screen is a full-screen window manager that multiplexes a physical ter‐
minal between several processes (typically interactive shells). Each
virtual terminal provides the functions of a DEC VT100 terminal and, in
addition, several control functions from the ISO 6429 (ECMA 48, ANSI
X3.64) and ISO 2022 standards (e.g. insert/delete line and support for
multiple character sets). There is a scrollback history buffer for
each virtual terminal and a copy-and-paste mechanism that allows moving
text regions between windows.
~~~~~~~~~~

lubuntu LXDE 13.10 running on AMD Phenom II*4; ASUS Crosshair III Formula MB; 4 GB Ram.....
User avatar
Ram
LXF regular
 
Posts: 1675
Joined: Thu Apr 07, 2005 9:44 pm
Location: Guisborough

Postby Gordon » Fri Mar 15, 2013 5:33 pm

Yes

xterm -e script_to_run

or

exec xterm -e script_to_run
User avatar
Gordon
LXF regular
 
Posts: 209
Joined: Thu Apr 07, 2005 5:01 pm
Location: Bradford, West Yorkshire

Postby Bazza » Fri Mar 15, 2013 6:00 pm

Thanks guys...

Gordon, many thanks almost exactly what I want except on exiting the child script the xterm terminal closes down. I want it to remain open and manually close it done when I am actually finished with it...

Will pursue it further...

Thanks...

Bazza...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough

Postby johnhudson » Fri Mar 15, 2013 10:26 pm

Maybe too obvious but is there an
Code: Select all
exit
anywhere in the programs? Should be
Code: Select all
return
.
johnhudson
LXF regular
 
Posts: 873
Joined: Wed Aug 03, 2005 1:37 pm

Postby Bazza » Sat Mar 16, 2013 12:27 pm

Hi jh...

No need to worry sussed it... ;o)

See other upload...
73...

Bazza, G0LCU...

Team AMIGA...
User avatar
Bazza
LXF regular
 
Posts: 1476
Joined: Sat Mar 21, 2009 11:16 am
Location: Loughborough


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest