<?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>Bandos&#039; Arcade &#187; Hacks</title>
	<atom:link href="http://www.nuwanbando.com/tag/hacks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nuwanbando.com</link>
	<description>&#34;It&#039;s not about how it is, but how I see it &#34; - Stranger Than Fiction</description>
	<lastBuildDate>Mon, 30 Aug 2010 07:37:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Single Sign-On between Joomla (PHP) and a custom JSF / JSP login (JAVA)</title>
		<link>http://www.nuwanbando.com/2008/01/single-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java/</link>
		<comments>http://www.nuwanbando.com/2008/01/single-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java/#comments</comments>
		<pubDate>Thu, 24 Jan 2008 15:08:15 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Designing & Development]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[JSF]]></category>
		<category><![CDATA[TCP/UDP]]></category>

		<guid isPermaLink="false">http://nuwanbando.com/?p=72</guid>
		<description><![CDATA[Single sign-on (SSO) is a method of access control, that enables a user to authenticate once, and gain access to the resources of multiple software systems. Well in my case, the task i have given is to authenticate a user in a PHP and a JAVA (Web) system simultaneously. My PHP web application is the [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2008%2F01%2Fsingle-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java%2F&title=Single+Sign-On+between+Joomla+%28PHP%29+and+a+custom+JSF+%2F+JSP+login+%28JAVA%29&related=no" ><span style="display:none">Single sign-on (SSO) is a method of access control, that enables a user to authenticate once, and gain access to the resources of multiple software systems. Well in my case, the task i have given is to authenticate a user in a PHP and a JAVA (Web) system simultaneously. My PHP web application is the [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2008%2F01%2Fsingle-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2008%2F01%2Fsingle-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Single sign-on</strong> (SSO) is a method of access control, that enables a user to authenticate once, and gain access to the resources of multiple software systems. Well in my case, the task i have given is to authenticate a user in a PHP and a JAVA (Web) system simultaneously.</p>
<p>My PHP web application is the well known Joomla CMS, and my JAVA web application is based on JSF and custom built. After some thinking and research I found several resources which are worth reading (<a href="http://www.josso.org/" title="JOSSO" id="kv-6">JOSSO</a>, <a href="http://www.imprivata.com/onesign_sso" title="One Sign" id="vwpy">OneSign</a> ), but i couldn&#8217;t take any help from them, mostly those SSO frameworks are complex ( yeah <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  I couldn&#8217;t understand ) and aimed on a general pourpose and most of them are not for free.</p>
<p>So yeah I thought of doing some Hack to joomla and also make some changes in my Java web app&#8217;s authentication method. After talking with some of my geeky Friends (<a href="http://www.sandaru1.com/" title="Sandaruwan" id="who9">Sandaruwan</a> and Anjana). I came up with two approaches. both are involved in handling the cookies manually up to certain extent.</p>
<p>The 1st approach is (Which i didn&#8217;t try and had to give up due to the reason that I am using JSF as the web application framework) to log-in to the Joomla site and after loged in to Joomla create a random named temp file in the server  (possibly in /home/secrets with 777) with the user-name  (if a valid log in) and set a cookie using set_cookie(&#8220;name&#8221;,$filename) and direct to a jsp page to do the java side authentication.</p>
<p>in this JSP, page read the secret file name from the cookie and read the file from the http server in-order to take the username of the loged-in user. By passing this to the authentication method of the java web app, the java side also can be authenticated.</p>
<p>yup it is pretty simple, but i had to give it up mainly because I use JSF. if I do the user authentication in the above way in the java side. I cannot add the user object to the FacesContext which will be used by my other java side components. so even though i log in. later on in other jsf pages my loged user cannot be found. (Shortly my java login process is not happening according to the JSF implementation procedures.) and secondly i had to give up this method because my Project manger didn&#8217;t like the idea of saving temp files in the server. <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>So the Second and the method which i have implemented is, automating the Joomla log-in process by making an http request to the http server from my JSF backing bean. and set the PHP cookie manually via Http Servlet response.</p>
<p>before i explain this method more broadly i have to mention about two nice tools which helped me to monitor the http requests and response.<br />
<a href="http://ws.apache.org/commons/tcpmon/" title="Apache TCP Monitor" id="belg">Apache TCP Monitor</a><br />
<a href="https://addons.mozilla.org/en-US/firefox/addon/3829" title="Live Http headers (FireFox ad-on)" id="vem7">Live Http headers (FireFox ad-on)</a></p>
<p><strong><u>Architecture</u></strong></p>
<p><img src="http://docs.google.com/File?id=ddv87v2p_21dpsn2kwh" style="width: 365px; height: 245px" /></p>
<p><span style="font-weight: bold">Implementation</span></p>
<p>There are two different scenarios.<br />
1. User can visit teh home page of the joomla site 1st and the PHP Cookie is already set.<br />
2. User visit the Java site PHP Cookie is not available.</p>
<p><span id="more-72"></span><span style="font-weight: bold"></span></p>
<p>Since anyhow we are using the java login form for the username and password in put. the Signing in for both sites will be done from the java side. (If its the PHP side same problem with the JSF session)</p>
<p>I created a link in the joomla home to the JSF login form. and made the joomla login form invisible to the user.</p>
<pre id="line123">&lt;<span class="start-tag">form</span><span class="attribute-name"> action</span>=<span class="attribute-value">"/joomla/index.php" </span><span class="attribute-name">method</span>=<span class="attribute-value">"post" </span><span class="attribute-name">name</span>=<span class="attribute-value">"login" </span><span class="attribute-name"></span></pre>
<pre id="line123"><span class="attribute-name">					id</span>=<span class="attribute-value">"form-login" </span>&gt;
    &lt;<span class="start-tag">input</span><span class="attribute-name"> type</span>=<span class="attribute-value">"hidden" </span><span class="attribute-name">name</span>=<span class="attribute-value">"option" </span><span class="attribute-name">value</span>=<span class="attribute-value">"com_user" </span><span class="error"><span class="attribute-name">/</span></span>&gt;
    &lt;<span class="start-tag">input</span><span class="attribute-name"> type</span>=<span class="attribute-value">"hidden" </span><span class="attribute-name">name</span>=<span class="attribute-value">"task" </span><span class="attribute-name">value</span>=<span class="attribute-value">"login" </span><span class="error"><span class="attribute-name">/</span></span>&gt;
    &lt;<span class="start-tag">input</span><span class="attribute-name"> type</span>=<span class="attribute-value">"hidden" </span><span class="attribute-name">name</span>=<span class="attribute-value">"return" </span><span class="attribute-name"></span></pre>
<pre id="line123"><span class="attribute-name">		value</span>=<span class="attribute-value">"aHR0cDovL2xvY2FsaG9zdC9qb29tbGEvaW5kZXgucGhw" </span><span class="error"><span class="attribute-name">/</span></span>&gt;
    &lt;<span class="start-tag">input</span><span class="attribute-name"> type</span>=<span class="attribute-value">"hidden" </span><span class="attribute-name"></span></pre>
<pre id="line123"><span class="attribute-name">		name</span>=<span class="attribute-value">"4c8b847e06d9cfc211c7c0547d8b0e82" </span><span class="attribute-name">value</span>=<span class="attribute-value">"1" </span><span class="error"><span class="attribute-name">/</span></span>&gt;
&lt;/<span class="end-tag">form</span>&gt;</pre>
<p>I removed the input text fields for username and password but kept the four hidden fields as shown above. it is very important to keep these hidden fields hence, when login, joomla is checking for these randomly generated (generated in the server and dynamically added to the form) values. to remove the visible input text fields you have to hack in to thejoomla template.<br />
Now there is no login form in the Joomla home (not invisible). Once you click the Login Link the user will be forward to a java (JSF) login form and asked to insert the username and password. these values are taken in to the Backing bean (Normal JSF procedure). and make the JAVA side authentication.</p>
<p>If the user is authenticated, what you have to do is make two UrlConnection to the HTTP server in order to authenticate Joomla. the 1st UrlConnection is to read the main page (or the page where joomla has its dynamically generated Login form)</p>
<p>you have to read four hidden fields in the form and take them to variables and create a request string, and make the 2nd request to the same page (Due to Joomla&#8217;s design pattern). you should not forget to send the cookie that you received with the 1st request. Once you did this you are authenticated in thephp side too. The next step is adding the cookie to the HttpServletResponce. (Make sure u set the path of the cookie.. I had to debug for hours forgetting that part <img src='http://www.nuwanbando.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  )</p>
<p>The above mentioned is the 1st scenario if there are no cookies in the client side (if the user haven&#8217;t requested the home page ofjoomla). the 2nd scenario is if the user has a cookie, then when ur making the request u have to get the cookies from the HttpServletRequest and append it to the request header. Simply what you have to do is get all the cookies and append them. the rest of it is same.</p>
<p>So that&#8217;s it.. you&#8217;re authenticated in both web apps. With the post i will attach the Java Source code i used to do this task.</p>
<p><a href="http://nuwanbando.com/wp-content/uploads/2008/01/authjoomla.zip" title="Joomla Auth Source Code">Joomla Auth Source Code</a></p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2008/01/single-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2008/01/single-sign-on-between-joomla-php-and-a-custom-jsf-jsp-login-java/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>JEvents Hack &#8211; Integrating JEvents with Google calender</title>
		<link>http://www.nuwanbando.com/2007/10/jevents-hack-integrating-jevents-with-google-calender/</link>
		<comments>http://www.nuwanbando.com/2007/10/jevents-hack-integrating-jevents-with-google-calender/#comments</comments>
		<pubDate>Thu, 04 Oct 2007 09:12:49 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[LAMP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web Designing & Development]]></category>
		<category><![CDATA[Hacks]]></category>

		<guid isPermaLink="false">http://nuwanbando.com/?p=64</guid>
		<description><![CDATA[As i promised today I got some time to write about some PHP programming i did few weeks ago. I had to integrate Google calender with the Sensoria web site, so that the events published in the sensoria site will be automatically published in Sensoria&#8217;s public Google calender. Sensoria Site is created using a famous [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F10%2Fjevents-hack-integrating-jevents-with-google-calender%2F&title=JEvents+Hack+%26%238211%3B+Integrating+JEvents+with+Google+calender&related=no" ><span style="display:none">As i promised today I got some time to write about some PHP programming i did few weeks ago. I had to integrate Google calender with the Sensoria web site, so that the events published in the sensoria site will be automatically published in Sensoria&#8217;s public Google calender. Sensoria Site is created using a famous [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F10%2Fjevents-hack-integrating-jevents-with-google-calender%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F10%2Fjevents-hack-integrating-jevents-with-google-calender%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As i promised today I got some time to write about some PHP programming i did few weeks ago. I had to integrate Google calender with the <a href="http://www.sensoria-ist.eu/">Sensoria</a> web site, so that the events published in the sensoria site will be automatically published in Sensoria&#8217;s public Google calender.</p>
<p>Sensoria Site is created using a famous CMS called <a href="http://www.mamboserver.com/">Mamb</a><a href="http://www.mamboserver.com/">o</a>, in Mambo one can install plug-ins for many usage for the customized site they are creating. In this case Sensoria was using Mambo Events Component or now available to download as JEvents in Joomla CMS.</p>
<p>What I did was a small code hack in the eventmanager.php file in com_eventmanager folder in the components directory of Mambo. Its was a pretty easy task, but i had problems while testing. I was behind a proxy and the Zend framework gave a huge trouble when connecting to Google Via an HTTPS connection. After some descutions on <a href="http://groups.google.com/group/google-calendar-help-dataapi/browse_thread/thread/725f73252e76851c">Google calender forums</a>.. I found out that it is a bug in the Zend Farmework (Which i could not find a solution and didn&#8217;t bother or had time to spend on fixing it). So i had to test it in a live server.</p>
<p>Any how now its all working.. I will publish the code out here.. so anyone who wants to do the same.. please feel free to use it..</p>
<p><a href="http://nuwanbando.com/wp-content/uploads/2007/10/eventmanager.zip" title="eventmanager.php">eventmanager.php</a></p>
<p>cheers !!</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2007/10/jevents-hack-integrating-jevents-with-google-calender/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2007/10/jevents-hack-integrating-jevents-with-google-calender/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNIX / LINUX based Client &amp; a Server application</title>
		<link>http://www.nuwanbando.com/2007/06/unixlinux-based-client-a-server-application/</link>
		<comments>http://www.nuwanbando.com/2007/06/unixlinux-based-client-a-server-application/#comments</comments>
		<pubDate>Wed, 13 Jun 2007 04:08:10 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[protocols]]></category>
		<category><![CDATA[TCP/UDP]]></category>

		<guid isPermaLink="false">http://nuwanbando.com/?p=34</guid>
		<description><![CDATA[Okey so am writing after some time about some valuable thing !! This is about some thing I happened to do as an assignment for one of my degree modules (Network Application Development). The Assignment is to implement a server and a client using both TCP and UDP. The functionalities expected were, a centralized server [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F06%2Funixlinux-based-client-a-server-application%2F&title=UNIX+%2F+LINUX+based+Client+%26%23038%3B+a+Server+application&related=no" ><span style="display:none">Okey so am writing after some time about some valuable thing !! This is about some thing I happened to do as an assignment for one of my degree modules (Network Application Development). The Assignment is to implement a server and a client using both TCP and UDP. The functionalities expected were, a centralized server [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F06%2Funixlinux-based-client-a-server-application%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F06%2Funixlinux-based-client-a-server-application%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Okey so am writing after some time about some valuable thing !! This is about some thing I happened to do as an assignment for one of my degree modules (Network Application Development). The Assignment is to implement a server and a client using both TCP and UDP. The functionalities expected were, a centralized server which keeps records of the online connected buddies in the network (Subscription)<span id="more-34"></span><!--more--><!--more--><!--more--></p>
<p>A Client to communicate and retrieve the buddy list from the central central server and directly connect to the buddy (peer 2 peer)</p>
<p>message broadcasting among groups.</p>
<p>So here I go with some details about the application level protocol  and I will atach the C codes if any one needs to download and modify please feel free.</p>
<p><strong>Application Level Protocol</strong></p>
<p>The application level protocol is mainly implements two applications, the central server and the p2p<br />
client.</p>
<p><strong>Basic functionality of the central server</strong></p>
<ul>
<li>User(client) subscription</li>
<li>Keep records of the users</li>
<li>Update records on new subscription and un-subscription</li>
<li>Broadcast the record table to all the online clients.</li>
</ul>
<p></br></br><br />
<strong>Basic p2p client functionality</strong></p>
<ul>
<li>Retrieve the user table from the central server.</li>
<li>Broadcast messages to all peers</li>
<li>Talk with each peer separately</li>
</ul>
<p></br></br><br />
<strong>Server protocol</strong></p>
<p>Centralized server is using a TCP connection to connect to all its peers. The Server binds to a socket<br />
and keeps listening to all incoming TCP connections.<br />
When a new client is connected to the server’s port number server accepts the client connection and<br />
open up a new thread for that client.<br />
The server maintains a table of clients containing client information.<br />
In side the newly created thread the server updates the count of clients and inserts new client data in<br />
to its table.<br />
The connection between the server and the client will not be closed.<br />
The server in its main process will keep on listening to new incoming TCP connections.<br />
The server is declaring a thread pool (an array of threads) where it will create a separate new thread<br />
for each connected client and will do all the communication with that client in that separate thread.<br />
The server keeps the number of clients and the client table as global data. And they are shared with<br />
each thread.<br />
As soon as the numbers of clients are changed (a user is newly subscribed or unsubscribed)<br />
the<br />
server will send the updated table of clients to all clients using the connected threads.</p>
<p><strong>p2p Client protocol</strong></p>
<p>Client connects to the server using a TCP connection.<br />
Client is maintaining UDP server and a UDP client for the peer-to-peer<br />
communication.<br />
At first when the client is run with the server port as a command line argument it prompts for the<br />
UDP port where it’s UDP server will be listening for incoming messages from the fellow peers. The<br />
UDP server Port will be send to the central server for subscription.<br />
A child process will be invoked inside the main process for UDP activities (UDP server and client)<br />
The UDP client will prompt for the host address and the port of the fellow peer to start a<br />
conversation. This can be provided by referencing to the clients table, sent by the server.<br />
Then the UDP client will establish a connection with the fellow peer using the given host addresses<br />
and the port.<br />
If a message has to be broadcast the UDP client will connect to all hosts and send the message.</br></br><br />
<a href="http://www.nuwanbando.com/ServerClient.zip">Download</a> the C code, make and run</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2007/06/unixlinux-based-client-a-server-application/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2007/06/unixlinux-based-client-a-server-application/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing Gnome(cairo)-Dock</title>
		<link>http://www.nuwanbando.com/2007/02/installing-gnome-dock-cairo/</link>
		<comments>http://www.nuwanbando.com/2007/02/installing-gnome-dock-cairo/#comments</comments>
		<pubDate>Tue, 20 Feb 2007 16:23:01 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Aiglx]]></category>
		<category><![CDATA[Beryl]]></category>
		<category><![CDATA[Cairo]]></category>
		<category><![CDATA[Cario-dock]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Gnome-dock]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://nuwanbando.com/?p=16</guid>
		<description><![CDATA[Today while i was surfing the net (digging new gadgets for my Gnome desktop) i saw some interesting screenshots of a universal dock something which is similar to the OSX making me hunt down this new feature to my desktop. i googled for &#8220;Gnome dock&#8221; and found a post in ubuntu forums where i followed [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F02%2Finstalling-gnome-dock-cairo%2F&title=Installing+Gnome%28cairo%29-Dock&related=no" ><span style="display:none">Today while i was surfing the net (digging new gadgets for my Gnome desktop) i saw some interesting screenshots of a universal dock something which is similar to the OSX making me hunt down this new feature to my desktop. i googled for &#8220;Gnome dock&#8221; and found a post in ubuntu forums where i followed [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F02%2Finstalling-gnome-dock-cairo%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F02%2Finstalling-gnome-dock-cairo%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Today while i was surfing the net (digging new gadgets for my Gnome desktop) i saw some interesting screenshots of a universal dock something which is similar to the OSX making me hunt down this new feature to my desktop.  i  googled  for <em>&#8220;Gnome dock</em>&#8221; and found a post in ubuntu forums where i followed the installation  process  and at last.. yes !! I got the DOCK but there were no application images seen in the DOCK. i solved this problem by editing the .svg files and the cairo-dock.c file. but the biggest problem i encountered was that when i added this to the sesion and restarted my X-server. I crashed or rather I didn&#8217;t see my desktop at all. (well for some wired reason it crashes only the desktop.) I think this happens when the Gnome session loads Beryl-manager, Beryl, Gdesklets and the cairo-dock at the same time it might get overloded and crashes the desktop.</p>
<p>Anyhow as a solution i delayed the loading process of each of these applications through a shell script. so on this post I will describe how to install <em>cairo-dock</em> and make it work hand to hand with <em>beryl</em>.</p>
<p>You can follow the instructions on the <a href="http://ubuntuforums.org/showthread.php?t=302570">Ubuntu forum</a> for the installation process. since it describes well I will write what is missing.</p>
<p>At the step 5 before download <a href="http://ubuntuforums.org/attachment.php?attachmentid=19718&#038;d=1164073465">cairo-dock.tar.gz</a> i signed up for the ubuntu forum.</p>
<p>At last after the installation process is done when you run cairo-dock it will appear in the bottom of your desktop with almost no images for the named applications.  These application icons are saved as .SVG files in the cairo directory what you have to do is open each of these files and replace the link to the image with your application icon&#8217;s path.</p>
<p align="center">xlink:href=&#8221;/<strong>usr/share/pixmaps/firefox.png</strong>&#8221;<br />
sodipodi:absref=&#8221;<strong>/usr/share/pixmaps/firefox.png</strong>&#8221;</p>
<p align="left">replace the highlighted link with your icon&#8217;s path and secondly you can add/remove applications from the dock by edition the cairo-dock.c file.  there in the specified section you have to add the name of the .SVG file, name of the application and the command to launch that application and <em>make</em> it. this is the simple way to make the DOCK running  with the applications you want in your desktop. If at the end when you add the DOCK to the session and restart and if then your Desktop crashes, simply write a shell script and save in /usr/bin/ and add that script to run on the beginning of the each session.</p>
<p align="left">my scripted looked like this.</p>
<p align="left">#!/bin/bash<br />
beryl-manager<br />
sleep 5<br />
beryl<br />
sleep 7<br />
cd /opt/cairo-dock<br />
./cairo-dock &#8211;no-glitz &#038;</p>
<p align="left">restart your X and you must be smoothly working !!! Enjoy&#8230;</p>
<p><strong>Credits :</strong></p>
<p align="left"><a href="http://nuwanbando.com/www.sandaru1.com">Sandaru1</a> &#038; Kasun</p>
<p align="left">
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2007/02/installing-gnome-dock-cairo/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2007/02/installing-gnome-dock-cairo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AiGLX  and Beryl On Ubuntu Edgy</title>
		<link>http://www.nuwanbando.com/2007/02/aiglx-and-beryl-on-ubuntu-edgy-intel-i915/</link>
		<comments>http://www.nuwanbando.com/2007/02/aiglx-and-beryl-on-ubuntu-edgy-intel-i915/#comments</comments>
		<pubDate>Sat, 10 Feb 2007 16:29:08 +0000</pubDate>
		<dc:creator>Nuwan Bandara</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[LAMP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Aiglx]]></category>
		<category><![CDATA[Beryl]]></category>
		<category><![CDATA[Gnome]]></category>
		<category><![CDATA[Hacks]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://nuwanbando.com/?p=13</guid>
		<description><![CDATA[Haah !!! after few days of playing on Ubuntu I decided to write some thing on things what I did to make my Gnome desktop more eye catching&#8230; I have heard of XGL working on Gnome providing a surprising effects !!! But also I have heard and seen that XGL effects works in much slower [...]]]></description>
			<content:encoded><![CDATA[		<div style="float:right;margin:0px 0px 10px 10px;">
			<a class="DiggThisButton DiggMedium" href="http://digg.com/submit?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F02%2Faiglx-and-beryl-on-ubuntu-edgy-intel-i915%2F&title=AiGLX++and+Beryl+On+Ubuntu+Edgy&related=no" ><span style="display:none">Haah !!! after few days of playing on Ubuntu I decided to write some thing on things what I did to make my Gnome desktop more eye catching&#8230; I have heard of XGL working on Gnome providing a surprising effects !!! But also I have heard and seen that XGL effects works in much slower [...]</span></a>		
		</div>		
		<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F02%2Faiglx-and-beryl-on-ubuntu-edgy-intel-i915%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.nuwanbando.com%2F2007%2F02%2Faiglx-and-beryl-on-ubuntu-edgy-intel-i915%2F&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Haah !!! after few days of playing on Ubuntu I decided to write some thing on things what I did to make my Gnome desktop more eye catching&#8230; I have heard of XGL working on Gnome providing a surprising effects !!!  But also  I have  heard and seen that XGL effects works in much slower motion in most of Intel  on board  graphic cards (intel i915),  so due to this fact I was  searching for alternatives  and found  AiGLX which comes  bundled  with  Ubuntu  Edgy&#8230; I decided to try this  hence  many Online articles have recommended AiGLX + Beryl combination works well in intell chipset.</p>
<p>What I did was simple configured the AiGLX as shown in the <a href="http://wiki.beryl-project.org/wiki/Install_Beryl_on_Ubuntu_Edgy_with_AIGLX">wiki</a>  and installed beryl !!! And yes As it says It works well&#8230;. but small suggestion when you make a session and load that in the start-up the ubuntu start-up gets much slower !!! So my idea is to place a small shell script to load the beryl manager and beryl and make it run in the start-up.. this will make the system faster than defining a separate session. my friend <a href="http://www.sandaru1.com">sandaruwan</a> have described of this method in a detail manner.</p>
<p>for the Intel i915 chipset users now have AiGLX+beryl to have the same experience where you will get by adding XGL !!!! As the last word for the post I would like to say&#8230;Now my Ubuntu OS is incomparable with the Windows in anyway of its appearance.</p>
<div id="fb-root"></div>
       <script>
       window.fbAsyncInit = function() {
       FB.init({appId: "108492862525832", status: true, cookie: true,
             xfbml: true});
        };
     (function() {
      var e = document.createElement("script"); e.async = true;
     e.src = document.location.protocol +
       "//connect.facebook.net/en_US/all.js";
     document.getElementById("fb-root").appendChild(e);
   }());
   </script><div class = "fb-div"><fb:like href="http://www.nuwanbando.com/2007/02/aiglx-and-beryl-on-ubuntu-edgy-intel-i915/" layout="standard" show_faces="true" width="450" action="like" colorscheme="light" /></div>]]></content:encoded>
			<wfw:commentRss>http://www.nuwanbando.com/2007/02/aiglx-and-beryl-on-ubuntu-edgy-intel-i915/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
