Linux Game Kiosk

From LinuxNewbie

This was written for Gentoo linux but i believe it would work for other distros also.

Introduction (aka my stupid story)

If you're wondering how i came up with this idea... well, it's America's Army's fault. I allways get bored if i die, and there's a big map and i must wait for a few minutes waiting for the new round to begin... sure it would be ok if AA would tolerate an Alt+Tab or something to get me out of the game untill the current round finishes but since it doesn't i thought of running AA in another X server. But starting an X server with KDE and all the other apps that start with it everytime i wanted to play proved to be too much for me so i wanted to create a separate user that can only run AA.

The real thing (aka... ummm, just read this)

1) Create a new user:

useradd -g games -d /home/armyops -p <password> armyops

You can see the username is armyops (just as the game's executable). I specified a home folder so it will be automagically created :) and a password so my mom and dad won't be able to play :)). Oh, don't forget the username, it is important too ;P

2) Copy the game's settings from your home folder (optional).

su - #get root privilege
cp -r /home/codertux/.armyops250 /home/armyops/ #copy the files
chown -R armyops:games /home/armyops/.armyops250 #change the ownership of the files since they were created as root
logout #no more root privilege required 

3) Create (or edit) ~/.xinitrc

echo "exec armyops" > ~/.xinitrc

4) Log in with the user armyops and the password you specified and Tadaaaaaaaaaa ;P

--Codertux 09:18, 18 April 2006 (CDT)