Modify PATH variable for X11 during log-in
-
I am working on some lab computers (read: no administrative rights) that, if I log in, I need to change the PATH variable as X11 starts. The reason is that I need to change the PATH variable at this time, as opposed to later, is that the Print Screen command seems to "bind" during login (forgive my bad explanation of this). Currently, I have a .bashrc script as a workaround: #!/bin/bash export PATH=/home/username/bin:$PATH I can make it work by starting a new X, but I was wondering if it is possible to change upon login. cat /etc/redhat-release tells me my distribution is: Red Hat Enterprise Linux Client release 5.8 (Tikanga)
-
Answer:
You can change $PATH easily for your user account (thus without admin rights). It depends on what kind of shell you have, to find the shell do: echo $SHELL, most likely you have /bin/bash(that echo $SHELL behaves funny sometimes, if so try ps). If you shell is bash, you want to modify ~/.bash_profile by adding things like: export PATH=$PATH:/path/to/something/:/path/to/something/else/ or export PATH=/path/to/something/:/path/to/something/else/:$PATH If your shell is not bash, you need to modify other files in your user directory in a slightly different way, e.g. http://tcshrc.sourceforge.net/tcsh.html for the files you need to modify for tcsh. If another shell is used (unlikely), just use your favorite search engine to check how to modify $PATH for that shell and do this in the per-user files, ~/.something. You don't need admin rights to modify these files.
user1028435 at Super User Visit the source
Other answers
add proper export to /etc/X11/Xsession file, or even better create a separate /etc/X11/Xsession.d/my_whatever file with such exports.
Michał Šrajer
Related Q & A:
- How To Modify Car?Best solution by Yahoo! Answers
- How to modify a schema.xml of an existing list?Best solution by SharePoint
- How to create variable from value in variable?Best solution by Stack Overflow
- Cant log into yahoo messenger but can log into mail help?Best solution by Yahoo! Answers
- I only change my Friendster account and then I cannot log in it when I log in it.Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.