LinuxQuestions.org
Visit Jeremy's Blog.
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-12-2003, 10:32 PM   #1
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Rep: Reputation: 15
Linux Keywords


How do I register a keyword for a program?

I have a program called qmake and I need it to make project files but typing its whole path out is really annoying.

Instead of having to be in the qmake directory, I would just like to be able to type qmake (while in any directory) to run the program.

An example of a Linux keyword, if you don't understand what I mean, is ksnapshot, which will run the KSnapShot screenshot program or konqueror, which will run Konqueror (some other keywords are kwrite, kmail, you get the idea... i hope)
 
Old 06-12-2003, 10:40 PM   #2
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
vi ~/.bashrc
alias qmake='/path/to/qmake'
:wq!
 
Old 06-12-2003, 10:45 PM   #3
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Original Poster
Rep: Reputation: 15
thanks...

the alias worked just fine but what are the other two lines for? i didn't use them...
 
Old 06-13-2003, 02:09 AM   #4
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 47
vi is a text editor in linux.

:wq! is the command for write the file and then quit in vi

The reason I wrote them is that if you use alias on the prompt, you will lose it after your next reboot.

So, to make it permanent, it's recommended that you write it in a file called .bashrc in your home dir (if it doesn't exist, then create it).

The .bashrc file is parsed everytime you log on.

Hope this helps
 
Old 06-13-2003, 03:00 AM   #5
Westdog976
LQ Newbie
 
Registered: Jun 2003
Location: Los Angeles, CA
Posts: 25

Original Poster
Rep: Reputation: 15
Thanks for the info... I was wondering why the keyword wasn't working when I logged back in...
 
  


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
[BUG] lq bookmarks- searchable keywords titanium_geek LQ Suggestions & Feedback 3 10-11-2005 08:17 AM
GCC 4.0 specific keywords abk4523 Programming 1 09-22-2005 12:03 PM
Sarch files for multiple keywords with AND titopoquito Linux - Software 4 03-06-2005 07:51 AM
As will get rid of a spam on keywords ukrainet Linux - Newbie 2 12-13-2004 03:00 AM
SQL errors on Keywords at Reviews itsjustme LQ Suggestions & Feedback 3 07-16-2004 01:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:31 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
Open Source Consulting | Domain Registration