Pages

Tuesday, February 16, 2010

Runnig Windows applications in Unix/Linux Platform

So you want to run windows application/software on Unix/Linux machines??

below are the 2 ways you can do.......

First way is for the lazy people or I can say for the people who have more money and less time to crack their heads ;-)

Just download the product
corssover from below link whichever suites best to you and install on the linux and enjoy..  yuppi !!!   You are done.. 

http://www.codeweavers.com/products/download_trial/

If you want to go with the HARD and FREE way, carry on with the below method.

-> Have you heard about WINE? 

       Yes Wine is an implementation of the Windows Application Programing Interface (API) library, acting as a bridge between the Windows program and Linux. Wine makes it possible to run Windows programs alongside any Unix-like operating system, particularly Linux. Think of Wine as a compatibility layer, when a Windows program tries to perform a function that Linux doesn't normally understand, Wine will translate that program's instruction into one supported by the system.

Let’s see Installation of Wine

Wine is supported for many Unix flavors like Ubuntu, Debian, Red Hat, CentOS, Fedora, SUSE, Mandriva, Slackware, FreeBSD, Solaris, OpenSolaris for which you can download their related packages from the link below.

http://www.winehq.org/site/download

Lets try to install Wine on the Suse Linux, 

Below steps can be followed for most of the Linux distros

Step 1: 

Download latest wine package from the below link 
http://sourceforge.net/projects/wine/files/Source/

Step 2: 

Extract the package , Usually the package is in tar.bz2 format. 

#bunzip2 filename.tar.bz2

You will get the file with the .tar extention.

# tar –xvf filename.tar

You will get the all the binaries into a folder say wine

Step3:

Navigate into the wine directory and give the following commands

#./configure
# make depend
# make
# make install

Hurray!! You are done with the installation. 

Now let’s configure Wine

Step1:
Run the command 

 #/usr/local/bin/winecfg
When the program starts you'll notice there are tabs along the top of the window for:
Applications
Libraries
Graphics
Desktop Integration
Drives
Audio
About

Carefully change the settings in the Applications and Libraries tab as it impacts on getting an application to run, Wine has the ability to mimic the behavior of different versions of Windows. In general, the biggest difference is whether Wine behaves as a Win9x version or an NT version. Some applications require a specific behavior in order to function and changing this setting may cause a buggy app to work. Within the tab you'll notice there is a Default Settings entry. If you select that you'll see the current default Windows Version for all applications. A troublesome application is best configured separately from the Default Settings. To do that:

Click on the Add application button. -> Browse until you locate the filename.exe  -> After it's been added you can choose the specific Windows version Wine will emulate for that application



-> To run an Application in Wine 

Just execute the following command
You could run the file c:\windows\system\myappli.exe with:

# wine myappli.exe
      
if you want to run the file c:\myapps\myappli.exe with this command:

# wine c:\\myapps\\myappli.exe
      
Plz Note the backslash used here are for escape "\" 


->Tricks to add different devices

->To add your CD-ROM, just create a new link pointing to it: 

# ln -s /mnt/cdrom ~/.wine/dosdevices/d: 

NOTE:  we are using the DOS-style naming convention here for links - the format is a letter followed by a colon, such as "a:". So, if the link to your c: drive points to ~/.wine/drive_c, you can interpret references to c:\windows\system32 to mean ~/.wine/drive_c/windows/system32.

-> To add Serial and parallel port 
   
Its very similar to drive configuration - simply create a symbolic link in ~/.wine/dosdevices with the name of the device.

#ln -s /dev/ttyS0 com1
#ln -s /dev/lp0 lpt1

->Do you have shares on windows? 

Windows shares are mapped into the unc/ directory so anything trying to access \\myserver\some\file will look in ~/.wine/dosdevices/unc/myserver/some/file/. For example, if you used Samba to mount\\myserver\some on /mnt/smb/myserver/some then you can do
            
   #ln -s /mnt/smb/myserver/some unc/myserver/some
          
to make it available in wine (don't forget to create the unc directory if it doesn't alrady exist).


Cheers,
All the Best ..... :-)



No comments:

Post a Comment