WarGame: European Escalation Linux (Optimus)

This game was giving me a hell of a time. It would not load at all. I tried the following things, and got the following errors.

./Wargame”  <— (this just using the intel card) .. Game wont load. Just got this error.

./Wargame: error while loading shared libraries: libsteam_api.so: cannot open shared object file: No such file or directory

Then i tried “optirun ./Wargame“… Then got this error.

[S_API FAIL] SteamAPI_Init() failed; Sys_LoadModule failed to load: /home/chuck/.steam/bin32/steamclient.so
[S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.dll.
sh: xmessage: command not found

(Although this error says steam isn’t running..it is)

Then i tried “primusrun ./Wargame

./Wargame: error while loading shared libraries: libsteam_api.so: cannot open shared object file: No such file or directory

This error saying that “libsteam_api.so” isn’t found….It is in the Wargame directory.

So i figured it out, and created this bash script for primusrun with this command “touch Opti-war“.

then i opened it with gedit “gedit Opti-war“. Then i added this to it

export vblank_mode=0
cd ~/.local/share/Steam/SteamApps/common/Wargame\ European\ Escalation/ && export LD_LIBRARY_PATH=~/.local/share/Steam/ubuntu12_32/:~/.local/share/Steam/SteamApps/common/Wargame\ European\ Escalation/ SteamAppId=58610 && primusrun ./Wargame

Then i saved it, and did “chmod +x Opti-war

then i ran it just fine with “./Opti-war

Game loaded up just fine, and works great 🙂 It took a bit to figure out what was going on.


I hope this helps any other Optimus users having the same problem





Streaming to Twitch.tv in Ubuntu Linux!

So apparently i am writing this like a new post. I had a script for streaming to twitch.tv with ffmpeg, but apparently it doesn’t work for that anymore. So i found a script on github that i will share with you. This time it is using avconv.

Open a terminal, and create a file in your home directory or where ever you want, and name it “twitch-stream“, with this command “touch twitch-stream“. Then open it with a editor, and add this script to it.

#! /bin/bash
# originaly from http://tinyurl.com/twitch-linux from taladan
# gist created by brodul
INRES=”1600×900″ # input resolution
OUTRES=”1600×900″ # Output resolution
FPS=”30″ # target FPS
STREAM_KEY=$(cat ~/.twitch_key)
avconv \
-f x11grab -s $INRES -r “$FPS” -i :0.0 \
-f alsa -ac 2 -i pulse \
-vcodec libx264 -s $OUTRES -preset $QUAL \
-acodec libmp3lame -ar 44100 -threads 6 -qscale 3 -b 712000 -bufsize 512k \
-f flv “rtmp://live.twitch.tv/app/$STREAM_KEY”
Ok so apparently this one is simular to the last one i had on here.
1.) set your INRES=
2.) set your OUTRES=
3.) set your FPS=
4.) you can set your QUAL=  <– i have it set to ultrafast. Really depends on your bandwith
5.) this script is telling us to put your live twitch key in a file in your home directory called “.twitch_key” .. so in our home directory we just type in “touch .twitch_key“, and then get our key from http://twitch.tv/broadcast. (you must be logged in to twitch.tv, and press the “Show Key” button on the right) Copy and past your key into “.twitch_key”, then save it.
6.) then run “chmod +x twitch-stream
I just tested this out on my laptop and i had to install something extra, because it was giving me an error “Unrecognized option ‘preset’ Failed to set value ‘ultrafast’ for option ‘preset’“. So i did “sudo apt-get install libavcodec-extra-53", and tried to run my script again. It started up, and i was able to view it on my twitch page. Also found out that sound wasn't working, so i noticed in the script that it is using libmp3lame. So make sure you install lame with "sudo apt-get install lame". It should now work well.
I hope this works out better than the last script with ffmpeg. I know it was working for me when i first created that last one, but it wasn’t working when i just tried it. Sorry for all that confusion.
PS: if you want to stream to justin.tv, you just change the line on the bottom from “rtmp://live.twitch.tv/app/$STREAM_KEY“, to “rtmp://live.justin.tv/app/$STREAM_KEY