Fedora Linux Support Community & Resources Center
  #1  
Old 10th May 2005, 02:49 PM
jim's Avatar
jim Offline
Retired Community Manager & Avid Drinker Of Suds
 
Join Date: Feb 2005
Location: Rochester NY
Age: 38
Posts: 4,176
shell scripting

Hi all I'm writing a shell script of common commands I run. I want one of the options to open a new terminal window (which it does) and run a command in that window
E.X
Code:
function yum_update
{
  gnome-terminal 
 sudo yum update
}
this executes the opening of a new terminal window but runs the yumupdate in the original window
How can I get it to run in the New window ?


BTW anyone else noticed a problem with Dags repo ?
__________________
Registered Linux User: #376813
Western NY
My linux site
Smolt Profile

please remember to say if you problem was solved

Did you get your id10t award today?
Reply With Quote
  #2  
Old 10th May 2005, 02:55 PM
AndyGreen's Avatar
AndyGreen Offline
Registered User
 
Join Date: Apr 2005
Location: Northants, UK
Posts: 2,026
Try

gnome-terminal --help

On konsole by this method I discover that you can use

konsole -e sudo yum update
__________________
Freelance RedHat Certified Engineer - http://northantsIT.com
Reply With Quote
  #3  
Old 10th May 2005, 02:56 PM
jim's Avatar
jim Offline
Retired Community Manager & Avid Drinker Of Suds
 
Join Date: Feb 2005
Location: Rochester NY
Age: 38
Posts: 4,176
i'll give it a whirl !
__________________
Registered Linux User: #376813
Western NY
My linux site
Smolt Profile

please remember to say if you problem was solved

Did you get your id10t award today?
Reply With Quote
  #4  
Old 10th May 2005, 02:59 PM
jim's Avatar
jim Offline
Retired Community Manager & Avid Drinker Of Suds
 
Join Date: Feb 2005
Location: Rochester NY
Age: 38
Posts: 4,176
gives me a invalid argument
i'll try the -x switch
__________________
Registered Linux User: #376813
Western NY
My linux site
Smolt Profile

please remember to say if you problem was solved

Did you get your id10t award today?
Reply With Quote
  #5  
Old 10th May 2005, 03:01 PM
jim's Avatar
jim Offline
Retired Community Manager & Avid Drinker Of Suds
 
Join Date: Feb 2005
Location: Rochester NY
Age: 38
Posts: 4,176
that did it!
Thanks andy
Code:
function yum_update
{
  gnome-terminal  -x sudo yum update
}
__________________
Registered Linux User: #376813
Western NY
My linux site
Smolt Profile

please remember to say if you problem was solved

Did you get your id10t award today?
Reply With Quote
  #6  
Old 10th May 2005, 03:57 PM
jim's Avatar
jim Offline
Retired Community Manager & Avid Drinker Of Suds
 
Join Date: Feb 2005
Location: Rochester NY
Age: 38
Posts: 4,176
Well since I have this nice little script I want it to get loaded at login. Where is the BEST place to place this script?
I know i can execute it at login with preferences menu Isn't there a better place to run it?
__________________
Registered Linux User: #376813
Western NY
My linux site
Smolt Profile

please remember to say if you problem was solved

Did you get your id10t award today?
Reply With Quote
  #7  
Old 10th May 2005, 04:08 PM
jtang613's Avatar
jtang613 Offline
Registered User
 
Join Date: Apr 2004
Location: Ottawa, Canada
Posts: 1,932
Quote:
Originally Posted by fedorajim
BTW anyone else noticed a problem with Dags repo ?
It's a known issue: http://forums.fedoraforum.org/showthread.php?t=53839

Jason
__________________
There is no 'CTRL' button on Chuck Norris's computer. Chuck Norris is always in control.
Reply With Quote
  #8  
Old 10th May 2005, 04:23 PM
tejas's Avatar
tejas Offline
Registered User
 
Join Date: Feb 2005
Location: Bangalore
Age: 25
Posts: 1,574
Add it to the /etc/rc.local

But this is done before login, on system boot
__________________
I Was Counted! Registered Linux User #384707

BASH && Beer && Bass! Now THAT makes sense!!
Reply With Quote
  #9  
Old 10th May 2005, 05:18 PM
jim's Avatar
jim Offline
Retired Community Manager & Avid Drinker Of Suds
 
Join Date: Feb 2005
Location: Rochester NY
Age: 38
Posts: 4,176
Anyother place ?

One other question
I can double click the script on my notebook and it asks me if I want to run it view it or run in the terminal
On my desktop, It does nothing unless i open the terminal and type sh My_commnads,sh then it will run sh files.

Why is this? it really bothers me that something works on my notebook and not on my desktop. They both have the identical setup.
__________________
Registered Linux User: #376813
Western NY
My linux site
Smolt Profile

please remember to say if you problem was solved

Did you get your id10t award today?
Reply With Quote
Reply

Tags
scripting, shell

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shell scripting - please need help malaka19 Using Fedora 4 20th January 2008 03:18 PM
shell scripting haaidy Programming & Packaging 5 14th January 2008 10:42 PM
shell scripting Baby Chen Programming & Packaging 32 11th February 2006 06:46 PM


Current GMT-time: 06:22 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat