View Full Version : launching Doom 3 under sudo
PriceChild
October 30th, 2005, 01:08 PM
Hey... i've got doom 3 working absolutely perfectly!
However, i'd like to create a launcher instead of typing "sudo doom3" into the terminal each time. It must be sudo'd in order to save and load savegames. However, a "sudo su -" followed by a "doom3" doesn't allow the opengl to load.
"gksudo doom3" doesn't seem to work as a launcher.
Please help, Pricey
ubuntumaneh
October 30th, 2005, 01:11 PM
in .bashrc or .bash_aliases insert appropriately:
alias doom3='sudo doom3'
you still have to insert your password. But it is a beggining.
aneeshm
October 30th, 2005, 01:36 PM
Are setuid scripts allowed ? Because that may work .
mo_x
October 30th, 2005, 01:39 PM
Better find out why you need to use sudo. Probably some file permissions are not set correctly, check the ~/.doom3 directory.
PriceChild
October 30th, 2005, 02:04 PM
all of the permissions in usr/local/games are set to root.
I can't figure out whether the save directory is here too though?
Im happy typing password each time though, it's just the strain of moving the mouse and clickign several times then typing out two commands :P
Thanks, Pricey
EDIT
where is .bash and .bash_aliases? :)
mo_x
October 30th, 2005, 03:16 PM
The games are probably saved in the directory /home/<username>/.doom3. Because it start with a "." it is a hidden directory, you might have to set some option to see it.
frenkel
October 30th, 2005, 03:23 PM
Don't ever run games like that as sudo. That's a very Bad Thing. It's like in windows, when everybody is administrator. Try to start it as a normal user and tell us what error messages you get.
PriceChild
October 30th, 2005, 03:35 PM
The game works fine as a normal user! however it just won't save, or load savegame files.
EDIT
Ok, i've found the save game files :D
However, they're all owned by root.
How can i make every file in there my own? (pricechild)
I can't be bothered to open nautilus as a root user and change the permissinos for every single file.
Thanks, Pricey
mo_x
October 30th, 2005, 04:30 PM
Try the following command froma terminal in your home directory:
sudo chown -R pricechild .doom3
PriceChild
October 30th, 2005, 04:53 PM
Changed it to
sudo chown -R pricechild:pricechild .doom
To get it to change the group as well.
He he might be starting to get the hang of the linux terminal :P
Anyway, it's worked and changed every file's permissions!
I've also noticed that one of the files in there which saves the cd key has been made writable by me so i don't have to keep putting in the serial at each launch! :D
Thanks guys, i love Ubuntu :D
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.