LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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 12-03-2002, 11:05 PM   #1
MINDOFD
LQ Newbie
 
Registered: Mar 2002
Location: united states
Distribution: Redhat 8.0 Gnome
Posts: 8

Rep: Reputation: 0
Question Programs from bash?


I would like to start using bash for everything. Is there a way to run all my programs from bash? If so, what are the commands to use? For example, while in gnome can i open the xterm and run mozilla?????
thanks for your help.....
 
Old 12-03-2002, 11:16 PM   #2
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 55
why not? also try to put the jobs on background by appending &
mozilla&
It will give you bash prompt back when the program starts
 
Old 12-03-2002, 11:21 PM   #3
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 46
yeah. just type mozilla.
usually, the name of the application (mozilla, netscape, xine,
whatever) is the name of the binary executable you would need
to run. If said binary is in your path, then all you need to do is
enter its name.
 
Old 12-04-2002, 01:40 AM   #4
Natbobc
LQ Newbie
 
Registered: Dec 2002
Posts: 9

Rep: Reputation: 0
Hello,

One thing to note is that you should make sure your paths are set correctly though. The standard program locations are /bin, /usr/bin, /usr/local/bin, /usr/X11R6/bin(I think can't remember the exact path), and quite often /opt/ProgramNameAndVersion/bin. If you don't have your path's set then you'll have to type the full location of the file ie: /usr/local/bin/mozilla &
Which as you can imagine even w/ tab completition can get tedious after a while. Hope the info is useful.

Cheers,

Natbob
 
Old 12-04-2002, 03:38 AM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,953
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
...and if you don't like to type "/usr/local/bin/mozilla &" each time, make it an alias in your ~/.bashrc:
alias moz='/usr/local/bin/mozilla &'
rerun your .bashrc and now you can type just "moz" to have it work.

Of course you can use "dialog" to script entire menus or use simple case statements in your .bashrc:

br_select() {
case "$1" in
ns4|netscape) /usr/local/bin/netscape &;;
moz|mozilla) etc, etc &;;
op6|opera|opera-6.1) etc, etc &;;
gal|galeon) etc, etc &;;
*|-h|--help) echo "browser: [ns(4|5)|mozilla|opera|galeon]"
esac

alias browser='br_select $1'

Now you can type "browser ns4", while just typing "browser" or "browser -h" shows what's available.
 
  


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
Bash: how to get the PID of programs started? J_Szucs Programming 11 01-16-2012 02:08 AM
BASH - passing paramters to programs dkrysak Programming 1 11-18-2005 03:16 PM
launching programs from a bash script Ian D Linux - Software 2 10-25-2005 04:31 PM
Bash redirection being taken literally by programs R00ts Programming 13 05-26-2005 12:46 AM
problems running c programs in bash KDE4me Programming 10 05-01-2003 12:22 AM


All times are GMT -5. The time now is 07:40 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