Directory /usr/games/bin not in my $PATH

A place where Linux Gamers can share their experience and help each other with Linux Games, native or emulated ;)

Moderator: Moderators

Directory /usr/games/bin not in my $PATH

Postby Honeyman » Thu Oct 17, 2013 22:14

Hi all,

I wanted to try out some games under Linux and had to realize that I can only launch games that come along the GNOME and KDE desktop environments (e.g. KAtomic, Granatier). Others like 0ad, FreeCiv, Danger From The Deep or the emulator Mupen64plus, I cannot run as normal user as the directory /usr/games/bin is not in my PATH. Is that on purpose? If so, what is the reason? Should/could I change that?
Je me regarde pour me désoler,
je me compare pour me consoler

Maurice de Talleyrand
Honeyman
Growing Hen
 
Posts: 159
Joined: Sun Apr 08, 2012 2:25
Location: Berlin, Germany

Re: Directory /usr/games/bin not in my $PATH

Postby Fitzcarraldo » Fri Oct 18, 2013 1:14

I have no idea why it is not in your path. Are you in the games group?

Code: Select all
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.7.3:/usr/games/bin
$ groups
lp wheel uucp console audio cdrom video cdrw usb users lpadmin portage messagebus plugdev scanner vboxusers vboxguest pulse pulse-access entropy fitzcarraldo polkituser games
$

If you're not in the games group, log in as root user and add yourself to that group:

Code: Select all
# usermod -a -G games <your_user_name>
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Directory /usr/games/bin not in my $PATH

Postby Honeyman » Fri Oct 18, 2013 7:57

Sorry, I forgot to mention that I am in the games group:

Code: Select all
$ groups
lp wheel uucp console audio cdrom video cdrw usb users bumblebee lpadmin portage messagebus plugdev scanner sabnzbd vboxguest pulse pulse-access entropy pascal polkituser games


On the other hand:

Code: Select all
echo $PATH
/usr/local/texlive/2011/bin/i386-linux:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin


It seems that something has gone wrong....
Je me regarde pour me désoler,
je me compare pour me consoler

Maurice de Talleyrand
Honeyman
Growing Hen
 
Posts: 159
Joined: Sun Apr 08, 2012 2:25
Location: Berlin, Germany

Re: Directory /usr/games/bin not in my $PATH

Postby Fitzcarraldo » Fri Oct 18, 2013 12:36

Add it to your path, then. See Chapter 5 of the Gentoo Handbook for instructions:

http://www.gentoo.org/doc/en/handbook/h ... t=2&chap=5

I'm on my main laptop running Gentoo at the moment, which has:

Code: Select all
$ cat /etc/env.d/90games
LDPATH="/usr/games/lib64:/usr/games/lib32:/usr/games/lib"
PATH="/usr/games/bin"
$

See aforementioned Gentoo Handbook for complete instructions, as you need to do more than just create/edit a file.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Directory /usr/games/bin not in my $PATH

Postby Tedel » Thu Mar 06, 2014 19:19

I had the same problem. I noticed my /usr/games/bin folder is with wrong permissions:

owner: can read and write (correct)
group: can read (correct)
others: forbidden (incorrect)

See if you can reproduce in your machine and then change your folder permissions. You should be able to start the games.
Tedel
Simple Hen
 
Posts: 87
Joined: Sun Mar 10, 2013 5:32
Location: Peru

Re: Directory /usr/games/bin not in my $PATH

Postby Honeyman » Fri Mar 07, 2014 9:39

Thanks for the hint to change permission on the folder /usr/games/bin.

In case somewhat is interested on how to do that:

Previous permissions were:

Code: Select all
ls  -l /usr/games/
rwxr-x--- 2 root games 4096 Jan 19 03:09 bin


Giving others permissions to execute programs:
Code: Select all
chmod 751 /usr/games/bin

# or

chmoad a+x /usr/games/bin


Checking for permissions:

Code: Select all
ls -l /usr/bin/games
drwxr-x--x 2 root games 4096 Jan 19 03:09 bin

# if yo wish in octal code

stat -c "%a %n" /usr/games
751 /usr/games
Je me regarde pour me désoler,
je me compare pour me consoler

Maurice de Talleyrand
Honeyman
Growing Hen
 
Posts: 159
Joined: Sun Apr 08, 2012 2:25
Location: Berlin, Germany

Re: Directory /usr/games/bin not in my $PATH

Postby Stupot » Fri Mar 07, 2014 16:15

Tedel wrote:I had the same problem. I noticed my /usr/games/bin folder is with wrong permissions:

owner: can read and write (correct)
group: can read (correct)
others: forbidden (incorrect)

See if you can reproduce in your machine and then change your folder permissions. You should be able to start the games.



Those permissions are considered correct. Any user who is supposed to be allowed to play games would simply need to be a member of group 'games'.
Stupot
Sagely Hen
 
Posts: 1545
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Directory /usr/games/bin not in my $PATH

Postby Honeyman » Fri Mar 07, 2014 19:08

Stupot wrote:Those permissions are considered correct. Any user who is supposed to be allowed to play games would simply need to be a member of group 'games'.


Well, that was the point. I am member of the groups games, but still games binaries are not in my path environment.
Je me regarde pour me désoler,
je me compare pour me consoler

Maurice de Talleyrand
Honeyman
Growing Hen
 
Posts: 159
Joined: Sun Apr 08, 2012 2:25
Location: Berlin, Germany

Re: Directory /usr/games/bin not in my $PATH

Postby Stupot » Fri Mar 07, 2014 19:50

Honeyman wrote:
Stupot wrote:Those permissions are considered correct. Any user who is supposed to be allowed to play games would simply need to be a member of group 'games'.


Well, that was the point. I am member of the groups games, but still games binaries are not in my path environment.



Yes, I understand. I wasn't addressing you, I was addressing Tedel. The problem is not the permissions, it is your user's path.
Stupot
Sagely Hen
 
Posts: 1545
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: Directory /usr/games/bin not in my $PATH

Postby Honeyman » Fri Mar 07, 2014 20:19

Granted, you are correct to point that out. Should have read your post more carefully.
Je me regarde pour me désoler,
je me compare pour me consoler

Maurice de Talleyrand
Honeyman
Growing Hen
 
Posts: 159
Joined: Sun Apr 08, 2012 2:25
Location: Berlin, Germany

Next

Return to The Gamers Shed

Who is online

Users browsing this forum: No registered users and 0 guests

cron