<?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>Ishan&#039;s way</title>
	<atom:link href="http://blog.ishans.info/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ishans.info</link>
	<description>The pathway of a potential geek</description>
	<lastBuildDate>Wed, 10 Oct 2012 07:18:28 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>My presentation on the internship at WSO2</title>
		<link>http://blog.ishans.info/2012/10/09/my-presentation-on-the-internship-at-wso2/</link>
		<comments>http://blog.ishans.info/2012/10/09/my-presentation-on-the-internship-at-wso2/#comments</comments>
		<pubDate>Tue, 09 Oct 2012 03:14:15 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[About]]></category>
		<category><![CDATA[Operating Systems development]]></category>
		<category><![CDATA[WSO2]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=242</guid>
		<description><![CDATA[This is the presentation I did after completing 5 months of internship in WSO2. &#160; JMX1 on Prezi]]></description>
				<content:encoded><![CDATA[<p>This is the presentation I did after completing 5 months of internship in <a href="http://www.wso2.com" target="_blank">WSO2</a>. &nbsp;</p>
<div class="prezi-player">
<p><object id="prezi_sclyawmut6az" width="700" height="400" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0" name="prezi_sclyawmut6az" bgcolor="#ffffff"><param name="allowfullscreen" value="true" /><param name="allowFullScreenInteractive" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="direct" /><param name="flashvars" value="prezi_id=sclyawmut6az&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0" /><param name="src" value="http://prezi.com/bin/preziloader.swf" /><param name="allowfullscreeninteractive" value="true" /><embed id="prezi_sclyawmut6az" width="700" height="400" type="application/x-shockwave-flash" src="http://prezi.com/bin/preziloader.swf" allowfullscreen="true" allowFullScreenInteractive="true" allowscriptaccess="always" wmode="direct" flashvars="prezi_id=sclyawmut6az&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0" allowfullscreeninteractive="true" name="prezi_sclyawmut6az" bgcolor="#ffffff" /></object></p>
<div class="prezi-player-links">
<p><a title="JMX1" href="http://prezi.com/sclyawmut6az/jmx1/">JMX1</a> on <a href="http://prezi.com">Prezi</a></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2012/10/09/my-presentation-on-the-internship-at-wso2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How I “earned” a Google Summer of Code project&#8230;!</title>
		<link>http://blog.ishans.info/2012/09/09/how-i-earned-a-google-summer-of-code-project/</link>
		<comments>http://blog.ishans.info/2012/09/09/how-i-earned-a-google-summer-of-code-project/#comments</comments>
		<pubDate>Sun, 09 Sep 2012 04:58:30 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[GSoC]]></category>
		<category><![CDATA[My perspective]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=229</guid>
		<description><![CDATA[It&#8217;s not a sin to try, the real sin is not trying at all should have been the thought that was working on my head in the months of March and April 2011, in the time that I was working &#8230; <a href="http://blog.ishans.info/2012/09/09/how-i-earned-a-google-summer-of-code-project/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>It&#8217;s not a sin to try, the real sin is not trying at all </strong>should have been the thought that was working on my head in the months of March and April 2011, in the time that I was working hard to find a project in Google Summer of Code 2011, as a 2<sup>nd</sup> year student in the department of Computer Science and Engineering, University of Moratuwa. So after spending lot&#8217;s of time, I found a project that matched my novice knowledge. It was a project by a company called <a href="www.digitalmars.com/" target="_blank">Digital Mars</a>. The project idea in which I had interest (rather, I had the capability to work on) was “adding more containers to D”. In simple terms, what I had to do was to write new data structures to the programming language named <strong>D</strong>. I had never before heard about <strong>D </strong>or the data structures that they wanted to be implemented. But that didn&#8217;t stop me from trying. Countless hours were spent on learning <strong>D</strong> and learning about the data structures that they suggested.&nbsp;</p>
<p>Unfortunately, being an organization which was in it&#8217;s debut GSoC, Digital Mars didn&#8217;t get many slots for their projects and they could only select the most critical projects to their product. So my project was not among the projects they selected for GsoC. But I felt really satisfied because I knew that if my project was selected, I had a very high chance of getting that project. Also my bond towards the internals of the Programming Languages kept growing because of the efforts I put for GsoC 2011 and that lead me to study more about Programming Languages in the university also (which showed me a total new path for my future carrier). So ultimately, my failure at GsoC 2011 was not a failure, but an achievement.</p>
<p>Time flew and came the time for the 3<sup>rd</sup> year Software Engineering Project (SEP) in the university. The visionary lecturers at our department wanted all 100 of the batch to find a way to contribute to a FOSS product (which would ultimately be the 3<sup>rd</sup> year SEP). The only exception they allowed other than contributing to a FOSS product is developing a mobile application. So in that sense, SEP is also like a mini-GSoC!.</p>
<p>The project idea that I came up with was writing a LibreOffice extension which allows the user to access their Google documents using the online accounts feature in Gnome 3. If you want more information about the product, please feel free to visit <a href="https://github.com/ishanthilina/Gnome-Online-Documents-Manager">https://github.com/ishanthilina/Gnome-Online-Documents-Manager</a>&nbsp;and view its documentation plus the crappy code it contains(yes, I admit, it contains crappy code!). Before starting the project, I had never written a single extension for LibreOffice nor even seen its API(or the Google API for Google Docs). It&#8217;s only after starting the project that I got to know the real pain of the trouble that I&#8217;ve put my self in to. There were only a handful of tutorials on writing LibreOffice extensions using Python (yes, I was going to code in Python, with no prior extensions knowledge!). And none of them described most of the essential parts that I needed to know about extensions developing under LibreOffice. And to make my matters worse, the documentation for the Google Docs API was not up to date with the Python Gdata library I used. Result..? 3 months of pure suffering!. At the end of the SEP evaluations, I knew that I am never going to write a LibreOffice extension again, I was simply had enough!.</p>
<p>In no time came GsoC 2012 and I was wandering through the ideas list again!. Seeing the number of Android projects available for this years GsoC, I blamed my self for not doing an Android related project. If I did so, my life would have been easier in the period of SEP and I could have easily found an Android project in GsoC. But hoping to find a project that suits me, I kept wandering through the GsoC 2012 ideas list, and BANG&#8230;!. I spotted a project on which the task was to write an extension to LibreOffice. The project was from the organization <a href="http://creativecommons.org/" target="_blank">Creative Commons</a> and the task was to port an existing LibreOffice extension to Python and add some more new features to it.</p>
<p>As you might have guessed, the first stream of thoughts that came up in to my mind were the bad memories of all the hardships which I had to undergo in SEP!. But I was not ready to give up that easily. So about a week before the deadline for the student application period I started communicating with the projects potential mentors on their mailing list. Finally I put an application for the proposal in Google Melange and when the selected students were announced, I was selected to that project!.</p>
<p>&nbsp;It&#8217;s amazing how you can succeed when you keep trying even when you fail. You never fail until you abandon trying. Unlike in GsoC 2011,in GsoC 2012, I was able to get my hands on a project without trying much hard!.</p>
<p>But then came the most challenging days of the story. I knew that I had a lot to learn, and I knew that I had to learn fast!. I knew only a very little on extensions developing under LibreOffice. I didn&#8217;t know how to package an extension, I didn&#8217;t know how to write GUI stuff, I didn&#8217;t know how to debug in Python(yes, I was a complete novice to Python too!), and the list of I don&#8217;t knows seemed pretty endless!. Lot&#8217;s of time was spent on reading Java code (since most of the examples for LibreOffice extensions development was in Java) and another considerable amount of time was spent on porting that code to Python, lot&#8217;s of time was spent on learning new stuff. &nbsp;</p>
<p>Since my internship in <a href="http://www.wso2.com" target="_blank">WSO2</a> had begun on those days, I was spending most of my time in WSO2. It was around 8.30-9pm everyday&nbsp;when I returned home . So I had only a little time to work on my GsoC project at night. But I didn&#8217;t give up. I managed to allocate at least an hour to the project everyday. And on weekdays, I spent lot&#8217;s of time on the project. They sure were hard days. Pretty hard indeed. But when the mid-term reviews were approaching, I truly was happy and progress seemed truly promising. I knew that I had learned a lot and I had done a pretty good job. My hard work had showed promising results. It was truly a satisfactory feeling.</p>
<p>And I should specially appreciate the support from my mentor, &nbsp;<a href="http://creativecommons.org/staff#jonathanpalecek" target="_blank">Jonathan.Palecek</a>. He always put faith on me, always motivated me to do my best, but at the same time didn&#8217;t expect me to be working like a slave, he was always this cool person who always put trust on me.</p>
<p>&nbsp;Also I should give a special thank to <a href="http://www.oooforum.org/forum/profile.phtml?mode=viewprofile&amp;u=14789" target="_blank">Hanya</a>. Without him, I won&#8217;t even make it to the mid-evaluations. He answered almost all of the questions I posted in <a href="http://www.oooforum.org/" target="_blank">OOoForum.org</a>. I know at most of the times I was causing him lot&#8217;s of trouble and I really am thankful to him the way he tolerated all of them and how he always helped me in his full capacity.</p>
<p>&nbsp;After the mid-term evaluations, life was much easier. I added some new features to the extension and ultimately I passed the final evaluation which resulted in a happy mentor, happy community and a happy student!.&nbsp;</p>
<p>It&#8217;s amazing how the bitter experiences we undergo results in the sweetest memories in our lives. When the life puts challenges in front of us, we should make use of them, hence the same challenges will make our lives a comfortable place in the future. We should not be backing down in the face of difficulties hence the same difficulties will make our lives a luxurious place one day. All we need to master are patience and smart work!.</p>
<p>Always keep in mind, It&#8217;s not a sin to try, the real sin is not trying at all&#8230;!.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2012/09/09/how-i-earned-a-google-summer-of-code-project/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Adding a template for new Python files in Emacs</title>
		<link>http://blog.ishans.info/2012/06/10/adding-a-template-for-new-python-files-in-emacs/</link>
		<comments>http://blog.ishans.info/2012/06/10/adding-a-template-for-new-python-files-in-emacs/#comments</comments>
		<pubDate>Sun, 10 Jun 2012 10:50:43 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Emacs]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=215</guid>
		<description><![CDATA[I wanted my name and email address to appear in the top of the page every time I create a new python file in Emacs. So here&#8217;s what I did to achieve that. First of all create a folder called &#8230; <a href="http://blog.ishans.info/2012/06/10/adding-a-template-for-new-python-files-in-emacs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I wanted my name and email address to appear in the top of the page every time I create a new python file in Emacs. So here&#8217;s what I did to achieve that.</p>
<p>First of all create a folder called <strong>templates </strong>in the <strong>.emacs.d </strong>directory (the <strong>.emacs.d </strong>directory is located in your home directory. If it does not exist, just create the directory&nbsp;). Then create a file named <strong>template.py </strong>&nbsp;in that directory. And add the text you want to be included when you create a new python file. An example can be shown as follows.</p>
<blockquote><p>#Name: This Is My Name</p>
<p>#E-mail: someone@somewhere.lol</p></blockquote>
<p>Then open the <strong>.emacs </strong>file in your home directory (if this doesn&#8217;t exist, simply create an empty file named <strong>.emacs</strong>). Then add the following content to the bottom of the&nbsp;<strong>.emcas</strong>.</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Lisp"><div class="devcodeoverflow"><ol><li><span style="color: #808080; font-style: italic;">;#############################################</span></li><li><span style="color: #808080; font-style: italic;">;To load python templates</span></li><li>&nbsp;</li><li><span style="color: #66cc66;">&#40;</span>add-hook 'find-file-hooks 'maybe-load-template<span style="color: #66cc66;">&#41;</span></li><li><span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">defun</span> maybe-load-template <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></li><li>&nbsp;&nbsp;<span style="color: #66cc66;">&#40;</span>interactive<span style="color: #66cc66;">&#41;</span></li><li>&nbsp;&nbsp;<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">when</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> </li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #66cc66;">&#40;</span>string-match <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\\</span>.py$&quot;</span> <span style="color: #66cc66;">&#40;</span>buffer-file-<span style="color: #b1b100;">name</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">eq</span> <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#40;</span>point-<span style="color: #b1b100;">max</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<span style="color: #66cc66;">&#40;</span>insert-file <span style="color: #ff0000;">&quot;~/.emacs.d/templates/template.py&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></li></ol></div></pre><!--END_DEVFMTCODE--></p>
<p>(Use the &#8216;Lisp&#8217; link above to copy the code).</p>
<p>That&#8217;s all&#8230;!. Now when ever you create a new python file using Emacs these header info will appear!.</p>
<p><span style="text-decoration: underline;">More info:</span></p>
<p>As you might have observed this trick can be extended to other file types by changing the <strong>.py </strong>extension in the&nbsp;<strong>(insert-file &#8220;~/.emacs.d/templates/template.py&#8221;)</strong> line and creating a relevant template in the templates folder.</p>
<p>Also there are more advanced ways to achieve the same with more functionality in&nbsp;<a href="http://www.emacswiki.org/emacs/AutomaticFileHeaders">http://www.emacswiki.org/emacs/AutomaticFileHeaders</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2012/06/10/adding-a-template-for-new-python-files-in-emacs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple FAT32 bootloader written in assembly to boot from USB drives.</title>
		<link>http://blog.ishans.info/2012/01/19/a-simple-fat32-bootloader-written-in-assembly-to-boot-from-usb-drives/</link>
		<comments>http://blog.ishans.info/2012/01/19/a-simple-fat32-bootloader-written-in-assembly-to-boot-from-usb-drives/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 19:06:39 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[About]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[Bootloader]]></category>
		<category><![CDATA[Operating Systems development]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=199</guid>
		<description><![CDATA[This is an assignment done by me for a second year project &#160;in the university. The goal was to write a bootloader that can boot the given OS (&#160;JOSH&#160;) from a pen drive which is having FAT32 file system( We &#8230; <a href="http://blog.ishans.info/2012/01/19/a-simple-fat32-bootloader-written-in-assembly-to-boot-from-usb-drives/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This is an assignment done by me for a second year project &nbsp;in the university. The goal was to write a bootloader that can boot the given OS (&nbsp;<a href="http://www.mohanraj.info/josh.jsp">JOSH</a>&nbsp;) from a pen drive which is having FAT32 file system( We were supplied with a bootloader that could boot only from a FAT12 file system ).&nbsp;</p>
<p>&nbsp;</p>
<p><strong>What this bootloader can do:</strong></p>
<p>&nbsp;</p>
<p>It can load the first file( which should be a file less than 4096 bytes) which is located in a USB drive with a FAT32 file&nbsp;system to the memory and hand over the execution to that program.</p>
<p>&nbsp;</p>
<p><strong>Download location:</strong></p>
<p>&nbsp;</p>
<p><a href="https://github.com/ishanthilina/USB-FAT32-Bootloader">https://github.com/ishanthilina/USB-FAT32-Bootloader</a></p>
<p>&nbsp;</p>
<p><strong>Steps to use the Bootloader:</strong></p>
<p>&nbsp;</p>
<p>Included in the README file in gitHub.&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>More information can be found in the pdf in the <strong>doc</strong> folder.&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2012/01/19/a-simple-fat32-bootloader-written-in-assembly-to-boot-from-usb-drives/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>saveMyStatus &#8211; A script to manage the chat statuses in a better way in Empathy</title>
		<link>http://blog.ishans.info/2012/01/19/savemystatus-a-script-to-manage-the-chat-statuses-in-a-better-way-in-empathy/</link>
		<comments>http://blog.ishans.info/2012/01/19/savemystatus-a-script-to-manage-the-chat-statuses-in-a-better-way-in-empathy/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 18:33:55 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Empathy]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=192</guid>
		<description><![CDATA[This is a script I wrote long time ago.It will load the last used status when Empathy restarts or&#160;when one of the accounts of the user comes online. This functionality was not available in Empathy at the time I wrote &#8230; <a href="http://blog.ishans.info/2012/01/19/savemystatus-a-script-to-manage-the-chat-statuses-in-a-better-way-in-empathy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This is a script I wrote long time ago.It will load the last used status when Empathy restarts or&nbsp;when one of the accounts of the user comes online. This functionality was not available in Empathy at the time I wrote this script. Every time I restart Empathy, its chat status was reset to &#8220;Available&#8221;. But now it seems that the new Empathy versions has the capability to remember the last used chat status (whether it was &#8220;Available&#8221;, &#8220;Busy&#8221;, &#8220;Away&#8221;, or &#8220;Invisible&#8221;). &nbsp;But still Empathy cannot remember the chat status message that was used in the last time. This script adds all this functionality to Empathy.</p>
<p><strong>How to use this:</strong></p>
<p><strong></strong><br />
(These guidelines are for Ubuntu 11.04 . But procedure will be lot common<br />
in other Linux flavours too)</p>
<p style="padding-left: 30px;">0) Get the code from&nbsp;<a href="https://github.com/ishanthilina/saveMyStatus">https://github.com/ishanthilina/saveMyStatus</a></p>
<p style="padding-left: 30px;">1).Create a folder named &#8220;.scripts&#8221; in the home directory. Copy this script to that folder.<br />
2).Go to Startup Application Preferences (search for &#8220;startup&#8221; in dashboard).<br />
3).Click Add.<br />
4).Give any Name you like.<br />
5).In Command, click on Browse and select your script from the file browser (which is in<br />
/home/<your user="" name="">/.scripts)<br />
6).Add a comment if you like.</your></p>
<p>Now the script will run from the next time you login to the computer. Have fun. And don&#8217;t forget to give me feedback <img src='http://blog.ishans.info/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2012/01/19/savemystatus-a-script-to-manage-the-chat-statuses-in-a-better-way-in-empathy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to fix the Folderview screenlet properties dialog exception throw</title>
		<link>http://blog.ishans.info/2012/01/15/how-to-fix-the-folderview-screenlet-properties-dialog-exception-throw/</link>
		<comments>http://blog.ishans.info/2012/01/15/how-to-fix-the-folderview-screenlet-properties-dialog-exception-throw/#comments</comments>
		<pubDate>Sun, 15 Jan 2012 05:32:01 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Screenlets]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=176</guid>
		<description><![CDATA[Folderview screenlet is one of the screenlets that I have found very useful. But it doesn&#8217;t function correctly with the new python version (python 2.7). When the option is selected to view the properties dialog it gives the following exception. &#8230; <a href="http://blog.ishans.info/2012/01/15/how-to-fix-the-folderview-screenlet-properties-dialog-exception-throw/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Folderview screenlet is one of the screenlets that I have found very useful. But it doesn&#8217;t function correctly with the new python version (python 2.7). When the option is selected to view the properties dialog it gives the following exception.</p>
<blockquote><p>Traceback (most recent call last):</p>
<p>&nbsp; File &#8220;/usr/lib/python2.7/site-packages/screenlets/__init__.py&#8221;, line 1913, in button_press</p>
<p>&nbsp; &nbsp; self.menuitem_callback(widget,&#8217;info&#8217;)</p>
<p>&nbsp; File &#8220;/usr/lib/python2.7/site-packages/screenlets/__init__.py&#8221;, line 2119, in menuitem_callback</p>
<p>&nbsp; &nbsp; self.show_settings_dialog()</p>
<p>&nbsp; File &#8220;/usr/lib/python2.7/site-packages/screenlets/__init__.py&#8221;, line 1570, in show_settings_dialog</p>
<p>&nbsp; &nbsp; se.set_info(self.__name__, glib.markup_escape_text(self.__desc__), &#8216;(c) &#8216; + glib.markup_escape_text(self.__author__),&nbsp;</p>
<p>TypeError: glib.markup_escape_text() argument 1 must be string or read-only buffer, not None</p>
<div>&nbsp;</div>
</blockquote>
<p>It seems that the variable <strong>__desc__</strong>&nbsp;is not set when calling the&nbsp;<strong>glib.markup_escape_text() </strong>method. So until some geek comes and fix this bug, we can use the following method to overcome this burden. (You&#8217;ll be able to follow the same procedure if you are getting this error for some other screenlet too <img src='http://blog.ishans.info/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' />  )</p>
<ul>
<li>Open <strong>__init__.py</strong> &nbsp;in <strong>/usr/lib/python2.7/site-packages/screenlets</strong> with root&nbsp;privileges.&nbsp;</li>
<li>Find the line&nbsp;<strong>se.set_info(self.__name__, glib.markup_escape_text(self.__desc__), &#8216;(c) &#8216; + glib.markup_escape_text(self.__author__)</strong> . This should approximately be in the line 1570.</li>
<li>Add the following code segment before that line.</li>
</ul>
<p style="padding-left: 120px;"><strong>if not self.__desc__:</strong></p>
<p style="padding-left: 150px;"><strong>self.__desc__=&#8217;Description not set&#8217;</strong></p>
<p style="padding-left: 30px;">(keep in mind that python is sensitive to indentations).</p>
<ul>
<li>Save and restart the screenlet.</li>
</ul>
<div>&nbsp;</div>
<p>Congratulations&#8230;! You have fixed a bug in a very naive way&#8230;.! .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2012/01/15/how-to-fix-the-folderview-screenlet-properties-dialog-exception-throw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Set brightness automatically at the startup in Linux</title>
		<link>http://blog.ishans.info/2011/09/25/set-brightness-automatically-at-the-startup-in-linux/</link>
		<comments>http://blog.ishans.info/2011/09/25/set-brightness-automatically-at-the-startup-in-linux/#comments</comments>
		<pubDate>Sun, 25 Sep 2011 05:42:12 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=158</guid>
		<description><![CDATA[When ever I restart (or logout and login) my laptop the LCD display brightness is set to the maximum value. Even if I set the brightness settings in the power to the value I need, they won&#8217;t be in effect &#8230; <a href="http://blog.ishans.info/2011/09/25/set-brightness-automatically-at-the-startup-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>When ever I restart (or logout and login) my laptop the LCD display brightness is set to the maximum value. Even if I set the brightness settings in the power to the value I need, they won&#8217;t be in effect when I restart the machine.</p>
<p><strong>&nbsp;Please note that rest of the blog article was edited on 5th of August 2012.</strong></p>
<p>To solve this problem I wrote the following python script. First you need to add it to the startup applications list. The command to be given in the startup applications is&nbsp;“<strong>python /&lt;path&gt;/&lt;to&gt;/&lt;script&gt;/setBrightness.py &lt;&nbsp;Brightness&nbsp;level&gt;</strong>”.</p>
<p>(If you don&#8217;t know how to add this to&nbsp;start-up&nbsp;applications please refer <a href="http://linuxandfriends.com/2011/06/01/how-to-add-startup-programs-in-gnome-3/" target="_blank">http://linuxandfriends.com/2011/06/01/how-to-add-startup-programs-in-gnome-3/</a>&nbsp;)</p>
<p>An example would be&nbsp;<strong>python</strong> <strong>/home/ishan/.setBrightness/setBrightness.py 20</strong> . If you do not specify a brightness level, the script will change the brightness level according to the time of the day. If it&#8217;s between 7am and 8pm, the script will make the brightness be set to 75.&nbsp;&nbsp;If it&#8217;s between 8pm and 7am, the script will make the brightness be set to 20. You can edit these brightness levels by changing the variables <strong>day_level</strong> and <strong>night_level</strong> respectively. &nbsp;</p>
<p>A special thank should go to <a title="Sergio" href="http://www.chekolyn.com/" target="_blank">Sergio Aguilar</a> for adding this neat functionality of brightness changing according to the time of the day and changing the brightness using parameter passing.</p>
<p><span style="text-decoration: underline;"><strong>If you are using Gnome 3 or Unity -&nbsp;</strong></span></p>
<p>Checkout the <strong>master</strong> branch from&nbsp;<a href="https://github.com/ishanthilina/setBrightness">https://github.com/ishanthilina/setBrightness</a>.</p>
<p><span style="text-decoration: underline;"><strong>If you are using Gnome 2 -</strong></span></p>
<p>Checkout the <strong>Gnome2</strong> branch from&nbsp;<a href="https://github.com/ishanthilina/setBrightness">https://github.com/ishanthilina/setBrightness</a>.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2011/09/25/set-brightness-automatically-at-the-startup-in-linux/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Start empathy automatically when network connection is available</title>
		<link>http://blog.ishans.info/2011/09/24/start-empathy-automatically-when-network-connection-is-available/</link>
		<comments>http://blog.ishans.info/2011/09/24/start-empathy-automatically-when-network-connection-is-available/#comments</comments>
		<pubDate>Sat, 24 Sep 2011 15:42:02 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[D-bus]]></category>
		<category><![CDATA[Empathy]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=147</guid>
		<description><![CDATA[I have noticed that Empathy (the default multi-protocol chat client in Ubuntu 11.04) doesn&#8217;t re-login to the accounts after the network is dropped and re-connected. So I wrote the following python script to solve this problem. The script will be &#8230; <a href="http://blog.ishans.info/2011/09/24/start-empathy-automatically-when-network-connection-is-available/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I have noticed that Empathy (the default multi-protocol chat client in Ubuntu 11.04) doesn&#8217;t re-login to the accounts after the network is dropped and re-connected. So I wrote the following python script to solve this problem. The script will be using D-bus signals to detect the network connection status.This will make empathy to,</p>
<p>&nbsp;</p>
<ul>
<li>connect automatically when network connection is established (even when empathy is not running).</li>
<li>re-login to accounts when the network gets dropped and reconnect again(very useful when using wireless connections).</li>
</ul>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>To use this script add it to the startup applications. Command to be given is “<strong>python /&lt;path&gt;/&lt;to&gt;/&lt;script&gt;/empathyConnect.py</strong>”</p>
<p>&nbsp;</p>
<p>Download::<a title="Download empathyConnect" href="http://ishans.info/attachments/article/64/empathyConnect.py"> http://ishans.info/attachments/article/64/empathyConnect.py</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2011/09/24/start-empathy-automatically-when-network-connection-is-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Slick sound problems in Linux</title>
		<link>http://blog.ishans.info/2011/07/30/java-slick-sound-problems-in-linux/</link>
		<comments>http://blog.ishans.info/2011/07/30/java-slick-sound-problems-in-linux/#comments</comments>
		<pubDate>Sat, 30 Jul 2011 15:15:45 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Slick]]></category>
		<category><![CDATA[slick engine]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=140</guid>
		<description><![CDATA[My operating system is Ubuntu Linux 11.04 and I am using Java Slick library to build a game in these days. I faced the following error when I tried to load sounds using Music backMus=new Music(“path/to/file”); . &#160; &#160; INFO:Initialising &#8230; <a href="http://blog.ishans.info/2011/07/30/java-slick-sound-problems-in-linux/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->My operating system is Ubuntu Linux 11.04 and I am using Java Slick library to build a game in these days. I faced the following error when I tried to load sounds using <strong>Music backMus=new Music(“path/to/file”);</strong> .</p>
<p>&nbsp;</p>
<p>&nbsp;<br />
<pre><strong>INFO:Initialising sounds..</strong></pre><br />
<pre><strong>AL lib: oss.c:179: Could not open /dev/dsp: No such file or directory</strong></pre><br />
<pre><strong>ERROR:Sound initialisation failure.</strong></pre><br />
<pre><strong>ERROR:Could not locate OpenAL library. org.lwjgl.LWJGLException: Could not locate OpenAL library.</strong></pre><br />
<!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->Searched everywhere for hours to find a solution for this and tried many guides which were written to solve this problem, but none of them were a success. Finally I got to know that this error is caused because Slick library uses a very old version of LWJGL (Light Weight Java Gaming Library). If you too are having this same problem use the following guidelines to rectify it.</p>
<p>&nbsp;</p>
<ul>
<li>Download the latest version of LWJGL from <a href="http://lwjgl.org/download.php">http://lwjgl.org/download.php</a>.(Download the file named lwjgl-x.x.x.zip).</li>
<li>Extract the downloaded file.</li>
<li>Copy the libraries that you are using from the jar folder in the extracted directory to your games Slick library folder. (Confirm file overwrites).</li>
<li>Copy the relevant native files from the native folder to your games Slick natives folder. (Confirm file overwrites).</li>
<li>Now reload the libraries in your IDE-if you are using any (For an example,in Net Beans remove all the slick libraries and add them again).</li>
</ul>
<p>&nbsp;</p>
<p><!-- 		@page { margin: 0.79in } 		P { margin-bottom: 0.08in } -->Now the game will play the sounds smoothly&#8230;!</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2011/07/30/java-slick-sound-problems-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to put Conky under the windows?</title>
		<link>http://blog.ishans.info/2011/06/03/how-to-put-conky-under-the-windows/</link>
		<comments>http://blog.ishans.info/2011/06/03/how-to-put-conky-under-the-windows/#comments</comments>
		<pubDate>Fri, 03 Jun 2011 10:33:03 +0000</pubDate>
		<dc:creator>Ishan Thilina Somasiri</dc:creator>
				<category><![CDATA[Conky]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[About]]></category>
		<category><![CDATA[Eye candy]]></category>

		<guid isPermaLink="false">http://blog.ishans.info/?p=134</guid>
		<description><![CDATA[Some of you may have experienced the problem of Conky being over the windows when the machine starts. So you have to manually restart Conky using killall conky; conky . But this can be easily avoided by editing the .conkyrc &#8230; <a href="http://blog.ishans.info/2011/06/03/how-to-put-conky-under-the-windows/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Some of you may have experienced the problem of Conky being over the windows when the machine starts. So you have to manually restart Conky using <strong>killall conky; conky</strong> . But this can be easily avoided by editing the .conkyrc file. All you have to do is to set the <strong>&#8220;own_window_type&#8221;</strong> option to <strong>&#8220;normal&#8221;</strong>. Then Conky will appear under the windows when the OS restarts.</p>
<p>Happy Conkying&#8230;.!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.ishans.info/2011/06/03/how-to-put-conky-under-the-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
