FCI-Helwan blog

Just another FCI-H weblog

Wine — Windows Applications On Linux

Wine is a program that runs MS Windows applications on Unix-based systems by providing a compatibility layer by implementing some of the Windows APIs and wrapping the others to call native Unix functions, X server, and OpenGL. Wine implementation is all in userland (outside the kernel and doesn’t need special privileges)[1].

Wine was originally short of WINdows Emulator, but I a am not sure about if that’s still the case. “Wine” is originally a recursive acronym “Wine Is Not an Emulator”[A]. (Update) Wine is more of a compatibility layer than of an emulator. An emulator usually emulates hardware, like a Playstation emulator (offtopic: I know a good one called pSX).

Wine doesn’t only implement Windows system calls, but also most of the DLLs that comes with
Windows. Most notably DirectX (which is one of the top reasons to use Wine; playing Windows games on Linux). If you are a windows license owner you can use some of the native Windows DLLs instead (but others can’t be used).

ReactOS[8] is to Windows as Linux is to Unix. A free and open source alternative. It uses Wine code. Several other commercial projects uses Wine too, like TransGaming Cedega and CodeWeavers CrossOver (and others). The former is a fork of Wine specially for gaming, they do NOT send their patches to the main-stream Wine. The latter is both a general-purpose and gaming-purpose dedicated development for Wine. Unlike the former, the latter sends it patches instantly to the main-stream Wine. It relies mostly on support for profit (as for what I understood).

Google have paid CodeWeavers to make Wine able to run Photoshop CS 2 on Linux[2]. CodeWeavers also have acted quickly to to make Wine able to run Google Chrome on Linux, and they made it in 11 days[3]. Google has actively encouraged Wine development through their interns [4] and through student participation during the Summer Of Code 2008 [5].

The only Microsoft acknowledgment about Wine, is to state it is not Genuine Windows and therefore deprived from Windows Genuine Advantage (some downloads). [6] Generously, Microsoft still allows some updates, like Office updates to Wine users. [same source]. (See [7] for instructions how to install Office 2003 on Linux.)

Wine is not small at all. WINE 1.0 have over 1.8 million lines of C code (with blank lines and comments), ~300,000 of which are tests, and ~87000 are related to Direct3D (a subset of DirectX) implementation[original research]. I am not sure how big is the Micorsoft Subsystem for Unix-based Applications (SUA)[9](*1), but I am sure it is much less. That’s because what a Unix program assumes to find in a system is much less that what a Windows application assumes to find (which are thousands of Windows APIs[10]).

Due to the large amount Wine has to implement, it doesn’t implement all of the Windows APIs yet. A program that depends on an unimplemented API might not function correctly. Wine developers try to implement high-priority APIs first. Those are the ones used by the most popular applications. (For a list of which programs are compatible with Wine check Wine AppDB[11])

Wine have been in development for more than 16 years (since 1992); even before Linux was born[12]. Wine’s still not complete, because it faces the problem with catching up with more recent Windows systems. For example (not saying that this have actually happened), when they completely supported Windows 95 applications, they were struck by XP, and then XP SP 1 and Windows 2000 (just an example, I know there are several editions in the middle). Wine development is indeed much slower than the real development pace of the real Windows (thousands of organized developers vs. hundreds of random contributers – ~700 have contributed to Wine somehow [12]).

Wine is binary compatibility layer, which means the binary executable can be executed both on Windows and Linux without modifications. While MS SUA is source compatibility layer, which means the same program will have two executables, compiled differently, but from the same source, in order to run on both platforms.

Wine’s web page: http://winehq.org/ .

Other references and links:

[1] Linux Unified Kernel is a project to implement Windows system calls (only, not the entire set of APIs) natively in Linux kernel.
[2] http://apcmag.com/google_behind_photoshops_new_linux_compatibility.htm
[3] http://www.heise-online.co.uk/news/CodeWeavers-bring-Chrome-to-Mac-and-Linux–/111535
[4] http://code.google.com/opensource/wine.html
[5] http://wiki.winehq.org/SummerOfCode
[6] http://www.microsoft.com/genuine/downloads/faq.aspx
[7] http://www.wine-reviews.net/microsoft/running-ms-office-2003-under-linux-with-wine-0952.html
[8] http://www.reactos.org/en/index.html
[9] http://mohnabil.blogspot.com/2008/09/microsoft-subsystem-for-unix-based.html
[10] Unlike Windows system calls (http://www.metasploit.com/users/opcode/syscalls.html), which are less than 400 in Windows Vista, the entire set of the windows APIs are much more (http://www.codase.com/windows.html)
[11] http://appdb.winehq.org/
[12] http://www.winehq.org/site/history
[A] http://wiki.winehq.org/FAQ?action=recall&rev=217#head-8b4fbbe473bd0d51d936bcf298f5b7f0e8d25f2e


September 30, 2008 Posted by | Linux | Leave a comment

Fedora 9 alpha release

Fedora 9 Alpha have been released a minutes ago here is the link of the page and for downloads


February 10, 2008 Posted by | Linux | Leave a comment

The solution of the fedora 8 shock (swing doesn’t work)

In this post we gonna show why does swing components? most of us tried netbeans ,but it awfully doesn’t work with it. The reason is that , netbeans and swings are using the libx11 and there some thread safety operation the new version of this lib is doing that’s why if you downgraded to the last version of libx11 you will find swings works will but of course it’s not the ideal solution but of course there is another solution. The solution is to change the path of the libx11 in the libmawt.so which have shared native functions that calls libx11. we change the place of the used lib from the XINERAMA to the FAKEEXTN
using the sed command like this :

sed -i ‘s/XINERAMA/FAKEEXTN/g’ libmawt.so

but where is libmawt.so this is different from jvm to jvm especially after the icedtea(icedtea is an implementation of the jvm by redhat ) so if you are using the jdk’s jvm you will find the file in

and after that you can run your net beans setup of any program that runs with java

November 23, 2007 Posted by | JAVA, Linux, NetBeans | 2 Comments

Linux & Open Source Replacments Session by IEEE SB

Click to cheek the full version

October 19, 2007 Posted by | Announcements, JAVA, Linux, open source | 1 Comment

Ubuntu 7.10 after two days

The official site of Ubuntu promise all Linux lover to a new version of Ubuntu, Kubuntu, Edubuntu, Gobuntu, and Xubuntu codenamed “Gutsy Gibbon” throw version 7.10 .

They consider this new release candidate to be complete, stable, and suitable for testing by any user.

The new version 7.10 is scheduled for 18 October 2007 (after two days ) and will have supporting for 18 month only so from users want support for longer time using Ubuntu 6.06 LTS, with security support until 2011 .

October 16, 2007 Posted by | Announcements, Linux, open source | Leave a comment

Best Linux Distribution for Java Development

I’ve spent the last few weeks learning the basics, coding and database development, source control…etc on Linux, as I want to completely transfer to it, that’s why I’m trying as much Linux distros as I can these days (@ home and @ work, trying to spread the open-source word); I tried Ubuntu 7.04 and Fedora 7, and currently downloading openSUSE 10.2, and till now I love Ubuntu and prefer GNOME to KDE, although KDE seems to have nicer visual effects, but I feel much more comfortable with GNOME, anyway, have you got any ideas that might help me find the best distro for development especially with Java? I need a fast and reliable system that doesn’t require much configuration, I’d be grateful if you could provide me with help in that, thanks!

By the way, I have a small – yet annoying – problem in Ubuntu that occurred on my laptop and home PC, and will try to trigger that problem on my work PC tomorrow to help me in choosing my primary Linux distro; when I shut my computer down improperly (e.g. by unplugging the power cable or pressing the Reset button), Ubuntu’s response became much slower than it used to (not just after the following restart, but always)!! Sometimes it returns back to normal (but usually after leaving the computer on for some time), but mostly it makes me want to SMASH MY PC!! I click any icon such as Firefox, Terminal or Thunderbird, gives no response for about 5 seconds and then starts execution!! Any ideas?? I don’t think I’m in the mail group yet, so I’d be grateful if you reply to my post here or e-mail me at aamr@fcih.net, thanks again.

August 26, 2007 Posted by | Linux, open source | 4 Comments

MySQL Server on Ubuntu 6.06 Server and Client on Ubuntu 7.04 Desktop Setup & Configuration For Remote Access

Hello Linux & MySQL users :), this is my first article here, and hope it’s useful! Here’s the scenario I’m trying to achieve: Using VMWare, I set 2 images up, one containing Ubuntu Server 6.06 and MySQL Server, and the other containing Ubuntu Desktop 7.04 and MySQL Client tools, and I wanted to access the server remotely (on the same LAN). Note: you can do the same using 2 separate machines on the same LAN, it’s not different at all. Ubuntu Server doesn’t have a Desktop Manager by default and I used the command line to achieve everything (I set an X-Server and a desktop manager called Icewm up later using this tutorial: https://help.ubuntu.com/community/Installation/LowMemorySystems )

  • MySQL Server

    1. Create a root account password: sudo passwd

    2. login with your root account: su

    3. if you didn’t set a LAMP (Linux, Apache, MySQL, PHP/Python…etc) server, you can download the mysql-server:
      sudo apt-get update
      sudo apt-get install mysql-server

    1. create the root account on mysql-server: mysqladmin -u root password ‘yourpassword’

    2. login to mysql using the root account: mysql -p

    3. create an administrator account that has all privileges of root, e.g.

        GRANT ALL ON *.* TO aamr@’%’ IDENTIFIED BY ‘yourpassword’

    4. exit from mysql: exit

    5. Edit the configuration file of MySQL (/etc/mysql/my.cnf ) to enable remote access to it using any text editor such as vi: vi /etc/mysql/my.cnf

    6. go to the line “bind-address”, press INSERT and change the IP to the IP of the server, e.g. From to

    7. After you complete editing, press Escape, then type :w to save and :q to quit

  • MySQL Client

    1. You can use the Synaptic package manager in System->Administration and search for mysql-client, mysql-query-browser, and mysql-admin and install them.

    2. Launch any of both, enter the username and password of the user you created, and there you go 🙂

August 24, 2007 Posted by | Linux, open source | Leave a comment

Silverlight for Linux [Moonlight Project]

Posted by: Jack Vaughan on June 25, 2007 DIGG
Miguel de Icaza and his Mono project cohorts have quickly produced an implementation of Silverlight for Linux. The effort is called Moonlight.

Silverlight is an extended subset of the 2.0 .NET framework that can support rich media on multiple browsers and platforms.

Various developers worked intensely to create the first version of Moonlight, which de Icaza demonstrated at a European Microsoft MIX event last week.

de Icaza blog on Moonlight

Moonlight Project page

June 28, 2007 Posted by | Linux | Leave a comment

Linux Tip #4 : Virtual CD

Indeed sometime you have faced the situation that you have an ISO image and you want to use it as an actual CD but without burning it to a real CD. In windows you need to get some software to do that for you that usually create a virtual device etc.

In Linux you can do with a single line, mounting it to a folder.

Here’s the command:
sudo mount -o loop -t iso9660 CD_IMAGE.ISO /path/to/folder

You give it the ISO file name and the path to the folder where you want to access it and it’s all done for you! No device naming (A: G: I:…) required, no max number of virtual CD-ROM devices, none. Just that simple.



March 10, 2007 Posted by | Linux | 8 Comments

Linux Demo Week @ FCIH by SU

Students United is proud to announce the launch of Linux Demo Week. Hope that you all come and see Linux live in action


March 4, 2007 Posted by | Announcements, Linux | Leave a comment