LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 10-26-2005, 01:24 PM   #1
djc
Member
 
Registered: Mar 2004
Posts: 54

Rep: Reputation: 15
editing the PATH problem - doubling?


this may be more appropriate in the n00b forum but I'm using suse 9.1 pro and I think this is one of those things that each distro may do differently... at least where (which file) its done in.

I need to edit my path. I installed a progam to /usr/local/programs/theprogramname and its executable went into /usr/local/programs/theprogramname/bin

according to what I found in order to effect my interactive login shell I should be editing .profile from my home directory which I did. However the path I appended to PATH shows up twice when I view by issuing echo $PATH command? This is what I added to the very end of the .profile file:

PATH=$PATH:/usr/local/programs/theprogramname/bin
export PATH

so after loging in again my path is as it was plus /usr/local/programs/theprogramname/bin:/usr/local/programs/theprogramname/bin

anyone know whats wrong?

just a note: in case anyone is wondering why I didn't just install program to default /usr/local its because I wasn't sure where to install programs to and the first 'how to' style artical I read on installing from source used the /usr/local/programs style... so I was just trying to be cool and use the --prefix option. I don't think I will continue to do that.
 
Old 10-26-2005, 01:50 PM   #2
nymusicman
Member
 
Registered: Jun 2004
Location: Aurora, IL
Distribution: Slackware Current
Posts: 162

Rep: Reputation: 30
Somebody may give you a more detailed approach. But I do have a quick fix for you. Take out what you added to the config file.

And then use this command as root:

ln -s $PATH:/usr/local/programs/theprogramname/bin $PATH:/usr/local/programs/theprogramname
 
Old 10-26-2005, 02:29 PM   #3
djc
Member
 
Registered: Mar 2004
Posts: 54

Original Poster
Rep: Reputation: 15
thanks for the reply nymusicman. I can't say that I understand it though. I know the ln -s command is for creating symbolic links (shortcuts in windows speak) but I'm not sure whats going on in you example. Yes, I am a linux b00b. I do appreciate the reply. Any further explanation would be appreciated as well. thanks.
 
Old 10-28-2005, 08:04 AM   #4
nymusicman
Member
 
Registered: Jun 2004
Location: Aurora, IL
Distribution: Slackware Current
Posts: 162

Rep: Reputation: 30
Just out of curiosity what program are you installing and why didn't you just install it with an Suse RPM. Why edit where it goes in the first place unless the paticular piece of software either a. doesn't come in RPM form or b. needs your specific configuration to work. I'm assuming that since you chose the directory to install in to your either using a manufacturer bin file or your compiling from source.

But if I'm right, Suse is an RPM package distro and that should work just fine in most cases. If you can give more info I think it would help.

PS. After rereading your post and realizing how tired I was the first time I read it, I realized that my piece of advice may have not been helpful to you. Sorry for the mishap.

Last edited by nymusicman; 10-28-2005 at 08:06 AM.
 
Old 10-28-2005, 12:40 PM   #5
djc
Member
 
Registered: Mar 2004
Posts: 54

Original Poster
Rep: Reputation: 15
hi nymusicman,

I think most of your questions would be answered from my note at the bottom of my original post. I expected replys like 'why are you even doing that?... just do this...' etc... so I put that note there. To summarize: I was following directions from an article on installing from source. The article used the --prefix option to specify alternate installation locations claiming easier and cleaner uninstalls by simply deleting rather than having to keep the makefiles around and counting on them. It was through this process that I ran across my problem. I needed to edit the path since I installed to an alternate location (and don't want to type the full path to run the program).... Also, to answer your other question the program is nmap and from what I see you have to install from source in order to get the nmapfe part, which is the X frontend for nmap. So thats what I was doing. I just figured being the n00b that I am I should really figure out how to edit my path... I never expected to have any problems with such a simple task.

but i did .

I don't care about installing nmap to this alternate location. In fact I am going to uninstall it and install it to its default location anyway but thats beside the point. The point is my path problem.

don't sweat your 'tired' response. At least you replied. No one else did. Thanks again. Any other suggestions just keep em coming.

thanks.
 
Old 10-28-2005, 04:36 PM   #6
nymusicman
Member
 
Registered: Jun 2004
Location: Aurora, IL
Distribution: Slackware Current
Posts: 162

Rep: Reputation: 30
My biggest suggestion for you is familiarize yourself with using RPM's. A really great site I used to use when I was using Mandrake was http://rpm.pbone.net . That site has rpm's for every rpm distribution.

When looking up nmapfe for SUSE 9.x I found nmap-gtk... Considering it uses the gtk libraries I would say that is a GUI.

Enjoy.


P.S. If you truly feel the need to waste your time compiling from source (or your computer wont allow any other way. For example, mplayer for slackware 10.1, that you definetly want to source. Anyway....) then I would always stick with default folders. The linux filesystem is truly a very awesome file system. I wouldn't mess it up.
 
Old 10-31-2005, 07:13 AM   #7
djc
Member
 
Registered: Mar 2004
Posts: 54

Original Poster
Rep: Reputation: 15
ya, I have nothing against rpms and they are my prefered method. This situation required installing from source, and the install to a non-default directory was just experimental based on myself not really knowing linux well enough yet and the article I was reading.

thanks for the input.
 
Old 10-31-2005, 01:35 PM   #8
nymusicman
Member
 
Registered: Jun 2004
Location: Aurora, IL
Distribution: Slackware Current
Posts: 162

Rep: Reputation: 30
Sorry I couldn't be of more help.
 
  


Reply



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
editing $PATH resist_r Linux - Newbie 3 07-09-2005 09:33 PM
PATH statement editing? cottonmouth Linux - General 2 08-17-2003 08:00 PM
Problem when doubling my RAM gdrobson Linux - General 8 05-02-2003 03:56 PM
PATH editing... Jester888 Linux - Newbie 2 01-23-2002 08:13 PM
Editing the PATH Cichlid Linux - General 3 01-06-2002 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

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