onemyndseye
10-07-2008, 11:18 AM
Hey guys... I had frequent crashes under Linux for some time and this little launcher script solved my problems:
create the following script in your RO game directory (probably ~/regnum)
rolauncher.sh
#!/bin/sh#!/bin/sh
## Set variables
## Set this to the full path of your regnum install
GAME_DIR=/home/onemyndseye/regnum
## Attempt to make sure no other regnum process is running
#
RO_PID=$(ps ax |grep rolaucher |grep -v rolauncher.sh| grep -v grep | awk '{print $1}')
GAME_PID=$(ps ax |grep "./game" | grep -v grep | awk '{print $1}')
KILL_PIDS="$GAME_PID $RO_PID"
[ -n "$KILL_PID" ] && kill -9 $KILL_PID
### Setup the env and start laucher
cd "$GAME_DIR"
export MALLOC_CHECK_=1
./rolauncher
# Now that the launcher has exited and the game has been run
# Switch env settings and renice the games binary
# Reniceing the games binary is optional though it does improve
# performance
# Determine games PID
GAME_PID=$(ps ax |grep "./game" |grep -v grep |awk '{print $1}')
export MALLOC_CHECK_=0
sudo renice -15 "$GAME_PID"
If you do not wish to use renice to improve game performance then comment out that section... if you do, make the following changes to your sudoers file
edit the file: /etc/sudoers
and add this line replacing "onemyndseye" with YOUR username
onemyndseye ALL=(ALL) NOPASSWD: /usr/bin/renice
Now start the game using this simple script instead of running ./rolauncher directly... You make also edit any menu or desktop shortcuts to point to this script instead of the launcher bianary. This loader script GREATLY reduced my crashes and boosted my FPS by a good 12-20... your mileage my vary.
Have fun and happy hunting,
-onemyndseye
Syrtis Hunter lvl50: Elusis
create the following script in your RO game directory (probably ~/regnum)
rolauncher.sh
#!/bin/sh#!/bin/sh
## Set variables
## Set this to the full path of your regnum install
GAME_DIR=/home/onemyndseye/regnum
## Attempt to make sure no other regnum process is running
#
RO_PID=$(ps ax |grep rolaucher |grep -v rolauncher.sh| grep -v grep | awk '{print $1}')
GAME_PID=$(ps ax |grep "./game" | grep -v grep | awk '{print $1}')
KILL_PIDS="$GAME_PID $RO_PID"
[ -n "$KILL_PID" ] && kill -9 $KILL_PID
### Setup the env and start laucher
cd "$GAME_DIR"
export MALLOC_CHECK_=1
./rolauncher
# Now that the launcher has exited and the game has been run
# Switch env settings and renice the games binary
# Reniceing the games binary is optional though it does improve
# performance
# Determine games PID
GAME_PID=$(ps ax |grep "./game" |grep -v grep |awk '{print $1}')
export MALLOC_CHECK_=0
sudo renice -15 "$GAME_PID"
If you do not wish to use renice to improve game performance then comment out that section... if you do, make the following changes to your sudoers file
edit the file: /etc/sudoers
and add this line replacing "onemyndseye" with YOUR username
onemyndseye ALL=(ALL) NOPASSWD: /usr/bin/renice
Now start the game using this simple script instead of running ./rolauncher directly... You make also edit any menu or desktop shortcuts to point to this script instead of the launcher bianary. This loader script GREATLY reduced my crashes and boosted my FPS by a good 12-20... your mileage my vary.
Have fun and happy hunting,
-onemyndseye
Syrtis Hunter lvl50: Elusis