Skip to main content

Running Windows Applications in Linux

Ask some Windows users why they aren’t using Linux and chances are you will hear “because [program] doesn’t have a Linux version.” Although cross-platform software is popping up all over the place, there are still a number of applications that are restricted to a single platform – and for a lot of software, that platform is Microsoft Windows.

However, all is not lost. Although Linux has its own executable format and set of system libraries, a tool exists that will allows us to run a good portion of our Windows applications directly in Linux. This tool is of course, Wine. Wine initially began as a small project that was designed to run simple 16-bit Windows applications. As time went on, the target shifted to 32-bit applications and the long and hard process of rewriting Windows’ user-mode libraries began.

How Wine Works
Learning how to use Wine is easier if you understand exactly what Wine does. In order to explain things further, we need to take a look at how Windows applications work. This explanation might get a bit technical so feel free to skip this section if you have trouble understanding it.

A Windows application consists of binary machine code contained within a PE (Portable Executable) file. More than likely, the application makes use of one or more of Windows’ user-mode libraries for things like accessing files, creating graphical interfaces, and network communication. When Windows loads the application and begins running the code contained inside, it needs to know what user-mode libraries the application needs in order to run. This information is stored inside the executable file. Whenever the application needs to access a file or have the operating system perform some other task, it invokes the appropriate function in the user-mode library.

How does all of this relate to Wine? Well, Wine contains its own versions of most common Windows user-mode libraries and when it runs a Windows application, it simply directs the program to use its version of the libraries. Under those circumstances, the Windows application doesn’t really need to even be modified since it is performing the same instructions as it would on Windows – the only difference being that the user-mode libraries (and the appropriate code inside them) is designed to run on Linux.

How to Install Wine
The easiest way to install Wine on Linux is to check your system’s package manager to see if it already contains a pre-compiled binary that you can install. In Ubuntu, you can easily do this by visiting the Software Center and searching for ‘wine.’ If you prefer to install packages from the command line, use the following on a recent version of Ubuntu to install Wine:

sudo apt-get install wine1.3

Compiling Wine from scratch is slightly more difficult but provides you with access to the latest development versions. In order to go this route, you will need to determine what packages Wine requires for building. First off, you will need to make sure that you have a working C++ compiler (ideally g++ from the GNU Compiler Collection). The next step is to determine what packages provide the development files that Wine uses. Determining this can be tricky – a great place to find this information is the source package build dependencies page for a common distro like Ubuntu, for example, lists all of the packages that the wine1.3 package needs to build on Ubuntu. Thankfully, if you are using Ubuntu, there is a very easy way to install all of them – run this command:

sudo apt-get build-dep wine1.3

Once you have all of the build dependencies installed, it’s simply a matter of getting the Wine source and compiling it. You can download one of the prepackaged source archives or you can checkout the latest development code from the Git repository using:

git clone git://source.winehq.org/git/wine.git wine1.3

This will create a ‘wine1.3′ folder in the current directory with the Wine source code. Once you have the source code, you can run the following command to compile and install Wine:

./configure ; make ; sudo make install

Comments

Popular posts from this blog

Pengertian UNIX

The Open Group memegang definisi tentang apa sistem UNIX dan merek dagang yang terkait dalam kepercayaan untuk industri. Pada tahun 1994 Novell (yang telah memperoleh sistem UNIX bisnis AT & T / USL) memutuskan untuk keluar dari bisnis itu. Daripada menjual bisnis sebagai satu kesatuan, Novell mengalihkan hak atas merek dagang UNIX dan spesifikasi (yang kemudian menjadi Single UNIX Specification) untuk The Open Group (pada Perusahaan X waktu / Buka). Selanjutnya, menjual kode sumber dan implementasi produk (UnixWare) untuk SCO. The Open Group juga memiliki UnixWare merek dagang. Hari ini, definisi dari UNIX ® mengambil bentuk UNIX Specification seluruh dunia tunggal mengintegrasikan X / Perusahaan Terbuka XPG4, IEEE POSIX Standar dan ISO C. Melalui evolusi terus-menerus, Single UNIX Specification adalah definisi de facto dan secara de jure standar untuk aplikasi sistem UNIXpemrograman interface. Sebagai pemilik merek dagang UNIX, The Open Group telah memisahkan merek da...

Cara Instalasi Ubuntu

Install Ubuntu Menggunakan CD Masukkan CD Ubuntu ke dalam CD / DVD-drive Restart komputer Anda. Anda akan melihat layar selamat datang meminta Anda memilih bahasa Anda dan memberikan Anda pilihan untuk menginstal Ubuntu atau coba dari CD. Jika Anda tidak mendapatkan menu ini, membaca boot Dari buku CD untuk informasi lebih lanjut. Menggunakan USB drive. Komputer Paling baru dapat boot dari USB. Anda akan melihat layar selamat datang meminta Anda memilih bahasa Anda dan memberikan Anda pilihan untuk menginstal Ubuntu atau coba dari CD. Bersiaplah untuk menginstal Ubuntu. Kami sarankan Anda pasang komputer Anda ke sumber listrik. Anda juga harus memastikan bahwa Anda memiliki cukup ruang pada komputer Anda untuk menginstal Ubuntu. Kami sarankan Anda untuk memilih Download update ketika menginstal dan Instal software ini pihak ketiga sekarang. Anda juga harus tetap terhubung ke internet sehingga Anda bisa mendapatkan update terbaru saat Anda menginstal Ubuntu. Jika Anda tida...

Bahasa C++

#include <iostream.h> #include <conio.h> main (void) { char npm[10], nama[100], *hasil;    float ipk;    int jml_mhs,i;    cout << "Masukkan jumlah mahasiswa : "; cin >> jml_mhs;    for (i=1; i<=jml_mhs; i++) {       cout << "Inputkan NPM mahasiswa  : "; cin >> npm;     cout << "Inputkan nama mahasiswa : "; cin >> nama;       cout << "Inputkan IPK mahasiswa  : "; cin >> ipk;       clrscr();       if (ipk = 3) {       hasil = "MEMUASKAN";       } else if (ipk >= 2.5 && ipk < 3) {       hasil = "CUKUP";       } else if (ipk < 2.5) {       hasil = "MEMPRIHATINKAN";       }       cout << "NPM mahasiswa  : " << npm << endl;    ...