<?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/"
	>

<channel>
	<title>Juraj Seffer &#124; Playground &#187; Ubuntu</title>
	<atom:link href="http://jurajsplayground.com/category/ubuntu/feed/" rel="self" type="application/rss+xml" />
	<link>http://jurajsplayground.com</link>
	<description>Web development trinkets, articles about LAMP development, productivity tools and every day struggles</description>
	<pubDate>Sun, 20 May 2012 17:46:05 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Shrinking a dynamic Virtualbox hard disk on Ubuntu</title>
		<link>http://jurajsplayground.com/2012/05/20/shrinking-a-dynamic-virtualbox-hard-disk-on-ubuntu/</link>
		<comments>http://jurajsplayground.com/2012/05/20/shrinking-a-dynamic-virtualbox-hard-disk-on-ubuntu/#comments</comments>
		<pubDate>Sun, 20 May 2012 17:46:05 +0000</pubDate>
		<dc:creator>Juraj</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://jurajsplayground.com/?p=262</guid>
		<description><![CDATA[Mount a Ubuntu Live CD and boot into it. Install zerofree
sudo apt-get install zerofree
If the package cannot be found, try enabling Multiverse repository (Software Sources).
Find out which drive you want to shrink
df
Run zerofree
sudo zerofree /dev/sda1
Once finished, shut down the Virtualbox machine and use Virtualbox to compact the hard disk image file
VBoxManage modifyvdi /path/to/the/image.vdi compact
Done.
]]></description>
			<content:encoded><![CDATA[<p>Mount a Ubuntu Live CD and boot into it. Install zerofree</p>
<pre>sudo apt-get install zerofree</pre>
<p>If the package cannot be found, try enabling Multiverse repository (Software Sources).</p>
<p>Find out which drive you want to shrink</p>
<pre>df</pre>
<p>Run zerofree</p>
<pre>sudo zerofree /dev/sda1</pre>
<p>Once finished, shut down the Virtualbox machine and use Virtualbox to compact the hard disk image file</p>
<pre>VBoxManage modifyvdi /path/to/the/image.vdi compact</pre>
<p>Done.</p>
]]></content:encoded>
			<wfw:commentRss>http://jurajsplayground.com/2012/05/20/shrinking-a-dynamic-virtualbox-hard-disk-on-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Fetching of emails from a POP3 server and serving via IMAP (Ubuntu)</title>
		<link>http://jurajsplayground.com/2009/04/19/fetching-of-emails-from-a-pop3-server-and-serving-via-imap-ubuntu/</link>
		<comments>http://jurajsplayground.com/2009/04/19/fetching-of-emails-from-a-pop3-server-and-serving-via-imap-ubuntu/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 21:50:06 +0000</pubDate>
		<dc:creator>Juraj</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jurajsplayground.com/blog/?p=115</guid>
		<description><![CDATA[One of the servers from which I download emails regularly doesn&#8217;t provide IMAP access. The obvious solution seemed to be install my own IMAP server and fetch emails from the original server via POP3.
After a brief research, I&#8217;ve decided to install Dovecot and getmail to accomplish the above.
First step was to install Dovecot:
sudo apt-get install [...]]]></description>
			<content:encoded><![CDATA[<p>One of the servers from which I download emails regularly doesn&#8217;t provide IMAP access. The obvious solution seemed to be install my own IMAP server and fetch emails from the original server via POP3.</p>
<p>After a brief research, I&#8217;ve decided to install <a href="http://ww.dovecot.org">Dovecot</a> and <a href="http://pyropus.ca/software/getmail/">getmail</a> to accomplish the above.</p>
<p>First step was to install Dovecot:</p>
<p><code>sudo apt-get install dovecot-imapd</code></p>
<p>Then I followed <a href="http://wiki.dovecot.org/BasicConfiguration">instructions from Dovecot website</a>, set the location of <a href="http://wiki.dovecot.org/MailLocation">IMAP mail directories</a> and configured it to use <a href="http://wiki.dovecot.org/SSL/DovecotConfiguration">SSL connections</a> only. I have also modified standard port in /etc/dovecot/dovecot.conf from 993 to a different one:</p>
<p><code>protocol imap {<br />
ssl_listen = *:7777<br />
}</code></p>
<p>Restarted Dovecot</p>
<p><code>sudo /etc/init.d/dovecot restart</code></p>
<p>and tested my first IMAP account using Thunderbird. As the SSL certificate I used on the server was self-signed, Thunderbird complained about it but that can be ignored and SSL certificate saved.</p>
<p>After that, I installed getmail:</p>
<p><code>sudo apt-get install getmail4</code></p>
<p>For each mailbox I wanted to download from a POP3 server, I defined a separate config file for getmail:</p>
<p><code>[retriever]<br />
type = SimplePOP3Retriever<br />
server = mailserver<br />
username = user<br />
password = pass<br />
</code><code><br />
[destination]<br />
type = Maildir<br />
path = ~/Maildir/<br />
</code></p>
<p>Note that emails will be saved into Maildir directory within home directory of a particular user. Maildir is also the format in which emails will be saved. This configuration works nicely with Dovecot when serving emails.</p>
<p>The last step was to set up a cron job to fetch emails from POP3 and save them into IMAP folder:</p>
<p><code>crontab -e<br />
* * * * * getmail -d >> getmail.log<br />
</code></p>
<p>where &#8220;-d&#8221; means it will delete messages from the server after downloading them.</p>
<p>getmail can also load multiple config files at once, so if you have more then one account to fetch:</p>
<p><code>getmail -d -r configfile1 -r configfile2</code></p>
]]></content:encoded>
			<wfw:commentRss>http://jurajsplayground.com/2009/04/19/fetching-of-emails-from-a-pop3-server-and-serving-via-imap-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Default terminal size in Ubuntu</title>
		<link>http://jurajsplayground.com/2009/03/08/default-terminal-size-in-ubuntu/</link>
		<comments>http://jurajsplayground.com/2009/03/08/default-terminal-size-in-ubuntu/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:22:22 +0000</pubDate>
		<dc:creator>Juraj</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jurajsplayground.com/blog/?p=54</guid>
		<description><![CDATA[Too small for you?
sudo gedit /usr/share/vte/termcap/xterm
and replace :co#80:it#8:li#24:\ with say :co#180:it#8:li#30:\
That will give you 180&#215;30
]]></description>
			<content:encoded><![CDATA[<p>Too small for you?<br />
<code>sudo gedit /usr/share/vte/termcap/xterm</code><br />
and replace <strong>:co#80:it#8:li#24:\</strong> with say <strong>:co#180:it#8:li#30:\</strong><br />
That will give you 180&#215;30</p>
]]></content:encoded>
			<wfw:commentRss>http://jurajsplayground.com/2009/03/08/default-terminal-size-in-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Conky!</title>
		<link>http://jurajsplayground.com/2009/03/01/conky/</link>
		<comments>http://jurajsplayground.com/2009/03/01/conky/#comments</comments>
		<pubDate>Sun, 01 Mar 2009 00:57:27 +0000</pubDate>
		<dc:creator>Juraj</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jurajsplayground.com/blog/?p=35</guid>
		<description><![CDATA[Stumbled upon this lovely monitor today.
Conky is a free, light-weight system monitor for X, that displays any information on your desktop.
Here is a screenshot of my configuration:

To get the same:
$ sudo apt-get install conky
$ vi .conkyrc
paste the contents of this conky config:
&#8230; save the file, download and extract this archive into your home directory (cd [...]]]></description>
			<content:encoded><![CDATA[<p>Stumbled upon this lovely monitor today.</p>
<blockquote><p>Conky is a <strong>free, light-weight system monitor for X</strong>, that displays any information on your desktop.</p></blockquote>
<p>Here is a screenshot of my configuration:</p>
<p style="text-align: center;"><a href="http://www.jurajsplayground.com/wp-content/uploads/2009/03/conky.png"><img class="aligncenter size-full wp-image-36" title="conky" src="http://www.jurajsplayground.com/wp-content/uploads/2009/03/conky.png" alt="conky" /></a></p>
<p>To get the same:</p>
<p><code>$ sudo apt-get install conky<br />
$ vi .conkyrc</code></p>
<p>paste the contents of this <a href="http://www.jurajsplayground.com/wp-content/uploads/2009/03/conkyconfig.txt">conky config</a>:</p>
<p>&#8230; save the file, download and extract <a href="http://www.jurajsplayground.com/wp-content/uploads/2009/03/conky.zip">this archive</a> into your home directory (cd ~) and run</p>
<p><code>$ conky</code></p>
<p>Please note that I have removed CPUs 2-4 from the config to make it more compatible with single processor systems. <a href="http://conky.sourceforge.net/variables.html" target="_blank">Full list of Conky variables</a>.</p>
<p>If you wish to monitor a remote Ubuntu computer and display conky&#8217;s output on your desktop:</p>
<p><code>$ scp .conkyrc scp username@remoteserver:<br />
$ ssh -X username@remoteserver<br />
$ sudo apt-get install conky<br />
$ conky</code></p>
<p>UPDATE: If your server doesn&#8217;t have Xorg installed (which most don&#8217;t), you can use {execi} to issue commands over ssh and grep the info you need. The below part of conkyrc is based on a Ubuntu Jaunty server, your distribution may vary in where some of the details are stored.<br />
${voffset 30}<br />
${execi 43200 ssh vds hostname} ${hr 2}<br />
${voffset 2}${font OpenLogos:size=16}u${font}   Kernel:  ${alignr}${execi 43200 ssh vds uname -r}<br />
${execi 43200 ssh vds less /proc/cpuinfo | head -n 5 | tail -n 1 | cut -d @ -f 2 | cut -c 2-} ${alignr}Load: ${execi 60 ssh vds uptime |cut -d , -f 4- | cut -c 17-}<br />
${execibar 60 ssh vds bash ~/cpuload.sh}<br />
${execigraph 60 ssh vds bash ~/cpuload.sh}<br />
${font StyleBats:size=16}q${font}   Uptime: ${alignr}${execi 60 ssh vds uptime |cut -d , -f 1 | cut -c 2-}<br />
${font StyleBats:size=16}q${font}   Users logged in: ${alignr}${execi 60 ssh vds w | head -n 1 | cut -d \  -f 7- | cut -d \, -f1}</p>
<p>HD ${hr 2}<br />
${execi 600 ssh vds df -h | head -n2 | tail -n1 | cut -c 24-}<br />
${voffset 4}${execibar 600 ssh vds df -h | head -n2 | tail -n1 | cut -c 41-42}</p>
<p>NETWORK ${hr 2}<br />
${voffset 4}${font PizzaDude Bullets:size=14}N${font}   Download: ${alignr}${execi 600 ssh vds ifconfig | head -n 8 | tail -n 1 | cut -d \( -f 2 | cut -d \) -f 1}<br />
${voffset 4}${font PizzaDude Bullets:size=14}T${font}   Upload: ${alignr}${execi 600 ssh vds ifconfig | head -n 8 | tail -n 1 | cut -d \( -f 3 | cut -d \) -f 1}<br />
${voffset 4}${font PizzaDude Bullets:size=14}b${font}   Public IP: ${alignr}${execi 43200 ssh vds ifconfig | head -n 2 | tail -n 1 | cut -c 21- | cut -d \  -f 1}</p>
<p>TOP: ${hr 2}<br />
${voffset 4}${execi 60 ssh vds ps -eo pcpu,pid,user,args | sort -k 1 -r | head -5}</p>
<p>Note that if you run both local and remote conky, you may need to amend conky&#8217;s position on the remote server in .conkyrc so they won&#8217;t overlap.</p>
<p>To start conky from a remote computer and have it displayed on yours, create this as a .sh script and run:</p>
<p><code>ssh -X username@remoteserver 'conky'</code></p>
<p>And finally, if you wish to start conky automatically after your log in, create a bash script with the following and add it into your Ubuntu start up programs:</p>
<p><code>#!/bin/bash<br />
sleep 20 &amp;&amp; conky;</code></p>
<p>Halting it for 20 seconds prevents compiz from applying border and drop down shadows etc. to conky&#8217;s window.</p>
]]></content:encoded>
			<wfw:commentRss>http://jurajsplayground.com/2009/03/01/conky/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Running a script after log off in Ubuntu</title>
		<link>http://jurajsplayground.com/2009/02/24/running-a-script-after-log-off-in-ubuntu/</link>
		<comments>http://jurajsplayground.com/2009/02/24/running-a-script-after-log-off-in-ubuntu/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 20:59:16 +0000</pubDate>
		<dc:creator>Juraj</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jurajsplayground.com/blog/?p=24</guid>
		<description><![CDATA[Perhaps bit of a hack I but could not find another way of unmounting Samba shares automatically before my user session ends. If I do not unmount them myself, they would stay mounted after network manager has shutdown making Ubuntu hang. So to overcome this problem, I&#8217;ve done the following:
$ cd /etc/gdm/PostSession
$ sudo vi Default
add [...]]]></description>
			<content:encoded><![CDATA[<p>Perhaps bit of a hack I but could not find another way of unmounting Samba shares automatically before my user session ends. If I do not unmount them myself, they would stay mounted after network manager has shutdown making Ubuntu hang. So to overcome this problem, I&#8217;ve done the following:</p>
<p><code>$ cd /etc/gdm/PostSession<br />
$ sudo vi Default</code></p>
<p>add your commands before &#8220;exit 0&#8243;, for example:</p>
<p><code>...<br />
sudo fusermount -u /home/juraj/shareA/<br />
sudo fusermount -u /home/juraj/shareB/<br />
exit 0</code></p>
<p>Save (:wq) and give it a go - restart or logoff. Tested in Ubuntu 8.10</p>
]]></content:encoded>
			<wfw:commentRss>http://jurajsplayground.com/2009/02/24/running-a-script-after-log-off-in-ubuntu/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ubuntu - visual tuning</title>
		<link>http://jurajsplayground.com/2009/02/07/ubuntu-visual-tuning/</link>
		<comments>http://jurajsplayground.com/2009/02/07/ubuntu-visual-tuning/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 23:45:39 +0000</pubDate>
		<dc:creator>Juraj</dc:creator>
		
		<category><![CDATA[All]]></category>

		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.jurajsplayground.com/blog/?p=18</guid>
		<description><![CDATA[Ubuntu comes with Gnome and default settings include some visual effects (provided graphic card and drivers can handle them). To get the most out of it, consider installing the following  (using Synaptec or &#8220;sudo apt-get install package-name&#8220;):
compizconfig-settings-manager
This manager includes endless compiz configuration options including burning of windows on closing, Mac-like window effects and much [...]]]></description>
			<content:encoded><![CDATA[<p>Ubuntu comes with Gnome and default settings include some visual effects (provided graphic card and drivers can handle them). To get the most out of it, consider installing the following  (using Synaptec or &#8220;sudo apt-get install <strong>package-name</strong>&#8220;):</p>
<p><strong>compizconfig-settings-manager</strong><br />
This manager includes endless compiz configuration options including burning of windows on closing, Mac-like window effects and much more.</p>
<p><strong>gnome-color-chooser</strong><br />
Allows to customise Gnome colours - panels, desktop, icons etc. Try these <a href="http://www.jurajsplayground.com/blog/wp-content/uploads/2009/02/84941-dax_ultrapack220_3v2_gnomecctar.bz2">220 Gnome colour schemes</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jurajsplayground.com/2009/02/07/ubuntu-visual-tuning/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

