Registered Member
|
OK, I've done this before, but for the life of me I cannot remember how. There are some environment variables, specifically some aliases such as `alias ll="ls -la"` I want to have set whenever any user brings up a terminal. Setting the alias in /etc/profile or in ~/.bashrc works for "ordinary" shells, but not for Konsole. How do I get it to work for Konsole?
|
Registered Member
|
Setting aliases in ~/.bashrc works for konsole, did you open a new konsole window after editing .bashrc?
/etc/profile and ~/.bash_profile get executed once at login, so if you change them you have to logout then login. |
Registered Member
|
It seems that /etc/profile is not being run at login, because changing the file does not establish the aliases for all users for Konsole. It works for regular x-term sessions. I want this to be for all users using Konsole. Secondly, it doesn't work for root to put it in /root/.bashrc. When I su to root in Konsole or an X-term, the alias is lost. This is where I need it most often.
Yes, I logged out and back in, and even rebooted several times. |
Registered Member
|
Editing /root/.bashrc works here when I su in konsole, also the system wide alias is set in /etc/profile.d/alias.sh (this is in Mandriva).
When you put alias ll='ls -l' in your ~/.bashrc then open a konsole what does this say:
I have this in ~/.bash_profile:
|
Registered Member
|
I must have been on the wrong machine. I could have sworn I was on the right one. In any case, putting the alias in /etc/profile does not cause the alias to work for root, but putting it in /root/.bashrc does.
|
Registered Member
|
I know what you mean, when I try something so many times and it doesn't work I become frustrated and forget I changed what/where/when
|
Registered Member
|
|
Registered Member
|
or instead of logging out do the following and they'll be available immediately:-
Kind regards |
Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]