REDnet.nl
REDnet.nl
Creative Vision Interaction   [=] NederlandsSwitch to Nederlands Home
News
(0 comments) show comments Half-Life classic on Linux (Fr jul. 31st, '09 at 01:18 am) This language is available.
Do you still have that decade old Half-Life CD and an old(er) computer running Linux?

The crash-on-load you see for example on 'load game' or when the train from new game reaches the first loading point is not some wine error or incompatibility like I thought. It is in fact a file permission problem. Half-Life somehow just really really wants to write an update to the save folder even if you just load your game. And the logged on user who last played the game 'owns' the file, so the game crashes in every other account until some superuser sets writable permissions for all users on all saved files again.

I have fixed the permission-mess crash in a way that gives every user their own private save games, which is convenient because you cannot name the saves so it pretty quickly becomes a mess if two people play the game anyway.

The desktop shortcut to start Half-Life simply points to this file (or you can run it from a terminal or alt+f2):
/usr/local/bin/hl
#!/bin/bash
# Half-Life classic independent saves per account
# Make sure halflife/valve folder has write access for ALL!!
# Redsandro 2009-07-30

savedir=~/.halflife
gamesavedir=/usr/local/games/halflife/valve/SAVE

# Verify SAVE folder
if [ -d $savedir ]; then
echo okay
else
mkdir $savedir
fi

# Unlink old symlink if exists
if [ -L $gamesavedir ]; then
unlink $gamesavedir
fi

# Link SAVE folder to HOME folder
ln -s $savedir $gamesavedir

# Start Half-Life
env WINEPREFIX="/home/`whoami`/.wine" __GL_FSAA_MODE=4 wine "L:\\games\\halflife\\hl.exe"

# Remove symlink
unlink $gamesavedir
Exporting __GL_FSAA_MODE is for 2x anti-aliasing on nVidia based cards.. you might export some vars specific for your card.

Happy gaming! Smile
Home
Creative
Vision
Interaction
 
~Home~


Recent reactions
[13/11] Firefox versus Opera
[3/11] CSS en DIVs - gedoe
[22/12] Korn coverband
[14/5] Lost en de buggy leader
[10/1] J-Five - Modern Times
[7/2] Schijt aan deze buurt
[22/3]
[1/4] Wie heeft mijn tas meegenomen?
~Creative~


Parts
Red photoshed
Classics
RED @ RED
Interdimensionals
RED's Place 3
The Radon clan
RED's Place 2
~Vision~


Articles
[8/1] Windows 7, SSH daemons and Cygwin
[31/12] I'ma stick to Ubuntu, sorry!
[15/4] Rid your consoles- XBMC and Arcade Browser are here!
[5/2] Import those frickin' contacts on your Nokia N Series
[30/11] Onhandigheden en ambtenarij van de IB-Groep
Columns
[9/1] C1000
[3/4] Albert Heijn Klantenservice is een idiocratie
[11/3] What Really Boils My Blood II
[16/2] Je beste vriend de politie
[4/2] Kanker NS
~Interaction~


Guestbook
Post message
Contact