Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Terminals running in X don't use the right PATH.. [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Sat Dec 29, 2012 4:34 am    Post subject: Terminals running in X don't use the right PATH.. [SOLVED] Reply with quote

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
View user's profile Send private message
The Doctor
Veteran
Veteran


Joined: 27 Jul 2010
Posts: 1519

PostPosted: Sat Dec 29, 2012 4:44 am    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
cravengemetzel
n00b
n00b


Joined: 12 Mar 2012
Posts: 40

PostPosted: Sat Dec 29, 2012 4:36 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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