View previous topic :: View next topic |
Author |
Message |
cravengemetzel n00b
Joined: 12 Mar 2012 Posts: 40
|
Posted: Sat Dec 29, 2012 4:34 am Post subject: Terminals running in X don't use the right PATH.. [SOLVED] |
|
|
I created a 99local file in /etc/env.d/ and added ROOTPATH="/usr/games/bin" to it in order to use VisualBoyAdvance. I rebooted, logged in as root, and checked "echo $PATH" from a no-x environment. Here the directory /usr/games/bin is in the PATH (and along with quite a few others that are missing in X), but when I startx, open a terminal, login as root, and run "echo $PATH" all I get is "/sbin:/bin:/usr/sbin:/usr/bin". It doesn't matter which terminal emulator I use in X (Eterm, Terminator, Konsole) - they all have the same issue.
My theory is that they are trying to read the wrong file, but there are so many files in which PATH variables can be defined that I have no clue where to start looking for the culprit..
I have emerged zsh as I heard it was good, but that's as far as it went; I have not had time to play with it yet. This means that the terminals should still be using whatever shell they were previously using. I am so lost....
Here is what I get when I run $PATH logged in as root and without X:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.3:/usr/games/bin
These are all the directories defined in the /etc/profile.env file for ROOTPATH.
Last edited by cravengemetzel on Sat Dec 29, 2012 4:39 pm; edited 1 time in total |
|
Back to top |
|
|
The Doctor Moderator
Joined: 27 Jul 2010 Posts: 2678
|
Posted: Sat Dec 29, 2012 4:44 am Post subject: |
|
|
0) Default is bash. You can test this by using echo $SHELL
1) Don't mess with root. Root is for administration, not daily use. No X applications should be run as root.
2) this should go in your user's ~/.bashrc file. This will get executed any time you log in or open a new terminal.
The line you should add is PATH=$PATH:/usr/games/bin as you want to add to the path, not overwrite it.
3) you may be missing something else. I did not need to modify my $PATH to run VBA. is your user in the games group? You can check by issuing the groups command. You will need to be in this group to run games. _________________ First things first, but not necessarily in that order.
Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box. |
|
Back to top |
|
|
cravengemetzel n00b
Joined: 12 Mar 2012 Posts: 40
|
Posted: Sat Dec 29, 2012 4:36 pm Post subject: |
|
|
The Doctor wrote: | 0) Default is bash. You can test this by using echo $SHELL
1) Don't mess with root. Root is for administration, not daily use. No X applications should be run as root.
2) this should go in your user's ~/.bashrc file. This will get executed any time you log in or open a new terminal.
The line you should add is PATH=$PATH:/usr/games/bin as you want to add to the path, not overwrite it.
3) you may be missing something else. I did not need to modify my $PATH to run VBA. is your user in the games group? You can check by issuing the groups command. You will need to be in this group to run games. |
You are correct, the issue was not with my $PATH or even the $ROOTPATH as I had thought; upon user creation I had (stupidly) overlooked adding myself to the group games. I ran "gpasswd -a user games" and this solved my problem. Thank you, I am now marking this thread as solved. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|