<?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>stick&#039;s corner &#187; linux</title>
	<atom:link href="http://stick.gk2.sk/blog/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://stick.gk2.sk</link>
	<description>Look at you, hacker. A pathetic creature of meat and bone. How can you challenge a perfect, immortal machine?</description>
	<lastBuildDate>Mon, 26 Jul 2010 16:31:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Prezi Offline in Linux</title>
		<link>http://stick.gk2.sk/blog/2010/05/prezi-offline-in-linux/</link>
		<comments>http://stick.gk2.sk/blog/2010/05/prezi-offline-in-linux/#comments</comments>
		<pubDate>Fri, 07 May 2010 11:46:50 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[gamestore]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[offline]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[prezi]]></category>
		<category><![CDATA[svg]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/?p=1296</guid>
		<description><![CDATA[For creating my GameStore talk at LinuxWochen Wien I decided to use new and hip tool called Prezi. I&#8217;m not going to write about its features, you have to try and see for yourself. What I can say is that I really like the tool, but it has one big disadvantage &#8211; it&#8217;s written in [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">For creating my <a href="http://prezi.com/aoojwi_3tlzn/">GameStore</a> talk at <a href="http://linuxwochen.at">LinuxWochen Wien</a> I decided to use new and hip tool called <a href="http://prezi.com">Prezi</a>.  I&#8217;m not going to write about its features, you have to try and see for yourself. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  What I can say is that I really like the tool, but it has one big disadvantage &#8211; it&#8217;s written in Flash.</p>
<p style="text-align: justify;">During the event we had a wireless connection available, but it was rather unreliable, so it was no option for me to present the talk online. I started to investigate the offline options. Either you can download the full blown Prezi Desktop, which is available if you subscribe the service, or you just download the Prezi &#8220;Player&#8221;. But wait, the page claims it is compatible only with Windows and Mac OS X. Let&#8217;s see. I downloaded the ZIP archive and indeed &#8211; it contains data folder with your presentation, Windows application (<code>prezi.exe</code>) and Mac OS X application (<code>prezi.app</code>).</p>
<p style="text-align: justify;">Let&#8217;s get hacking! Mac OS X application is in fact just a directory structure. I copied the file <code>prezi.app/Contents/Resources/movie.swf</code> to the same location as my <code>data</code> directory and tried to run <code>flashplayer movie.swf</code>. Wow! The presentation started to load, but unfortunately it stopped after few seconds and I ended with this:</p>
<p><a href="http://stick.gk2.sk/blog/wp-content/uploads/2010/05/prezi1.png"  rel="lightbox[1296]"><img class="aligncenter size-medium wp-image-1297" title="Prezi 1" src="http://stick.gk2.sk/blog/wp-content/uploads/2010/05/prezi1-300x264.png" alt="" width="300" height="264" /></a></p>
<p style="text-align: justify;">I tried <code>strace</code>ing the process, but found nothing unusual (like failed <code>open</code> calls). Then I downloaded the debug version of Flash Player, run the command again and got this exception:</p>
<pre>An ActionScript error has occurred:
Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation:
file:///.../movie.swf/[[DYNAMIC]]/1 cannot load file:///.../data/fonts/LiberationSerif-Regular.swf.
Local-with-filesystem and local-with-networking SWF files cannot load each other.</pre>
<p style="text-align: justify;">Aha! Locally stored SWF files cannot load other SWF files, neither local ones, nor remote ones. That&#8217;s the problem.  Ok, let&#8217;s change the standalone player settings. But how?! I tried various command line switch with no success. After couple minutes of searching I found that standalone Flash Player settings could be changed via Flash plugin that loads Settings manager from the Internet? WTF?! <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p style="text-align: justify;">I will make it easier for you: let&#8217;s google for &#8220;flash global security settings content creators&#8221;. The first result at the time of writing this article was <a href="http://macromedia.com/support/documentation/en/flashplayer/help/settings_manager04a.html">this one</a>. Go to this URL, wait until the Settings manager is loaded and then click on the &#8220;Edit locations &#8230;&#8221; button.</p>
<p><a href="http://stick.gk2.sk/blog/wp-content/uploads/2010/05/prezi2.png"  rel="lightbox[1296]"><img class="aligncenter size-medium wp-image-1298" title="Prezi 2" src="http://stick.gk2.sk/blog/wp-content/uploads/2010/05/prezi2-300x218.png" alt="" width="300" height="218" /></a></p>
<p style="text-align: justify;">After that select &#8220;Add directory&#8221; and choose local directory where you store your presentations. From now on you enabled standalone Flash player to run your Prezis. Congratulations!</p>
<p style="text-align: justify;">Even though I like Prezi, I would be ecstatic if they dropped Flash and used SVG instead as its presentation and interchange format, probably using the uber-cool <a href="http://svg-edit.googlecode.com/">SVG-edit</a> as the core. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  It would also enable iPad users to use the tool. And yes, I know about <a href="http://jessyink.googlecode.com/">JessyInk</a>, but that&#8217;s not exactly what I have on mind &#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2010/05/prezi-offline-in-linux/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wrong usage of LD_LIBRARY_PATH</title>
		<link>http://stick.gk2.sk/blog/2009/10/wrong-usage-of-ld_library_path/</link>
		<comments>http://stick.gk2.sk/blog/2009/10/wrong-usage-of-ld_library_path/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 15:51:10 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[fedora]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[tips+tricks]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/?p=829</guid>
		<description><![CDATA[Lots of programs that bring their own libraries use the following snippet in their wrapper scripts: export LD_LIBRARY_PATH="/my/special/librarypath:$LD_LIBRARY_PATH" This allows linker to find the needed libraries, even if they are not located in the standard directories (which are defined by /etc/ld.so.conf). At first, this seems OK, but it creates one problem, though. When the $LD_LIBRARY_PATH [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Lots of programs that bring their own libraries use the following snippet in their wrapper scripts:</p>
<pre>export LD_LIBRARY_PATH="/my/special/librarypath:$LD_LIBRARY_PATH"</pre>
<p style="text-align: justify;">This allows linker to find the needed libraries, even if they are not located in the standard directories (which are defined by <code>/etc/ld.so.conf</code>). At first, this seems OK, but it creates one problem, though. When the <code>$LD_LIBRARY_PATH</code> was empty before the assignment, the new value ends with a colon. When we run the program wrapper, linker splits the variable into substrings and ends up with one empty path. This indicates to search for libraries in the CURRENT working directory, which can cause problems or even a security threat.</p>
<p style="text-align: justify;">So, what&#8217;s the correct way of defining the library path? Of course, we could check if the variable is empty before the assignment like this:</p>
<pre>if [ -n "$LD_LIBRARY_PATH" ]; then
    export LD_LIBRARY_PATH="/my/special/librarypath:$LD_LIBRARY_PATH"
else
    export LD_LIBRARY_PATH="/my/special/librarypath"
fi</pre>
<p>but there is one neat shell trick we can use (should work on all POSIX shells). The description says:</p>
<blockquote><p><code>${parameter:+word}</code><br />
Use Alternate Value.  If <code>parameter</code> is null or unset, nothing is substituted, otherwise the expansion of <code>word</code> is substituted.</p></blockquote>
<p>In the end we have:</p>
<pre>export LD_LIBRARY_PATH="/my/special/librarypath${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"</pre>
<p>which is not much longer than the line we started with, but does the assignment correctly. (The first colon belongs to shell syntax, the second one is a part of the value being appended).</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/10/wrong-usage-of-ld_library_path/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Daisy Plasmoid &#8211; A dock for KDE 4</title>
		<link>http://stick.gk2.sk/blog/2009/08/daisy-plasmoid-a-dock-for-kde-4/</link>
		<comments>http://stick.gk2.sk/blog/2009/08/daisy-plasmoid-a-dock-for-kde-4/#comments</comments>
		<pubDate>Wed, 12 Aug 2009 23:38:28 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[buildservice]]></category>
		<category><![CDATA[daisy]]></category>
		<category><![CDATA[dock]]></category>
		<category><![CDATA[kde]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mac os x]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[plasmoid]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/?p=606</guid>
		<description><![CDATA[From time to time I use Mac OS X and I really like the application management with its dock. I came across several different implementations for KDE 4, but they were usually too immature and not very pretty. I was very surprised when I finally found a decent implementation called Daisy. I immediately dropped the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">From time to time I use Mac OS X and I really like the application management with its <a href="http://en.wikipedia.org/wiki/Dock_(Mac_OS_X)">dock</a>. I came across several different implementations for KDE 4, but they were usually too immature and not very pretty. I was very surprised when I finally found a decent implementation called <a href="http://daisyplasma.freehostia.com/">Daisy</a>. I immediately dropped the default KDE taskbar and started to use Daisy in conjunction with desktop effects &#8220;Box Switch&#8221; and &#8220;Present Windows&#8221; a.k.a Exposé. You can look at my setup here (only bottom 64 pixels are shown, the rest is usually occupied with maximized application):</p>
<p><a href="http://stick.gk2.sk/blog/wp-content/uploads/2009/08/daisytray.jpg"  rel="lightbox[606]"><img class="aligncenter size-thumbnail wp-image-607" title="Daisy + Tray" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/08/daisytray-512x55.jpg" alt="Daisy + Tray" width="512" height="55" /></a></p>
<p style="text-align: justify;">Daisy detects running instances of applications by Window Class, so it doesn&#8217;t try to start another instance, it rather activates the already running one. The experience is very similar to the Mac OS X one, but still, there are three problems:</p>
<ul>
<li>I still have to use the panel for Battery Monitor and Device Notifier widgets
<ul>
<li>Daisy could act as a host for other widgets and show them as icons</li>
</ul>
</li>
<li>Applications started manually (e.g. with KRunner) do not appear in the dock
<ul>
<li>Daisy could act as a taskbar and show icons of all running windows</li>
</ul>
</li>
<li>Applications like instant messengers or IRC clients use tray for notifications
<ul>
<li>Daisy could act as a tray and replace the launcher icon with the one added to tray by application after its start (so it will flash in the dock)</li>
</ul>
</li>
</ul>
<p style="text-align: justify;">Once these three points are met, Daisy will become a complete counterpart of Mac OS X dock. I&#8217;ve already written these suggestions to Lechio (upstream developer), but I&#8217;m not sure if this is the direction he wants to go and whether it is possible to do without any extra hacks at the KDE/Plasma side. (I&#8217;m sure that Lechio will accept any help <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ) Anyway, have a look at the <a href="http://daisyplasma.freehostia.com/">project page</a>, <a href="http://www.kde-look.org/content/show.php/Daisy?content=102077">KDE-Look page</a> or try the plasmoid from the Build Service. The package is called <code>plasmoid-daisy</code> and is present in <a href="http://download.opensuse.org/repositories/KDE:/KDE4:/Community/">KDE:KDE4:Community</a> project.</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/08/daisy-plasmoid-a-dock-for-kde-4/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Pencil project &#8211; Sketching and Prototyping with Firefox</title>
		<link>http://stick.gk2.sk/blog/2009/04/pencil-project-sketching-and-prototyping-with-firefox/</link>
		<comments>http://stick.gk2.sk/blog/2009/04/pencil-project-sketching-and-prototyping-with-firefox/#comments</comments>
		<pubDate>Wed, 22 Apr 2009 16:44:53 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[buildservice]]></category>
		<category><![CDATA[contrib]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[pencil]]></category>
		<category><![CDATA[prototyping]]></category>
		<category><![CDATA[tryme]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=315</guid>
		<description><![CDATA[A few years ago, me and four of my friends were doing an university project, which was basically a web portal. While designing our application we needed a tool for creating mock-ups and screen prototypes. There are a lot of options like Wireframe Sketcher, Cleverlance Petra, but finally we ended up with Axure RP. Now [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-314" style="margin-right: 16px;" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/pencil.jpg" alt="pencil" width="128" height="128" /></p>
<p style="text-align: justify;">A few years ago, me and four of my friends were doing an university project, which was basically a web portal. While designing our application we needed a tool for creating mock-ups and screen prototypes. There are a lot of options like <a href="http://wireframesketcher.com/">Wireframe Sketcher</a>, <a href="http://petra.cleverlance.com/">Cleverlance Petra</a>, but finally we ended up with <a href="http://www.axure.com/">Axure RP</a>. Now I&#8217;m not sure why, but at least we had the motivation to finish the prototype early (trial period was only 30 days <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> ).</p>
<p style="text-align: justify;">Today, I was again looking for the alternatives and found &#8211; <a href="http://www.evolus.vn/Pencil/">Pencil</a>. No, I don&#8217;t mean the office aid, but the <a href="http://www.evolus.vn/Pencil/Screenshots.html">Pencil Project</a>. It lacks some important features like creating hyper-links between the components and thus exporting to HTML pages, but these are <a href="http://code.google.com/p/evoluspencil/issues/detail?id=3">planned</a> and I can say that I really like this tool. And not to forget &#8211; it is open source! You can install it as a <a href="https://addons.mozilla.org/en-US/firefox/addon/8487">Firefox extension</a> or download it as a standalone application. Unfortunately upstream tarball contains the whole XULRunner, so I decided to create a package for openSUSE. It is available from our <a href="http://en.opensuse.org/Contrib">Contrib</a> repository and is only 330kB large! (Big thanks goes to <a href="http://www.rosenauer.org/blog/">Wolfgang Rosenauer</a> for helping me to tame XULRunner.)</p>
<p style="text-align: justify;">Pencil right now supports common shapes like rectangles or bitmaps, annotations, GTK widgets and Windows XP widgets. The widgets (or rather stencils) are simple SVG files, so if we help Duong Thanh An, the author, we might see Qt, <a href="http://www.graffletopia.com/stencils/413">iPhone</a> or <a href="http://developer.yahoo.com/ypatterns/wireframes/">Yahoo</a> stencils as a part of the Pencil in the future! Wouldn&#8217;t that be sweet? <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update:</strong> I just found <a href="http://graffletopia.com/">Graffletopia</a> &#8211; with hundreds of stencils (or so-called graffles) for Mac OS X tool <a href="http://www.omnigroup.com/applications/OmniGraffle/">OmniGraffle</a> and some of them are really great. How about a converter ? <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/04/pencil-project-sketching-and-prototyping-with-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LinuxExpo 2009</title>
		<link>http://stick.gk2.sk/blog/2009/04/linuxexpo-2009/</link>
		<comments>http://stick.gk2.sk/blog/2009/04/linuxexpo-2009/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 15:27:23 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[linuxexpo]]></category>
		<category><![CDATA[opensuse]]></category>
		<category><![CDATA[photo]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=278</guid>
		<description><![CDATA[On Wednesday I attended the biggest Linux event in the Czech Republic called LinuxExpo (more particularly its first day). I also took some photos for your viewing pleasure Comments for each photo are under the enlarged versions shown after clicking on the thumbnails. a.m. contest lunch p.m. Update: Bubli has written a commentary about the [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">On Wednesday I attended the biggest Linux event in the Czech Republic called <a href="http://linuxexpo.cz/">LinuxExpo</a> (more particularly its first day). I also took some photos for your viewing pleasure <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Comments for each photo are under the enlarged versions shown after clicking on the thumbnails.</p>
<p>a.m.</p>
<p><a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0092.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-253" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0092-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a> <a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0126.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-265" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0126-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a> <a title="Konq with Eyes plasmoid" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0128.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-266" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0128-150x150.jpg" alt="Konq with Eyes plasmoid" width="150" height="150" /></a> <a title="Microsoft Surface displaying openSUSE screenshots ;-)" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0120.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-262" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0120-150x150.jpg" alt="Microsoft Surface displaying openSUSE screenshots ;-)" width="150" height="150" /></a> <a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0094.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-254" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0094-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a> <a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0091.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-252" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0091-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a> <a title="Even Red Hat people are interested in openSUSE :-)" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0143.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-273" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0143-150x150.jpg" alt="Even Red Hat people are interested in openSUSE :-)" width="150" height="150" /></a> <a title="Happy community members" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0110.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-258" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0110-150x150.jpg" alt="Happy community members" width="150" height="150" /></a> <a title="SleepWalker and Marex at the Hack&amp;Dev Booth" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0089.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-250" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0089-150x150.jpg" alt="SleepWalker and Marex at the Hack&amp;Dev Booth" width="150" height="150" /></a> <a title="SleepWalker and Miska at the Hack&amp;Dev Booth" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0090.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-251" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0090-150x150.jpg" alt="SleepWalker and Miska at the Hack&amp;Dev Booth" width="150" height="150" /></a></p>
<p>contest</p>
<p><a title="Contest" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0119.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-261" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0119-150x150.jpg" alt="Contest" width="150" height="150" /></a> <a title="People waiting ..." href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0096.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-255" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0096-150x150.jpg" alt="People waiting ..." width="150" height="150" /></a> <a title="... for Kendy and Marek to draw the winners ..." href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0100.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-256" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0100-150x150.jpg" alt="... for Kendy and Marek to draw the winners ..." width="150" height="150" /></a> <a title="... of our fabulous prizes :)" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0104.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-257" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0104-150x150.jpg" alt="... of our fabulous prizes :)" width="150" height="150" /></a> <a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0125.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-264" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0125-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a></p>
<p>lunch</p>
<p><a title="Hungry developers and community members waiting for their lunch" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0140.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-272" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0140-150x150.jpg" alt="Hungry developers and community members waiting for their lunch" width="150" height="150" /></a> <a title="Hungry developers and community members waiting for their lunch" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0130.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-267" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0130-150x150.jpg" alt="Hungry developers and community members waiting for their lunch" width="150" height="150" /></a> <a title="Hungry developers and community members waiting for their lunch" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0135.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-268" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0135-150x150.jpg" alt="Hungry developers and community members waiting for their lunch" width="150" height="150" /></a> <a title="Hungry developers and community members waiting for their lunch" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0136.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-269" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0136-150x150.jpg" alt="Hungry developers and community members waiting for their lunch" width="150" height="150" /></a> <a title="Hungry developers and community members waiting for their lunch" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0137.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-270" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0137-150x150.jpg" alt="Hungry developers and community members waiting for their lunch" width="150" height="150" /></a> <a title="Hungry developers and community members waiting for their lunch" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0138.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-271" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0138-150x150.jpg" alt="Hungry developers and community members waiting for their lunch" width="150" height="150" /></a></p>
<p>p.m.</p>
<p><a title="Two Jirkas drawing the lucky winners" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0148.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-277" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0148-150x150.jpg" alt="Two Jirkas drawing the lucky winners" width="150" height="150" /></a> <a title="Two Jirkas drawing the lucky winners" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0147.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-276" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0147-150x150.jpg" alt="Two Jirkas drawing the lucky winners" width="150" height="150" /></a> <a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0146.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-275" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0146-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a> <a title="IT Crowd" href="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0145.jpg"  rel="lightbox[278]"><img class="size-thumbnail wp-image-274" style="margin: 4px;" title="LinuxExpo 2009" src="http://stick.gk2.sk/blog/wp-content/uploads/2009/04/le09_dsc_0145-150x150.jpg" alt="IT Crowd" width="150" height="150" /></a></p>
<p><strong>Update:</strong> <a href="http://hedgehogpainter.livejournal.com/">Bubli</a> has written a <a href="http://hedgehogpainter.livejournal.com/6380.html">commentary</a> about the day 2.</p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/04/linuxexpo-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ugly Duckling called $XDG_CONFIG_HOME</title>
		<link>http://stick.gk2.sk/blog/2009/03/the-ugly-duckling-called-xdg_config_home/</link>
		<comments>http://stick.gk2.sk/blog/2009/03/the-ugly-duckling-called-xdg_config_home/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 12:09:02 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[appeal]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips+tricks]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=228</guid>
		<description><![CDATA[Let&#8217;s take a look into my home directory: [stick@spectra 0 ~] ls -F Applications/ Documents/ google.txt reverse-ssh* Desktop/ Downloads/ public_html/ work/ [stick@spectra 0 ~] ls -AF .0verkill google.txt public_html/ .adobe/ .grails/ .pulse/ .android/ .gstreamer-0.10/ .pulse-cookie Applications/ .gtk-bookmarks .pyhistory .AtomicWorm/ .gtkrc-2.0-kde4 .qt/ .bash_history .gvfs/ .rawstudio/ .bashrc .hplip/ .recently-used .bouml .htoprc .recently-used.xbel .boumlrc .hugin .repoconfig/ .bzr.log .icedteaplugin/ [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Let&#8217;s take a look into my home directory:</p>
<pre>[stick@spectra 0 ~] ls -F
Applications/  Documents/  google.txt    reverse-ssh*
Desktop/       Downloads/  public_html/  work/       

[stick@spectra 0 ~] ls -AF
.0verkill             google.txt              public_html/
.adobe/               .grails/                .pulse/
.android/             .gstreamer-0.10/        .pulse-cookie
Applications/         .gtk-bookmarks          .pyhistory
.AtomicWorm/          .gtkrc-2.0-kde4         .qt/
.bash_history         .gvfs/                  .rawstudio/
.bashrc               .hplip/                 .recently-used
.bouml                .htoprc                 .recently-used.xbel
.boumlrc              .hugin                  .repoconfig/
.bzr.log              .icedteaplugin/         reverse-ssh*
.cache/               .inkscape/              .rnd
.cddb/                .inputrc                .rpmpatch_macros
.cedega/              .IntelliJIdea80/        .rpmpatch_rpmrc
.civclientrc          .IntelliJIdea8x/        .scummvmrc
.civserver_history    .irssi/                 .signature-gk2
.config/              .java/                  .signature-gmail
.crack-attack/        .JxBrowser/             .signature-suse
.cxgames/             .kde/                   .skel/
.darkplaces/          .kde4/                  .Skype/
.dbus/                .kderc                  .smc/
.designer/            .kinorc                 .springrc
Desktop/              .ktorrent.lock          .sqlite_history
.directory            .lbrc.conf              .ssh/
.dmrc                 .lesshst                .strigi/
Documents/            .links/                 .subversion/
Downloads/            .liquidwarrc            .teeworlds/
.dvdcss/              .local/                 .thumbnails/
.eclipse/             .loki/                  .thunderbird/
.emacs                .macromedia/            .ufrawrc
.esd_auth             .mc/                    .ultramixer/
.fbhighlevelshistory  .mcop/                  .vendetta/
.fbhighscores         .miro/                  .viminfo
.fblevels/            .mixxxbpmscheme.xml     .vimrc
.fbrc                 .mixxx.cfg              .VirtualBox/
.fontconfig/          .mixxxmacros/           .vlc/
.fonts/               .MixxxMIDIBindings.xml  .vnc/
.fonts.conf           .mixxxtrack.xml         .w3m/
.gajim/               .mozilla/               .Wammu
.gconf/               .mplayer/               .wapi/
.gconfd/              .mysql_history          .windows-label
.gegl-0.0/            .mysticmine             .wine/
.gem/                 .netxrc                 .winetrickscache/
.gimp-2.6/            .nexuiz/                work/
.gitconfig            .ooo3/                  .Xauthority
.gnome/               .opera/                 .xim.template
.gnome2/              .osc_cookiejar          .xine/
.gnome2_private/      .oscrc                  .xsession-errors
.gnupg/               .profile                .y2usersettings
.google/              .psi/
.googleearth/         .psql_history</pre>
<p style="text-align: justify;">Out of 148 entries in my $HOME, there are only 12 of them I really want to see! How much nicer would it be, if it looked like this:</p>
<pre>[stick@spectra 0 ~] ls -AF
Applications/  Documents/  public_html/    .signature-gmail
.config/       Downloads/  reverse-ssh*    .signature-suse
Desktop/       google.txt  .signature-gk2  work/</pre>
<p style="text-align: justify;">This is very simple to achieve, if only applications followed the <a href="http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html">XDG Base Directory Specification</a>. Unfortunately, lots of them don&#8217;t. When you start using the following piece of code in your new awesome applications:</p>
<pre>config = getenv("XDG_CONFIG_HOME")
if (!config) config = getenv("HOME") + "/.config"
config = config + "/my_awesome_app"</pre>
<p style="text-align: justify;">instead of the old-school one:</p>
<pre>config = getenv("HOME") + "/.my_awesome_app"</pre>
<p style="text-align: justify;">users will gain two great advantages with nearly no extra effort:</p>
<ul>
<li>trying application without overwriting the existing configuration
<pre>XDG_CONFIG_HOME=/tmp/ my_awesome_app</pre>
</li>
<li>maintaining multiple configurations of the same application
<pre>XDG_CONFIG_HOME=~/.config/awesome3 my_awesome_app</pre>
</li>
</ul>
<p style="text-align: justify;">So, please, don&#8217;t ignore the ugly duckling called <code>$XDG_CONFIG_HOME</code>, I&#8217;m sure it will mature into a beautiful swan. <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/03/the-ugly-duckling-called-xdg_config_home/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Parallel command execution with limits</title>
		<link>http://stick.gk2.sk/blog/2009/02/parallel-command-execution/</link>
		<comments>http://stick.gk2.sk/blog/2009/02/parallel-command-execution/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 16:32:18 +0000</pubDate>
		<dc:creator>Pavol Rusnak</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tips+tricks]]></category>

		<guid isPermaLink="false">http://stick.gk2.sk/blog/?p=112</guid>
		<description><![CDATA[Randy_sk asked today on IRC if we had any idea how to run commands in parallel, but he also wanted to limit the number of the concurrent processes. I immediately responded: &#8220;use make&#8221;. I started to shape my idea further until I came to this Makefile: tasks := $(shell seq -s ' ' 1 `cat [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">Randy_sk asked today on IRC if we had any idea how to run commands in parallel, but he also wanted to limit the number of the concurrent processes. I immediately responded: &#8220;use make&#8221;. I started to shape my idea further until I came to this Makefile:</p>
<pre>tasks := $(shell seq -s ' ' 1 `cat commands.txt | wc -l`)

all: $(tasks)
    @echo Done

%:
    @echo `sed '$@!d' commands.txt`
    @eval `sed '$@!d' commands.txt`</pre>
<p style="text-align: justify;">This expects you had the file commands.txt prepared, which contains one command per line. If you want to call the same command over and over again, just replace <code>commands.txt</code> with <code>values.txt</code> and <code>eval</code> with the command you want to run.</p>
<p style="text-align: justify;">Using this approach you can limit both the number of concurrent jobs: <code>make -j 5</code> and the maximum load: <code>make -l 2</code></p>
<p style="text-align: justify;">Others ideas were to use the shell with <code>&amp;</code> and <code>wait</code>, or to use the following one-liner:</p>
<pre>while sleep 1; do [ "`ps ax | grep your_cmd | wc -l`" -gt 6 ] || your_cmd &amp;; done</pre>
<p style="text-align: justify;">but I really like mine solution the most <img src='http://stick.gk2.sk/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://stick.gk2.sk/blog/2009/02/parallel-command-execution/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
