<?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>Aberration &#187; HowTo</title>
	<atom:link href="http://tomasz.sterna.tv/topics/howto/feed/" rel="self" type="application/rss+xml" />
	<link>http://tomasz.sterna.tv</link>
	<description>technology babbling</description>
	<lastBuildDate>Wed, 01 Feb 2012 19:19:47 +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>Give old &#8216;make&#8217; some flare</title>
		<link>http://tomasz.sterna.tv/2012/02/give-old-make-some-flare/</link>
		<comments>http://tomasz.sterna.tv/2012/02/give-old-make-some-flare/#comments</comments>
		<pubDate>Wed, 01 Feb 2012 19:19:47 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=839</guid>
		<description><![CDATA[This is a &#8216;make&#8217; wrapper I use to make my life easier. It notifies me with desktop notification of failed build and of successful build that took longer than 30 seconds (and I got bored watching &#8220;The Matrix&#8221;). It requires colormake and notify-send installed and is activated by: alias make=make-wrapper #!/bin/bash MINIMUM=30 START=$SECONDS time colormake [...]]]></description>
			<content:encoded><![CDATA[<p>This is a &#8216;make&#8217; wrapper I use to make my life easier.</p>
<p>It notifies me with desktop notification of failed build and of successful build that took longer than 30 seconds (and I got bored watching &#8220;The Matrix&#8221;). It requires <em>colormake</em> and <em>notify-send</em> installed and is activated by:</p>
<blockquote><p><code>alias make=make-wrapper</code></p></blockquote>
<p><span id="more-839"></span><br />
<code>#!/bin/bash<br />
MINIMUM=30</p>
<p>START=$SECONDS<br />
time colormake $*</p>
<p>ERR=$?<br />
case $ERR in<br />
0)<br />
  [[ $(($SECONDS - $START)) -gt $MINIMUM ]] &#038;&#038; notify-send -t 3000 -u critical -i gtk-ok "make $1 OK"<br />
  ;;<br />
141)<br />
  tput setaf 1<br />
  echo "make stopped by ^C"<br />
  tput sgr0<br />
  ;;<br />
*)<br />
  notify-send -u critical -i gtk-dialog-error "make $1 FAILED:$ERR"<br />
  ;;<br />
esac<br />
exit $ERR<br />
</code></p>
<p><small><a href="http://tomasz.sterna.tv/2012/02/give-old-make-some-flare/">Give old &#8216;make&#8217; some flare</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2012/02/give-old-make-some-flare/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to restore GNOME 2 look to GNOME 3 desktop</title>
		<link>http://tomasz.sterna.tv/2011/12/how-to-restore-gnome-2-look-to-gnome-3-desktop/</link>
		<comments>http://tomasz.sterna.tv/2011/12/how-to-restore-gnome-2-look-to-gnome-3-desktop/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 22:25:43 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gnome shell]]></category>
		<category><![CDATA[gnome2]]></category>
		<category><![CDATA[gnome3]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=827</guid>
		<description><![CDATA[If you don&#8217;t find the default GNOME 3 Shell appealing and would like to get back your GNOME 2 desktop, you can do it without any hassle. It&#8217;s actually one checkbox &#8211; few clicks away. But a checkbox very well hidden by GNOME Shell designers. Just click your name in the top-right corner and select [...]]]></description>
			<content:encoded><![CDATA[<p>If you don&#8217;t find the default GNOME 3 Shell appealing and would like to get back your GNOME 2 desktop, you can do it without any hassle.<br />
It&#8217;s actually one checkbox &#8211; few clicks away. But a checkbox very well hidden by GNOME Shell designers.</p>
<p>Just click your name in the top-right corner and select &#8220;System Settings&#8221;. The system settings window will appear.<br />
<a href="http://tomasz.sterna.tv/uploads/2011/12/gnome3-system-settings.png"><img src="http://tomasz.sterna.tv/uploads/2011/12/gnome3-system-settings-300x292.png" alt="" title="gnome3-system-settings" width="300" height="292" class="aligncenter size-medium wp-image-828" /></a></p>
<p>There select &#8220;System Info&#8221;. (Yes&#8230; System Info) and there select &#8220;Graphics&#8221; tab. (Yes&#8230; Graphics)<br />
<a href="http://tomasz.sterna.tv/uploads/2011/12/gnome-3-fallback-mode.png"><img src="http://tomasz.sterna.tv/uploads/2011/12/gnome-3-fallback-mode-300x227.png" alt="" title="gnome-3-fallback-mode" width="300" height="227" class="aligncenter size-medium wp-image-829" /></a></p>
<p>Now all you need is to switch ON the &#8220;Forced Fallback Mode&#8221; and relogin.<span id="more-827"></span></p>
<p>After login you will be greeted with familiar two panel desktop with defaultish look. Panels work as always, with one exception &#8211; every widget is locked in place by default. To customize it you need to right-click it holding <em>Alt</em> button. And they may be aligned to the left, center or to the right of the panel &#8211; just by dragging them where you want with the middle mouse button, holding <em>Alt</em> of course. Try it by dragging the clock to the right position where it belongs. Right-clicking the panel (holding <em>Alt</em> button, remember) gives you the standard menu to customize the panel, add widgets and create new panels.</p>
<p>If you run Ubuntu, you can even get Unity&#8217;s Indicator Applets on the panel. See <a href="http://www.webupd8.org/2011/11/indicator-applet-ported-to-gnome-3-can.html" title="Indicator Applet Ported To GNOME 3"></a> article for instructions.<br />
<a href="https://lh6.googleusercontent.com/-VY3ZkgyabZ0/Tru5HNZP3kI/AAAAAAAAAf8/XixhXrkv--Y/s1024/Zrzut%2Bekranu%2B2011-11-10%2B12%253A43%253A28.png"><img alt="GNOME 3 desktop without Gnome Shell" src="https://lh6.googleusercontent.com/-VY3ZkgyabZ0/Tru5HNZP3kI/AAAAAAAAAf8/XixhXrkv--Y/s1024/Zrzut%2Bekranu%2B2011-11-10%2B12%253A43%253A28.png" title="GNOME 3 desktop without Gnome Shell" class="aligncenter" width="500" height="280" /></a></p>
<p><small><a href="http://tomasz.sterna.tv/2011/12/how-to-restore-gnome-2-look-to-gnome-3-desktop/">How to restore GNOME 2 look to GNOME 3 desktop</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2011/12/how-to-restore-gnome-2-look-to-gnome-3-desktop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Home directory encryption++ under openSUSE</title>
		<link>http://tomasz.sterna.tv/2011/04/home-directory-encryption-under-opensuse/</link>
		<comments>http://tomasz.sterna.tv/2011/04/home-directory-encryption-under-opensuse/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 02:01:13 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[cryptconfig]]></category>
		<category><![CDATA[cryptsetup]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[encryption]]></category>
		<category><![CDATA[home]]></category>
		<category><![CDATA[luks]]></category>
		<category><![CDATA[manual]]></category>
		<category><![CDATA[mmc]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[physical key]]></category>
		<category><![CDATA[steroids]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=790</guid>
		<description><![CDATA[While setting up a new laptop I decided it&#8217;s finally time to encrypt my $HOME. I don&#8217;t want to encrypt the whole /home partition, because I don&#8217;t like to watch the boot process of my computer waiting for the moment it wants to mount it and asks me for the disk encryption password. Then wait [...]]]></description>
			<content:encoded><![CDATA[<p>While setting up a new laptop I decided it&#8217;s finally time to encrypt my $HOME.</p>
<p>I don&#8217;t want to encrypt the whole /home partition, because I don&#8217;t like to watch the boot process of my computer waiting for the moment it wants to mount it and asks me for the disk encryption password. Then wait some more and enter the user password. I want to use just one password for both and let the login process do the magic for me.</p>
<p>Actually getting this setup under <a href="http://www.opensuse.org/">openSUSE</a> is as easy as going to <em>YaST -&gt; User management -&gt; Your user -&gt; Edit -&gt; Details</em> and checking &#8220;Use encrypted home directory&#8221; checkbox. But I didn&#8217;t go this way for three reasons:</p>
<ul>
<li>I wanted to have my encryption key on a separate device (explanation at the next paragraph)</li>
<li>I wanted to have a strong grip on what is going on under the hood in case of emergency (ie. system crash recovery)</li>
<li>The automagic GUI simply did not work in my case ;-)</li>
</ul>
<p>My laptop has an MMC reader, so I wanted to utilize <a href="http://home.coming.dk/index.php/encrypted_home_partition_using_luks_pam_">Jaervosz idea of having disk encryption keys in my pocket</a> every time I need to leave the computer unattended. This gives a very good physical keys analogy. Also might be useful in countries <a href="http://xkcd.com/538/">you are required by law to reveal your password</a> to certain services. It&#8217;s easily verifiable that you gave the real password by logging to the machine. But you cannot be expected to reveal key file content of the MMC that got &#8220;damaged&#8221; or lost. (Of course it&#8217;s crucial to have a backup of the MMC content in some safe place.) I use a small (256MB) and quite fast (Class 4) MicroSD card I had spare left after a mobile phone.</p>
<p>Let&#8217;s start with an easy bit and encrypt swap first. I&#8217;m not that paranoid to fear of data leaking through swap, but this gives a nice checkpoint before following with putting your crucial $HOME data into a box you may be unable to open later. ;-)</p>
<p><span id="more-790"></span>Install some packages you will need:</p>
<pre>
# zypper install cryptsetup cryptconfig pam_mount
</pre>
<p>Put one line in <tt>/etc/crypttab</tt> file:</p>
<pre>
swap /dev/sda5 /dev/urandom swap,cipher=aes-cbc-essiv:sha256
</pre>
<p>and replace swap device entry in your <tt>/etc/fstab</tt> with <tt>/dev/mapper/swap</tt> like this:</p>
<pre>
/dev/mapper/swap   swap   swap   defaults   0 0
[...]
</pre>
<p>Add <tt>boot.crypto</tt> script to boot level:</p>
<pre>
# chkconfig --add boot.crypto
boot.crypto   0:off  1:off  2:off  3:off  4:off  5:off  6:off  B:on
</pre>
<p>Now reboot. You should have a <tt>/dev/mapper/swap</tt> encrypted device being used as swap:</p>
<pre>
# ls /dev/mapper
control  swap
# swapon -s
Filename		Type		Size		Used	Priority
/dev/mapper/swap	partition	10490408	0	-1
</pre>
<p>Congratulations. You may now follow with encrypting your real data.</p>
<p>Setting up LUKS encrypted loop device, pam_mount configs, etc. may be a bit cumbersome while doing everything by hand. Fortunately there is a tool to ease the pain &#8211; enter <tt>cryptconfig</tt>. It has a lot of tools off which we need to use only few.</p>
<p>First mount MMC on <tt>/mmc</tt> directory:</p>
<pre>
# mkdir /mmc
# mount /dev/mmcblk0p1 /mmc
</pre>
<p>Next you need to create an encrypted disk image file with associated key file. Unfortunately when I wanted to create a properly big image, <tt>cryptconfig</tt> complained that it won&#8217;t fit on my partition so I ended up creating a small one and enlarging it after. (BTW, You may want to use your own username instead of &#8220;user&#8221; ;-) Use your user password when asked for.</p>
<pre>
# cryptconfig create-image --key-file /mmc/user-home.key /home/user.img 20000
# cryptconfig enlarge-image --key-file /mmc/user-home.key /home/user.img 200000
</pre>
<p>Next add pam_mount to PAM and create its configuration file:</p>
<pre>
# cryptconfig pm-enable --key-file /mmc/user-home.key user
</pre>
<p>Next you need to tweak pam_mount configuration. I don&#8217;t want to mount <tt>/mmc</tt> content via <tt>fstab</tt> because that would make my laptop unbootable with MMC removed. Instead I engage pam_mount to do this for me. Add the following line just before the last line mounting your home in <tt>/etc/security/pam_mount.conf.xml</tt> file:</p>
<pre>
&lt;volume fstype="auto" user="user" path="/dev/mmcblk0p1" mountpoint="/mmc"/&gt;
</pre>
<p>But having a removable device connected and not present in <tt>fstab</tt> may cause that Volume Manager will want to mount it under removable <tt>/media</tt>. To mitigate this, add the following line to <tt>/etc/fstab</tt>:</p>
<pre>
/dev/mmcblk0p1   /mmc   auto   noauto   0 0
</pre>
<p>That&#8217;s it. You have completed the setup. Now you just need to fix your home directory image content permissions (it&#8217;s just an empty filesystem owned by root) and transfer your data.</p>
<p>Kill your current X session by tapping Ctrl-Alt-Backspace twice or reboot again. Log in to your account and you should see your desktop environment complaining it has no access to your home directory. Good &#8211; this means your encrypted home directory was mounted properly. Let&#8217;s fix it.</p>
<p>Switch to text mode console (Ctrl-Alt-F1), login as root and fix your home directory permissions:</p>
<pre>
# chown -R user:users ~user
</pre>
<p>Next the tricky part &#8211; transferring your data:</p>
<pre>
# mount -o bind /home /mnt
# rsync -rvaP /mnt/user/ /home/user/
</pre>
<p>After killing X again log in and verify that your desktop works correctly. After that you may cleanup by removing <tt>/mnt/user</tt> content:</p>
<pre>
# rm -rf /mnt/smoku/*
# rm -rf /mnt/smoku/.[a-zA-Z0-9]*
# umount /mnt
</pre>
<p>Congratulations. You have an encrypted home directory mounted on login, using a &#8220;physical key&#8221; in a form of a Memory Card. Reboot. :-)</p>
<p>P.S. You may want to make some other areas like <tt>/tmp</tt> inaccessible to anyone getting hands on your computer. I solved it by mounting <tt>/tmp</tt> with <tt>tmpfs</tt>. But that&#8217;s something for a different article.</p>
<p><small><a href="http://tomasz.sterna.tv/2011/04/home-directory-encryption-under-opensuse/">Home directory encryption++ under openSUSE</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2011/04/home-directory-encryption-under-opensuse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Gnome Shell under Ubuntu Linux</title>
		<link>http://tomasz.sterna.tv/2010/04/installing-gnome-shell-under-ubuntu-linux/</link>
		<comments>http://tomasz.sterna.tv/2010/04/installing-gnome-shell-under-ubuntu-linux/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 12:26:01 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[gnome shell]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=630</guid>
		<description><![CDATA[At work there is still sluggish Ubuntu on my desktop. I wanted to use Gnome Shell (which I got to love under Arch) on it though. Step One &#8211; Gnome Shell PPA # echo 'deb http://ppa.launchpad.net/ricotz/testing/ubuntu lucid main # GnomeShell PPA' >> /etc/apt/sources.list # aptitude update Step Two &#8211; Install the Beast # aptitude install [...]]]></description>
			<content:encoded><![CDATA[<p>At work there is still <a href="http://tomasz.sterna.tv/2010/04/bye-bye-ubuntu-welcome-arch/">sluggish Ubuntu</a> on my desktop. I wanted to use Gnome Shell (which I got to love under Arch) on it though.</p>
<ol>
<li>Step One &#8211; Gnome Shell PPA
<pre>
# echo 'deb http://ppa.launchpad.net/ricotz/testing/ubuntu lucid main # GnomeShell PPA' >> /etc/apt/sources.list
# aptitude update
</pre>
</li>
<li>Step Two &#8211; Install the Beast
<pre>
# aptitude install gnome-shell
</pre>
</li>
<li>Step Three &#8211; Activate!
<pre>
$ echo 'export WINDOW_MANAGER=gnome-shell' >> ~/.gnomerc
</pre>
</li>
<li>Step Four &#8211; RELOGIN</li>
</ol>
<p><small><a href="http://tomasz.sterna.tv/2010/04/installing-gnome-shell-under-ubuntu-linux/">Installing Gnome Shell under Ubuntu Linux</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2010/04/installing-gnome-shell-under-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GSM Dial-Up over Nokia N900 Bluetooth on Ubuntu Karmic</title>
		<link>http://tomasz.sterna.tv/2009/12/gsm-dial-up-over-nokia-n900-bluetooth-on-ubuntu-karmic/</link>
		<comments>http://tomasz.sterna.tv/2009/12/gsm-dial-up-over-nokia-n900-bluetooth-on-ubuntu-karmic/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 16:54:02 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Maemo]]></category>
		<category><![CDATA[bluetooth]]></category>
		<category><![CDATA[dialup]]></category>
		<category><![CDATA[gsm]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[nokia]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=455</guid>
		<description><![CDATA[It was some time ago that I needed to setup a Dial-Up connection on my Ubuntu workstation and boy, things have changed since. The procedure got easier, but it still isn&#8217;t straightforward. This time you don&#8217;t need to manually edit files though. :-) Let&#8217;s get to the business&#8230; Nokia N900 part Default Maemo5 bluetooth setup [...]]]></description>
			<content:encoded><![CDATA[<p>It was some time ago that I needed to setup a <a href="http://tomasz.sterna.tv/2007/05/networkmanager-and-gsm-dial-up-over-bluetooth/">Dial-Up connection on my Ubuntu workstation</a> and boy, things have changed since. The procedure got easier, but it still isn&#8217;t straightforward. This time you don&#8217;t need to manually edit files though. :-)</p>
<p>Let&#8217;s get to the business&#8230;<span id="more-455"></span></p>
<p><strong>Nokia N900 part</strong></p>
<p>Default <a href="http://wiki.maemo.org/Bluetooth">Maemo5 bluetooth</a> setup on Nokia N900 does not provide Dial-Up Networking BlueZ profile. You need to install &#8220;Bluetooth Dial-up Networking&#8221; package from <a href="http://wiki.maemo.org/Extras-testing">extras-testing repository</a>. Restart the phone after installing to activate DUN.</p>
<p style="text-align: center;"><a href="http://tomasz.sterna.tv/uploads/2009/12/Screenshot-20091227-160856.png"><img class="size-medium wp-image-456 aligncenter" title="App Manager" src="http://tomasz.sterna.tv/uploads/2009/12/Screenshot-20091227-160856-300x180.png" alt="App Manager" width="300" height="180" /></a></p>
<p><strong>Ubuntu Karmic part</strong></p>
<p>Ubuntu default gnome-bluetooth package does not provide means needed to setup Dial-Up connection. You need to replace it with a lot better Blueman. First add <a href="https://launchpad.net/~blueman/+archive/ppa">Blueman PPA</a> to repositories.</p>
<p><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Modyfikuj-źródło.png"><img class="aligncenter size-medium wp-image-459" title="Blueman PPA" src="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Modyfikuj-źródło-300x172.png" alt="Blueman PPA" width="300" height="172" /></a></p>
<p>Then install Blueman. It will replace gnome-bluetooth. Reboot workstation to get changes active.<a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Centrum-oprogramowania-Ubuntu.png"></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Centrum-oprogramowania-Ubuntu1.png"></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Centrum-oprogramowania-Ubuntu1.png"></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Centrum-oprogramowania-Ubuntu.png"></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Centrum-oprogramowania-Ubuntu.png"><img class="aligncenter size-full wp-image-466" title="App Manager - Blueman" src="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Centrum-oprogramowania-Ubuntu.png" alt="App Manager - Blueman" width="600" height="113" /></a></p>
<p>Right click on bluetooth icon in notification area and &#8220;Setup a new device&#8230;&#8221; &#8211; pair your N900. Then left click on same icon and &#8220;Bluetooth devices&#8221; window opens.<a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Urządzenia-Bluetooth.png"></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Urządzenia-Bluetooth1.png"></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Urządzenia-Bluetooth1.png"><img class="aligncenter size-full wp-image-467" title="Bluetooth Devices" src="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Urządzenia-Bluetooth1.png" alt="Bluetooth Devices" width="500" height="180" /></a></p>
<p>Select your device and click &#8220;Settings&#8230;&#8221; button. Then connect &#8220;Dialup Networking (DUN)&#8221;. This will add your device to NetworkManager. Right click Network icon in notification area and select &#8220;Modify connections&#8230;&#8221;. Then on &#8220;Mobile&#8221; tab &#8220;Add&#8221; a connection for &#8220;Installed GSM device&#8221;. It&#8217;s good to check &#8220;Connect automatically&#8221;.<a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Połączenia-sieciowe.png"><img class="aligncenter size-medium wp-image-461" title="Network Connections" src="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Połączenia-sieciowe-300x180.png" alt="Network Connections" width="300" height="180" /></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Nowe-połączenie-komórkowe.png"><img class="aligncenter size-medium wp-image-460" title="New mobile connection" src="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Nowe-połączenie-komórkowe-300x207.png" alt="New mobile connection" width="300" height="207" /></a><a href="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Modyfikowanie-iPlus-N900.png"><img class="aligncenter size-medium wp-image-458" title="GSM Connection" src="http://tomasz.sterna.tv/uploads/2009/12/zrzut_ekranu-Modyfikowanie-iPlus-N900-274x300.png" alt="GSM Connection" width="274" height="300" /></a></p>
<p>Now when you want to establish a connection just click the Bluetooth icon in notification area, right click your device and Connect &#8220;Dial-up Networking&#8221;. NetworkManager will kick in if you checked it to connect automatically and you&#8217;re online.</p>
<p><strong>Have Fun.</strong></p>
<p><small><a href="http://tomasz.sterna.tv/2009/12/gsm-dial-up-over-nokia-n900-bluetooth-on-ubuntu-karmic/">GSM Dial-Up over Nokia N900 Bluetooth on Ubuntu Karmic</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2009/12/gsm-dial-up-over-nokia-n900-bluetooth-on-ubuntu-karmic/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Fullscreen StarCraft on Linux WINE</title>
		<link>http://tomasz.sterna.tv/2009/10/fullscreen-starcraft-on-linux-wine/</link>
		<comments>http://tomasz.sterna.tv/2009/10/fullscreen-starcraft-on-linux-wine/#comments</comments>
		<pubDate>Mon, 26 Oct 2009 22:24:23 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[StarCraft]]></category>
		<category><![CDATA[XOrg]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=433</guid>
		<description><![CDATA[In order for StarCraft to launch full screen WINE needs to be able to change X11 resolution. Unfortunately, on new laptops the graphics subsystem only reports resolution native to the LCD display, thus the only resolution available in X on my system is 1280&#215;800. I needed to add one more &#8211; native to StarCraft &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>In order for StarCraft to launch full screen WINE needs to be able to change X11 resolution.<br />
Unfortunately, on new laptops the graphics subsystem only reports resolution native to the LCD display, thus the only resolution available in X on my system is 1280&#215;800.</p>
<p>I needed to add one more &#8211; native to StarCraft &#8211; and let the graphics hardware scale it to full screen.<br />
It&#8217;s pretty easy using XRandr extensions:</p>
<pre>
$ cat .xprofile
xrandr --newmode "640x480_120.00"  52.41  640 680 744 848  480 481 484 515  -HSync +Vsync
xrandr --addmode LVDS1 640x480_120.00
</pre>
<p><small><a href="http://tomasz.sterna.tv/2009/10/fullscreen-starcraft-on-linux-wine/">Fullscreen StarCraft on Linux WINE</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2009/10/fullscreen-starcraft-on-linux-wine/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PHP &#8220;Cannot modify header information&#8221; and the dreaded BOM</title>
		<link>http://tomasz.sterna.tv/2009/06/php-cannot-modify-header-information-and-the-dreaded-bom/</link>
		<comments>http://tomasz.sterna.tv/2009/06/php-cannot-modify-header-information-and-the-dreaded-bom/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 11:40:04 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=394</guid>
		<description><![CDATA[Were you ever hit by the PHP warning: Warning: Cannot modify header information - headers already sent by (output started at some/file.php:1) in some/other/file.php on line 123 ? The first line of the file in question some/file.php looks innocent: &#60;?php A standard PHP code opening tag. So, where are the outputted characters? Well&#8230; Welcome to [...]]]></description>
			<content:encoded><![CDATA[<p>Were you ever hit by the PHP warning:<br />
<code>Warning: Cannot modify header information - headers already sent by (output started at some/file.php:1) in some/other/file.php on line 123</code> ?</p>
<p>The first line of the file in question <code>some/file.php</code> looks innocent:<br />
<code>&lt;?php</code><br />
A standard PHP code opening tag. So, where are the outputted characters?<br />
Well&#8230; Welcome to Unicode world. With multibyte characters there is a need of distinguishing low-endian from high-endian encoded files. It&#8217;s a job of the <a href="http://en.wikipedia.org/wiki/Byte-order_mark">BOM</a> &#8211; byte-order mark &#8211; it is an invisible, no length space with a unique two bytes character code U+FEFF. It does not affect the rendered content of the document and it is easy to detect the endianness of the document.</p>
<p>But PHP is not a renderer &#8211; it takes the two bytes literally and sends them to browser. But before any content, it needs to send HTTP headers. The rest of the story is obvious &#8211; you cannot modify already sent headers and PHP warns you about the fact.</p>
<p><strong>How to remove BOM?</strong><br />
It&#8217;s not that easy &#8211; in most editors it is not an editable character and they just leave it as-is. For me, the easiest way is to open the file in <a href="http://www.scintilla.org/SciTE.html">SciTE</a>, change the File -> Encoding from <em>UTF-8 with BOM</em> to <em>UTF-8</em> and save it.</p>
<p><small><a href="http://tomasz.sterna.tv/2009/06/php-cannot-modify-header-information-and-the-dreaded-bom/">PHP &#8220;Cannot modify header information&#8221; and the dreaded BOM</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2009/06/php-cannot-modify-header-information-and-the-dreaded-bom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using monit with Ubuntu Server</title>
		<link>http://tomasz.sterna.tv/2009/05/using-monit-with-ubuntu-server/</link>
		<comments>http://tomasz.sterna.tv/2009/05/using-monit-with-ubuntu-server/#comments</comments>
		<pubDate>Wed, 27 May 2009 12:08:44 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Monit]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=383</guid>
		<description><![CDATA[Monit is a software watchdog &#8211; a very useful tool to keep your service daemons alive. The best way to run monit is as the Init managed process. But there is no /etc/inittab on Ubuntu anymore. Instead we have Upstart. Adding Monit as an Upstart service is easy. Let me show you how&#8230; Upstart is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://mmonit.com/monit/">Monit</a> is a software <a href="http://en.wikipedia.org/wiki/Watchdog_timer">watchdog</a> &#8211; a very useful tool to keep your service daemons alive.</p>
<p>The best way to run monit is as the Init managed process. But there is no <code>/etc/inittab</code> on Ubuntu anymore. Instead we have <a href="http://upstart.ubuntu.com/">Upstart</a>. Adding Monit as an Upstart service is easy. Let me show you how&#8230;</p>
<p><span id="more-383"></span>Upstart is event based, and its event handling configuration is in <code>/etc/event.d</code>. The configuration is a bit similar to <code>/etc/inittab</code>, but a bit more verbose and placed in separate files. To add Monit as a managed process, just create a file similar to a getty spawner configuration in <code>ttyX</code>. I named my file: <code>/etc/event.d/monit</code> with content of:</p>
<p><code># Run monit in standard run-levels<br />
start on stopped rc2<br />
start on stopped rc3<br />
start on stopped rc4<br />
start on stopped rc5<br />
stop on runlevel 0<br />
stop on runlevel 1<br />
stop on runlevel 6<br />
respawn<br />
exec /usr/sbin/monit -Ic /etc/monit/monitrc</code></p>
<p>Next just start monit. Issue a command:<br />
<code>start monit</code></p>
<p>Good luck with service monitoring.</p>
<p><small><a href="http://tomasz.sterna.tv/2009/05/using-monit-with-ubuntu-server/">Using monit with Ubuntu Server</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2009/05/using-monit-with-ubuntu-server/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>nginx and BOSH / Comet connections</title>
		<link>http://tomasz.sterna.tv/2009/05/nginx-and-bosh-comet-connections/</link>
		<comments>http://tomasz.sterna.tv/2009/05/nginx-and-bosh-comet-connections/#comments</comments>
		<pubDate>Mon, 25 May 2009 10:10:14 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Jabber/XMPP]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[jabber]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=372</guid>
		<description><![CDATA[Yesterday I was scratching my head badly, why on earth my development BOSH installation (I am developing a web based Jabber client) did not work, while the production one did fine. After digging (telnet and hand crafted HTTP+XMPP requests did the job well) I found out, that my local nginx installation was &#8220;to new&#8221;. The [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was scratching my head badly, why on earth my development BOSH installation (I am developing a web based Jabber client) did not work, while the production one did fine. After digging (telnet and hand crafted HTTP+XMPP requests did the job well) I found out, that my local nginx installation was &#8220;to new&#8221;.</p>
<p>The latest nginx version does proxied request caching. It buffers the proxied server response and pushes it to the client as a whole. It does help in mitigating client-backend bandwidth differences, but breaks Comet requests like the BOSH one. There is an option added to nginx for this very purpose: proxy_buffering. You need to disable the buffering: <code>proxy_buffering off;</code>.</p>
<p><span id="more-372"></span>So, the complete BOSH proxy location should look like this:</p>
<p><code>	location /http-bind/ {<br />
		proxy_buffering off;<br />
		tcp_nodelay on;<br />
		keepalive_timeout 55;<br />
		proxy_pass      http://xmpp.server:5280/xmpp-httpbind/;<br />
	}</code></p>
<p><small><a href="http://tomasz.sterna.tv/2009/05/nginx-and-bosh-comet-connections/">nginx and BOSH / Comet connections</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2009/05/nginx-and-bosh-comet-connections/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Connecting remote X client to Windows workstation over SSH</title>
		<link>http://tomasz.sterna.tv/2009/05/connecting-remote-x-client-to-windows-workstation-over-ssh/</link>
		<comments>http://tomasz.sterna.tv/2009/05/connecting-remote-x-client-to-windows-workstation-over-ssh/#comments</comments>
		<pubDate>Tue, 05 May 2009 11:29:27 +0000</pubDate>
		<dc:creator>Tomasz Sterna</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Administration]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[SSH]]></category>

		<guid isPermaLink="false">http://tomasz.sterna.tv/?p=141</guid>
		<description><![CDATA[Being a Linux administrator usually means having many remote servers at care. The best tool to do the job is SSH and your favourite shell launched remotely (mine is good-ol&#8217; Bash). Problems arise when the only thing you have (or are allowed to have) at hand locally is a Windows workstation. Put this problem has [...]]]></description>
			<content:encoded><![CDATA[<p>Being a Linux administrator usually means having many remote servers at care. The best tool to do the job is SSH and your favourite shell launched remotely (mine is good-ol&#8217; Bash).</p>
<p>Problems arise when the only thing you have (or are allowed to have) at hand locally is a Windows workstation. Put this problem has a good solution already &#8211; <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a>.</p>
<p>But what if the application you need is an X client? You need to launch it remotely and display its windows on some X11 screen. Unfortunately Windows does not provide one.</p>
<p>You need to install a separate X11 server on your windows workstation. The best free one is <a href="http://sourceforge.net/projects/xming">Xming</a>.<br />
Get it, install and run &#8220;Xming&#8221; app. You should see the X icon in taskbar. You&#8217;re now half way there.</p>
<p>Next, launch PuTTY<a href="http://tomasz.sterna.tv/uploads/2009/05/putty-x11-forwarding.png"><img src="http://tomasz.sterna.tv/uploads/2009/05/putty-x11-forwarding-150x150.png" alt="putty-x11-forwarding" title="putty-x11-forwarding" width="150" height="150" class="alignright size-thumbnail wp-image-142" /></a> and enable X11 forwarding on your Connection -> SSH -> X11 pane. Check &#8220;Enable X11 forwarding&#8221; and enter <code>127.0.0.1:0</code> at &#8220;X display location&#8221;.</p>
<p>Login to the remote server account and check whether X11 forwarding is working. Issue command: <code>echo $DISPLAY</code>. You should get something like: <code>localhost:10.0</code>. You&#8217;re done.</p>
<p>But if you did get nothing, you&#8217;re not completely out of luck. Most probable reason is that X11 forwarding is disabled on your remote host. Check <code>/etc/ssh/sshd_config</code> &#8220;X11Forwarding&#8221; directive. If it is set to &#8220;no&#8221; or unset, just set it to &#8220;yes&#8221; (or ask the system administrator to set it). While you are there it&#8217;s worth setting &#8220;X11DisplayOffset 10&#8243; too there, to avoid clashing local X servers on the machine.</p>
<p><small><a href="http://tomasz.sterna.tv/2009/05/connecting-remote-x-client-to-windows-workstation-over-ssh/">Connecting remote X client to Windows workstation over SSH</a> &copy;, <a rel="license" href=""></a>.</small></p>]]></content:encoded>
			<wfw:commentRss>http://tomasz.sterna.tv/2009/05/connecting-remote-x-client-to-windows-workstation-over-ssh/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

