9

It is clear that the environment required for running a Windows application and an Ubuntu application are completely different. But a small package (of approx. around 650 MB) is able to run Windows applications on Ubuntu. So how is this done?

It clearly won't simulate the entire Windows environment, so how far does it go by simulating the Windows environment?. What will wine do if certain setup files requite it to change registry keys (which Ubuntu does not have). Moreover, what does wine actually do while installing a Windows application on Ubuntu ?

It is not a virtual machine, so it must be missing many parts. I don't understand how far can it go, simulating the Windows environment. So briefly, what is it missing?

muru
  • 197,895
  • 55
  • 485
  • 740
Anonymous_Guy
  • 107
  • 1
  • 3
  • 2
    Super brief answer: it translates Windows syscalls to Linux syscalls. – You'reAGitForNotUsingGit May 16 '16 at 12:31
  • 1
    I hope someone with good experience writes a very good answer for this question in detail. – Severus Tux May 16 '16 at 12:33
  • 3
    "Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop."

    https://www.winehq.org/about

    – jzonthemtn May 17 '16 at 17:08
  • 2
    Wine actually has Registry and you can edit it. Programs use "shared libraries" - DLLs and Wine makes sure they can run properly. – jet Sep 05 '16 at 20:06
  • you assume it works? :+ – Rinzwind Nov 01 '16 at 18:01
  • This is not rally an answer, but a reference to some links, perhaps after reading them you can write up an answer to your question yourself? https://wiki.winehq.org/Wine_Features https://wiki.winehq.org/FAQ https://en.wikipedia.org/wiki/Wine_(software) – d1bro Nov 01 '16 at 17:22
  • If you really want to know how wine works I would recommend going to the source as anything else no matter how well intentioned is likely to miss the nuances you appear to be looking for. You might also check the Documentation for details – Elder Geek Nov 07 '16 at 16:31
  • Also, end user questions regarding wine can be posted here – Elder Geek Nov 07 '16 at 16:45

1 Answers1

3

Wine (originally an acronym for "Wine Is Not an Emulator") is a compatibility layer capable of running Windows applications on several POSIX-compliant operating systems, including Ubuntu. Instead of simulating internal Windows logic like a virtual machine or emulator, Wine translates Windows API calls into POSIX calls on-the-fly, eliminating the performance and memory penalties of other methods and allowing you to cleanly integrate Windows applications into your desktop.WineHQ

In addition to allowing the user to install and run Windows applications just like you would in Windows, Wine provides these benefits over Windows.

  • Wine makes it possible to access Windows applications remotely.
  • Wine makes it economical to use thin clients: simply install Wine on a Linux server, and you can access these Windows applications from any X terminal.
  • Wine can also be used to make existing Windows applications available on the web by using VNC and its Java/HTML5 client.

What is missing in Wine?

Wine does not support Windows USB drivers. Windows drivers are of zero use in Wine. Wine will only present the devices that are working in the Linux system.

Reference: Ubuntu Community Docs: Wine

karel
  • 114,770
  • 1
    To extend the last point: Wine cannot use any hardware directly (incl. USB). It can only use high-level interfaces to access things like keyboards, mice, networking, audio devices, printers and files on a storage device for their primary purpose (i. e. reacting to pressed keys and buttons, mouse movements, record and play back sound, use existing system network connections, print, access files on mounted file systems). You won't be able to use special or proprietary functions of your USB mouse/keyboard/printer/dongle/flux capacitator. – David Foerster Nov 08 '16 at 04:50