<?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; winepath</title>
	<atom:link href="http://blog.bigsmoke.us/tag/winepath/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>
	</channel>
</rss>

