You are not logged in.
Hi,
Anyone knows how to add bin directory to the PATH environment variable? I tried the /etc/profile and /etc/environment but I think that $HOME is not available at the moment of running them. So next thing was to try .profile in user dir, but it's not run when I use startx with awesome wm and urxvt / zsh combination. What I would like is to have a shell agnostic solution which would work for all users.
Thanks,
Matt
Offline
# ~/.bashrc <- right here to avoid duplicates entries when using a shell in a shell in a shell
PATH=${HOME}/bin:${PATH}
# or
PATH=${PATH}:${HOME}/bin
# depending on which "bin" you want to give higher priority
export PATH # for good measure
Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!
Offline
Can you stick in in ~/.xinitrc given you are using startx?
Offline
Thanks, but I need something more general
klixon:
I think this is bash specific. I'm not sure if it will be called when I use zsh.
allan:
I would like it to be default when I add new users
Offline
As far as I remember it works on Ubuntu. Maybe I'll try to mount my Ubuntu partition and check it.
Offline
Ok, on Ubuntu lines responsible for adding bin to path are in ~/.profile. I think it is a good place for the functionality. What I will do is to source it in xinitrc, so it should work on terminals and in X. Then I'll modify the user skeleton directory.
Thanks for help,
Arch rocks
Offline
Have you looked in /etc/profile ? I think you can set it system-wide there.
Offline