<?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>Martin Ankerl &#187; linux</title>
	<atom:link href="http://martin.ankerl.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://martin.ankerl.com</link>
	<description>No movement is faster than no movement</description>
	<lastBuildDate>Tue, 13 Jul 2010 05:31:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>How To: Download Any Flash Video with flashrip in Ubuntu</title>
		<link>http://martin.ankerl.com/2009/11/15/how-to-download-any-flash-video-with-flashrip-in-ubuntu/</link>
		<comments>http://martin.ankerl.com/2009/11/15/how-to-download-any-flash-video-with-flashrip-in-ubuntu/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 11:57:37 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=218</guid>
		<description><![CDATA[Downloading flash videos in Linux was already not too difficult, but thanks to flashrip, it has gotten very easy. Here is a little demo how it works: Once installed, you basically use one click to get a video preview and then a prompt with the filename to save the file. The script works by looking [...]]]></description>
			<content:encoded><![CDATA[<p>Downloading flash videos in Linux was already <a href="http://www.youtube.com/watch?v=vxBGr2T1Ueo">not too difficult</a>, but thanks to <tt>flashrip</tt>, it has gotten very easy. Here is a little demo how it works:<br />
<center><br />
<object width="560" height="370"><param name="movie" value="http://www.youtube.com/v/qvxHQKGci9o&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/qvxHQKGci9o&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="370"></embed></object><br />
</center></p>
<p>
Once installed, you basically use one click to get a video preview and then a prompt with the filename to save the file. The script works by looking into the newest flash files in your <tt>/tmp</tt> folder, and creates a hardlink to the save destination. When the video has fully loaded, you can close the browser window. The temp file will get deleted, and the linked copy will remain.</p>
<h2>Installing flashrip</h2>
<p>Open a terminal like gnome-terminal or konsole, and run these commands:</p>
<pre>wget http://martin.ankerl.com/wp-content/uploads/2009/11/flashrip.sh
chmod 755 flashrip.sh
sudo mv flashrip.sh /usr/local/bin</pre>
<p>Now all thats left to do is to create a link in your gnome panel for ease of use: Right click the gnome panel, &#8220;Add to panel&#8230;&#8221;, choose &#8220;Custom Application Launcher&#8230;&#8221;. Choose a proper name, and a command like this:
<pre>/usr/local/bin/flashrip.sh /home/manker/Videos</pre>
<p>For the command, replace the second parameter with the default location where you want to save the ripped videos (you have to use the full path here!)</p>
<p>I have tested this in Ubuntu, but it should work on any linux where gnome is installed. </p>
<p>Have fun!</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=218&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/11/15/how-to-download-any-flash-video-with-flashrip-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Online Password Encrypter for Apache</title>
		<link>http://martin.ankerl.com/2009/05/22/online-password-encrypter-for-apache/</link>
		<comments>http://martin.ankerl.com/2009/05/22/online-password-encrypter-for-apache/#comments</comments>
		<pubDate>Fri, 22 May 2009 21:33:35 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[coding]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=213</guid>
		<description><![CDATA[Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password. Thats why I have created The [...]]]></description>
			<content:encoded><![CDATA[<p>Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password.</p>
<p>Thats why I have created <a href="http://martin.ankerl.com/files/pwd-encrypter.html">The Online Password Encrypter</a>. Here users can enter their desired username and password, and the encrypted key is automatically generated online, without transmitting anything to any server.</p>
<p>Here is an iframe of the file. <a href="http://martin.ankerl.com/files/pwd-encrypter.html">Click here for full screen</a>.</p>
<p><iframe src ="http://martin.ankerl.com/files/pwd-encrypter.html" width="95%" height="650">
<p>Your browser does not support iframes.</p>
<p></iframe></p>
<p>The <a href="http://martin.ankerl.com/files/pwd-encrypter.html">Online Password Encrypter</a> is just one single HTML page, it does not depend on any other files. So it is easy to download it, modify and send it around. Feel free do whatever you want with it.</p>
<p>Have fun,<br />
Martin</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=213&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/05/22/online-password-encrypter-for-apache/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Beautiful Font Hinting in Ubuntu 8.10 and 9.04</title>
		<link>http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/</link>
		<comments>http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 20:59:03 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=197</guid>
		<description><![CDATA[Even though I have an LCD monitor, I always have the subpixel hinting switched off because it is just painfully ugly to my eyes. Even when hinting is switched to maximum, the fonts are quite blurry (if you don&#8217;t believe me, type xmag and take a screenshot of your font. You can see red and [...]]]></description>
			<content:encoded><![CDATA[<p>Even though I have an LCD monitor, I always have the subpixel hinting switched off because it is just painfully ugly to my eyes. Even when hinting is switched to maximum, the fonts are quite blurry (if you don&#8217;t believe me, type <tt>xmag</tt> and take a screenshot of your font. You can see red and blue linese everywhere). My eyes hurt when I see this. </p>
<p>Thanks to <a href="http://johan.kiviniemi.name/blag/ubuntu-fonts/">Johan Kivinemi</a> I have just found out how to bring back the excellent legacy subpixel hinting engine. This has a much more crisp hinting, and uses subpixels only where it really is an improvement:</p>
<p>Just open these files in your home directory, and copy the content into them:</p>
<h2>~/.fonts.conf</h2>
<pre class="brush: xml;">
&lt;?xml version='1.0'?&gt;
&lt;!DOCTYPE fontconfig SYSTEM 'fonts.dtd'&gt;
&lt;fontconfig&gt;
  &lt;match target=&quot;font&quot;&gt;
    &lt;edit name=&quot;antialias&quot; mode=&quot;assign&quot;&gt;
      &lt;bool&gt;true&lt;/bool&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;hinting&quot; mode=&quot;assign&quot;&gt;
      &lt;bool&gt;true&lt;/bool&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;hintstyle&quot; mode=&quot;assign&quot;&gt;
      &lt;const&gt;hintfull&lt;/const&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;lcdfilter&quot; mode=&quot;assign&quot;&gt;
      &lt;const&gt;lcdlegacy&lt;/const&gt;
    &lt;/edit&gt;
    &lt;edit name=&quot;rgba&quot; mode=&quot;assign&quot;&gt;
      &lt;const&gt;rgb&lt;/const&gt;
    &lt;/edit&gt;
  &lt;/match&gt;
&lt;/fontconfig&gt;
</pre>
<h2>~/.Xresources</h2>
<pre class="brush: xml;">
Xft.antialias:  true
Xft.hinting:    true
Xft.hintstyle:  hintfull
Xft.lcdfilter:  lcdlegacy
Xft.rgba:       rgb
</pre>
<p>This should work in Ubuntu 8.04, 8.10, and 9.04 too, and makes all fonts much more crisp. Of course, your mileage may vary.</p>
<h1>UPDATE: Comparison Screenshots</h1>
<p>As promised on <a href="http://www.reddit.com/r/linux/comments/7ru91/beautiful_font_hinting_in_ubuntu_810/">reddit</a>, I got back from an awesome snowboard trip so I am able to put up extensive comparison screenshots of the two subpixel hinting engines. Move your mouse over the following images to see the differences. Watch especially out for letters like &#8220;m&#8221; where the spacing between the lines is very small. You might have to wait a bit for the image to load.</p>
<p>I have used all of the most important fonts that I usually use, and just for fun I have added &#8220;Dijkstra&#8221;, which just looks cool.</p>
<h2>Sans Fonts</h2>
<p>Mouse to see the same fonts with the legacy hinter.</p>
<style type="text/css"><!-- #sans a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-normal.png); width:395px; height:850px; } #sans a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-legacy.png); } --> </style>
<div id="sans">
<a href="#">&nbsp;</a>
</div>
<h2>Mono Fonts</h2>
<p>Mouse to see the same fonts with the legacy hinter.</p>
<style type="text/css"><!-- #mono a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-normal.png); width:430px; height:940px; } #mono a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-legacy.png); } --> </style>
<div id="mono">
<a href="#">&nbsp;</a>
</div>
<h2>Zoomed Comparison Screenhots</h2>
<p>Here is an excerpt with 400% magnifications. Mouse over the pictures to see the legacy hinter.</p>
<h3>Zoomed Sans</h3>
<style type="text/css"><!-- #sanszoom a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-normal-zoomed.png); width:400px; height:200px; } #sanszoom a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/sans-legacy-zoomed.png); } --> </style>
<div id="sanszoom">
<a href="#">&nbsp;</a>
</div>
<h3>Zoomed Mono</h3>
<style type="text/css"><!-- #monozoom a { text-decoration:none; display:block; background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-normal-zoomed.png); width:400px; height:200px; } #monozoom a:hover {background-image:url(http://martin.ankerl.com/wp-content/uploads/2009/01/mono-legacy-zoomed.png); } --> </style>
<div id="monozoom">
<a href="#">&nbsp;</a>
</div>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=197&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2009/01/22/beautiful-font-hinting-in-ubuntu-810/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>Ripping Multilanguage DVDs with Subtitles using Mencoder</title>
		<link>http://martin.ankerl.com/2008/12/25/ripping-multilanguage-dvds-with-subtitles-using-only-mencoder/</link>
		<comments>http://martin.ankerl.com/2008/12/25/ripping-multilanguage-dvds-with-subtitles-using-only-mencoder/#comments</comments>
		<pubDate>Thu, 25 Dec 2008 22:06:11 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=185</guid>
		<description><![CDATA[Yesterday at Christmas I got the Akira Kurosawa Samurai Edition, which is a 7 disc DVD set of his awesome movies. I am converting it into the best quality files currently possible: MKV as the container, x264 codec for the video, dual audio, and with subtitles. This is short Howto so that I won&#8217;t forget [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday at Christmas I got the <a href="http://en.wikipedia.org/wiki/Akira_Kurosawa">Akira Kurosawa</a> Samurai Edition, which is a 7 disc DVD set of his awesome movies. I am converting it into the best quality files currently possible: MKV as the container, x264 codec for the video, dual audio, and with subtitles. This is short Howto so that I won&#8217;t forget how <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /><br />
<span id="more-185"></span></p>
<ol>
<li>Create a file <tt>~/.mplayer/mencoder.conf</tt> with default compression settings. I use this, with encoding quality settings I have from <a href="http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-x264.html#menc-feat-x264-example-settings">mplayer&#8217;s x264 examples</a>:
<pre class="brush: ruby;">
o=out.avi
ovc=x264=yes
oac=mp3lame=yes

#lameopts=preset=medium
lameopts=aq=2:vbr=4
#lameopts=preset=voice

# the lower crf, the better
# 20: very good
# 22: Medium Quality DVD rips
# 23: quite ok
# 25: so-so
# 30: acceptable
# 40: my eyes hurt
# 50: my eyes bleed
x264encopts=threads=auto:crf=20:subq=7:partitions=all:8x8dct:me=umh:frameref=5:bframes=3:b_pyramid:weight_b

# deinterlace
# vf=yadif

# slight denoise
# vf=hqdn3d=3:2:3:3

# turbo encoding (low quality!)
#x264encopts=threads=auto:crf=23:turbo=2:subq=1:frameref=1
</pre>
<li>I use constant quality setting. The advantage is that it requires only one pass, and you get, well, constant quality <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  In the config file find the <tt>crf=20</tt> section and change it to your desire.
<li>Find out which DVD chapter you want to rip, starting with 1 up (e.g. <tt>mplayer dvd://1</tt>).
<li>If the DVD has black borders, find out their sizes with
<pre>mplayer dvd://2 -vf cropdetect</pre>
<p>Fast forward a bit into the movie so that the ratio can be trusted.<br />
<strong>WARNING</strong> Some DVDs like Natural Born Killers are shot with multiple different films, so the border changes! Take care not to crop anything important away. Copy the -crop printouts into the clipboard.</p>
<li>Open another console window, run <tt>mplayer dvd://2 -identify</tt>, and quit. Now scroll up, there is some important information about the tracks which you need in the next step. I have extraced the important information here:
<pre class="brush: ruby;">
ID_AUDIO_ID=128
ID_AID_128_LANG=de
...
ID_AUDIO_ID=129
ID_AID_129_LANG=ja
...
subtitle ( sid ): 0 language: de
...
subtitle ( sid ): 1 language: de
</pre>
<p>So there is audio language <tt>de</tt> and <tt>ja</tt>, and 2 subtitles for de. Mplayer the DVD and press <tt>J</tt> to find out which subtitles you want to have. (mplayer shows the ID, like <tt>(0) de</tt>).</p>
<li>I have chosen AID 129 and sid 1. In the other window, start ripping the movie:
<pre class="brush: ruby;">
mencoder dvd://2 -vf crop=704:432:0:72 -aid 129 -o Yojimbo.avi -vobsubout subs -vobsuboutindex 0 -sid 1</pre>
<p>This will get you 3 files: <tt>Yojimbo.avi</tt> with Japanese audio and x264 encoded movie video, and <tt>subs.idx</tt> and <tt>subs.sub</tt> with the subtitles. Play the movie to check everything works as it should.</p>
<li>Rip additional sound tracks now, if you want them. You can rip one additional subtitle at the same time. To do this, increase the vobsuboutindex by one, or choose another filename. I choose to rip the german audio and another subtitle track:
<pre class="brush: ruby;">
mencoder dvd://2 -aid 128 -ovc frameno -o de.avi -vobsubout out -vobsuboutindex 0 -sid 1
</pre>
<p>The <tt>-ovc frameno</tt> part is important, because this skips video encoding. Encoding is much faster this way because we already have the video anyways.</p>
<li>Merge everything together with <tt>mmg</tt>, this is a GUI interface for <tt>mkvmerge</tt> which you get via <tt>sudo apt-get install mkvtoolnix</tt>. Select the correct languages for the audio and subtitle tracks.
</ol>
<p>I think that&#8217;s about it. This way you will get very high quality, multi language rips with subtitles. Oh, some other interesting points to note:</p>
<ul>
<li>I <em>always</em> encode with the same resolution as the source, no rescaling. Rescaling is very bad, I much prefer that quality is reduced by the codec and not preemptively through scaling down. Even a HDTV ripped to 700MB gets you a much better quality when not rescaled than a DVD ripped to 700MB. The x264 does an awesome job at preserving quality where it is important.
<li>I only rip with variable bitrate VBR. It has very good quality, but it is not surround sound.
</ul>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=185&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/12/25/ripping-multilanguage-dvds-with-subtitles-using-only-mencoder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Human Compact Themes (for Ubuntu 8.10)</title>
		<link>http://martin.ankerl.com/2008/11/04/human-compact-themes-for-ubuntu-810/</link>
		<comments>http://martin.ankerl.com/2008/11/04/human-compact-themes-for-ubuntu-810/#comments</comments>
		<pubDate>Tue, 04 Nov 2008 17:11:58 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[downloads]]></category>
		<category><![CDATA[freeware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=182</guid>
		<description><![CDATA[This is a new release of the compact theme, based on the original Ubuntu 8.10 (Intrepid) theme. It was created by Jan Suhr almost a month ago, based on my little howto. I have now two versions of the theme: one with normal icon sizes, and one with the smaller 16&#215;16 icons for even more [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://brainstorm.ubuntu.com/idea/6772/"><img style="float:right; margin-left:20px; margin-bottom:20px" src="http://brainstorm.ubuntu.com/idea/6772/image/1/" /></a>This is a new release of the compact theme, based on the original Ubuntu 8.10 (Intrepid) theme. It was created by Jan Suhr almost a month ago, based on my little <a href="http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/">howto</a>. </p>
<p>I have now two versions of the theme: one with normal icon sizes, and one with the smaller 16&#215;16 icons for even more compactness. Here is a comparison animation of the standard Human theme vs. the compact theme:</p>
<p><center><br />
<img src="/files/compact8.10.gif" width="552" height="387" /><br />
</center></p>
<p>You can download the themes here:</p>
<ul>
<li><a href="/files/HumanCompact-8.10.tar.bz2">HumanCompact-8.10.tar.bz2</a>
<li><a href="/files/HumanCompactSmallIcons-8.10.tar.bz2">HumanCompactSmallIcons-8.10.tar.bz2</a>
</ul>
<h1>Download and Installation</h1>
<ol>
<li>Save the theme to your computer.
<li>Open the gnome&#8217;s appearence dialog with System > Preferences > Appearance.
<li>Drag and drop the downloaded file into the Theme tab of the appearance dialog. If you get an error message &#8220;Can&#8217;t move directory over directory&#8221;, you have already installed a theme with the same name. To be able to reinstall it, remove the directory <tt>~/.themes/Human Compact</tt> or <tt>~/.themes/Human Compact Small Icons</tt>.
<li>Choose &#8220;Apply new theme&#8221; in the popup dialog.
</ol>
<p>Most changes will occur immediately, but for e.g. the icon sizes it is best to log out and log in again. When you change the theme, you can get the Human Compact theme back by clicking on Customize, and then selecting Human Compact.</p>
<p>Any question, praise or flames? please post them!</p>
<h1>Install for root (e.g. Synaptic)</h1>
<p>Some readers asked how to get this to work for applications that run as root (e.g. synaptic), so here it is: simply copy the copy the theme file into the root’s home directory, like this (exchange <em>username</em> with your own name):</p>
<pre>sudo cp /home/username/.themes/Human\ Compact/gtk-2.0/gtkrc /root/.gtkrc-2.0</pre>
<p>Afterwards synaptic uses the human compact theme.</p>
<h1>Older Themes</h1>
<p>Here is some information about the original compact themes I have created:</p>
<ul>
<li><a href="http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/">How to Make a Human Compact Theme</a>
<li><a href="http://martin.ankerl.com/2008/05/13/human-compact-gnome-theme/">Human Compact Theme (for Ubuntu 8.04)</a>
<li><a href="http://martin.ankerl.com/2007/11/04/clearlooks-compact-gnome-theme/">Clearlooks Compact Theme (for Ubuntu 8.04)</a>
</ul>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=182&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/11/04/human-compact-themes-for-ubuntu-810/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>How to Make a Compact Gnome Theme</title>
		<link>http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/</link>
		<comments>http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 22:18:31 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/?p=179</guid>
		<description><![CDATA[The themes Human Compact and Clearlooks Compact have been quite a success, and I got several requests to make a tutorial on how to create such a compact theme. UPDATE: Human Compact Theme for Ubuntu 8.10 (Intrepid Ibex) is available! Well, it is a bit difficult to create a step-by-step tutorial, but I will try [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://brainstorm.ubuntu.com/idea/6772/"><img style="float:right; margin-left:20px; margin-bottom:20px" src="http://brainstorm.ubuntu.com/idea/6772/image/1/" /></a>The themes <a href="http://martin.ankerl.com/2008/05/13/human-compact-gnome-theme/">Human Compact</a> and <a href="http://martin.ankerl.com/2007/11/04/clearlooks-compact-gnome-theme/">Clearlooks Compact</a> have been quite a success, and I got several requests to make a tutorial on how to create such a compact theme.</p>
<p><strong>UPDATE</strong>: <a href="http://martin.ankerl.com/2008/11/04/human-compact-themes-for-ubuntu-810/">Human Compact Theme for Ubuntu 8.10 (Intrepid Ibex)</a> is available!</p>
<p>Well, it is a bit difficult to create a step-by-step tutorial, but I will try anyways. Prepare to fiddle around with your configuration and try it out several times until you get the desired results.</p>
<ol>
<li>All your Gnome themes are located under <tt>/usr/share/themes</tt>. Find the theme of which you want to create a compact one, and copy it into your home directory with e.g.
<pre>cp -r /usr/share/themes/Human ~/.themes/Human-Compact</pre>
<li>If there is a file <tt>index.theme</tt>, open it and change all the names (e.g. add &#8220;Compact&#8221; where appropriate). This file is necessary if you want to directly choose the theme from the Appearance Preferences; if it is not available you have to choose a theme and select &#8220;customize&#8221; to select the compact controls for it.
<li>Now to the fiddling part. Open <tt>gtk-2.0/gtkrc</tt>, and change lots of thickness and width settings&#8230; When you do this, always check how your changes work visibly, e.g. if the application still have usable borders etc. To help with the fiddling, I have added a <a href="#diff">diff of the Human vs. the Compact theme</a>, you might be able to reuse some of the settings there.
<li>Once you are satisfied with your theme, you can create a <tt>.tar.bz2</tt> distribution for backup or to be used by others, e.g. with this command:
<pre>cd ~/.themes
tar cjvf ~/Human-Compact.tar.bz2 Human-Compact</pre>
<li>That&#8217;s it. Have fun with your theme!
</ol>
<p><span id="more-179"></span><br />
<a name="diff"></a>Diff between &#8220;Human&#8221; and &#8220;Human Compact&#8221;</p>
<pre class="brush: ruby;">
--- /usr/share/themes/Human/gtk-2.0/gtkrc	2008-07-03 18:13:20.000000000 +0200
+++ .themes/Human Compact/gtk-2.0/gtkrc	2008-05-22 21:11:07.000000000 +0200
@@ -10,29 +10,61 @@

 gtk_color_scheme = &quot;fg_color:#101010\nbg_color:#EFEBE7\nbase_color:#FFF\ntext_color:#000\nselected_bg_color:#FFD799\nselected_fg_color:#000\ntooltip_bg_color:#F5F5B5\ntooltip_fg_color:#000\norange_color:#FF6D0C\nmetacity_frame_color:#CC863E\nextra_view_widgets_color:#F5C07F&quot;

-gtk-icon-sizes = &quot;panel-menu=24,24&quot;
+gtk-icon-sizes = &quot;panel-menu=16,16 : gtk-menu=16,16 : gtk-button=16,16 : gtk-small-toolbar=16,16 : gtk-large-toolbar=16,16 : gtk-dialog=32,32 : gtk-dnd=32,32&quot;

 style &quot;ubuntulooks-default&quot;
 {
-	GtkButton      ::default_border    = { 0, 0, 0, 0 }
+	# base class for everything
+        # setting this to 0 has *very* tight packing. 1-2 looks better.
+	GtkWidget      ::focus_padding        = 0
+
+	GtkButton      ::child-displacement-x = 1
+	GtkButton      ::child-displacement-y = 1
+	GtkButton      ::default-border       = { 0, 0, 0, 0 }
+	GtkButton      ::default-outside-border={ 0, 0, 0, 0 }
+
+	GtkButtonBox   ::child_min_width      = 0
+	GtkButtonBox   ::child_min_heigth     = 0
+	GtkButtonBox   ::child_internal_pad_x = 0
+	GtkButtonBox   ::child_internal_pad_y = 0
+
+	GtkPaned       ::handle_size       = 4
+
 	GtkRange       ::trough_border     = 0
-	GtkPaned       ::handle_size       = 6
-	GtkRange       ::slider_width      = 15
+	GtkRange       ::slider_width      = 14
 	GtkRange       ::stepper_size      = 15
+	GtkRange       ::stepper_spacing   = 0

-	GtkScrollbar   ::min_slider_length = 35
+	GtkScrollbar   ::min_slider_length = 30
+	GtkScrolledWindow::scrollbar_spacing = 0
 	GtkCheckButton ::indicator_size    = 14
 	GtkMenuBar     ::internal-padding  = 0
-	GtkTreeView    ::expander_size     = 14
-	GtkExpander    ::expander_size     = 16
-	GtkScale       ::slider-length     = 31
+
+	GtkMenu        ::horizontal-padding   = 0
+	GtkMenu        ::vertical-padding     = 0
+
+	GtkOptionMenu  ::indicator_size       = 0
+	GtkOptionMenu  ::indicator_spacing    = 0
+
+
+	GtkTreeView    ::expander_size     = 11
+	GtkTreeView    ::expander_spacing  = 0
+	GtkTreeView    ::vertical-separator = 0
+	GtkTreeView    ::horizontal-separator = 0
+
+	GtkExpander    ::expander_size     = 11
+	GtkExpander    ::expander_spacing  = 0
+	GtkScale       ::slider-length     = 23
+	GtkScale       ::value_spacing     = 0
+
+	GtkToolbar     ::internal-padding  = 0
+	GtkToolbar     ::space-size        = 10
+
 	# GtkToolbar     ::button-relief     = GTK_RELIEF_NORMAL
 	# GtkMenuBar     ::shadow-type       = GTK_SHADOW_OUT
 	# GtkScrollbar   ::has-secondary-forward-stepper = 1
 	# GtkScrollbar   ::has-secondary-backward-stepper = 1

-	GtkButton      ::child-displacement-x = 0
-	GtkButton      ::child-displacement-y = 0

 	xthickness = 1
 	ythickness = 1
@@ -92,8 +124,8 @@

 style &quot;ubuntulooks-wide&quot; = &quot;ubuntulooks-default&quot;
 {
-	xthickness = 2
-	ythickness = 2
+	xthickness = 0
+	ythickness = 0
 }

 style &quot;ubuntulooks-wide-orange&quot; = &quot;ubuntulooks-wide&quot;
@@ -104,7 +136,7 @@
 style &quot;ubuntulooks-wider&quot; = &quot;ubuntulooks-default&quot;
 {
 	xthickness = 3
-	ythickness = 3
+	ythickness = 2
 }

 style &quot;ubuntulooks-wider-orange&quot; = &quot;ubuntulooks-wider&quot;
@@ -114,12 +146,18 @@

 style &quot;ubuntulooks-button&quot; = &quot;ubuntulooks-wider-orange&quot;
 {
+	xthickness   = 0
+	ythickness   = 0
+
 	bg[PRELIGHT] = shade (1.02, @bg_color)
 	bg[ACTIVE]   = shade (0.90, @bg_color)
 }

 style &quot;ubuntulooks-notebook&quot; = &quot;ubuntulooks-wide-orange&quot;
 {
+	xthickness = 0
+	ythickness = 0
+
 	bg[NORMAL]      = shade (0.99, @bg_color)
 	bg[ACTIVE]      = shade (0.85, @bg_color)
 	bg[INSENSITIVE] = shade (0.99, @bg_color)
@@ -127,14 +165,14 @@

 style &quot;ubuntulooks-tasklist&quot; = &quot;ubuntulooks-default&quot;
 {
-	xthickness = 5
-	ythickness = 3
+	xthickness = 0
+	ythickness = 0
 }

 style &quot;ubuntulooks-menu&quot; = &quot;ubuntulooks-default&quot;
 {
-	xthickness = 2
-	ythickness = 1
+	xthickness = 0
+	ythickness = 0
 	bg[NORMAL] = shade (1.04, @bg_color)
 }

@@ -145,8 +183,9 @@

 style &quot;ubuntulooks-menu-item&quot; = &quot;ubuntulooks-default&quot;
 {
-	xthickness     = 2
-	ythickness     = 3
+	xthickness     = 1
+	ythickness     = 1
+
 	bg[SELECTED]   = @selected_bg_color
 	fg[PRELIGHT]   = @selected_fg_color
 	text[PRELIGHT] = @text_color
@@ -171,19 +210,26 @@

 style &quot;ubuntulooks-progressbar&quot; = &quot;ubuntulooks-wide-orange&quot;
 {
-	xthickness    = 2
-	ythickness    = 2
+	xthickness    = 0
+	ythickness    = 0
 	fg[PRELIGHT]  = @base_color
 }

 style &quot;ubuntulooks-treeview&quot; = &quot;ubuntulooks-wide-orange&quot;
 {
-	xthickness    = 2
-	ythickness    = 2
+	xthickness    = 0
+	ythickness    = 0
 	fg[NORMAL]  = @text_color
 	fg[SELECTED]  = @base_color
 }

+# style are overriden again.
+style &quot;ubuntulooks-treeview-header&quot; = &quot;ubuntulooks-default&quot;
+{
+	xthickness = 0
+	ythickness = 0
+}
+
 style &quot;ubuntulooks-combo&quot; = &quot;ubuntulooks-button&quot;
 {
 }
</pre>
<p>Any questions, comments?</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=179&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/10/10/how-to-make-a-compact-gnome-theme/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Human Compact Gnome Theme (for Ubuntu 8.04)</title>
		<link>http://martin.ankerl.com/2008/05/13/human-compact-gnome-theme/</link>
		<comments>http://martin.ankerl.com/2008/05/13/human-compact-gnome-theme/#comments</comments>
		<pubDate>Tue, 13 May 2008 19:46:28 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[freeware]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/2008/05/13/human-compact-gnome-theme/</guid>
		<description><![CDATA[Thanks to the overwhelming success of the Clearlooks Compact Theme and demand from several users I have now created a Human Compact theme. Basically it features the same compactness as Clearlooks Compact, but the look &#038; feel of the Ubuntu Human theme. So, if you want compactness and did not like the cold blue look [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://brainstorm.ubuntu.com/idea/6772/"><img style="float:right; margin-left:20px; margin-bottom:20px" src="http://brainstorm.ubuntu.com/idea/6772/image/1/" /></a>Thanks to the overwhelming success of the <a href="http://martin.ankerl.com/2007/11/04/clearlooks-compact-gnome-theme/">Clearlooks Compact Theme</a> and demand from several users I have now created a <em>Human Compact</em> theme. Basically it features the same compactness as Clearlooks Compact, but the look &#038; feel of the <a href="http://www.ubuntu.com/">Ubuntu</a> Human theme. So, if you want compactness and did not like the cold blue look of clearlooks, this is for you. It should also work well with the Eee pc, there even is a <a href="http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization">nice tutorial here</a>.</p>
<p><strong>UPDATE</strong>: <a href="http://martin.ankerl.com/2008/11/04/human-compact-themes-for-ubuntu-810/">Human Compact Theme for Ubuntu 8.10 (Intrepid Ibex)</a> is available!</p>
<h1>Comparison</h1>
<p>Move your mouse over the image to see the difference of a save dialog between Ubuntu&#8217;s 8.04 <i>Human</i>, and <i>Human Compact</i>. Buttons and spacing is much smaller which results in a lot more free space for the actual content. See for yourself:</p>
<style type="text/css"><!-- #humancompact a { display:block; background-image:url(/wp-content/uploads/2008/05/s2.png); width:414px; height:423px; } #humancompact a:hover {background-image:url(/wp-content/uploads/2008/05/s1.png); } --> </style>
<p><center></p>
<div id="humancompact">
<a href="#">&nbsp;</a>
</div>
<p></center></p>
<p>Here are some other screenshots. The eclipse window uses 800&#215;480 resolution, which is the same as the eee pc has.<br />
<center><br />
<a href='http://martin.ankerl.com/wp-content/uploads/2008/05/screenshot-java-koagent-src-test-feasibility-at-profactor-inspector-graphvizvisitorjava-eclipse-platform.png' title='eclipse'><img src='http://martin.ankerl.com/wp-content/uploads/2008/05/screenshot-java-koagent-src-test-feasibility-at-profactor-inspector-graphvizvisitorjava-eclipse-platform.thumbnail.png' alt='eclipse' /></a> <a href='http://martin.ankerl.com/wp-content/uploads/2008/05/screenshot-infosvg-inkscape.png' title='inkscape'><img src='http://martin.ankerl.com/wp-content/uploads/2008/05/screenshot-infosvg-inkscape.thumbnail.png' alt='inkscape' /></a> <a href='http://martin.ankerl.com/wp-content/uploads/2008/05/screenshot-calculator-scientific.png' title='calc'><img src='http://martin.ankerl.com/wp-content/uploads/2008/05/screenshot-calculator-scientific.thumbnail.png' alt='calc' /></a><br />
</center></p>
<h1>Download and Installation</h1>
<ol>
<li>Save the file <a href='/files/HumanCompact.tar.bz2'>HumanCompact.tar.bz2</a> to your computer.
<li>Open the gnome&#8217;s appearence dialog with System > Preferences > Appearance.
<li>Drag and drop the downloaded file into the Theme tab of the appearance dialog.
<li>Choose &#8220;Apply new theme&#8221; in the popup dialog.
</ol>
<p>Most changes will occur immediately, but for e.g. the icon sizes it is best to log out and log in again. When you change the theme, you can get the Human Compact theme back by clicking on Customize, and then selecting Human Compact.</p>
<p>Any question, praise or flames? please post them!</p>
<h1>Install for root (e.g. Synaptic)</h1>
<p>Some readers asked how to get this to work for applications that run as root (e.g. synaptic), so here it is: simply copy the copy the theme file into the root’s home directory, like this (exchange <em>username</em> with your own name):</p>
<pre>sudo cp /home/username/.themes/Human\ Compact/gtk-2.0/gtkrc /root/.gtkrc-2.0</pre>
<p>Afterwards synaptic uses the human compact theme.</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=146&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/05/13/human-compact-gnome-theme/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>Clearlooks Compact Update</title>
		<link>http://martin.ankerl.com/2008/04/12/clearlooks-compact-update/</link>
		<comments>http://martin.ankerl.com/2008/04/12/clearlooks-compact-update/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 14:01:35 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/2008/04/12/clearlooks-compact-update/</guid>
		<description><![CDATA[I have made a minor update to the Clearlooks Compact theme, the panel menu now uses small icons. Clearlooks Compact is a Gnome theme that tries to make use of the wasted screen space as much as possible. It is especially useful for small screens like on the Eee PC, or with intense applications like [...]]]></description>
			<content:encoded><![CDATA[<p>I have made a minor update to the <a href="http://martin.ankerl.com/2007/11/04/clearlooks-compact-gnome-theme/">Clearlooks Compact theme</a>, the panel menu now uses small icons.</p>
<p>Clearlooks Compact is a Gnome theme that tries to make use of the wasted screen space as much as possible. It is especially useful for small screens like on the <a href="http://eeepc.asus.com/global/">Eee PC</a>, or with intense applications like Eclipse. </p>
<p>This theme is picking up some steam lately:</p>
<ul>
<li>It is recommended from the <a href="http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization">EeeUser Installation manual</a> (also available in many other languages, see translations to the top right).</li>
<li>Somebody wrote an idea into <a href="http://brainstorm.ubuntu.com/idea/6772/">Ubuntu&#8217;s Brainstorm</a>, and it got 86 votes already <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </li>
<li>I have written <a href="https://bugs.launchpad.net/ubuntu/+source/ubuntu-artwork/+bug/160938 ">a bug report</a> in Ubuntu&#8217;s launchpad a while ago, and somebody wrote <a href="https://blueprints.launchpad.net/ubuntu-eee/+spec/compact-theme">an Eee PC blueprint</a></li>
<li>There is an entry in <a href="http://www.gnome-look.org/content/show.php/Clearlooks+Compact?content=69357">Gnome-Look</a> and <a href="http://www.xfce-look.org/content/show.php/Clearlooks%20Compact?content=69357">Xfce-Look</a>.
<li>And of course there are <a href="http://blogsearch.google.com/blogsearch?hl=en&#038;q=clearlooks+compact&#038;btnG=Search+Blogs">several blog postings</a>.
</ul>
<p>I am using it on my 22&#8243; monitor and like it here too.</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=127&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/04/12/clearlooks-compact-update/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Logical Volume Manager Cheatsheet</title>
		<link>http://martin.ankerl.com/2008/02/05/logical-volume-manager-cheatsheet/</link>
		<comments>http://martin.ankerl.com/2008/02/05/logical-volume-manager-cheatsheet/#comments</comments>
		<pubDate>Mon, 04 Feb 2008 23:08:47 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/2008/02/05/logical-volume-manager-cheatsheet/</guid>
		<description><![CDATA[Today I got a new harddisk, so it was finally time for me to have an in depth look at LVM. I use it to combine two harddisks /dev/sdg1 and /dev/sdb1 into one volume group ext_vg which contains one big logical volume /dev/ext_vg/ext. In short, my 250GB and 500GB harddisks are used in one big [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got a new harddisk, so it was finally time for me to have an in depth look at <a href="http://sources.redhat.com/lvm2/">LVM</a>. I use it to combine two harddisks <tt>/dev/sdg1</tt> and <tt>/dev/sdb1</tt> into one volume group <tt>ext_vg</tt> which contains one big logical volume <tt>/dev/ext_vg/ext</tt>. In short, my 250GB and 500GB harddisks are used in one big 750GB ext3 mount point.</p>
<p>I followed the excellent <a href="http://www.linuxconfig.org/Linux_lvm_-_Logical_Volume_Manager">LVM Tutorial</a>, and was surprised how easy everything goes. Here is a short cheat sheet of the important commands (take care to exchange the partition/volume names if you use this):</p>
<h2>Installation</h2>
<p>I use <a href="http://www.ubuntu.com/">Ubuntu</a>, so this is a piece of cake:
<pre>sudo apt-get install lvm2</pre>
<p>There is also <a href="http://ubuntuforums.org/showthread.php?t=216117">a GUI available</a>, but I found the command line tools are very easy to use so there is no real need. I wouldn&#8217;t use <a href="https://wiki.ubuntu.com/Evms">EVMS</a> as it is not supported in Ubuntu 7.10 and may cause problems.</p>
<h2>Create a New Filesystem</h2>
<p>First I create the physical volume on the partition <tt>sdg1</tt>, create a new volume group <tt>ext_vg</tt> that contains this physical volume, and create a new logical volume of size 450GB within the volume group. Finally create the filesystem (disabled reservation space, see <a href="http://martin.ankerl.com/2008/01/12/get-more-space-out-of-your-ext3-partition/">Get More Space Out of Your ext3 Partition</a>).
<pre>sudo pvcreate /dev/sdg1
sudo vgcreate ext_vg /dev/sdg1
sudo lvcreate -L 450G -n ext ext_vg
sudo mkfs.ext3 -m 0 /dev/ext_vg/ext</pre>
<h2>Show Status</h2>
<p>Each LVM layer has its corresponding command to get information about the metadata:
<pre>sudo pvdisplay
sudo vgdisplay
sudo lvdisplay
sudo pvs
sudo vgs
sudo lvs</pre>
<h2>Mount via fstab</h2>
<p>I use the filesystem mainly for data, so allowing just <tt>rw</tt> is enough (no executables allowed). <tt>noatime</tt> allows quicker access.
<pre>sudo mkdir /media/mega
/dev/ext_vg/ext /media/mega     ext3    rw,noatime,user 0       2
mount /media/mega</pre>
<h2>Resize</h2>
<p>It is even possible to do an online resize of the system, wohoo <img src='http://martin.ankerl.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  This extends the logical volume by 200MB.
<pre>sudo lvextend -L +200 /dev/ext_vg/ext
sudo resize2fs -p /dev/ext_vg/ext</pre>
<p> You can watch the resize process going on with <tt>df -h</tt>.</p>
<h2>Add Another Partition to the Logical Volume</h2>
<p>To add another partition and use up all the available space in the logical volume, first add the physical volume to the volume group, then use <tt>pvdisplay</tt> to find out the total available number of free PE (add the numbers from the physical volumes), then use <tt>lvextend</tt> to use up all this available space.
<pre>sudo pvcreate /dev/sdb1
sudo vgextend ext_vg /dev/sdb1
sudo pvdisplay
sudo lvextend -l +63602 /dev/ext_vg/ext
sudo resize2fs /dev/ext_vg/ext</pre>
<p>That&#8217;s it! Any questions? please post.</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=119&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/02/05/logical-volume-manager-cheatsheet/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Howto Get Enough Sleep Despite StumbleUpon with Ubuntu</title>
		<link>http://martin.ankerl.com/2008/01/24/howto-get-enough-sleep-despite-stumbleupon-with-ubuntu/</link>
		<comments>http://martin.ankerl.com/2008/01/24/howto-get-enough-sleep-despite-stumbleupon-with-ubuntu/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 22:06:44 +0000</pubDate>
		<dc:creator>Martin Ankerl</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[getsomesleep]]></category>
		<category><![CDATA[lifehack]]></category>

		<guid isPermaLink="false">http://martin.ankerl.com/2008/01/24/howto-get-enough-sleep-despite-stumbleupon-with-ubuntu/</guid>
		<description><![CDATA[What? I am a long-term StumbleUpon user, which means that I don&#8217;t get much sleep. Now, after almost 4 years of stumbling, I have decided to get my life back. Well, at least some sleep! What does this do? Every night when I have to work on the next day (Sunday night to Thursday night [...]]]></description>
			<content:encoded><![CDATA[<h2>What?</h2>
<p><a href='http://martin.ankerl.com/wp-content/uploads/2008/01/stumbling-insomnia.jpg'><img src="http://martin.ankerl.com/wp-content/uploads/2008/01/stumbling-insomnia.jpg" alt="" title="stumbleupon insomnia" width="150" height="104" style="float:right;" /></a>I am a long-term <a href="http://www.stumbleupon.com/">StumbleUpon</a> user, which means that I don&#8217;t get much sleep. Now, after <a href="http://martinus.stumbleupon.com/public/">almost 4 years of stumbling</a>, I have decided to get my life back. Well, at least some sleep! </p>
<h2>What does this do?</h2>
<p>Every night when I have to work on the next day (Sunday night to Thursday night ), at 23:25 my computer shows me this little warning message:<br />
<center><img src='http://martin.ankerl.com/wp-content/uploads/2008/01/screenshot-warning.png' alt='go to bed warning' /></center><br />
After the 5 minutes have passed, the computer shuts itself automatically down.</p>
<p>I use this little trick with <a href="http://www.ubuntu.com/">Ubuntu,</a> but it should work anywhere where <a href="http://www.gnome.org/">Gnome</a> is installed.</p>
<h2>How?</h2>
<p>Thanks to the power of Linux, this is not difficult to do for yourself, and configure it however you want it to behave:</p>
<ol>
<li>Open <tt>/etc/crontab</tt> with your favourite text editor (no need for <tt>crontab -e</tt> since this is the system wide crontab), e.g.
<pre>sudo gedit /etc/crontab</pre>
</li>
<li>Add the following lines (replace <tt>manker</tt> with your username!)
<pre>25 23 * * 0-4   manker  /usr/bin/zenity --display :0 --warning --text="Shutdown in 5 minutes. Go to bed."
25 23 * * 0-4   root    shutdown -h +5</pre>
<li>The first part of both lines <tt>25 23 * * 0-4</tt> means that the commands are executed at 23:25, but only Sunday (day 0) to Thursday (day 4). Read <tt>man 5 crontab</tt> for a detailed description of that format.</li>
<li>The first command uses <tt>zenity</tt> to show a warning message. You have to execute this as the same user that you use for working, or you will not see the message, so change <tt>manker</tt> to your username (root does not work either).
<li>The second command <tt>shutdown -h +5</tt> means that the computer will halt in 5 minutes.  This has to be run as root, and it also shows nice warning messages in all your open terminals so you can&#8217;t really miss it.</li>
<li>Save the file, and stumble until it is 23:25.</ul>
</ol>
<p>Sweet dreams!</p>
<div style='clear:both'></div><img src="http://martin.ankerl.com/?ak_action=api_record_view&id=106&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://martin.ankerl.com/2008/01/24/howto-get-enough-sleep-despite-stumbleupon-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
	</channel>
</rss>
