LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 10-10-2013, 12:14 PM   #1
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 131

Rep: Reputation: 15
Scripting Question


Hi.

Id like to know how to open up another terminal in a script and have it excecute a command on its own.

For example, if I type gnome-terminal from a shell it opens a new shell.

Id like to know how to have a script open a new shell and execute a command once.

For a basic example, how would my script open a gnome-terminal and then run this command:

Code:
echo "Hello new shell."
Then keep running the original script while leaving this new shell open.

Thank You.
Scrag
 
Old 10-10-2013, 12:57 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Here you will find some answers to your question: http://www.linuxquestions.org/questi...1/#post3600982. Rgearding the "keep running the original script while leaving this new shell open" part, just launch the new terminal in background, so that your script will continue the execution in foreground.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A question on scripting sryzdn Linux - Newbie 2 08-25-2013 10:27 AM
Scripting question kaplan71 Linux - Software 3 04-13-2010 10:59 AM
Scripting question jim.thornton Linux - Newbie 10 03-24-2008 08:12 AM
Scripting question krazykevin Programming 9 03-19-2008 01:40 PM
Scripting question.... Darklight451 Linux - Newbie 2 09-13-2004 11:29 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration