<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>BigSmoke &#187; Wine</title>
	<atom:link href="http://blog.bigsmoke.us/tag/wine/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.bigsmoke.us</link>
	<description>Smokes your problems, coughs fresh air.</description>
	<lastBuildDate>Sat, 04 Feb 2012 18:03:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>winepath</title>
		<link>http://blog.bigsmoke.us/2009/06/28/winepath</link>
		<comments>http://blog.bigsmoke.us/2009/06/28/winepath#comments</comments>
		<pubDate>Sun, 28 Jun 2009 15:38:53 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[CLI]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Wine]]></category>
		<category><![CDATA[winepath]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=660</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>I have all these little scripts in my <tt>$HOME/bin</tt> directory to ease the execution of Windows programs. For instance, I don&#8217;t like to type the full path to Excel Viewer every time when I need to view an Excel sheet in Linux:</p>

<pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/sh</span>
<span style="color: #ff0000;">&quot;/home/bigsmoke/.wine/drive_c/Program Files/Microsoft Office/OFFICE11/XLVIEW.EXE&quot;</span> <span style="color: #ff0000;">&quot;$*&quot;</span></pre>

<p>This works pretty well, except when trying to view a document that&#8217;s not in the current directory:</p>

<pre class="bash">xlview <span style="color: #ff0000;">&quot;/tmp/Some Excel sheet sent to me by someone.xls&quot;</span></pre>

<p>To make that work, you need to use a handy utility that comes with <a href="http://www.winehq.org/">Wine</a>, <a href="http://wiki.winehq.org/winepath">winepath</a>. With winepath, I can modify the script to work (the example is for wordview):</p>

<pre class="bash"><span style="color: #808080; font-style: italic;">#!/bin/bash</span>
<span style="color: #0000ff;">path=</span>`winepath --windows <span style="color: #ff0000;">&quot;$*&quot;</span>`
<span style="color: #ff0000;">&quot;/home/bigsmoke/.wine/drive_c/Program Files/Microsoft Office/OFFICE11/WORDVIEW.EXE&quot;</span> <span style="color: #ff0000;">&quot;$path&quot;</span></pre>

<p>This, together with Linux&#8217;s <a href="http://blog.bigsmoke.us/2009/06/28/native-execution-of-windows-programs-on-linux">binfmt_misc</a> makes executing Windows programs on Linux a breeze.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/06/28/winepath/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Native execution of Windows programs on Linux</title>
		<link>http://blog.bigsmoke.us/2009/06/28/native-execution-of-windows-programs-on-linux</link>
		<comments>http://blog.bigsmoke.us/2009/06/28/native-execution-of-windows-programs-on-linux#comments</comments>
		<pubDate>Sun, 28 Jun 2009 15:24:46 +0000</pubDate>
		<dc:creator>Rowan Rodrik</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Gentoo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Wine]]></category>

		<guid isPermaLink="false">http://blog.bigsmoke.us/?p=656</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>When I installed this laptop last year, I was pleasantly surprised by the performance of vanilla Wine (and Gentoo&#8217;s default Wine configuration). At that time, my only memory of Wine was that getting anything useful to work took work and that your best bet to get anything working was to install CrossOver Office. Things change and in the meantime Wine has even come to version 1.0.</p>

<p>I want to write down what I had to do to be able to execute Windows executables as if they are Linux native. This can be done thanks to <a href="http://en.wikipedia.org/wiki/Binfmt_misc">Linux&#8217; support for <em>misc.</em> binaries</a>.</p>

<p>First, you have to enable <tt>CONFIG_BINFMT_MISC</tt> in your kernel configuration. If it was configured as a module, run <q><kbd>/sbin/modprobe binfmt_misc</kbd></q>.</p>

<p>Then you have to register the appropriate binary formats:</p>

<pre class="bash"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">':windows:M::MZ::/usr/bin/wine:'</span> &gt; /proc/sys/fs/binfmt_misc/register</pre>

<p>That&#8217;s it. Of course, the <tt>.exe</tt> files need to have their executable bit set:</p>

<pre class="bash">chmod u+x program.exe</pre>

<p>Done.</p>]]></content:encoded>
			<wfw:commentRss>http://blog.bigsmoke.us/2009/06/28/native-execution-of-windows-programs-on-linux/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

