Running CounterStrike.exe on Linux using Wine.

Well for those of you who want a complete guide on how to run counter strike, the most preferred multiplayer game in the world on Linux, you have come to the right place.

The first step is to install wine from your favorite package installer.

Here is a list of packages you need. If you install Wine as binaries, you do not need the developmentpackages (-dev) and the compiler.

The first step we must do is install WINE. Depending on how much you’ve played around with Linux, this shouldnt be a huge hassle. If you already have WINE installed from an RPM/binary package or otherwise, remove it. We will be installing from source and will get an up-to-the minute version with CVS. In RPM based systems do this:

      # rpm -qa |grep WINE
      # rpm -qa |grep wine
      # rpm -e "whatever showed up above"

In a Debian based system do this:

# apt-get remove wine

If you have previously compiled and installed WINE from source, go into the source directory and:

      # make uninstall
  1. Now, download WINE. With Transgaming now working on it, I recommend getting their version (winex). I will assume that you downloaded wine into /usr/src, so your wine source will be in /usr/src/wine. For more information on this process, please see the winex Sourceforge project site.To use CVS, try this:
            # export CVSROOT=:pserver:anonymous@cvs.winex.sf.net:/cvsroot/winex
    	# cvs login
    	*** There is no password (leave it empty) ***
    	# cvs -z3 co wine

    Please note this is a rather large CVS checkout. It may take a while for modem users. Also, there are some binaries of WINE compiled with OpenGL support. These are untested as far as I know, so don’t complain if they don’t work.

  2. Get the development packages for OpenGL for your distro. For Debian, this is xlibmesa-dev. Other distros should have similar packages. You are also going to need a file called glext.h. Let’s see if you have it:
            # updatedb
    	# locate glext.h

    If your system doesnt already have glext.h, then you will need to get it before compiling WINE. I have made a copy available here, download it and put it in “/usr/X11R6/include/GL/”. WINE will not compile with OpenGL support without this file.

  3. Now to compile, first configure wine. Go into /usr/src/wine and:
    	 # ./configure --enable-opengl

    Wine will configure itself. Check the screen output to make sure OpenGL was properly detected. Mine looks like this:

    	 checking GL/gl.h usability... yes
    	 checking GL/gl.h presence... yes
    	 checking for GL/gl.h... yes
    	 checking GL/glx.h usability... yes
    	 checking GL/glx.h presence... yes
    	 checking for GL/glx.h... yes
    	 checking for GL/glext.h... yes
    	 checking for up-to-date OpenGL version... yes
    	 checking for thread-safe OpenGL version... yes
    	 checking for glXCreateContext in -lGL... yes
    	 checking for glXGetProcAddressARB in -lGL... yes
    	 checking for OpenGL extension functions prototypes... no
    	 checking for gluLookAt in -lGLU... yes

    If everything appears to be good, check include/config.h for “#define HAVE_OPENGL 1″. If this line is commented out, or not in the file, OpenGL support will not build. Don’t even bother compiling Wine yet; first fix your OpenGL problem. Only when include/config.h contains that line should you move on to the next step.

  4. With Wine configured (and OpenGL support enabled), it’s time to compile. From /usr/src/wine:
    	 # make depend
    	 # make

    Wine will compile so go take a nap or whatever. If you are really bored you can read some funny IRC quotes here. Once done, it should say “Wine build complete.” and we can install it with:

    	 # make install

    Wine is now compiled and installed on your system.

  5. Time to configure wine.conf. Open up wine.conf in your faviourate editor. A sample file can be found at ‘/usr/src/wine/documentation/samples/config’. Your standard C drive should probably be set to /usr/local/wine, check thats the case in wine.conf. You will also want a drive that points to your CD-ROM mount point to install Half-Life. Now go down to the [x11drv] section, ensure that double-buffering is ON. useDGA may be either on or off as DGA now works in XFree86. Some people have reported to have problems with this, try fiddling around with useDGA and double-buffering (set them to off) if something doesnt work. Once the config file works fine, go to your home directory (as the user you will be running LHL as) and:
            # mkdir ~/.wine/
    	# cp /usr/src/wine/documentation/samples/config ~/.wine/config

WINE should now be installed and configured.

The Second Step is to get the executable setup of the version of Counter-Strike you want to install and store it any folder

for example I have stored it in /home/sunx/cs

and the setup file name is cs-digital.exe

The Third Step is to install the file using wine.

To install the file (cs-digital.exe)

  1. open a terminal
  2. change the directory to where the installation file is <i.e. cd /home/sunx/cs>
  3. Now run “wine cs-digital.exe&”


About this entry