LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-26-2006, 03:43 PM   #1
454redhawk
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Rep: Reputation: 0
Gnome-terminal equivalent to "konsole --noclose -e"


Can anyone tell me the Gnome-terminal equivalent to "konsole --noclose -e"

I want to launch a terminal and command in gnome and have the window stay open after the command is finished.

Thanks
 
Old 12-28-2006, 01:36 PM   #2
nightshade_1977
Member
 
Registered: Nov 2006
Location: Oklahoma City, OK
Distribution: Suse, Fedora, RHEL, Ubuntu
Posts: 112

Rep: Reputation: 15
what distro are you using?
some have that option already I use suse 10.1 and have no issues with my terminal emulation in gnome
 
Old 12-28-2006, 03:19 PM   #3
454redhawk
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nightshade_1977
what distro are you using?
some have that option already I use suse 10.1 and have no issues with my terminal emulation in gnome

Using Ubuntu.

I frequently use this option in KDE (MEPIS) but cant seem to find the right option for gnome-terminal

The hold option is for Xterm
The noclose option is for konsole
What is it for gnome-terminal?

Are you saying you can issue a command in a script (or whatever) for gnome-terminal and have the new window it creates stay open after execution? I am aware of the ability to use read in a script to hold the process. However this is not how I want to use it.

Thanks
 
Old 12-29-2006, 02:20 PM   #4
nightshade_1977
Member
 
Registered: Nov 2006
Location: Oklahoma City, OK
Distribution: Suse, Fedora, RHEL, Ubuntu
Posts: 112

Rep: Reputation: 15
ok I must have misunderstood
I thought your problem was from the terminal line after executing a command

no I have not had the terminal stay open after script execution
I have not had a need to do so

I will look into it and let you know if I find anything
 
Old 12-30-2006, 12:29 AM   #5
454redhawk
LQ Newbie
 
Registered: Dec 2006
Posts: 13

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nightshade_1977
ok I must have misunderstood
I thought your problem was from the terminal line after executing a command

no I have not had the terminal stay open after script execution
I have not had a need to do so

I will look into it and let you know if I find anything
Thanks for your attention.
 
Old 03-24-2009, 11:54 AM   #6
tiesel
LQ Newbie
 
Registered: Mar 2009
Distribution: Fedora and CentOS
Posts: 1

Rep: Reputation: 0
Solution

Create shell script e.g. shell.sh:

#!/bin/bash
$@
/bin/bash

and call it that way:

gnome-terminal -x shell.sh <my command, e.g. pwd>

If you want several commands to be executed and want to have a log displaying the arguments that arrived in shell.sh the latter should look like:

#!/bin/bash
echo $@ > shell.log
echo $@ | /bin/bash
/bin/bash

This way, the argument gets another round of substitution (mainly interesting to chop commands on ';' and to execute them one by one) and you would call it that way:

gnome-terminal -x shell.sh pwd \; echo nase

You have to quote the semicolon here. Otherwise the 'echo nase' is executed in the primary shell. The second form surely works for single commands too.

-- tiesel
 
  


Reply

Tags
gnome


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
How do you create shortcuts to "folders" and "binaries" in GNOME? ebenh Linux - Desktop 5 01-21-2008 05:28 AM
konsole problem: "Unable to open a suitable terminal device" Mistreated Linux - Software 2 11-15-2004 03:24 PM
Alternative terminal to konsole & gnome-terminal Adony Linux - Software 3 10-08-2004 03:59 AM
gnome global settings "Help Me!!" or "URGENT" Fascistchicken Linux - Software 3 01-26-2004 06:27 PM
"segmentation error" when issuing "useradd" command through terminal with RH 9.0 kaihuang Linux - General 0 10-21-2003 11:47 PM


All times are GMT -5. The time now is 09:36 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration