<body><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/plusone.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar.g?targetBlogID\x3d10192368\x26blogName\x3dChrno\x26publishMode\x3dPUBLISH_MODE_BLOGSPOT\x26navbarType\x3dBLUE\x26layoutType\x3dCLASSIC\x26searchRoot\x3dhttps://mckev.blogspot.com/search\x26blogLocale\x3den_US\x26v\x3d2\x26homepageUrl\x3dhttps://mckev.blogspot.com/\x26vt\x3d7675396428617383679', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script>

Thursday, February 07, 2008

War Craft III: DotA in Linux?? Why not?

It's amazing to find what you can do with Linux nowadays. Just several years ago, back when I was still in university, the WINE (Windows emulator in Linux) could only emulate Windows' mini games like Minesweeper. Now it could run many native Windows applications, including my favorite games, War Craft III!

Here's a step-by-step installation I did. I used OS Linux Ubuntu Desktop Edition v7.10 (Gutsy). Since this was my first experiment with Linux Ubuntu, please correct me if you know a more efficient way.
1. First install Linux Ubuntu by rebooting into Ubuntu Live CD. Just click "install" icon in the Ubuntu desktop.

2. Enable Ubuntu APT global repository:
# sudo cp /etc/apt/sources.list /etc/apt/sources.list.bck
# sudo sed -i -e "s/#deb/deb/g" /etc/apt/sources.list
# sudo apt-get update

3. Install NVIDIA drivers (I used nVidia Quadro NVS graphics card):
# sudo apt-get install linux-restricted-modules-generic
# sudo apt-get install nvidia-glx
# dpkg-reconfigure xserver-xorg
Use 'nvidia' as the X graphic driver. Then restart X by pressing Ctrl-Alt-Backspace.
# glxinfo | grep -i opengl
Make sure you can find "NVIDIA" and "Quadro NVS" displayed correctly.

4. Install WINE through APT:
# wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -
# sudo wget http://wine.budgetdedicated.com/apt/sources.list.d/gutsy.list -O /etc/apt/sources.list.d/winehq.list
# sudo apt-get update
# sudo apt-get install wine

5. Copy the entire War Craft III folder to any path in Linux.

6. And finally, run War Craft III through WINE:
$ wine "/home/kevin/mywine/wc3/Warcraft III 1.20/War3.exe" -opengl -window

This proves that you don't have to buy Windows to play War Craft III. Amazing huh! Open-source rulezz!! Bye-bye Micro$oft..