LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-03-2010, 06:57 AM   #1
nishanthame
LQ Newbie
 
Registered: Mar 2010
Location: Colombo
Distribution: Ubuntu and Cent OS
Posts: 9

Rep: Reputation: 2
gnome-terminal tab problem


I use following command to open the terminal with two tabs with one of them excuting a 'ls' command.

gnome-terminal --tab-with-profile=Default --working-directory=/home/nishantha/Desktop --command='ls' --tab-with-profile=Default --working-directory=/home/nishantha

But the problem is the tab which executes the command closes immediately after the completion of the command. I would be very thankful if someone can suggest me a solution for this.
 
Old 10-03-2010, 09:22 AM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
It doesn't look like it's possible to do it that way. After a bit of google, it appears that both the -e and -x options are designed to mimic the -e option of xterm, which is to simply launch a command and then exit.

The only easy solution I can think of is to add your command to the end of bashrc (or the config script of whatever shell you use), then it will run during initial start-up.

I'm not sure about the best way to limit it to gnome-terminal only though, if that's what you want. A quick test shows that it sets the COLORTERM variable, however, so you should be able to use that.
Code:
if [[ $COLORTERM = gnome-terminal ]]; then
  ls
fi
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tab does not auto-complete in terminal General Fedora 8 09-12-2013 02:48 AM
Cron tab error: No entry for terminal type "unknown"; sing dumb terminal settings. shlomi.s Linux - Software 12 09-06-2011 10:20 AM
gnome-terminal Command to open up a new tab.... chamila1986 Linux - Newbie 2 08-20-2010 11:06 AM
X Error of failed request - when open a new tab in gnome-terminal quanta Fedora 0 03-17-2008 11:02 PM
what is the command being called when pressing ctrl-shift-tab on gnome-terminal odysseus.lost Linux - Desktop 2 10-11-2006 11:49 AM


All times are GMT -5. The time now is 12:15 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration