<?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>Yet another web log &#187; Nautilus</title>
	<atom:link href="http://blog.philippheckel.com/tag/nautilus/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippheckel.com</link>
	<description>Life, Linux and other things</description>
	<lastBuildDate>Tue, 24 Aug 2010 05:24:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Launch Nautilus in the current working directory</title>
		<link>http://blog.philippheckel.com/2008/05/16/launch-nautilus-with-the-current-working-directory/</link>
		<comments>http://blog.philippheckel.com/2008/05/16/launch-nautilus-with-the-current-working-directory/#comments</comments>
		<pubDate>Fri, 16 May 2008 21:33:08 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Office]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nautilus]]></category>
		<category><![CDATA[Scripts]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/05/16/launch-nautilus-with-the-current-working-directory/</guid>
		<description><![CDATA[Working on the console is sometimes tiring, especially when you have to rename files. Using Nautilus is much quicker for these types of actions. The problem is, that if you&#8217;re working in a deep depth of your file tree and your path is very long, it may take you some extra seconds to open this [...]]]></description>
			<content:encoded><![CDATA[<p>Working on the console is sometimes tiring, especially when you have to rename files. Using Nautilus is much quicker for these types of actions. The problem is, that if you&#8217;re working in a deep depth of your file tree and your path is very long, it may take you some extra seconds to open this path in the Nautilus browser. So wouldn&#8217;t it be much easier to simply type <em>naut</em> on the console to <em>open Nautilus with the current working directory</em>? </p>
<p><span id="more-6"></span></p>
<h3 id="toc-update-feb09">Update Feb/09</h3>
<p>Apparently, this can be solved in a really easy way as <em>Mads Buus</em> suggested in the comments-section. The GNOME desktop environment ships with a tool called <em>gnome-open</em>, which can be used for this:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ gnome-open .</pre></div></div>

<p>This opens Nautilus in the current working directory. Note: Don&#8217;t forget the dot after the command!</p>
<p>You might also want to look how to make a shortcut for this command, cmp. Mads Buus&#8217; comment below. Thanks again for this much easier solution!</p>
<h3 id="toc-the-solution">The solution</h3>
<p>The solution is basically just a one-line command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;'<span style="color: #780078;">`pwd`</span>'&quot;</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> nautilus <span style="color: #660033;">--browser</span></pre></div></div>

<p>To make it shorter, we can just put these lines in a script called <em>naut</em>. You can either save the script where you like to or put it in your very own <em>.bin</em>-directory (which I will do here).</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">mkdir</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bin
$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'#!/bin/bash\necho &quot;'</span><span style="color: #000000; font-weight: bold;">\'</span><span style="color: #ff0000;">'`pwd`'</span><span style="color: #000000; font-weight: bold;">\'</span><span style="color: #ff0000;">'&quot; | xargs nautilus --browser'</span> <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bin<span style="color: #000000; font-weight: bold;">/</span>naut
$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> +x ~<span style="color: #000000; font-weight: bold;">/</span>.bin<span style="color: #000000; font-weight: bold;">/</span>naut</pre></div></div>

<p>Make sure to add the <em>.bin</em>-directory to your PATH variable:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'\n# Private binaries\nexport PATH=$PATH:~/.bin'</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc</pre></div></div>

<h3 id="toc-usage-of-the-naut-command">Usage of the <em>naut</em>-command</h3>
<p>You can now use the <em>naut</em>-command in your console window (make sure to restart the console window before). Here is a small example:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #7a0874; font-weight: bold;">cd</span> <span style="color: #ff0000;">&quot;/very/long and complicated/path/to/a/very/important/directory&quot;</span>
$ naut</pre></div></div>

<p>Et voilà , the Nautilus window will pop up.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/05/16/launch-nautilus-with-the-current-working-directory/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
