Sometimes, it is really needed to run some windows software on your Linux machines, there are different ways to do this, one of them is using wine. We will see here to do it, running at the end of the example the famous putty.exe file

We will see here how to do it for Ubuntu, Debian and Fedora We first need to install the file.

** Note: If you have Debian or a Based on Debian Distro like Ubuntu or Knoppix you can install this repo to your apt sources.list file, this is only if do not want to use your own distro’s package for wine. http://www.winehq.com/site/download-deb

For Ubuntu

sudo apt-get install wine

  • You need to have universe repo on in your /etc/apt/sources.list file this is part of mine
deb http://bo.archive.ubuntu.com/ubuntu/ dapper universe multiverse
deb-src http://bo.archive.ubuntu.com/ubuntu/ dapper universe multiverse

For Fedora

yum install wine

  • You will need to have your extras repos on in your /etc/yum.d/ directory

For Debian

apt-get install wine

  • Just the standard stable/main repo is needed

Here is the output I got in my ubuntu Dapper

user@ubuntu:~$ sudo apt-get install wine
Password:
Reading package lists... Done
Building dependency tree... Done
Suggested packages:
  msttcorefonts
The following NEW packages will be installed:
  wine
0 upgraded, 1 newly installed, 0 to remove and 74 not upgraded.
Need to get 8785kB of archives.
After unpacking 41.4MB of additional disk space will be used.
Get:1 http://bo.archive.ubuntu.com dapper/universe wine 0.9.9-0ubuntu2 [8785kB]
Fetched 8785kB in 6m4s (24.1kB/s)
Selecting previously deselected package wine.
(Reading database ... 82184 files and directories currently installed.)
Unpacking wine (from .../wine_0.9.9-0ubuntu2_i386.deb) ...
Setting up wine (0.9.9-0ubuntu2) ...

After this you have wine installed but not configured, run:

wine

and it will configure itself

</pre> user@ubuntu:/usr/lib/wine$ wine wine: creating configuration directory ‘/home/ggarron/.wine’… err:advpack:create_tmp_ini_file Unable to create temp ini file err:advpack:create_tmp_ini_file Unable to create temp ini file wine: ‘/home/ggarron/.wine’ created successfully. Wine 0.9.9 Usage: wine PROGRAM [ARGUMENTS…] Run the specified program wine –help Display this help and exit wine –version Output version information and exit </pre>

Now our wine is ready tu run windows applications if you check your $HOME/.wine directory you will find these folders.

user@ubuntu:~$ ls $HOME/.wine
dosdevices  drive_c  system.reg  userdef.reg  user.reg
user@ubuntu:~$

The directory drive_c is as the c:\ in a windows installation, so if we wanto tu run for example putty.exe we need to do this:

cd $HOME/.wine/drive_c/

mkdir my_programs

cd my_programs

wget http://the.earth.li/~sgtatham/putty/latest/x86/putty.exe

wine putty.exe

after that you will see this something like this.

Related Links http://www.go2linux.org/taxonomy/term/8