Linux and Technology blog

August 3, 2006

How to launch Windows binaries on Linux directly

Filed under: Hacking, Linux, Software — rakeshvk @ 6:12 pm

Although I rarely run Windows these days, it seems I can’t break the habit of using one or two Windows applications instead of their open source equivalents. However, instead of having a full-blown Windows desktop, I prefer to run these programs on my GNU/Linux system with Wine. The problem is that I’m tired of having to enter cd ~/.wine/drive_c/Program\ Files\My\ Windows\ App; wine My\ Windows\ App.exe every time I want to launch one of these programs. Having shell scripts for each program is not a great solution either. Wouldn’t it be better to simply run My\ Windows\ App.exe directly on an XTerm? Fortunately the Linux kernel already lets you do that with a feature called binfmt_misc.

If you run your distribution’s stock kernel, chances are this feature is already available. If it’s not, or you prefer to build your own kernels, make sure to select CONFIG_BINFMT_MISC (Executable file formats -> Kernel support for MISC binaries) either built-in or as a module. In the latter case, make sure that the binfmt_misc module is auto-loaded during boot (on Debian and its derivatives run echo binfmt_misc >> /etc/modules). Mount bifmt_misc with the command mount binfmt_misc -t binfmt_misc /proc/sys/fs/binfmt_misc, or copy the following line to your /etc/fstab to have it mounted automatically on each boot: >>>>


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at

%d bloggers like this: