Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
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.


  Search this Thread
Old 09-01-2005, 03:31 PM   #1
Registered: Nov 2004
Distribution: Debian/Ubuntu
Posts: 156

Rep: Reputation: 30
keeping the terminal window open

Im writing a program at the moment that will open a new terminal window in X and run some commands. The problem is if i type xterm -e ls /home/nnp the new terminal window flashes up then quickly disappears. Its the same with any terminal.

ANyone know how to make it stay on the screen? If i just open the new terminal using the xterm command or whatever it stays fine.

Old 09-01-2005, 11:08 PM   #2
Registered: Sep 2004
Location: Florida
Distribution: Slackware, VectorLinux, FreeBSD,Xubuntu
Posts: 69

Rep: Reputation: 15
Try the -hold option on xterm (and don't forget quotes around the command you want to run):

xterm -hold -e "ls /home/nnp"

This should leave the xterm window open until you close it by clicking it closed. It doesn't respond to the enter key. If you want to close the window after a certain amount of time, you can try the sleep command:

xterm -e "ls /home/nnp;sleep 5"

This will keep the window open for 5 seconds. Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Hmm. Can't seem to open a terminal window. EOHooligan Linux - General 4 02-06-2005 12:21 PM
keeping a transparent terminal in the background adizzle Linux - Newbie 6 09-27-2004 08:44 AM
how do I open a nautilus window when I'm in a terminal cjennings Linux - General 2 07-27-2004 12:41 PM
Open terminal window from web browser anoop_cn Linux - General 3 07-27-2004 03:10 AM
Keeping windows open martinpanda Programming 0 01-25-2002 03:46 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:54 AM.

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