Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

shell command to spawn new terminal window

Posted on 2008-10-24
1
3,304 Views
Last Modified: 2013-12-21
hi,

I need to write a shell script which gcc compiles my server / client app (server.c and client.c) and then runs them in separate terminal windows.  how can i spawn these new terminal windows?
echo 'Compiling client...'
gcc Client.c -o Client
 
echo "Compiling server..."
gcc Server.c -o Server -lpthread
 
echo "Running server..."
./Server

Open in new window

0
Comment
Question by:mstrelan
1 Comment
 
LVL 10

Accepted Solution

by:
mstrelan earned 0 total points
ID: 22801765
using gnome.terminal -x
echo 'Compiling client...'
gcc Client.c -o Client
 
echo "Compiling server..."
gcc Server.c -o Server -lpthread
 
echo "Running server..."
 
gnome-terminal -x ./Client localhost
gnome-terminal -x ./Client localhost 
./Server

Open in new window

0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Utilizing an array to gracefully append to a list of EmailAddresses
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

791 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question