LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-05-2007, 01:28 PM   #1
Uruclef
Member
 
Registered: Sep 2004
Distribution: Debian Etch
Posts: 45

Rep: Reputation: 15
Automatically starting a program in a new terminal


Hi everyone! I have a tricky question here.
I'm trying to write a script that opens an xterm, runs cmus in that terminal, and (but this is a secondary question) then closes the terminal when I close cmus.

The main problem is to switch to the second just-made terminal and run there a command.

How would you do that?
 
Old 05-05-2007, 01:30 PM   #2
johndoe0028
Member
 
Registered: Jun 2005
Location: CA, USA
Distribution: Gentoo
Posts: 165

Rep: Reputation: 30
Add the -e option to xterm and then the command that you want to run.

xterm -e cmus
 
Old 05-05-2007, 01:46 PM   #3
Uruclef
Member
 
Registered: Sep 2004
Distribution: Debian Etch
Posts: 45

Original Poster
Rep: Reputation: 15
Cool!!! That's exactly what I was looking for. Thank you!!
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting a program so it opens in a new terminal dangerousdave Linux - Newbie 1 03-24-2005 04:26 PM
Starting program with terminal TazLinux Linux - General 8 02-26-2003 07:16 AM
Starting a forking program in terminal Ztyx Linux - General 2 11-09-2002 05:06 PM
Starting program automatically as logging in adcripps Linux - Newbie 9 03-13-2002 12:47 PM
Starting X Automatically shari Linux - Software 2 08-08-2001 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:50 AM.

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