Tuesday, November 21, 2006

Counter-Strike: Source Ubuntu Linux WINE

Sadly I do own counter-strike source.... luckily though I can say I really dont play all that much. Tonight I decided to try and install Source on the T42, just to prove to everyone that you can game on linux and linux is the best. Well yeah and I need to pwn some Newbz! I'm writing this right now as Steam is downloading my source files... wait yea I said that, Steam is running in linux and downloading the files as we speak! So here's how I got that far, after the trial and error:
1. Download WINE
sudo apt-get install wine

2. Run WINE setup--
wine setup

3. Download Tahoma font and put it in your wine fonts folder:
cp Tahoma.ttf /home/USERNAME/.wine/drive_c/windows/fonts

4. Download Steam the go to the directory and install it
wine SteamInstaller.exe

(Note I just took a break to test out my CSS on Linux, and after a few trial and errors i figured it out and got onto a server and played it! So, IT WORKS!) 5.During the steam install just use all the same options/answers you would use in a windows environment-- at some point it will prompt you that it needs to install a Mozilla Gecko plugin? just say yes and it will do it's own thing.
6. When the installer finishes open up a terminal and do the following to launch steam:
cd /home/USER/.wine/drive_c/Program Files/Steam
WINEDEBUG="fixme-all" wine steam.exe

This will launch steam while hiding any outputs from wine, thus running your game faster.
7. When steam launched I couldnt type my name in the login/password boxes without first right clicking in the login field then left clicking. After this I could login as normal.
8. Now that you're ready to launch your game you will want to make sure that all other windows besides the steam "My Games" window are minimized or closed.
9. Double click "Counter Strike Source" and as soon as it says "preparing" click the x button on the steam window with "My Games List" or it will interfere with the game.
10. The game should be running fairly close to normal now, you ay be warned that you're video is wierd and that it's using software mode, but even on my 1.7 Ghz 512mb ram 64mb Radeon 9600 the game was more than playable.

I hope that this was helpful to some. Remember I am really doing this as a proof of concept so hopefully more people will migrate from Windows over to Ubuntu. If you have any questions feel free to comment or email me. Thanks I'm off to go play!


Just a quick little update-- my father has a pcmcia tv tuner based on the saa7134 chipset that he doesn't use so I took it and decided "I'm gonna make this work with ubuntu!" Basically what needed to be done was as follows: (this is after all the trial and error of course)

1. Place the pcmcia card in the slot with the cable plugged in

2. Make sure that if the modules are loaded you unload them by typing each line into terminal and hitting enter after each:

sudo rmmod saa7134_alsa

sudo rmmod saa7134

3. Load the modules with correct parameters:

sudo modprobe saa7134

sudo modprobe saa7134_alsa

4. download tvtime to watch the t.v.

sudo apt-get install tvtime

5. Now, you could run this as it stands but you will likely find that the audio does not work to fix that you must make a launcher that will point tvtime and your card to use the correct sound. to do that do as follows:

5(a) Make create launcher file:

gedit launcher.sh

5(b) Paste the following inside, save, then exit:


sox -c 2 -s -w -r 32000 -t ossdsp /dev/dsp1 -t ossdsp -w -r 32000 /dev/dsp />tvtime --mixer=/dev/mixer:pcm

wait tvtime

t=`pidof sox`;

kill $t;

amixer -c 0 sset PCM 80%,80% unmute

to play tv you can just type:

sh launcher.sh

If you have any questions or need help just comment or email-- aesnyder@gmail.com

I am lucky enough to have a second T42 which I will be setting up as a "MythTV" using this card so check back here sometime and check out the post pertaining to that!

Tap your laptop to execute commands and more...

Knock-based commands for your Linux laptop

You probably know that the T42 comes with active protection for the hard drive. Well using that technology it's possible to simply "tap" your computer and have it respond accordingly. Example, tap your laptop and have the track change or double tap somewhere to lock the screen. I havent tried setting up all of this but when I do I'll post-- dont worry!

For the first time, you can hit your computer and get a meaningful response! Using Linux® and the Hard Drive Active Protection System (HDAPS) kernel drivers, you can access the embedded accelerometers on Lenovo (formerly IBM®) ThinkPads, then process the accelerometer data to read specific sequences of "knocking" events -- literally rapping on the laptop case with your knuckles -- and run commands based on those knocks. Double tap to lock the screen, and knock in your secret code to unlock. Tap the display lid once to move your mp3 player to the next track. The possibilities are endless.

FGLRX w/ ACPI and Flicker

Well-- all is going well on the laptop and I guess it would be false advertising if I said that everything is perfect, I have one minor bug. With the fglrx driver I have noticed that my laptop's lcd screen has a very odd flicker to it. This seems to be a common problem but I haven't dedicated any time to a solution as I've been busy and did figure out a work around. For me if the screen is flickering I can press fn+f3 and wait for the screens to shut off. Then by moving the mouse the screens come back and the laptop is no longer flickering. I've messed with the xorg.conf a little bit but havent found anything that seems to fix it. I'm fairly positive that the real issue is being caused by the settings for the acpi on the laptop. I'm going to do some more research and more trial and error tests as to how I can get this puppy purrfect. So if you get the flicker just hit fn+f3 and shake the mouse after they turn black, if this doesnt work try repeating as it always works for me in less than 3 tries usually only two. Check back here and I should have a fix up.