Darkelve Posted July 23, 2004 Report Share Posted July 23, 2004 Hi, I decided to put some applications I installed myself into a directory /home/darkelve/bin/ Now I want to put it in my path so that they will be picked up when I type them from the command line or through Alt+F2. But I forgot how to do it... sad.gif I remember putting something in .bashrc or typing some kind of command (transport or something?) Link to comment Share on other sites More sharing options...
Darkelve Posted July 23, 2004 Author Report Share Posted July 23, 2004 (edited) Hi, I found about .bashrc What I did was: 1. go to my home dir 2. login as root 3. add "export PATH=~/bin" in .bashrc with vim 4. ran "export PATH" from command line The program names like 'azureus' and 'limewire' (which are in subfolders of /home/wouter/bin) get autocompleted now, but now bash says: bash: azureus: command not found Any ideas? Edited July 23, 2004 by Darkelve Link to comment Share on other sites More sharing options...
Darkelve Posted July 23, 2004 Author Report Share Posted July 23, 2004 Hi again... :o as some as you probably already figured out, I put myself in quite a mess doing these last steps. Somehow Linux could not find any more commands unless I specified the complete path to the application. I solved it though by removing the line from .bashrc ... now I would really appreciate if someone could explain what happened and what's the right way to do it instead... Link to comment Share on other sites More sharing options...
devries Posted July 23, 2004 Report Share Posted July 23, 2004 (edited) /home/darkelve/bin should be in you PATH. /home/darkelve/bin/folder is not in your PATH. So just link the app/binary to /home/darkelve/bin (ln -s /home/darkelve/bin/folder/azureus /home/darkelve/bin/azureus and it should work. Good luck Edited July 23, 2004 by devries Link to comment Share on other sites More sharing options...
Darkelve Posted July 23, 2004 Author Report Share Posted July 23, 2004 (edited) /home/darkelve/bin should be in you PATH. /home/darkelve/bin/folder is not in your PATH. So just link the app/binary to /home/darkelve/bin (ln -s /home/darkelve/bin/folder/azureus /home/darkelve/bin/azureus and it should work. Good luck <{POST_SNAPBACK}> Thank you, I got that! But why were none of my other commands, like "find" found when I did not type the full path (/usr/sbin/find or something)? And I don't know if this is related, but at the login screen (I think KDM) whatever Window Manager I would choose would bring up KDE?? Edited July 23, 2004 by Darkelve Link to comment Share on other sites More sharing options...
phunni Posted July 23, 2004 Report Share Posted July 23, 2004 if you do export PATH=/somedir then only that directory is on your path and so nothing in /usr/bin or wherever will be found. If you do export PATH=$PATH:/somedir then the new entry is simply added to your existing path and all will be found again... Link to comment Share on other sites More sharing options...
Darkelve Posted July 23, 2004 Author Report Share Posted July 23, 2004 (edited) Thanks phunni, that makes sense! Still leaves the KDE question though... gonna try and see if I can login into another WM now. Update: well, since I am typing this in WindowMaker now seems to suggest everything is okay now... maybe KDM (I think, or maybe XDM) when it cannot find the other Window Managers it starts KDE by default... or something? Darkelve P.S. mods can mark this as solved now ... Edited July 23, 2004 by Darkelve Link to comment Share on other sites More sharing options...
Guest anon Posted July 23, 2004 Report Share Posted July 23, 2004 Hi, I decided to put some applications I installed myself into a directory /home/darkelve/bin/ Now I want to put it in my path so that they will be picked up when I type them from the command line or through Alt+F2. But I forgot how to do it... sad.gif I remember putting something in .bashrc or typing some kind of command (transport or something?) <{POST_SNAPBACK}> If you put them in /usr/local/bin you can just type the command or script ./ and thats it, they will open/execute. This will make them system wide executable. You may need to chmod +rx whatever though. Link to comment Share on other sites More sharing options...
Darkelve Posted July 23, 2004 Author Report Share Posted July 23, 2004 (edited) Hi, I decided to put some applications I installed myself into a directory /home/darkelve/bin/ Now I want to put it in my path so that they will be picked up when I type them from the command line or through Alt+F2. But I forgot how to do it... sad.gif I remember putting something in .bashrc or typing some kind of command (transport or something?) <{POST_SNAPBACK}> If you put them in /usr/local/bin you can just type the command or script ./ and thats it, they will open/execute. This will make them system wide executable. You may need to chmod +rx whatever though. <{POST_SNAPBACK}> You mean the symlinks, or the actual programs themselves? Also, I noticed on my system there's nothing there. What's this directory for exactly? For me to put progams in? Edited July 23, 2004 by Darkelve Link to comment Share on other sites More sharing options...
bvc Posted July 24, 2004 Report Share Posted July 24, 2004 (edited) /usr/local is where most tarballs go if ./configure is not give the --prefix=/usr. It's also where source, tarbal, tgz distros install apps where rpm distros go to /usr. So on an rpm based distro yes, /usr/local is the perfect place for other versions of say kde, gnome or anything you want to compile from source. Then you can keep your app that was installed by rpm. /usr/local is in your $PATH by default. [root@localhost root]# echo $PATH /usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/root/bin:/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin[root@localhost root]# :D :unsure: anon? code is messed up :unsure: You can easily add a path by modifying ~/.bashrc. Say you wanted to add /home/Darkdelve/apps/bin Change PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin To PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/home/Darkdelve/apps/bin then in a terminal do; bash or logout and back it. Also check out the printenv output for kicks, if you want. Edited July 24, 2004 by bvc Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now