LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   SUSE / openSUSE (https://www.linuxquestions.org/questions/suse-opensuse-60/)
-   -   editing the PATH problem - doubling? (https://www.linuxquestions.org/questions/suse-opensuse-60/editing-the-path-problem-doubling-377145/)

djc 10-26-2005 01:24 PM

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.

nymusicman 10-26-2005 01:50 PM

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

djc 10-26-2005 02:29 PM

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.

nymusicman 10-28-2005 08:04 AM

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.

djc 10-28-2005 12:40 PM

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.

nymusicman 10-28-2005 04:36 PM

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.

djc 10-31-2005 07:13 AM

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.

nymusicman 10-31-2005 01:35 PM

Sorry I couldn't be of more help.


All times are GMT -5. The time now is 09:08 PM.