<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Random thoughts on different matters</title>
	<atom:link href="http://troshlyak.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://troshlyak.wordpress.com</link>
	<description></description>
	<lastBuildDate>Thu, 05 Jan 2012 19:43:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='troshlyak.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/30a179e2b22eb01af8e29f872c85116b?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Random thoughts on different matters</title>
		<link>http://troshlyak.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://troshlyak.wordpress.com/osd.xml" title="Random thoughts on different matters" />
	<atom:link rel='hub' href='http://troshlyak.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Thinkpad X220 and Ultrabase 3 Docking Station</title>
		<link>http://troshlyak.wordpress.com/2011/11/23/thinkpad-x220-and-ultrabase-3-docking-station/</link>
		<comments>http://troshlyak.wordpress.com/2011/11/23/thinkpad-x220-and-ultrabase-3-docking-station/#comments</comments>
		<pubDate>Wed, 23 Nov 2011 15:34:57 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[docking station]]></category>
		<category><![CDATA[f16]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[x220]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=385</guid>
		<description><![CDATA[As I promised, there will be more posts related to the Fedora 16 configuration on a Thinkpad X220. This one will be about the seamless docking/undocking of the notebook from the dock. It seems that this is largely still a grey area and is something that rarely seems to work as expected, so I had [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=385&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I promised, there will be more posts related to the Fedora 16 configuration on a Thinkpad X220. This one will be about the seamless docking/undocking of the notebook from the dock.</p>
<p>It seems that this is largely still a grey area and is something that rarely seems to work as expected, so I had to hack it away, because this one was one of the biggest problems that I face every day because I take the notebook every day at work and dock it so I&#8217;m able to use is as a regular desktop PC and  in the afternoon I take it with me at home (one never knows for sure where he&#8217;ll end up the next day &#8211; at work or at a customer&#8217;s site <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>What I was aiming was achieving effortless X setup and display switching under the following conditions:</p>
<p>1. When booting the notebook &#8211; should work as expected &#8211; show KDM on external display when docked and on local LVDS display when not</p>
<p>2. Proper switching when docking / undocking the notebook and there is active user X session</p>
<p>3. Proper switching when docking / undocking the notebook when KDM is active</p>
<p>4. Proper switching when the notebook is docked / undocked during it was suspended</p>
<p>To achieve this I&#8217;ve ended up with a simple bash script that verifies the current configuration (docked / undocked) and switches the display accordingly. What was left was to put it in the all appropriate places, so that it gets executed on all of the above listed conditions. So first about the script &#8211; it still a work in progress, but is mostly working properly. I&#8217;ll update it here when it becomes more polished. Bare in mind that this was written with KDM in mind, although it shouldn&#8217;t be so difficult to be adapted for GDM or other login manager.</p>
<h2>The Script (thinkpad-dock.sh)</h2>
<p><pre class="brush: bash;">

#!/bin/sh
# wait for the dock state to change
sleep 0.5

export IFS=$&quot;\n&quot;

DOCKED=$(cat /sys/devices/platform/dock.0/docked)

# invoke from XSetup with NO_KDM_REBOOT otherwise you'll end up in a KDM reboot loop
NO_KDM_REBOOT=0
for p in $*; do
case &quot;$p&quot; in
&quot;NO_KDM_REBOOT&quot;)
NO_KDM_REBOOT=1
;;
&quot;SWITCH_TO_LOCAL&quot;)
DOCKED=0
;;
esac
done

function switch_to_local {
export DISPLAY=$1
export XAUTHORITY=$(find /var/run/kdm -name &quot;A${DISPLAY}-*&quot;)

# Turn off all external displays
for output in $(/usr/bin/xrandr --verbose|grep &quot;+&quot;|grep connected| grep -v LVDS|awk '{print $1}'); do
logger -t DOCKING &quot;Switching off $DISPLAY&quot;
/usr/bin/xrandr --output $output --off
done

# Turn on local display
logger -t DOCKING &quot;Switching on LVDS1&quot;
/usr/bin/xrandr --output LVDS1 --auto
}

function switch_to_external {
export DISPLAY=$1
export XAUTHORITY=$(find /var/run/kdm -name &quot;A${DISPLAY}-*&quot;)

# The Display port on the docking station is on HDMI2 - lets use it and turn of local display
logger -t UNDOCKING &quot;Switching off LVDS1 and turning on HDMI2&quot;
/usr/bin/xrandr --output HDMI2 --primary --left-of LVDS1
/usr/bin/xrandr --output LVDS1 --off
/usr/bin/xrandr --output HDMI2 --primary --auto
}

case &quot;$DOCKED&quot; in
&quot;0&quot;)
#undocked event
CONNECTED_USER=0
# Check for logged users with X sessions
for u in $(w | awk '{print $1&quot; &quot;$2}' | grep ' :[0-9]'); do
CONNECTED_USER=1
switch_to_local $(echo $u | awk '{print $2}')
done
if [ $CONNECTED_USER -eq 0 ] &amp;&amp; [ ! $NO_KDM_REBOOT ]; then
# we are at login screen
logger -t KDM_DOCKING &quot;Reloading KDM after X setup&quot;
kill $(cat /var/run/kdm/kdm.pid)
fi
;;
&quot;1&quot;)
#docked event
CONNECTED_USER=0
for u in $(w | awk '{print $1&quot; &quot;$2}' | grep ' :[0-9]'); do
CONNECTED_USER=1
switch_to_external $(echo $u | awk '{print $2}')
done
if [ $CONNECTED_USER -eq 0 ] &amp;&amp; [ ! $NO_KDM_REBOOT ]; then
logger -t KDM_DOCKING &quot;Reloading KDM after X setup&quot;
kill $(cat /var/run/kdm/kdm.pid)
fi
;;
esac

</pre></p>
<h2>The Hooks</h2>
<p>There are several places where you should put an invoke this script.</p>
<h3 style="padding-left:30px;">1. KDM</h3>
<p style="padding-left:30px;">Obviously you need it to be run at KDM startup when X is initialized. You need to add this line at the and of <em><strong>/etc/kde/kdm/Xsetup</strong></em> file:</p>
<p><pre class="brush: bash;">
/usr/local/sbin/thinkpad-dock.sh NO_KDM_REBOOT
</pre></p>
<p style="padding-left:30px;">Where <em><strong>/usr/local/sbin/thinkpad-dock.sh</strong></em> is the location of the above script.</p>
<p style="padding-left:30px;">One more thing about the KDM &#8211; in order to get proper looking KDM login screen on the external display you&#8217;ll need to alter the xorg.conf, otherwise you&#8221;ll get a little borked KDM background.</p>
<p style="padding-left:30px;">Add this file to <em><strong>/etc/X11/xorg.conf.d/</strong></em> folder</p>
<p><pre class="brush: bash;">

$ cat /etc/X11/xorg.conf.d/01-external-monitor.conf
Section &quot;Device&quot;
Identifier      &quot;HD3000&quot;
Driver         &quot;intel&quot;
Option          &quot;monitor-LVDS1&quot; &quot;local-display&quot;
Option          &quot;monitor-HDMI2&quot; &quot;external-display&quot;
EndSection

Section &quot;Monitor&quot;
Identifier      &quot;local-display&quot;
Option &quot;Enable&quot; &quot;false&quot;
EndSection

Section &quot;Monitor&quot;
Identifier      &quot;external-display&quot;
Option &quot;PreferredMode&quot; &quot;1680x1050&quot;
Option &quot;Position&quot;       &quot;0 0&quot;
EndSection

</pre></p>
<p>Be carefull here as this instructs X to NOT enable by default the local display &#8211; it will be &#8220;later&#8221; activated when KDM is started and <em><strong>thinkpad-dock.sh</strong></em> is invoked.</p>
<h3 style="padding-left:30px;">2. Docking / Undocking events</h3>
<p style="padding-left:30px;">You&#8217;ll need to add this file in <em><strong>/etc/udev/rules.d</strong></em> to catch all dock/undock events through udev:</p>
<p><pre class="brush: bash;">

$ cat 81-thinkpad-dock.rules
KERNEL==&quot;dock.0&quot;, ACTION==&quot;change&quot;, RUN+=&quot;/usr/local/sbin/thinkpad-dock.sh&quot;
</pre></p>
<p>3. Suspend / Resume events</p>
<p style="padding-left:30px;">Finally you&#8217;ll need to ensure and check that the configuration was not changed while the notebook was suspended. To hook the script you&#8217;ll need to add this in <em><strong>/etc/pm/sleep.d/</strong></em></p>
<p><pre class="brush: bash;">
$ cat 00check_dock
#!/bin/bash

case &quot;$1&quot; in
hibernate|suspend)
# If sleeping - pretend undocking
/usr/local/sbin/thinkpad-dock.sh SWITCH_TO_LOCAL
;;
thaw|resume)
# If resuming verify docking station presence
/usr/local/sbin/thinkpad-dock.sh
;;
esac
</pre></p>
<p>Only one thing to be noted here &#8211; the script needs to be executed only during the resume process, but because of some problems that I had during resuming on local display when system was suspended on the dock I had to add the hook also during suspend state and force the X server to be switched over the local display in case the machine is undocked while suspended.</p>
<p>EDIT:</p>
<p>You&#8217;ll also need to disable the KDE display management systems, so it does not ask you every time for display reconfiguration because a new display was detected. The only thing that should be done is to stop the service itself like this:</p>
<p style="text-align:left;"><a href="http://troshlyak.files.wordpress.com/2011/11/f16_display_mod1.png"><img class="aligncenter  wp-image-404" title="f16_display_mod" src="http://troshlyak.files.wordpress.com/2011/11/f16_display_mod1.png?w=348&#038;h=234" alt="" width="348" height="234" /></a>That&#8217;s all &#8211; there still some quirks that should be polished and may be the script must be made some more general &#8211; like defining some variables at the beginning, but I&#8217;ll do that later. In general it just works, is quite simple to implement I think and finally the dock is out of my way <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/385/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/385/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/385/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=385&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2011/11/23/thinkpad-x220-and-ultrabase-3-docking-station/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/11/f16_display_mod1.png" medium="image">
			<media:title type="html">f16_display_mod</media:title>
		</media:content>
	</item>
		<item>
		<title>Thinkpad x220 &#8211; the (almost) perfect setup (Fedora 16)</title>
		<link>http://troshlyak.wordpress.com/2011/11/18/thinkpad-x220-the-almost-perfect-setup-fedora-16/</link>
		<comments>http://troshlyak.wordpress.com/2011/11/18/thinkpad-x220-the-almost-perfect-setup-fedora-16/#comments</comments>
		<pubDate>Fri, 18 Nov 2011 14:27:01 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[f16]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[ssd]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=300</guid>
		<description><![CDATA[So here I am &#8211; sitting in front of my new laptop &#8211; Lenovo Thinkpad X220. The date is November 8, 2011 which happens to be the release date of Fedora 16 codenamed &#8220;Jules Verne&#8221;. It&#8217;s 11:00pm, everybody are already asleep and it&#8217;s quite and peaceful in my home (thanks to my son that rarely [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=300&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://troshlyak.files.wordpress.com/2011/10/38490644_41f946c4f2_b.jpg"><img class="aligncenter size-full wp-image-316" title="38490644_41f946c4f2_b" src="http://troshlyak.files.wordpress.com/2011/10/38490644_41f946c4f2_b.jpg?w=580&#038;h=435" alt="" width="580" height="435" /></a></p>
<p>So here I am &#8211; sitting in front of my new laptop &#8211; <a title="Thinkpad X220 Tech Specs" href="http://www.lenovo.com/products/us/laptop/thinkpad/x-series/x220/x220_datasheet.pdf" target="_blank">Lenovo Thinkpad X220</a>. The date is November 8, 2011 which happens to be the release date of Fedora 16 codenamed &#8220;Jules Verne&#8221;. It&#8217;s 11:00pm, everybody are already asleep and it&#8217;s quite and peaceful in my home (thanks to my son that rarely happens <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  &#8211; it&#8217;s time to start with that perfect setup that I&#8217;ve had in my mind for quite some time now. I suppose that this is not going to be a short post &#8211; so if you are in same state of mind &#8211; thrilled, excited and willing to start that Fedora setup any minute now &#8211; this is the time to go grab a cup of coffee, tea or beer maybe <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  I&#8217;m going to describe all the specific things that I&#8217;ve done during the install (leaving the boring stuff behind <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2>The Hardware (4291-2WG)</h2>
<ul>
<li>Intel i5-2540M</li>
<li>1 x 4GB memory</li>
<li>12.5&#8221; HD Premium Display (the one with the IPS panel)</li>
<li>320GB 7200 HDD</li>
<li>80GB Intel mSATA SDD</li>
<li>Wireless &#8211; Intel 6205</li>
<li>Video &#8211; Intel HD 3000</li>
<li>720p webcam, fingerprint reader, bluethooth</li>
<li>9 cell battery</li>
<li>Thinkpad Ultrabase 3 + DVD Burner</li>
</ul>
<p>Some thoughts about the hardware &#8211; first of all I had some doubts about my choice, but after I&#8217;ve received the package &#8211; they are *all* gone. What where my main concerns:</p>
<ul>
<li>Display size would be too small &#8211; that turned out to be fine by me, but still I had to do some tricks to further &#8220;improve&#8221; it</li>
<li>Lack of USB3 ports &#8211; not a dealbreaker in the end as you can always stick an additional ExpressCard that sits flush in the laptop (like <a title="USB 3.0 ExpressCard" href="http://www.amazon.co.uk/StarTech-Flush-ExpressCard-SuperSpeed-Adapter/dp/B00535CMEE/ref=sr_1_6?ie=UTF8&amp;qid=1321305960&amp;sr=8-6">this</a> one) whenever you get the need of USB 3.0 speeds</li>
<li>The IPS panel would suffer from <a title="X220 Ghosting Problem" href="http://www.google.bg/url?sa=t&amp;rct=j&amp;q=x220%20faint%20ghosting&amp;source=web&amp;cd=1&amp;ved=0CCQQFjAA&amp;url=http%3A%2F%2Fforums.lenovo.com%2Ft5%2FX-Series-ThinkPad-Laptops%2FFaint-Ghosting-on-X220-IPS-screen%2Ftd-p%2F435201&amp;ei=I4jBTumqEsSE-wadmbCUBQ&amp;usg=AFQjCNG_-ZDPUM4jGTYKXqJC_ze44JEazA&amp;cad=rja">ghosting</a> &#8211; there is a huge thread about that, but the issue was actually addressed by Lenovo in the mid of August and after I&#8217;ve received mine I&#8217;ve even didn&#8217;t bother to check whether it has the new or old panel &#8211; the screen is (almost) perfect and is miles away from those TN panels. It has some bleeding from the bottom bezel though noticeable at boot time or at the console (when the screen is almost black), but that is not something that you&#8217;ll notice during your day to day work.</li>
</ul>
<p>One more remark about the hardware that I&#8217;ve choose &#8211; if you don&#8217;t have the option to order a customized device (like me) you can get all available options from the so called &#8220;tabook&#8221; &#8211; <a title="TA Book" href="http://www.lenovo.com/psref/pdf/tabook.pdf" target="_blank">Personal Systems Reference Lenovo® ThinkPad ® Notebooks</a>. Truly a must read if you are in a position of deciding what Thinkpad to buy.</p>
<h2>The Installation</h2>
<p>So, enough about the hardware itself &#8211; lets get it rolling. You&#8217;ll need a boot media first. A couple of options here, but as I wanted to go with the latest and greatest of the available technology I&#8217;ve decided to go with UEFI boot on the machine (I really wasn&#8217;t able to find any major benefits of using UEFI instead of BIOS BOOT, besides maybe the possibly faster boot times) with got me to the first part of this setup.</p>
<h3 style="padding-left:30px;">1. Preparing bootable media (USB Stick)</h3>
<p>I&#8217;ve decided to continue using 64bit OS despite the numerous problems that I had with some proprietary  software/packages, so I&#8217;ve downloaded the <a href="http://download.fedoraproject.org/pub/fedora/linux/releases/16/Fedora/x86_64/iso/Fedora-16-x86_64-netinst.iso">Fedora-16-x86_64-netinst.iso</a>. From the <a href="http://docs.fedoraproject.org/en-US/Fedora/16/html/Installation_Guide/Making_Minimal_Boot_Media.html" target="_blank">Fedora documentation</a>  &#8211; the are not UEFI bootable media by default &#8211; you&#8217;ll need the installation ISO file readily downloaded somewhere (on the preinstalled Windows 7 perhaps? or boot the Fedora Live CD image), mount it and extract the UEFI bootable image located under <code>/images/efidisk.img </code>on the iso itself.  The Network installation iso contains that file also so you can stick with it. After that you can put it on whatever USB stick you&#8217;ve got (the image is around 140MB) using dd:</p>
<p><pre class="brush: bash;">
mount -o loop /&lt;path&gt;/&lt;to&gt;/&lt;file&gt;.iso /mnt/cdrom

dd if=/mnt/cdrom/images/efidisk.img of=/dev/sdc #where /dev/sdc is your USB flash disk (be careful here!)

</pre></p>
<p style="padding-left:30px;">When this is finished the machine is ready to be rebooted.<strong></strong></p>
<p style="padding-left:30px;"><strong>REMARK: You&#8217;ll need to enter BIOS settings (F1) and select as boot method either only UEFI or at least select UEFI as preferred boot method. After that pressing F12 at boot time will allow you to select the USB stick as temporary boot device.<br />
</strong></p>
<h3 style="padding-left:30px;">2. Booting the installation</h3>
<p style="padding-left:30px;">Nothing special here &#8211; I used the Intel SSD of course for the system installation, creating EFI, BOOT and SYSTEM partitions. If everything is correct the Fedora installer will know that it was booted from UEFI and will create GPT table instead of MBR on the SSD, which will automatically be also aligned to the 2048 sector which is exactly at 1MB. To verify that, you can do the following. First select &#8220;Review and modify partitioning layout&#8221; during the installation setup and then check that the EFI partition is created:</p>
<p style="padding-left:30px;text-align:center;"><a href="http://troshlyak.files.wordpress.com/2011/11/f16_disks_mod.png"><img class="size-full wp-image-331 aligncenter" title="f16_disks" src="http://troshlyak.files.wordpress.com/2011/11/f16_disks_mod.png?w=580" alt=""   /></a></p>
<p style="padding-left:30px;text-align:center;"><a href="http://troshlyak.files.wordpress.com/2011/11/f16_disks3_mod1.png"><img class="aligncenter size-full wp-image-345" title="f16_disks3_mod" src="http://troshlyak.files.wordpress.com/2011/11/f16_disks3_mod1.png?w=580" alt=""   /></a></p>
<p style="padding-left:30px;text-align:left;">You could also verify the alignment and the partition table format from command line after the disk was formatted:</p>
<p><pre class="brush: bash;">
[root@yggdrasil ~]# parted /dev/sdb
GNU Parted 3.0
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit s
(parted) print
Model: ATA INTEL SSDMAEMC08 (scsi)
Disk /dev/sdb: 156301488s
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start     End         Size        File system  Name                  Flags
1      2048s     5974015s    5971968s    fat32        EFI System Partition  boot
2      5974016s  6998015s    1024000s    ext4
3      6998016s  156301311s  149303296s                                     lvm
</pre></p>
<p style="padding-left:30px;text-align:left;">What packages are you going to install is entirely a matter of personal taste, but for me &#8211; the most important was to switch the default Desktop Environment that is going to be installed from GNOME to KDE. Also I&#8217;ve removed almost all packages in the <strong><em>Base System -&gt; Hardware Support</em></strong> section that were not needed anyway on my system.</p>
<div class="navigation" style="text-align:right;"><a title="Page 2" href="http://troshlyak.wordpress.com/?p=300&amp;page=2">NEXT PAGE</a></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/300/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/300/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/300/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=300&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2011/11/18/thinkpad-x220-the-almost-perfect-setup-fedora-16/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/10/38490644_41f946c4f2_b.jpg" medium="image">
			<media:title type="html">38490644_41f946c4f2_b</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/11/f16_disks_mod.png" medium="image">
			<media:title type="html">f16_disks</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/11/f16_disks3_mod1.png" medium="image">
			<media:title type="html">f16_disks3_mod</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing N900 GPS locking</title>
		<link>http://troshlyak.wordpress.com/2011/10/27/fixing-n900-gps-locking/</link>
		<comments>http://troshlyak.wordpress.com/2011/10/27/fixing-n900-gps-locking/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 20:09:23 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Maemo]]></category>
		<category><![CDATA[gps]]></category>
		<category><![CDATA[lock]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=303</guid>
		<description><![CDATA[The Problem So as I mentioned in my earlier post I had lots of troubles getting GPS locking lately on my N900 which I regularly use for tracking when running. After switching and trying all apps that I was able to find &#8211; GPS Recorder, GPS desktop widget, Marble, eCoach and OVI Maps I&#8217;ve come [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=303&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://troshlyak.files.wordpress.com/2011/10/52849909_ca05c7a164_b.jpg"><img class="aligncenter size-full wp-image-304" title="52849909_ca05c7a164_b" src="http://troshlyak.files.wordpress.com/2011/10/52849909_ca05c7a164_b-e1319744618619.jpg?w=580&#038;h=385" alt="" width="580" height="385" /></a></p>
<h2></h2>
<h2>The Problem</h2>
<p>So as I mentioned in my <a title="Fixing Marble KML files" href="http://troshlyak.wordpress.com/2011/10/11/fixing-marbles-kml-files/">earlier</a> post I had lots of troubles getting GPS locking lately on my N900 which I regularly use for tracking when running. After switching and trying all apps that I was able to find &#8211; GPS Recorder, GPS desktop widget, Marble, eCoach and OVI Maps I&#8217;ve come to the conclusion that the problems is not in the applications, but rather the GPS device. Initially my thoughts were that it was completely broken as hardware, as I&#8217;ve used it quite often and it was always working as expected until recently when it completely failed on me.</p>
<h2>The Fix</h2>
<p>In the end after lots of searching I&#8217;ve found a fix that proved me wrong that it is HW issue, but rather a software one. The only thing that I&#8217;ve done was to switch the server used by the A-GPS from the original <em><strong>supl.nokia.com</strong></em> to <em><strong>supl.google.com</strong></em> &#8211; works like a charm, locks in a matter of seconds &#8211; even inside my apartment <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  Just go to Settings -&gt; Location on your device and change the <em><strong>Location server</strong></em></p>
<p style="text-align:center;"><a href="http://troshlyak.files.wordpress.com/2011/10/screenshot-20111027-230700.png"><img class="aligncenter size-full wp-image-308" title="Screenshot-20111027-230700" src="http://troshlyak.files.wordpress.com/2011/10/screenshot-20111027-230700.png?w=580" alt=""   /></a></p>
<p>Well &#8211; finally I&#8217;m back on track with eCoach &#8230;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/303/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/303/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/303/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=303&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2011/10/27/fixing-n900-gps-locking/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/10/52849909_ca05c7a164_b-e1319744618619.jpg" medium="image">
			<media:title type="html">52849909_ca05c7a164_b</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/10/screenshot-20111027-230700.png" medium="image">
			<media:title type="html">Screenshot-20111027-230700</media:title>
		</media:content>
	</item>
		<item>
		<title>Fixing Marble KML files</title>
		<link>http://troshlyak.wordpress.com/2011/10/11/fixing-marbles-kml-files/</link>
		<comments>http://troshlyak.wordpress.com/2011/10/11/fixing-marbles-kml-files/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 17:00:38 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Maemo]]></category>
		<category><![CDATA[Running]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[n900]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[fremantle]]></category>
		<category><![CDATA[running]]></category>
		<category><![CDATA[tracking]]></category>
		<category><![CDATA[gpx]]></category>
		<category><![CDATA[kml]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=232</guid>
		<description><![CDATA[So today I&#8217;ve woke up and went for my morning run. I&#8217;ve decided to use Marble for tracking on my N900 this time, as eCoach has failed me the couple of times and was not able to produce proper tracks. Everything went smoothly and I&#8217;ve got a nice track, which I saved after I&#8217;ve finished. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=232&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p style="text-align:center;"><img class="size-full wp-image-251 aligncenter" style="border-color:initial;border-style:initial;" title="running" src="http://troshlyak.files.wordpress.com/2011/10/running.jpg?w=580" alt=""   /></p>
<p>So today I&#8217;ve woke up and went for my morning run. I&#8217;ve decided to use Marble for tracking on my N900 this time, as eCoach has failed me the couple of times and was not able to produce proper tracks. Everything went smoothly and I&#8217;ve got a nice track, which I saved after I&#8217;ve finished. Marble supports only KML files, so when I got home, I knew I must convert it to GPX prior to uploading it to <a title="Map My Tracks website" href="http://www.mapmytracks.com" target="_blank">mapmytracks.com</a> (one of the best sites I&#8217;ve seen for analyzing your tracking data).</p>
<h2><strong><span class="Apple-style-span" style="font-size:20px;">The conversion</span></strong></h2>
<div>
<p>Using guidelines from the <a href="http://userbase.kde.org/Marble/Tracking" target="_blank">Marble/Tracking</a> page I&#8217;ve used the following command:</p>
<p><pre class="brush: bash;">
$ gpsbabel -i kml -f running-2011-10-11_071712.kml -o gpx -f running-2011-10-11_071712.gpx
</pre></p>
<p>Please bare in mind that I&#8217;m running this on a Fedora 14 install which misses the gpsbabel GUI. I was able to find packages for F15/F16 so if you are using one of those you should have it in the Fedora Repositories.</p>
<p>Having the file converted I&#8217;ve tried to upload it to <a title="Map My Tracks website" href="http://www.mapmytracks.com" target="_blank">mapmytracks.com</a>, but this is where the things got ugly. The following error was thrown at me:</p>
<pre><strong>Warning</strong>: Division by zero in <strong>/var/www/vhosts/mapmytracks.com/httpdocs/assets/php/modules/classes/gpx.php</strong> on line <strong>103</strong>
<strong>Warning</strong>: Division by zero in <strong>/var/www/vhosts/mapmytracks.com/httpdocs/assets/php/modules/classes/gpx.php</strong> on line <strong>103</strong>
<strong>Warning</strong>: Division by zero in <strong>/var/www/vhosts/mapmytracks.com/httpdocs/assets/php/modules/classes/gpx.php</strong> on line <strong>103</strong></pre>
<p><strong><br />
</strong></p>
<h2><strong><span class="Apple-style-span" style="font-family:Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;font-size:20px;line-height:19px;white-space:normal;">The Problem</span></strong></h2>
<p>After short investigation I&#8217;ve found that my other (eCoach) gpx tracks were having the attribute for each trackpoint () and the converted file was missing them. The google search resulted in nothing of a help that would allow me to inject the timestamps inside this trackpoints, so the logical continuation was to do it myself <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<h2><strong>The Fix</strong></h2>
<p>For the purpose of this task, a simple perl script was created. You&#8217;ll need <em><strong>Date::Parse</strong></em> perl module (<em><strong>perl-TimeDate</strong></em> package on Fedora 14):</p>
<p><pre class="brush: perl;">
#!/usr/bin/perl -w

use Date::Parse;
use POSIX qw/strftime/;

# read the input file
$num_args = $#ARGV + 1;
if ($num_args != 1) {
  print &quot;\nUsage: $0 &lt;input_file.gpx&gt;\n&quot;;
  exit;
}

# if you are consolidating points in gpsbabel, change this accordingly
# by default marble writes points every 1 second
my $timeStep = 1;

my $inFile = $ARGV[0];
open FILE, &quot;&lt; $inFile&quot; or die &quot;Can't open $inFile : $!&quot;;

# calculate the timezone
my $tz = strftime(&quot;%z&quot;, localtime(time()));
$tz =~ s/(\d{2})(\d{2})/$1:$2/;
my $unixTime = 0;

while(&lt;FILE&gt;){
  print $_;
  if(/&lt;time&gt;(.*)Z&lt;\/time&gt;/){
    # get the starting time
    $unixTime = str2time($1);
  }
  if(/&lt;ele&gt;/){
    # print ISO8601 formated time
    print &quot;  &lt;time&gt;&quot; . strftime(&quot;%Y-%m-%dT%H:%M:%S&quot;, localtime($unixTime)) . $tz . &quot;&lt;/time&gt;\n&quot;;
    $unixTime += $timeStep;
  }
}
close FILE
</pre></p>
<p>The only argument that this script takes is the input gpx file, generated with <strong><em>gpsbabel</em></strong> and the output is thrown on <em><strong>stdout</strong></em>. What that script does is it takes the initial time when the gpx file was generated and injects <em><strong>&lt;time&gt;&lt;/time&gt;</strong></em> values from it, increasing it after every trackpoint with one second. Of course this is not perfect as the timestamps are shifted in time and are not the real values, but at least that allows me to insert the file and analyze it on <a href="http://www.mapmytracks.com/explore/activity/285679">MapMyTracks</a>. Maybe I&#8217;ll post update on that script that will take also as input the KML file, where the time when the files was <strong>saved</strong> is used, and reverse it back to the first trackpoint. That should give more accurate gpx files.</p>
<p>It seems that I&#8217;ll be using this half-baked solution for uploading my tracks, as it works and generates pretty detailed track (one trackpoint per second), unlike eCoach that does this at best every 2 seconds (and does not work on my device <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> . Here is the final result on <a href="http://www.mapmytracks.com/explore/activity/285679">MapMyTracks</a>.</p>
<p>&nbsp;</p>
<p>EDIT: I&#8217;ve found what&#8217;s <a title="Fixing N900 GPS locking" href="http://troshlyak.wordpress.com/2011/10/27/fixing-n900-gps-locking/">wrong with eCoach and how to fix it</a></p>
</div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/232/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/232/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/232/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=232&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2011/10/11/fixing-marbles-kml-files/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/10/running.jpg" medium="image">
			<media:title type="html">running</media:title>
		</media:content>
	</item>
		<item>
		<title>Add some fun to your KDE desktop</title>
		<link>http://troshlyak.wordpress.com/2011/10/10/add-some-fun-to-your-desktop/</link>
		<comments>http://troshlyak.wordpress.com/2011/10/10/add-some-fun-to-your-desktop/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 12:59:41 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[KDE]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[icons]]></category>
		<category><![CDATA[wallpaper]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=218</guid>
		<description><![CDATA[So today I&#8217;ve got a little bored of my o-so-serious-monochrome-desktop and decided to change it a little bit. And here I am surfing my best site for desktop &#8220;candies&#8221; &#8211; kde-look.org. The icons First I&#8217;ve found some pretty good-looking and as it seems quite complete set of icons. Of course I&#8217;ve installed them directly through [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=218&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So today I&#8217;ve got a little bored of my o-so-serious-monochrome-desktop and decided to change it a little bit. And here I am surfing my best site for desktop &#8220;candies&#8221; <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  &#8211; <a title="kde-look.org" href="http://www.kde-look.org" target="_blank">kde-look.org</a>.</p>
<h2>The icons</h2>
<p>First I&#8217;ve found some pretty good-looking and as it seems quite complete set of <a title="KFraenza Icons" href="http://kde-look.org/content/show.php/KFaenza?content=143890" target="_blank">icons</a>. Of course I&#8217;ve installed them directly through systemsettings-&gt;Application Appearance-&gt;Icons &#8211; it is as easy as that. Just search for <em>kfraenza</em>. Here is a sample screenshot from my desktop with the this iconset:</p>
<p style="text-align:center;"><a href="http://troshlyak.files.wordpress.com/2011/10/wallpaper_config11.jpeg"><img class="aligncenter size-full wp-image-223" title="wallpaper_config1" src="http://troshlyak.files.wordpress.com/2011/10/wallpaper_config11.jpeg?w=580" alt=""   /></a></p>
<p>They may resemble some other OS to some extent, but I do not care &#8211; they are nice in the end.</p>
<h2>The wallpaper</h2>
<p>After that I&#8217;ve searched for something different and new and found one little nifty plasmoid package that makes wonders <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  &#8211; <a title="Wallpaper clock on kde-look.org" href="http://kde-look.org/content/show.php/Wallpaper+Clock?content=119563" target="_blank">The Wallpaper Clock plasmoid</a>. What this plasmoid is supposed to do is to sit in the background as a sort of dynamic wallpaper showing current date and time. It has lots and lots of themes and all of them looking great.</p>
<p>The plasmoit itself depends on <em>plasma-scriptengine-python</em> (as I&#8217;m installing this on Fedora 14), and you&#8217;ll need to install it if you don&#8217;t have it already. Initially I&#8217;ve tried installing the package which I&#8217;ve downloaded through the plasmoid GUI (&#8220;install from local file&#8221;), but that failed miserably. So I did it the old way:</p>
<p><pre class="brush: bash;">
$ plasmapkg -r clock # removing the plugin that failed
$ plasmapkg -i clock.plasmoid
</pre></p>
<p>EDIT: I&#8217;ve done this on another Fedora 14 install and this time I&#8217;ve used the &#8220;Download new plasma widgets&#8221; searched for &#8220;wallpaper clock&#8221; and directly installed it &#8211; it worked like a charm. Still if you have problems, you can try the manual install. You can verify that everything is working as expected by running it manually in separate window:</p>
<p><pre class="brush: bash;">
$ plasmawallpaperviewer --wallpaper clock
</pre></p>
<p style="text-align:center;">
/EDIT</p>
<p>And that&#8217;s all. After that you can find it sitting under your wallpaper configuration:</p>
<p style="text-align:left;"><a href="http://troshlyak.files.wordpress.com/2011/10/wallpaper_config1.jpeg"><img class="size-full wp-image-220 aligncenter" title="wallpaper_config" src="http://troshlyak.files.wordpress.com/2011/10/wallpaper_config1.jpeg?w=580" alt=""   /></a>As you&#8217;ll see adding themes is completely integrated into the plasmoid configuration itself (under &#8220;Get New Wallpapers&#8221;) and  are very fresh and fun. Please note that some of the themes are only for registered users.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/218/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/218/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/218/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=218&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2011/10/10/add-some-fun-to-your-desktop/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/10/wallpaper_config11.jpeg" medium="image">
			<media:title type="html">wallpaper_config1</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2011/10/wallpaper_config1.jpeg" medium="image">
			<media:title type="html">wallpaper_config</media:title>
		</media:content>
	</item>
		<item>
		<title>Mass changing TTL values in named</title>
		<link>http://troshlyak.wordpress.com/2011/04/05/mass-changing-ttl-values-in-named/</link>
		<comments>http://troshlyak.wordpress.com/2011/04/05/mass-changing-ttl-values-in-named/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 14:01:19 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[named]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=207</guid>
		<description><![CDATA[This is mostly a note to self &#8211; if you need to mass change the TTL value for a zone in named, when for example you need to change the IPv4 addressing scheme for your DNS servers, here is a simple way to do it. The script assumes that you have the "; Serial" comment [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=207&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is mostly a note to self &#8211; if you need to mass change the TTL value for a zone in named, when for example you need to change the IPv4 addressing scheme for your DNS servers, here is a simple way to do it. The script assumes that you have the <code>"; Serial"</code> comment after the serial number of the zone. The script runs inside the primary zone folder:</p>
<p><pre class="brush: bash;">
# cat changettl 
#!/bin/bash

for z in $(ls -1| grep -v jnl); do 
        echo '$TTL 600' &gt; newzone
        tail -n +2 $z | sed -r 's/^(\s+).*serial.*$/\12011040503 ; Serial/i' &gt;&gt; newzone
        mv newzone $z
done

</pre></p>
<p>It is quite dirty but works for me.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/207/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/207/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/207/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=207&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2011/04/05/mass-changing-ttl-values-in-named/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>
	</item>
		<item>
		<title>Webex on 64bit Fedora 13</title>
		<link>http://troshlyak.wordpress.com/2010/08/26/webex-on-64bit-fedora-13/</link>
		<comments>http://troshlyak.wordpress.com/2010/08/26/webex-on-64bit-fedora-13/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 10:00:54 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[webex]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=198</guid>
		<description><![CDATA[Have you ever tried to join webex session through 64bit firefox? Well &#8211; in case you&#8217;ve tried may be you&#8217;ve got something along the lines: OpenJDK Runtime Environment (IcedTea6 1.8.1) (fedora-42.b18.fc13-x86_64) OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode) applet start applet start ######### leaveUrl=https://vmwareeducation.webex.com/cmp0306lb/webcomponents/docshow/docshow.do?siteurl=vmwareeducation&#38;jvm=1.6.0_18&#38;isJavaClient=true applet return java.lang.NullPointerException at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649) at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270) at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82) java.lang.RuntimeException: Failed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=198&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Have you ever tried to join webex session through 64bit firefox? Well &#8211; in case you&#8217;ve tried may be you&#8217;ve got something along the lines:</p>
<p><code></p>
<div id="_mcePaste">OpenJDK Runtime Environment (IcedTea6 1.8.1) (fedora-42.b18.fc13-x86_64)</div>
<div id="_mcePaste">OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)</div>
<div id="_mcePaste">applet start</div>
<div id="_mcePaste">applet start</div>
<div id="_mcePaste">######### leaveUrl=https://vmwareeducation.webex.com/cmp0306lb/webcomponents/docshow/docshow.do?siteurl=vmwareeducation&amp;jvm=1.6.0_18&amp;isJavaClient=true</div>
<div id="_mcePaste">applet return</div>
<div id="_mcePaste">java.lang.NullPointerException</div>
<div id="_mcePaste">at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)</div>
<div id="_mcePaste">at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)</div>
<div id="_mcePaste">at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)</div>
<div id="_mcePaste">java.lang.RuntimeException: Failed to handle message: width 1 height 1 for instance 1</div>
<div id="_mcePaste">at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:660)</div>
<div id="_mcePaste">at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)</div>
<div id="_mcePaste">at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)</div>
<div id="_mcePaste">Caused by: java.lang.NullPointerException</div>
<div id="_mcePaste">at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)</div>
<div id="_mcePaste">... 2 more</div>
<div id="_mcePaste">Java downloader 2.5</div>
<div id="_mcePaste">Os Name: Linux</div>
<div id="_mcePaste">Netscape user.dir : /home/tushe</div>
<div id="_mcePaste">Netscape installation path11: /home/tushe</div>
<div id="_mcePaste">get:https://vmwareeducation.webex.com/client/T27LB/linux/nbr/npatgpc.xxx</div>
<div id="_mcePaste">Download finish^M</div>
<div id="_mcePaste">/bin/chmod 755 /home/tushe/.mozilla/plugins/npatgpc.so</div>
<div id="_mcePaste">LoadPlugin: failed to initialize shared library /home/tushe/.mozilla/plugins/npatgpc.so [/home/tushe/.mozilla/plugins/npatgpc.so: wrong ELF class: ELFCLASS32]</div>
<p></code></p>
<p><code>OpenJDK Runtime Environment (IcedTea6 1.8.1) (fedora-42.b18.fc13-x86_64)OpenJDK 64-Bit Server VM (build 14.0-b16, mixed mode)applet startapplet start######### leaveUrl=https://vmwareeducation.webex.com/cmp0306lb/webcomponents/docshow/docshow.do?siteurl=vmwareeducation&amp;jvm=1.6.0_18&amp;isJavaClient=trueapplet returnjava.lang.NullPointerException        at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)        at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)        at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)java.lang.RuntimeException: Failed to handle message: width 1 height 1 for instance 1        at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:660)        at sun.applet.PluginStreamHandler.handleMessage(PluginStreamHandler.java:270)        at sun.applet.PluginMessageHandlerWorker.run(PluginMessageHandlerWorker.java:82)Caused by: java.lang.NullPointerException        at sun.applet.PluginAppletViewer.handleMessage(PluginAppletViewer.java:649)        ... 2 moreJava downloader 2.5Os Name: LinuxNetscape user.dir : /home/tusheNetscape installation path11: /home/tusheget:https://vmwareeducation.webex.com/client/T27LB/linux/nbr/npatgpc.xxxDownload finish^M<br />
/bin/chmod 755 /home/tushe/.mozilla/plugins/npatgpc.soLoadPlugin: failed to initialize shared library /home/tushe/.mozilla/plugins/npatgpc.so [/home/tushe/.mozilla/plugins/npatgpc.so: wrong ELF class: ELFCLASS32]</code></p>
<p>inside your .xsession-errrors log file.</p>
<p>That is because webex tries to download and install their plugin and start it in the firefox session, but as it is only 32bit and it cannot be wrapped by the nspluginwrapper &#8211; it fails.</p>
<p>I&#8217;ve tried to manually install it and wrap it, but the java applet apparently does not have checks whether the plugin is already installed and tries the same procedure again and again.</p>
<p>So at the end I&#8217;ve managed to fix this with these tree simple commands:</p>
<p><code># setarch i686 yum install firefox</code> (this install firefox as i686 binary and pulls all its 32bit dependencies)</p>
<p><code># yum reinstall firefox</code> (this reinstalls the original 64bit firefox)</p>
<p><code># setarch i686 firefox</code> (this instructs firefox script to load the 32bit libraries)</p>
<p>And there you go &#8211; the webex plugin load like a charm!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/198/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/198/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/198/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=198&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2010/08/26/webex-on-64bit-fedora-13/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>
	</item>
		<item>
		<title>N900, Erminig and Google Calendar &#8211; the battle for the battery</title>
		<link>http://troshlyak.wordpress.com/2010/05/28/n900-erminig-and-google-calendar-the-battle-for-the-battery/</link>
		<comments>http://troshlyak.wordpress.com/2010/05/28/n900-erminig-and-google-calendar-the-battle-for-the-battery/#comments</comments>
		<pubDate>Fri, 28 May 2010 12:47:02 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Maemo]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=182</guid>
		<description><![CDATA[The latest N900 update (PR1.2) is already history &#8211; some are happy (like me) others are completely devastated. I, like many others, decided to make full reset of the device, as was abusing it allot. This meant that the new firmware together with the latest eMMC contents was reflashed. After that I&#8217;ve started fresh to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=182&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The latest N900 update (PR1.2) is already history &#8211; some are happy (like me) others are completely devastated. I, like many others, decided to make full reset of the device, as was abusing it allot. This meant that the new firmware together with the latest eMMC contents was reflashed. After that I&#8217;ve started fresh to reconfigure my device, and following the KISS approach, I wanted to restore only the apps that I really use. Having that in mind there was one thing that really bugged me &#8211; MfE. It was used only to sync my Google Calendars through <a href="https://www.nuevasync.com/" target="_blank">nyevasync</a> and in order to be always in sync I had to enable autoconnect WiFi &#8211; that way the calendar was able to sync on the given interval of time. But staying always online drains the battery allot. Maybe this is the biggest power drain source together with the 3G connectivity. Clearly a solution that connects-syncs-disconnects would be greatly appreciated. Below you&#8217;ll find the way I did it.</p>
<p>The first thing I&#8217;ve needed was an alternative to MfE  - I don&#8217;t like the sync-only-one calendar with google and the fact that I have a Exchange Mail account that just sits in my Modest configuration. As always the maemo community helped and thanks, thanks, thanks to lorelei from maemo.org &#8211; I was able to use <a href="http://maemo.org/packages/view/erminig/" target="_blank">Erminig</a> for that purpose. The application in the current stage is quite feature complete IMHO. It offers syncing in both directions for local calendars to/from Google calendars and supports *multiple* calendars. The other great thing about Erminig is that you can sync from command line <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  which opens the path to quite simple script implementing the connect-sync-disconnect philosophy. The script itself is quite simple. It respects the situations in which the WiFi was already active &#8211; it drops the connection only when it was initiated from the script itself:</p>
<p><strong>/opt/mybin/synccal</strong></p>
<p><pre class="brush: bash;">
#!/bin/sh
# Autor: Todor Tsankov (2010)
#
# 2010-05-28 - initial release

RETRIES=3
CONNECTED=false
DROPCONN=false

# check for existing wifi connectivity
if [ &quot;$(/sbin/route | awk '/au/ {print $1}')&quot; == &quot;default&quot; ]; then
	CONNECTED=true
else
  for i in $(seq 1 $RETRIES); do
    # try to connect to any known wifi
    run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:&quot;[ANY]&quot; uint32:0
    sleep 20
    if [ &quot;$(/sbin/route | awk '/au/ {print $1}')&quot; == &quot;default&quot; ]; then
      CONNECTED=true
      DROPCONN=true
      break
    fi
  done
fi

if [ &quot;$CONNECTED&quot; == &quot;true&quot; ]; then
  # sync erminig if having connectivity
  /usr/bin/erminig -a

  # sync MfE
  # run-standalone.sh dbus-send --print-reply --type=method_call --session --dest=com.nokia.asdbus /com/nokia/asdbus com.nokia.asdbus.fullSync

  sleep 5

  # drop the wifi connection if it was initiated by this script (saves battery)
  if [ &quot;$DROPCONN&quot; == &quot;true&quot; ]; then
    run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
  fi
fi
</pre></p>
<p>All that is left now is to save that script somewhere and invoke it in certain interval of time &#8211; how you&#8217;ll do it &#8211; it&#8217;s up to you. You can invoke it manually through X-terminal and tools like &#8220;Desktop Command Widget&#8221; or automate it with tools like <a href="http://maemo.org/packages/view/alarmed/" target="_blank">Alarmed</a> and <a href="http://wiki.maemo.org/Fcron" target="_blank">fcron</a>.</p>
<p>MfE comment: As you can see the MfE can be forced to sync from command line also, so if you prefer it, but still would like to minimize your wifi usage and optimize battery life &#8211; just comment erminig sync line and uncomment the MfE one.</p>
<p>Warning: the script is it&#8217;s infancy and although it makes some state checks it may misbehave.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=182&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2010/05/28/n900-erminig-and-google-calendar-the-battle-for-the-battery/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>
	</item>
		<item>
		<title>Maemo5 Catorise побългаряване :-)</title>
		<link>http://troshlyak.wordpress.com/2010/03/16/maemo5-catorise-%d0%bf%d0%be%d0%b1%d1%8a%d0%bb%d0%b3%d0%b0%d1%80%d1%8f%d0%b2%d0%b0%d0%bd%d0%b5/</link>
		<comments>http://troshlyak.wordpress.com/2010/03/16/maemo5-catorise-%d0%bf%d0%be%d0%b1%d1%8a%d0%bb%d0%b3%d0%b0%d1%80%d1%8f%d0%b2%d0%b0%d0%bd%d0%b5/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 14:32:12 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Maemo]]></category>
		<category><![CDATA[fremantle]]></category>
		<category><![CDATA[localization]]></category>
		<category><![CDATA[maemo5]]></category>
		<category><![CDATA[n900]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=172</guid>
		<description><![CDATA[След като вече имаме сравнително пълен превод на платформата която ползва N900 &#8211; Maemo5, реших да се занимая с няколко неща около локализацията които силно ме дразнеха. На първо място това беше привидно неподреденото меню което генерираше Catorise. Самото приложение е страхотно и това което най-много ми харесва е факта че всички инсталирани приложения автоматично [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=172&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>След като вече имаме сравнително пълен превод на платформата която ползва N900 &#8211; Maemo5, реших да се занимая с няколко неща около локализацията които силно ме дразнеха.</p>
<p>На първо място това беше привидно неподреденото меню което генерираше <a href="http://maemo.org/packages/view/catorise/" target="_blank">Catorise</a>. Самото приложение е страхотно и това което най-много ми харесва е факта че всички инсталирани приложения автоматично се сортират, спрямо категорията в която ги е поставил техния автор (т.е. спрямо категорията им в „Приложения“). За разлика от Catorise, MyMenu изглежда с всяка версия обновява собствен списък с приложенията, които се категоризират по някакъв начин &#8211; нещо което не ми изглежда толкова здравословно за поддържане <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Хаоса в генерираното меню се дължеше на факта, че категориите/приложенията в него се сортират по имената на файловете който го формират, а не по техния превод. Та след няколко <a href="https://bugs.maemo.org/show_bug.cgi?id=9420" target="_blank">съобщения</a> за <a href="https://bugs.maemo.org/show_bug.cgi?id=9418" target="_blank">бъгове</a>, недълга комуникация с автора на приложението и няколко кръпки, във версия 0.8.0 вече генерирането на менюто с категориите не изглежда толкова хаотично <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  и в момента изглежда така (поне на моята Nokia)</p>

<a href='http://troshlyak.wordpress.com/2010/03/16/maemo5-catorise-%d0%bf%d0%be%d0%b1%d1%8a%d0%bb%d0%b3%d0%b0%d1%80%d1%8f%d0%b2%d0%b0%d0%bd%d0%b5/screenshot-20100316-160744/' title='Screenshot-20100316-160744'><img data-attachment-id='173' data-orig-size='800,480' data-liked='0'width="150" height="90" src="http://troshlyak.files.wordpress.com/2010/03/screenshot-20100316-160744.png?w=150&#038;h=90" class="attachment-thumbnail" alt="Screenshot-20100316-160744" title="Screenshot-20100316-160744" /></a>
<a href='http://troshlyak.wordpress.com/2010/03/16/maemo5-catorise-%d0%bf%d0%be%d0%b1%d1%8a%d0%bb%d0%b3%d0%b0%d1%80%d1%8f%d0%b2%d0%b0%d0%bd%d0%b5/screenshot-20100316-160809/' title='Screenshot-20100316-160809'><img data-attachment-id='174' data-orig-size='800,480' data-liked='0'width="150" height="90" src="http://troshlyak.files.wordpress.com/2010/03/screenshot-20100316-160809.png?w=150&#038;h=90" class="attachment-thumbnail" alt="Screenshot-20100316-160809" title="Screenshot-20100316-160809" /></a>

<p>Допълнение:</p>
<p>С излизането на последното обновление за N900 &#8211; PR1.2, поради факта че е добавена възможност да се подреждат ръчно иконите в менюто, генерираното от Catorise меню не се подрежда правилно спрямо превода на категориите. Надявам се скоро да ми остане време и да успея да помогна с отстраняването на този проблем.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/172/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/172/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/172/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=172&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2010/03/16/maemo5-catorise-%d0%bf%d0%be%d0%b1%d1%8a%d0%bb%d0%b3%d0%b0%d1%80%d1%8f%d0%b2%d0%b0%d0%bd%d0%b5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2010/03/screenshot-20100316-160744.png?w=150" medium="image">
			<media:title type="html">Screenshot-20100316-160744</media:title>
		</media:content>

		<media:content url="http://troshlyak.files.wordpress.com/2010/03/screenshot-20100316-160809.png?w=150" medium="image">
			<media:title type="html">Screenshot-20100316-160809</media:title>
		</media:content>
	</item>
		<item>
		<title>Receiving static routes through DHCP in Fedora 12</title>
		<link>http://troshlyak.wordpress.com/2010/02/23/receiving-static-routes-through-dhcp-in-fedora-12/</link>
		<comments>http://troshlyak.wordpress.com/2010/02/23/receiving-static-routes-through-dhcp-in-fedora-12/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 11:49:53 +0000</pubDate>
		<dc:creator>Todor Tsankov</dc:creator>
				<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[dhclient]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[static-routes]]></category>

		<guid isPermaLink="false">http://troshlyak.wordpress.com/?p=141</guid>
		<description><![CDATA[So, today I had this very simple problem &#8211; to add static route to a certain network on my laptop It really is as simple as: ip route add network/mask via gateway But as I&#8217;m quite lazy, to add this every time I need access to that network (the laptop is using NetworkManager + DHCP), [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=141&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, today I had this very simple problem &#8211; to add static route to a certain network on my laptop <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  It really is as simple as:</p>
<pre><strong>ip route add network/mask via gateway</strong></pre>
<p>But as I&#8217;m quite lazy, to add this every time I need access to that network (the laptop is using NetworkManager + DHCP), I&#8217;ve decided to push this config through the DHCP server.</p>
<p>Here started the funny part &#8211; it seems that at this point this is not so trivial and you need to make modifications to <strong>BOTH </strong>the server and the client.</p>
<h2>The Server</h2>
<p>Let&#8217;s start with the server as this was the easy part. The only thing that is needed there is to add an DHCP option 121. In my case, as I&#8217;m using <strong>dnsmasq</strong>, this was the relevant option that should be added in <strong><em>/etc/dnsmasq.conf</em></strong>:</p>
<pre><strong>dhcp-option=121,10.10.0.0/24,172.16.1.100</strong></pre>
<p>This option defines all classless static routes that will be advertised by the DHCP server. If you need more than one route, the above can be changed like this:</p>
<pre><strong>dhcp-option=121,10.10.0.0/24,172.16.1.100,192.168.1.0/24,172.16.1.200</strong></pre>
<h2>The Client</h2>
<p>Now let&#8217;s go on the client side. There seems to be ALLOT of misunderstandings between <strong>NetworkManager</strong> and <strong>dhclient</strong> configurations. I took me quite a lot of time to figure it out, where what should be changed in order the NetworkManager to get the proper configuration from dhclient.</p>
<h3><span style="font-weight:normal;font-size:13px;">The first thing that should be done is to inform dhclient that you need this DHCP option 121 requested from the server. In order this  configuration to be picked up from NetworkManager also, you&#8217;ll have to edit (most probably create) <strong><em>/etc/dhclient-eth0.conf</em></strong>, where eth0 is the interface where the static routes should be added:</span></h3>
<pre><strong>option classless-routes code 121 = array of unsigned integer 8;</strong>
<strong>script "/usr/local/sbin/dhclient-script-networkmanager";</strong>
<strong>also request classless-routes;</strong></pre>
<p>Note, that adding this config to <strong><em>/etc/dhclient.conf</em><span style="font-weight:normal;"> didn&#8217;t work for me. NM picked the config after the file was moved to </span><em>/etc/dhclient-eth0.conf</em><span style="font-weight:normal;">.</span></strong></p>
<p><strong><span style="font-weight:normal;">So now, the server is ready to send static routes, the client is ready and is hopefully at this point receiving these routes. But, but this by itself does not do anything to modify the routing table. You&#8217;ll need to add </span><span style="font-weight:normal;"><em>/etc/dhcp/dhcp-exit-hook</em></span><span style="font-weight:normal;"> file for </span>dhclient,</strong> that will parse the DHCP option 121. I found how this could be done <a href="http://ignore-your.tv/2009/07/17/distributing-static-routes-with-dhcp/" target="_blank">here on this blog</a>. You can copy the file from there, or below here:</p>
<p><pre class="brush: bash;">
#!/bin/bash
#
# /etc/dhcp/dhclient-exit-hooks
#
# This file is called from /sbin/dhclient-script after a DHCP run.
#
#
# parse_option_121:
# @argv: the array contents of DHCP option 121, separated by spaces.
# @returns: a colon-separated list of arguments to pass to /sbin/ip route
#

function parse_option_121() {
result=&quot;&quot;
while [ $# -ne 0 ]; do
mask=$1
shift
# Is the destination a multicast group?

if [ $1 -ge 224 -a $1 -lt 240 ]; then
multicast=1
else
multicast=0
fi

# Parse the arguments into a CIDR net/mask string
if [ $mask -gt 24 ]; then
destination=&quot;$1.$2.$3.$4/$mask&quot;
shift; shift; shift; shift
elif [ $mask -gt 16 ]; then
destination=&quot;$1.$2.$3.0/$mask&quot;
shift; shift; shift
elif [ $mask -gt 8 ]; then
destination=&quot;$1.$2.0.0/$mask&quot;
shift; shift
else
destination=&quot;$1.0.0.0/$mask&quot;
shift
fi

# Read the gateway
gateway=&quot;$1.$2.$3.$4&quot;
shift; shift; shift; shift
# Multicast routing on Linux
#  - If you set a next-hop address for a multicast group, this breaks with Cisco switches
#  - If you simply leave it link-local and attach it to an interface, it works fine.

if [ $multicast -eq 1 ]; then
temp_result=&quot;$destination dev $interface&quot;
else
temp_result=&quot;$destination via $gateway dev $interface&quot;
fi

if [ -n &quot;$result&quot; ]; then
result=&quot;$result:$temp_result&quot;
else
result=&quot;$temp_result&quot;
fi
done
echo &quot;$result&quot;
}

function modify_routes() {
action=$1
route_list=&quot;$2&quot;
IFS=:
for route in $route_list; do
unset IFS
/sbin/ip route $action $route
IFS=:
done
unset IFS
}

if [ &quot;$reason&quot; = &quot;BOUND&quot; -o &quot;$reason&quot; = &quot;REBOOT&quot; -o &quot;$reason&quot; = &quot;REBIND&quot; -o &quot;$reason&quot; = &quot;RENEW&quot; ]; then

# Delete old routes, if they exist
if [ -n &quot;$old_classless_routes&quot; ]; then
modify_routes delete &quot;$(parse_option_121 $old_classless_routes)&quot;
fi

# Add new routes, if they exist...
if [ -n &quot;$new_classless_routes&quot; ]; then
modify_routes add &quot;$(parse_option_121 $new_classless_routes)&quot;
fi
fi

</pre></p>
<p>Next you&#8217;ll need to modify the <strong>dhclient</strong> <strong>dhclient-script</strong>, so that the <strong>NetworkManager</strong> actually executes the hooks defined in <strong><em>/etc/dhcp/dhclient-exit-hooks</em><span style="font-weight:normal;">. The information was found on this <a href="http://www.webtatic.com/blog/2009/03/workaround-so-networkmanager-runs-dhclient-hooks/" target="_blank">blog</a>. I&#8217;ve modified the script found on that blog so that it would work on Fedora 12. Put this file in </span><em>/usr/local/sbin/dhclient-script-networkmanager</em><span style="font-weight:normal;"> (If you&#8217;ve noticed we&#8217;ve already modified the </span><em>dhclient-eth0.conf</em><span style="font-weight:normal;"> file and instructed the dhclient to use this script instead of the default one located in <strong><em>/sbin/dhclient-script</em></strong>)</span><span style="font-weight:normal;">:</span></strong></p>
<p><pre class="brush: bash;">
#!/bin/bash
NM_DHCLIENT_SCRIPT=/usr/libexec/nm-dhcp-client.action


# dhclient-script for Linux. Dan Halbert, March, 1997.
# Updated for Linux 2.[12] by Brian J. Murrell, January 1999.
# Modified for Debian.  Matt Zimmerman and Eloy Paris, December 2003
# Modified to remove useless tests for antiquated kernel versions that
# this doesn't even work with anyway, and introduces a dependency on /usr
# being mounted, which causes cosmetic errors on hosts that NFS mount /usr
# Andrew Pollock, February 2005
# Modified to work on point-to-point links. Andrew Pollock, June 2005
# Modified to support passing the parameters called with to the hooks. Andrew Pollock, November 2005
# The alias handling in here probably still sucks. -mdz


run_hook() {
local script=&quot;$1&quot;
local exit_status
shift       # discard the first argument, then the rest are the script's


if [ -f $script ]; then
. $script &quot;$@&quot;
fi


if [ -n &quot;$exit_status&quot; ] &amp;&amp; [ &quot;$exit_status&quot; -ne 0 ]; then
logger -p daemon.err &quot;$script returned non-zero exit status $exit_status&quot;
save_exit_status=$exit_status
fi
}


run_hookdir() {
local dir=&quot;$1&quot;
local exit_status
shift       # See run_hook


if [ -d &quot;$dir&quot; ]; then
for script in $(ls -1 $dir); do
run_hook $script &quot;$@&quot; || true
exit_status=$?
done
fi


return $exit_status
}


# Must be used on exit.   Invokes the local dhcp client exit hooks, if any.
exit_with_hooks() {
exit_status=$1


# Source the documented exit-hook script, if it exists
if ! run_hook /etc/dhcp/dhclient-exit-hooks &quot;$@&quot;; then
exit_status=$?
fi


# Now run scripts in the Debian-specific directory.
if ! run_hookdir /etc/dhcp/dhclient-exit-hooks.d &quot;$@&quot;; then
exit_status=$?
fi


exit $exit_status
}


# The action starts here
# Invoke the local dhcp client enter hooks, if they exist.
run_hook /etc/dhcp/dhclient-enter-hooks
run_hookdir /etc/dhcp/dhclient-enter-hooks.d


$NM_DHCLIENT_SCRIPT
exit_with_hooks 0
return $exit_status
</pre></p>
<p>Finally, if you are running SELinux like me, you&#8217;ll need to change the security context of the file, so that the dhclient could execute it:</p>
<pre><strong>chcon -t dhcpc_exec_t /usr/local/sbin/dhclient-script-networkmanager</strong>
<strong>
</strong></pre>
<p>And thats all &#8211; you done and good go to <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/troshlyak.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/troshlyak.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/troshlyak.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/troshlyak.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/troshlyak.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/troshlyak.wordpress.com/141/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/troshlyak.wordpress.com/141/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/troshlyak.wordpress.com/141/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=troshlyak.wordpress.com&amp;blog=9277262&amp;post=141&amp;subd=troshlyak&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://troshlyak.wordpress.com/2010/02/23/receiving-static-routes-through-dhcp-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/b6ef3f90b5369e57e92ea61f1c05d5b9?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=G" medium="image">
			<media:title type="html">troshlyak</media:title>
		</media:content>
	</item>
	</channel>
</rss>
