Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

On a standard filesystem, we have:

/usr/games
/usr/lib/games
/usr/local/games
/usr/share/games
/var/games
/var/lib/games

Is this a joke, or is there some history behind this? What is it for? Why do we have separate and specialized directories for something like games?

share|improve this question

2 Answers 2

up vote 9 down vote accepted

It's just a bit of historical cruft. A long time ago, games were an optional part of the system, and might be installed by different people, so they lived in /usr/games rather than /usr/bin. Data such as high scores came to live in /var/games. As time went by, people variously put variable game data in /var/lib/games/NAME or /var/games/NAME and static game data in /usr/lib/NAME or /usr/games/lib/NAME or /usr/games/NAME or /usr/lib/games/NAME (and the same with share instead of lib for architecture-independent data). Nowadays, there isn't any compelling reason to keep games separate, it's just a matter of tradition.

share|improve this answer
    
is this ok if I delete all games directories? or there will be compatibility issue? –  uray Sep 6 '10 at 23:05
3  
@uray: If you want to delete games, uninstall them through your distribution's package management system. –  Gilles Sep 7 '10 at 0:13
    
I'am messing up with something like LFS, I don't use distro and package management –  uray Sep 7 '10 at 9:58
    
@uray You can delete the directories if you want. The only issue this might cause is if at some stage you try to install some game, and it doesn't check for the directory's existence. This is unlikely though, for I expect standard install tools to have such a sanity check (and a clear error message in case of trouble). –  Tshepang Jan 19 '11 at 8:04

At least partially, it's so the system can have a games group that certain users are members of, and they all have rights to execute games in the games folder

share|improve this answer
1  
The games group is not for who can play games, it's for the game administrators (they get the right to install games and manage things like high score files). In the old days, when people didn't worry about trojans, “serious” administrators would sometimes delegate game administration to volunteers (for example a student team on a university system). –  Gilles Sep 6 '10 at 22:37
    
I'am puzzled here, is this "games" is the "games" as in a program for entertainment & fun? or what? –  uray Sep 6 '10 at 23:02
1  
@Gilles Are you sure? At least on my system (Gentoo), all the executables in the games folders are owned by root:games and set to 750, so people not in the games group can't run them –  Michael Mrozek Sep 6 '10 at 23:53
1  
Ok, then Gentoo is doing things differently from Debian, Ubuntu, Fedora, and several non-Linux systems I've seen. By the way, on these systems, games that keep high score files are setgid games (mode 2755), with high score files writable by the games group only. @uray: yes, that's games as in computer games and more generally entertainment software (but games can be in /usr/bin like other programs too). –  Gilles Sep 7 '10 at 0:13
    
@uray, yes, it's "games" as in entertainment and fun stuff. There are occasionally programs that are useful but have a whimsical element, such as xcowsay, which causes a pop-up graphic of a cow with a text message for a user. –  bgvaughan Oct 16 '11 at 1:31

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.