<?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; Bash</title>
	<atom:link href="http://blog.philippheckel.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.philippheckel.com</link>
	<description>Life, Linux and other things</description>
	<lastBuildDate>Thu, 17 Mar 2011 10:04:42 +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>Copy videos from Youtube &amp; Co. to your iPod Video with Ubuntu</title>
		<link>http://blog.philippheckel.com/2008/07/29/copy-videos-from-youtube-to-your-ipod-video-with-ubuntu/</link>
		<comments>http://blog.philippheckel.com/2008/07/29/copy-videos-from-youtube-to-your-ipod-video-with-ubuntu/#comments</comments>
		<pubDate>Tue, 29 Jul 2008 16:22:04 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Multimedia]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Video]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/07/30/copy-videos-from-youtube-co-to-your-ipod-video-with-ubuntu/</guid>
		<description><![CDATA[Since nearly everybody in the US and more and more Europeans have an iPod and the whole world loves Youtube, wouldn&#8217;t it be nice to copy these flash streaming videos (flv-files) to your iPod Video? &#8212; Yes, it is possible. And I will tell you how. 1st step: Copy the flash video files (capture the [...]]]></description>
			<content:encoded><![CDATA[<p>Since nearly everybody in the US and more and more Europeans have an iPod and the whole world loves Youtube, wouldn&#8217;t it be nice to copy these flash streaming videos (flv-files) to your iPod Video? &#8212; Yes, it is possible. And I will tell you how.</p>
<p><span id="more-8"></span></p>
<h3 id="toc-1st-step-copy-the-flash-video-files-capture-the-flv-files">1<sup>st</sup> step: Copy the flash video files (capture the FLV-files)</h3>
<p>Ubuntu (and I guess nearly every Linux distribution) makes it really easy to download the flash videos which can be streamed on platforms like Youtube and all the others. <em>Bad luck for Windows users.</em></p>
<ul>
<li>Just open your browser (Opera in my case, Firefox does it too)</li>
<li>Go to the website with the video you want to stream</li>
<li>Hit &#8220;Play&#8221;, wait a few seconds and push &#8220;Pause&#8221; so that the video starts to buffer</li>
<li>Now open the <em>/tmp</em>-folder in a file manager like Nautilus or Konquerer</li>
<li>You will find a file with a name like &#8220;Flashzad23&#8243;, in any case something starting with &#8220;Flash&#8221;</li>
<li>Rename this file to &#8220;my-youtube-video.flv&#8221;. This also works when the buffering process has not been finished yet</li>
</ul>
<p>That&#8217;s it. </p>
<p>If you just want to watch the video, it&#8217;s possible to just open it with your favourite player such as VLC, Totem, MPlayer, etc. This also works while it is still buffering! But since you want to copy it to the iPod Video, you need to resize/re-encode it to a <em>m4v</em>- or <em>mov</em>-file.</p>
<h3 id="toc-2nd-step-resizere-encode-the-flv-file-for-the-ipod-video">2<sup>nd</sup> step: Resize/Re-encode the flv-file for the iPod Video</h3>
<p>Unfortunately, I didn&#8217;t find a perfect <em>and</em> fast solution to re-encode flv-videos for the iPod. I will demonstrate two ways, the <em>fast</em> one for movies and series you only want to watch once. And the <em>perfect</em> one for videos you want to keep on the iPod for a longer time.</p>
<h4 id="toc-install-ffmpeg-from-the-medibuntu-repository">Install &#8220;ffmpeg&#8221; from the Medibuntu repository</h4>
<p>For both ways it is at least necessary to install the packages <em>ffmpeg</em> and <em>libavcodec0</em> from the Medibuntu Repository instead of the regular Ubuntu reps. </p>
<p>You can find out how to do this on the <a href="https://help.ubuntu.com/community/Medibuntu">Ubuntu help pages</a>.</p>
<h4 id="toc-the-fast-way">The fast way</h4>
<p>The fast way a one big <em>disadvantage</em>: The iPod isn&#8217;t able to estimate the length of the video. That means it&#8217;s not possible to use the nice diamond control to jump within the video. Regular rewind and fast-forward is still possible anyway.</p>
<p>Luckily, you only need one tool: ffmpeg. Just install it via apt-get:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span></pre></div></div>

<p>Basically, just use this command to convert a flv-file to a mov-file (readable/playable by the iPod Video):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> <span style="color: #ff0000;">&quot;my-youtube-video.flv&quot;</span> <span style="color: #660033;">-f</span> mp4 <span style="color: #660033;">-vcodec</span> mpeg4 <span style="color: #660033;">-maxrate</span> 1000k \
   <span style="color: #660033;">-b</span> 700k <span style="color: #660033;">-qmin</span> <span style="color: #000000;">3</span> <span style="color: #660033;">-qmax</span> <span style="color: #000000;">5</span> <span style="color: #660033;">-bufsize</span> <span style="color: #000000;">4096</span> <span style="color: #660033;">-g</span> <span style="color: #000000;">300</span> <span style="color: #660033;">-acodec</span> aac <span style="color: #660033;">-ab</span> 192k \
   <span style="color: #660033;">-s</span> 320x240 <span style="color: #660033;">-aspect</span> <span style="color: #000000;">4</span>:<span style="color: #000000;">3</span> <span style="color: #ff0000;">&quot;my-youtube-video.mov&quot;</span></pre></div></div>

<p>To simplify the mass-conversion, I wrote a tiny script which can be copied to your own &#8220;.bin&#8221;-directory (cp. <a href="/2008/05/16/launch-nautilus-with-the-current-working-directory/">this article</a>):</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">for</span> <span style="color: #c20cb9; font-weight: bold;">file</span> <span style="color: #000000; font-weight: bold;">in</span> $<span style="color: #000000; font-weight: bold;">@</span>; <span style="color: #000000; font-weight: bold;">do</span>
        <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> <span style="color: #660033;">-i</span> <span style="color: #007800;">$file</span> <span style="color: #660033;">-f</span> mp4 <span style="color: #660033;">-vcodec</span> mpeg4 <span style="color: #660033;">-maxrate</span> 1000k <span style="color: #660033;">-b</span> 700k <span style="color: #660033;">-qmin</span> <span style="color: #000000;">3</span> <span style="color: #660033;">-qmax</span> <span style="color: #000000;">5</span> \
           <span style="color: #660033;">-bufsize</span> <span style="color: #000000;">4096</span> <span style="color: #660033;">-g</span> <span style="color: #000000;">300</span> <span style="color: #660033;">-acodec</span> aac <span style="color: #660033;">-ab</span> 192k <span style="color: #660033;">-s</span> 320x240 <span style="color: #660033;">-aspect</span> <span style="color: #000000;">4</span>:<span style="color: #000000;">3</span> <span style="color: #007800;">$file</span>.mov
<span style="color: #000000; font-weight: bold;">done</span></pre></div></div>

<h4 id="toc-the-perfect-and-slow-way">The perfect (and slow) way</h4>
<p>Well, this way might be the better one since the disadvantage from above doesn&#8217;t occur. Unfortunately, it does take <em>a lot longer</em>. A LOT! But just try it out by yourself.</p>
<p>I found an <a href="/uploads/2008/07/flv2ipod.sh">flv-to-iPod (m4v) encoding script</a> on ubuntu.com written by John Dong. Find instructions and installation hints to the script on the <a href="https://help.ubuntu.com/community/iPodVideoEncoding#Script 1: pypodconv Script">Ubuntu Wiki</a></p>
<h3 id="toc-3rd-and-last-step-transfer-the-video-to-the-ipod">3<sup>rd</sup> and last step: Transfer the video to the iPod</h3>
<p>Use gtkpod or your favorite iPod managing software to transfer the video to your iPod.<br />
I hope this helped a little. Please let me know if you have difficulties or found a better (easier) way to do the conversion!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/07/29/copy-videos-from-youtube-to-your-ipod-video-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<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>4</slash:comments>
		</item>
		<item>
		<title>Unison 2.27.57 on Debian Etch and Ubuntu Hardy</title>
		<link>http://blog.philippheckel.com/2008/05/16/unison-2-27-57-on-debian-etch-and-ubuntu-hardy/</link>
		<comments>http://blog.philippheckel.com/2008/05/16/unison-2-27-57-on-debian-etch-and-ubuntu-hardy/#comments</comments>
		<pubDate>Fri, 16 May 2008 00:47:32 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Synchronization]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Unison]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/05/16/unison-22757-on-debian-etch-and-ubuntu-hardy/</guid>
		<description><![CDATA[The good thing about the file sync tool Unison is, that it&#8217;s available for several operating systems. This is great for groups working on different systems (Mac, Linux and Windows) but want to share and synchronize files on a remote server. Well, the bad thing about Unison on the other hand is, that its backwards [...]]]></description>
			<content:encoded><![CDATA[<p>The good thing about the file sync tool <a href="http://www.cis.upenn.edu/~bcpierce/unison/">Unison</a> is, that it&#8217;s available for several operating systems. This is great for groups working on different systems (Mac, Linux and Windows) but want to share and synchronize files on a remote server.</p>
<p>Well, the bad thing about Unison on the other hand is, that its backwards compatibility is anything but great, so that you have to make sure that everybody in the team uses the same version. And this can be tricky depending on what system you are using.</p>
<p>My home system is Ubuntu Hardy, the remote server system is Debian Etch. Both come with Unison 2.16.13 which would be great if not Apple&#8217;s new Leopard brings the newest version 2.27.57. Long story short, I needed the newest version on Hardy and Etch.</p>
<p><span id="more-3"></span></p>
<h3 id="toc-unison-on-hardy">Unison on Hardy</h3>
<p>To install the newest version of Unison on Hardy, it&#8217;s the best to just use the existing Backport package.</p>
<p>First, add the backports to the apt-sources, using your favorite editor, e.g. vi or nano:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">sudo</span> editor <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>apt<span style="color: #000000; font-weight: bold;">/</span>sources.list</pre></div></div>

<p>Look for <em>backports</em> and uncomment/add the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="apt_sources" style="font-family:monospace;"><span style="color: #00007f;">deb</span> <span style="color: #009900;">http://de.archive.ubuntu.com/ubuntu/</span> <span style="color: #b1b100;">hardy-backports</span> <span style="color: #b16000;">main</span> <span style="color: #b16000;">restricted</span> <span style="color: #b16000;">universe</span> <span style="color: #b16000;">multiverse</span>
<span style="color: #00007f;">deb-src</span> <span style="color: #009900;">http://de.archive.ubuntu.com/ubuntu/</span> <span style="color: #b1b100;">hardy-backports</span> <span style="color: #b16000;">main</span> <span style="color: #b16000;">restricted</span> <span style="color: #b16000;">universe</span> <span style="color: #b16000;">multiverse</span></pre></div></div>

<p>Then just install the backport using <em>apt-get</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> hardy-backports <span style="color: #c20cb9; font-weight: bold;">install</span> unison</pre></div></div>

<p>After installing you probably should remove the added lines from the <em>sources.list</em>-file. Otherwise the update-manager wants to install all available backports which is probably not what you want.</p>
<h3 id="toc-debian-etch">Debian Etch</h3>
<p><strong>Update 30/07/08:</strong> Before reading my post, please have a look at the much easier method described by <a href="#comment-3">Andrew</a> in the user comments. Only if this doesn&#8217;t work, you might want to have a look at my post.</p>
<p><strong>Unison 2.27.57 binary for Debian Etch</strong>:<br />
If you don&#8217;t want to compile the binary on your own (as described in the following paragraphs), you can download the <a href="/uploads/2008/05/unison-2.27.57-binary-for-debian-etch.gz">Unison 2.27.57 binary for Debian Etch</a> here.</p>
<p><strong>Update 30/11/08:</strong><br />
~ 300 downloads so far, no known problems/malfunctions!</p>
<p>It&#8217;s much more difficult on an Etch system because no Backport package is available. Therefore you either have to create such a package, which can be annoying and frustrating, or you just <em>compile it on your own and overwrite the binary</em>.</p>
<p>Add the unstable sources and the etch backports to your apt-get sources by editing the file <em>/etc/apt/sources.list</em> (as <em>root</em>!):</p>

<div class="wp_syntax"><div class="code"><pre class="apt_sources" style="font-family:monospace;"><span style="color: #adadad; font-style: italic;"># Unstable source packages</span>
<span style="color: #00007f;">deb-src</span> <span style="color: #009900;">ftp://ftp.de.debian.org/debian/</span> <span style="color: #b1b100;">unstable</span> <span style="color: #b16000;">main</span> <span style="color: #b16000;">contrib</span> <span style="color: #b16000;">non-free</span>
&nbsp;
<span style="color: #adadad; font-style: italic;"># Backports for Etch</span>
<span style="color: #00007f;">deb</span> <span style="color: #009900;">http://www.backports.org/debian</span> etch-backports <span style="color: #b16000;">main</span> <span style="color: #b16000;">contrib</span> <span style="color: #b16000;">non-free</span></pre></div></div>

<p>Now update <em>apt</em> and install the backport package of ocaml compiler. You also might want to install the debian backports keyring to avoid warning and error messages:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> debian-backports-keyring
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #660033;">-t</span> etch-backports <span style="color: #c20cb9; font-weight: bold;">install</span> ocaml</pre></div></div>

<p>Then get the source package of unison 2.27.57 and make the binary:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> update
$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #7a0874; font-weight: bold;">source</span> unison
$ dpkg-source <span style="color: #660033;">-x</span> unison_2.27.57-<span style="color: #000000;">1</span>.dsc
$ <span style="color: #7a0874; font-weight: bold;">cd</span> unison-2.27.57<span style="color: #000000; font-weight: bold;">/</span>
$ <span style="color: #c20cb9; font-weight: bold;">make</span></pre></div></div>

<p><em>Note:</em> For my Etch installation, the make progress failed with some error, but the binary was created successfully anyway. Just have a look whether the <em>unison</em>-binary exists and test if it is working.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ .<span style="color: #000000; font-weight: bold;">/</span>unison <span style="color: #660033;">-version</span>
unison version 2.27.57</pre></div></div>

<p>Now install the old version of Unison and replace the binary with the new one. Also you might want to remove the lines from <em>/etc/apt/sources.list</em> and uninstall the ocaml compiler.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">$ <span style="color: #c20cb9; font-weight: bold;">apt-get</span> <span style="color: #c20cb9; font-weight: bold;">install</span> unison
$ <span style="color: #c20cb9; font-weight: bold;">cp</span> unison <span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>
$ unison <span style="color: #660033;">-version</span>
unison version 2.27.57</pre></div></div>

<p>That&#8217;s it! I know that this is not the best solution and that it might be better to create the backports package. But as there are many dependencies to other packages it&#8217;s maybe one of the fastest solutions.</p>
<p>I decided to publish the binary here (for the lazy ones): <a href="/uploads/2008/05/unison-2.27.57-binary-for-debian-etch.gz">Unison 2.27.57 binary for Debian Etch</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/05/16/unison-2-27-57-on-debian-etch-and-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Switch off sound on Ubuntu before login</title>
		<link>http://blog.philippheckel.com/2008/05/15/switch-off-sound-on-ubuntu-before-login/</link>
		<comments>http://blog.philippheckel.com/2008/05/15/switch-off-sound-on-ubuntu-before-login/#comments</comments>
		<pubDate>Thu, 15 May 2008 20:53:06 +0000</pubDate>
		<dc:creator>Philipp C. Heckel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Scripts]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.philippheckel.com/2008/05/15/switch-off-sound-on-ubuntu-before-login/</guid>
		<description><![CDATA[Most of the Ubuntu users know the situation: You&#8217;re sitting in a public place, let&#8217;s say a lecture or a café, and you forgot to switch off the sound of your laptop. Unfortunately, you can&#8217;t avoid the first short drumming. But by using the following command, it is at least possible to switch off the [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the Ubuntu users know the situation: You&#8217;re sitting in a public place, let&#8217;s say a lecture or a café, and you forgot to switch off the sound of your laptop. Unfortunately, you can&#8217;t avoid the first short drumming. But by using the following command, it is at least possible to switch off the longer welcome melody of Ubuntu before you actually log in.</p>
<p><span id="more-5"></span></p>
<h3 id="toc-preparation-create-a-short-mute-script">Preparation: Create a short <em>mute</em>-script</h3>
<p>Create your custom <em>.bin</em>-directory, add it to your <em>.bashrc</em>, create a <em>mute</em>-script and make it executable.</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;">'\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
 $ <span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #660033;">-e</span> <span style="color: #ff0000;">'#!/bin/bash\namixer set Master mute'</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>mute
 $ <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>mute</pre></div></div>

<h3 id="toc-avoid-the-embarrassment-use-the-script">Avoid the embarrassment: Use the script</h3>
<p>You can now use the script by simply typing <em>mute</em> in your console window. To use it before logging into GNOME/KDE, follow these steps.</p>
<ul>
<li>Switch to a different tty by pressing <em>CTRL+ALT+F1</em></li>
<li>Log in with your username and password</li>
<li>Run the script by typing <em>mute</em></li>
<li>And finally switch back to the graphical login window: <em>CTRL+ALT+F7</em></li>
</ul>
<p>Well, I hope this helps a little. Of course you don&#8217;t have to use the script but can just type:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$ amixer set Master mute</pre></div></div>

<p>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.philippheckel.com/2008/05/15/switch-off-sound-on-ubuntu-before-login/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

