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 06-22-2005, 11:02 PM   #1
ljr2600
LQ Newbie
 
Registered: Aug 2004
Posts: 22

Rep: Reputation: 15
creating your own text commands to start programs in Terminal?


How do you create text commands to start programs from xterm?

i.e. if I want to start mozilla just by typing mozilla into the terminal, how would I go about doing it?

I think it has something to do with bash but I dont know.
 
Old 06-22-2005, 11:14 PM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
That is all you do to start mozilla, is type 'mozilla'.
But, I think what you're looking for is Bash shell scripting... Click here for that...
 
Old 06-23-2005, 04:56 AM   #3
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
You can edit your .bash_profile file. Then you can make custom commands like this:

alias flux = "startx && exit"

For normal programs it's usually just the name of the program you want to run. Use tab for the autocompletion if you don't know. It's really useful.
 
Old 06-23-2005, 08:27 AM   #4
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Every user has a path which is a list of directories to look in when the user tries to execute a program. you can add a soft link of the program binary into /usr/bin or something, which is in every users path i believe and then just typing the name of the file will run it, like mozilla.

Is it mozilla or firefox?

either way you could try

which <program>

That will tell you if it's already in your path

or

slocate firefox if the above comes up empty

then

echo $PATH

will show your path and you can pick a suitable one to link the mozilla binary to.

Also note that if you just type mozilla it'll hog the terminal session and you won't be able to do any work in that particular one.

mozilla & will run mozilla in the background and keep the terminal free
 
  


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
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 11:34 AM
execute commands in order to start newly installed programs kpachopoulos Linux - Newbie 1 08-05-2004 10:08 AM
How to open programs in terminal without being stuck to the terminal?? brynjarh Linux - Newbie 6 07-07-2004 01:52 PM
creating my own commands Veteq Programming 3 06-06-2004 03:38 PM
Creating Batch Commands? reefadt Linux - Newbie 3 08-17-2003 10:46 AM


All times are GMT -5. The time now is 10:53 AM.

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