<?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>Shekhar Govindarajan's Blog &#187; Tips N Tricks</title>
	<atom:link href="http://www.shekhargovindarajan.com/category/tips-n-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.shekhargovindarajan.com</link>
	<description>My Notepad on the Web</description>
	<lastBuildDate>Mon, 06 Feb 2012 04:58:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
<atom:link rel="hub" href="http://pubsubhubbub.appspot.com/" />
			<item>
		<title>Solved: pfSense is not letting Tata Photon to talk to Tata Indicom Broadband</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-pfsense-is-not-letting-tata-photon-to-talk-to-tata-indicom-broadband/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-pfsense-is-not-letting-tata-photon-to-talk-to-tata-indicom-broadband</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-pfsense-is-not-letting-tata-photon-to-talk-to-tata-indicom-broadband/#comments</comments>
		<pubDate>Fri, 04 Nov 2011 16:00:48 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[bogon networks]]></category>
		<category><![CDATA[indicom]]></category>
		<category><![CDATA[pfsense]]></category>
		<category><![CDATA[photon]]></category>
		<category><![CDATA[tata]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=2512</guid>
		<description><![CDATA[Recently I faced this strange issue at a client&#8217;s place. Users using Tata Photon USB modem were not able to browse the website and other services, hosted on a server sitting at my client&#8217;s office. The client is using a Tata Indicom Broadband connection at the office. The server is sitting behind a pfSense firewall. [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I faced this strange issue at a client&#8217;s place. Users using Tata Photon USB modem were not able to browse the website and other services, hosted on a server sitting at my client&#8217;s office. The client is using a Tata Indicom Broadband connection at the office. The server is sitting behind a <a href="http://www.pfsense.org/" target="_blank">pfSense firewall</a>.</p>
<p>To add to the confusion, users using Airtel broadband and Reliance USB modem were able to browse the website. It was easy to blame Tata for this but the culprit (well, more or less) was the pfSense firewall.<span id="more-2512"></span>After struggling with Tata customer support, blaming them for this peculiar issue, the IT team of my client started troubleshooting. As a useful input, I was told that if the Tata broadband line was directly connected to a laptop, users using Tata Photon USB were able to connect to the laptop. This led me to suspect pfSense <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>To investigate this, what I did was as follows. I remote logged in to one of the user&#8217;s laptop who was using the Tata Photon USB modem. I ran a traceroute to the server.</p>
<p>The following image shows the output of the traceroute (tracert command running in a DOS terminal on Windows XP).</p>
<div id="attachment_2513" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2011/11/Traceroute-from-a-Tata-Photon-USB-to-a-Tata-Indicom-Broadband.jpg"><img class="size-medium wp-image-2513" title="Traceroute from a Tata Photon USB to Tata Indicom Broadband" src="http://www.shekhargovindarajan.com/wp-content/uploads/2011/11/Traceroute-from-a-Tata-Photon-USB-to-a-Tata-Indicom-Broadband-300x177.jpg" alt="Traceroute from a Tata Photon USB to Tata Indicom Broadband" width="300" height="177" /></a><p class="wp-caption-text">Traceroute from a Tata Photon USB to Tata Indicom Broadband</p></div>
<p>For security reasons, I have changed the actual hostname to abc.com and IP to 121.243.xxx.xxx in the above image.</p>
<p>Note the second last hop. It is a router (or whatever device) with an IP address 172.31.131.26! This seemed like a private IP address (more on this later).  This shows Tata is routing a connection, from a Tata Photon modem to a Tata Broadband, internally. So, for the pfSense firewall, the request is coming from a private IP (172.31.131.26 in this case).</p>
<p>With this finding in hand, I logged into the pfSense web interface and checked the firewall rules. But didn&#8217;t find anything suspicious or obstructing there.</p>
<p><strong>The Solution<br />
</strong>The solution was on the WAN page (Interfaces&gt;WAN). While browsing this page, I spotted two options on this page namely Block Private Networks and</p>
<div id="attachment_2521" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2011/11/pfsense-by-default-blocks-private-and-reserved-IP-addresses.png"><img class="size-medium wp-image-2521" title="pfSense by default blocks private and reserved IP addresses" src="http://www.shekhargovindarajan.com/wp-content/uploads/2011/11/pfsense-by-default-blocks-private-and-reserved-IP-addresses-300x168.png" alt="pfSense by default blocks private and reserved IP addresses" width="300" height="168" /></a><p class="wp-caption-text">pfSense by default blocks private and reserved IP addresses</p></div>
<p>Block Bogon Networks.</p>
<p>Both settings were hinting at something to do with private IPs and were checked (on) by default. What worked was unchecking Block Bogon Network. After reading up on Wikipedia, I found that the IP 172.31.x is a reserved IP  but not defined for private networks in the <a href="http://en.wikipedia.org/wiki/Private_network" target="_blank">RFC 1918</a>. This is the reason why unchecking Block Private Networks  did not work.</p>
<p>Bottom line: If Tata is not able to talk to Tata and you are using pfSense firewall, goto Interfaces&gt;WAN and uncheck Block Bogon Networks.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=2512&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-pfsense-is-not-letting-tata-photon-to-talk-to-tata-indicom-broadband/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Solved: Extension filename.php not present</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-extension-filename-php-not-present/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-extension-filename-php-not-present</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-extension-filename-php-not-present/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 15:09:06 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[dos2unix]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=2098</guid>
		<description><![CDATA[The day was pleasant till I got an E-mail from a client with a PHP script file attached to it. I had to schedule the PHP script via Cron on a Linux server. For PHP scripts in Cron, I do not prefer writing the Cron job as: 1 30 * * * /usr/bin/php -q /opt/script.php [...]]]></description>
			<content:encoded><![CDATA[<p>The day was pleasant till I got an E-mail from a client with a PHP script file attached to it. I had to schedule the PHP script via Cron on a Linux server. For PHP scripts in Cron, I do not prefer writing the Cron job as:</p>
<pre>1  30  *  *  *  /usr/bin/php -q /opt/script.php</pre>
<p>Instead, I prefer a crisper line as:</p>
<pre>1  30  *  *  *  /opt/script.php</pre>
<p>The latter is obviously neater and readable. To prepare a PHP script to execute just by the filename, you need to do two things:</p>
<ol>
<li>Add a line to the path to the PHP interpreter at the top of the script. For example:
<pre>#!/usr/bin/php -q
&lt;?php
// PHP code
?&gt;</pre>
</li>
<li>Make the script executable as:
<pre>chmod + script.php</pre>
</li>
</ol>
<p>Before inserting it in Cron it is always a good idea to test the script by executing it manually as:</p>
<pre>/opt/script.php</pre>
<p>What always worked for me, failed on me this time with an error saying: Extension /opt/script.php not present. What will you do when you get an informative error (being sarcastic) like this? I too had no clue.<span id="more-2098"></span>I checked the path of the PHP interpreter, double checked the permissions and also found other PHP files to be working. The script worked when served via a Web Server (Apache). What added to the confusion was, the same script worked when executed as follows:</p>
<pre>/usr/bin/php -q /opt/script.php</pre>
<p>I could have wasted hours in troubleshooting this if it hadn&#8217;t clicked to my mind that the client who sent me this script uses Windows. This means, this script would have been written in one the Windows text editors. Going by experience, case insensitivity and newline characters is the root to most problems with script which are written in Windows and run on Linux. A quick check did not reveal any case related issue.</p>
<p>To fix the second possible problem, I used dos2unix &#8211; a handy commandline tool to convert Windows based text files into Linux files (more on this later).</p>
<pre>dos2unix /opt/script.php</pre>
<p>And voila! this fixed the problem. I was then able to execute the script as /opt/script.php and also scheduling it via Cron worked perfectly.</p>
<p>If you ask me, how exactly did Windows newline characters would have messed up the script to result into this cryptic error (Extension script.php not present), I don&#8217;t have an answer. But going by the above fix, it was definitely Windows newline characters which were causing the problem.</p>
<p>A note about Windows and Linux newline character: Windows uses \r\n as the new line or next line characters. \r is called the carriage return character and \n is called the line feed character. Whereas in Linux, \n (line feed) is the newline character. The command line tool called dos2unix replaces all the \r\n (carriage return and line feed pair) to \n (line feed) in a script or text file.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=2098&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-extension-filename-php-not-present/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Solved: Unable to call toll free numbers in India using Windows Phone 7</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-unable-to-call-toll-free-numbers-in-india-using-windows-phone-7/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-unable-to-call-toll-free-numbers-in-india-using-windows-phone-7</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-unable-to-call-toll-free-numbers-in-india-using-windows-phone-7/#comments</comments>
		<pubDate>Thu, 03 Mar 2011 08:08:33 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[dell venue pro]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[windows phone 7]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=2076</guid>
		<description><![CDATA[I recently purchased a Dell Venue Pro powered by Windows Phone 7. It has been about 10 days that I&#8217;m living with lack of apps, tethering, E-mail client with conversation view and a feature rich Twitter client. I&#8217;m hoping that most of these will be solved by future updates and upcoming apps. On the other [...]]]></description>
			<content:encoded><![CDATA[<p>I recently purchased a Dell Venue Pro powered by Windows Phone 7. It has been about 10 days that I&#8217;m living with lack of apps, tethering, E-mail client with conversation view and a feature rich Twitter client. I&#8217;m hoping that most of these will be solved by future updates and upcoming apps.</p>
<p>On the other hand, I&#8217;m at war with issues on the phone due to lack of my familiarity with a Windows Phone. After all, I had been using Android for almost two years. One issue that bothered me the most was, I could not dial toll free numbers in India using my Dell Venue Pro.<span id="more-2076"></span>For example, 1800-425-4026 is the toll free number for <a title="Dell India" href="http://dell.co.in/" target="_blank">Dell India</a>. When I dial this number on my Dell Venue Pro, a + (plus) is automatically prefixed to the number. Hence the number becomes +18004254026. On the phone dialer it shows up nicely formatted as +1 (800) 425-4026. This means it actually dials a U.S. number (+1 is the country code for United States). So forget toll free, I&#8217;m accidently dialing an international number for which I will be charged!</p>
<p>The crux of the matter is I was not able to dial any toll free numbers in India. What&#8217;s more, I&#8217;m was not able to call Dell using a Dell. For those who have seen the Hindi movie <a title="Karthik Calling Karthik" href="http://www.imdb.com/title/tt1373156/" target="_blank">Karthik calling Karthik</a>, the situation here was  &#8221;Karthik not able to call Karthik&#8221; <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>So where did Dell screw up? Actually it is not Dell, it is Windows Phone 7. Seems the phone is tailored better for the U.S. customers than for Indian customers. But Dell must also not be forgiven. If they are launching a phone in India, they should have customized the bare bones for India. At the least they should have ensured that a Dell should be able to call Dell! After all, how would we call the toll free Dell support number(s) for any needed assistance for our phone.</p>
<p>Thankfully, the solution to the above is simple. The culprit is something called International Assist, found in the phone dialer&#8217;s settings. International Assist is defined as &#8220;Turning on this feature will help automatically correct some common mistakes while dialing internationally or dialing while abroad&#8221;. So it is the International Assist which decides that dialing a toll free number which starts with a 1 is a mistake and it corrects it by prefixing a +. And the worst part is, <strong>International Assist is turned &#8220;On&#8221; by default.</strong></p>
<p><strong>The Solution</strong><br />
To turn off International Assist, click on the Phone Tile or launch Phone from the list of applications. Tap on &#8220;&#8230;&#8221; on the bottom right. Select &#8220;call settings&#8221;. On Settings, turn off International Assist by tapping on the Toggle Switch. Now, you will be able to dial to toll free numbers in India and my Dell is able to call Dell <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=2076&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-unable-to-call-toll-free-numbers-in-india-using-windows-phone-7/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Solved: Setting up D-LINK DWA-525 (RaLink Device 3060) Wireless Desktop PCI Adapter on Fedora 14 Linux</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-setting-up-d-link-dwa-525-ralink-device-3060-wireless-desktop-pci-adapter-on-fedora-14-linux/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-setting-up-d-link-dwa-525-ralink-device-3060-wireless-desktop-pci-adapter-on-fedora-14-linux</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-setting-up-d-link-dwa-525-ralink-device-3060-wireless-desktop-pci-adapter-on-fedora-14-linux/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 06:06:52 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[802.11n]]></category>
		<category><![CDATA[cnetworkmanager]]></category>
		<category><![CDATA[dlink]]></category>
		<category><![CDATA[dwa525]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ralink]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=2014</guid>
		<description><![CDATA[My new &#8220;desktop grade server machine&#8221; at home has a 802.11n wireless PCI adapter namely D-LINK DWA-525 Wireless N 150 Desktop Adapter.  An adapter like this plugs into one of the PCI slots and connects to a wireless or Wi-Fi network. This helps to keep the machine anywhere in the house and not necessarily near [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_2032" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2011/02/D-Link_DWA-525_Wireless_N_150_Desktop_Adapter1.jpg"><img class="size-medium wp-image-2032" title="D-Link DWA-525 Wireless N 150 Desktop Adapter" src="http://www.shekhargovindarajan.com/wp-content/uploads/2011/02/D-Link_DWA-525_Wireless_N_150_Desktop_Adapter1-300x225.jpg" alt="D-Link DWA-525 Wireless N 150 Desktop Adapter" width="300" height="225" /></a><p class="wp-caption-text">D-Link DWA-525 Wireless N 150 Desktop Adapter</p></div>
<p>My new &#8220;desktop grade server machine&#8221; at home has a 802.11n wireless PCI adapter namely <strong>D-LINK DWA-525 Wireless N 150 Desktop Adapter</strong>.  An adapter like this plugs into one of the PCI slots and connects to a wireless or Wi-Fi network. This helps to keep the machine anywhere in the house and not necessarily near a router or Ethernet port.</p>
<p>On my desktop, I did a minimal or base installation of Fedora 14 Linux. Fedora was not able to recognize the wireless adapter and hence could not connect to the Wi-Fi router at my home. But with some efforts, I was able to make the adapter work on Fedora 14. Additionally, I was also able to configure the wireless adapter from the command line. What follows is a crisp tutorial with the required steps to setup DIR-615 PCI adapter on Linux.</p>
<p><span id="more-2014"></span>The following steps worked on a fresh installation of Fedora 14. While the steps mentioned are specific to <a href="http://fedoraproject.org/get-fedora" target="_blank">Fedora 14</a> , they should work for other flavors of Linux with minor changes. For example, while the method of installing GCC (the C language compiler) may differ, installation of the drivers for the wireless adapter should work as mentioned.</p>
<p><strong>Identify your Wireless adapter </strong><br />
Besides checking out the box and the manual of the wireless adapter, there is another way to identify it. Issue the following command:</p>
<pre>lspci | grep RaLink</pre>
<p>If the output contains something as follows:</p>
<pre>Network controller: RaLink Device 3060</pre>
<p>then this blog post is for you <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  But the same steps may work for a few other models (as explained in the section <strong>Download the drivers</strong>).</p>
<p><strong>Install the prerequisites</strong><br />
You will need to install gcc (C compiler) and kernel sources. On Fedora, they can be installed as follows:</p>
<pre>yum install gcc
yum install kernel-devel-`uname -r`</pre>
<p><strong>Download the drivers</strong><br />
Browse to the URL <a href="http://www.ralinktech.com/support.php?s=2">http://www.ralinktech.com/support.php?s=2</a>. Click on the link labeled <strong>RT3062PCI/mPCI/CB/PCIe(RT3060/RT3062/RT3562/RT3592)</strong>.<strong> </strong>Note the label. Besides 3060, it contains other model numbers too. Hence if the lspci command (see above) gives a different (from 3060) number, this blog post may still work for you.</p>
<p>On the subsequent page, type in your name and e-mail and click on the Accept button. This will download a file named DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217.tgz. In my case, I downloaded the drivers on my laptop and uploaded it on my desktop machine via SSH. The following steps should be executed on the machine with the wireless PCI adapter. Login as root.</p>
<p><strong>Install the drivers</strong><br />
Extract the downloaded file as:</p>
<pre>tar -zxvf DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217.tgz</pre>
<p>This will produce a directory named DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217. Open the file named config.mk, found in the directory DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217/os/linux/, in a text editor and modify the line:</p>
<pre>HAS_WPA_SUPPLICANT=n</pre>
<p>to</p>
<pre>HAS_WPA_SUPPLICANT=y</pre>
<p>Also change the line which says:</p>
<pre>HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=n</pre>
<p>to:</p>
<pre>HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y</pre>
<p>Save the file. Next, change (cd) to the directory DPO_RT3562_3592_3062_LinuxSTA_V2.4.1.1_20101217 and issue the following commands:</p>
<pre>make
make install</pre>
<p>Reboot and voila! The wireless adapter should start working. You should be able to connect to your WiFi router or access point using NetwokManager in GNOME or KDE. In my case, I connected via the command line utility of NetworkManager called cnetworkmanager (as explained in the next section)</p>
<p><strong>Connect to WiFi from the command line</strong><br />
My WiFi router is configured to use WPA or WPA2 authentication as shown in the screenshot below:</p>
<div id="attachment_2029" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2011/02/WPA_settings_on_D-Link-DIR-615_Wireless_N_Router.png"><img class="size-medium wp-image-2029" title="WPA settings on D-Link DIR-615 Wireless N Router" src="http://www.shekhargovindarajan.com/wp-content/uploads/2011/02/WPA_settings_on_D-Link-DIR-615_Wireless_N_Router-300x157.png" alt="WPA settings on D-Link DIR-615 Wireless N Router" width="300" height="157" /></a><p class="wp-caption-text">WPA settings on D-Link DIR-615 Wireless N Router</p></div>
<p>Install cnetworkmanager as:</p>
<pre>yum install cnetworkmanager</pre>
<p>To connect to a wireless router using WPA, append the following lines to the file named rc.local found in /etc directory:</p>
<pre>sleep 5
cnetworkmanager -C &lt;SSID&gt;  --wpa-pass="&lt;WPA-Password&gt;" &amp;</pre>
<p>In the second line, substitute &lt;SSID&gt; with the SSID of your wireless router. Substitute &#8220;&lt;WPA-Password&gt;&#8221; with the password that you have specified in your router for WPA/WPA authentication. For example:</p>
<pre>cnetworkmanager -C SHEKHAR --wpa-pass="secret123" &amp;</pre>
<p>Upon a reboot, the machine should automatically connect to your wireless router. That&#8217;s all folks!</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=2014&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-setting-up-d-link-dwa-525-ralink-device-3060-wireless-desktop-pci-adapter-on-fedora-14-linux/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Install Fedora 14 Linux without a monitor (headless), keyboard and CD/DVD</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/install-fedora-14-linux-without-a-monitor-headless-keyboard-and-cddvd/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=install-fedora-14-linux-without-a-monitor-headless-keyboard-and-cddvd</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/install-fedora-14-linux-without-a-monitor-headless-keyboard-and-cddvd/#comments</comments>
		<pubDate>Tue, 01 Feb 2011 09:02:48 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[fedora 14]]></category>
		<category><![CDATA[headless]]></category>
		<category><![CDATA[network boot]]></category>
		<category><![CDATA[pxe]]></category>
		<category><![CDATA[pxeboot]]></category>
		<category><![CDATA[syslinux]]></category>
		<category><![CDATA[tftpboot]]></category>
		<category><![CDATA[vnc]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=1979</guid>
		<description><![CDATA[As I tweeted http://twitter.com/#!/shekharg/status/30986928094453760 sometime back, I bought a new desktop for my home. This desktop (my home server) is with 16GB of RAM and with no monitor. For the monitor, I thought of hooking it up to my TV via a VGA port (a.k.a. RGB port). The machine has a DVD writer and I also bought [...]]]></description>
			<content:encoded><![CDATA[<p>As I tweeted <a href="http://twitter.com/#!/shekharg/status/30986928094453760">http://twitter.com/#!/shekharg/status/30986928094453760</a> sometime back, I bought a new desktop for my home. This desktop (my home server) is with 16GB of RAM and with no monitor. For the monitor, I thought of hooking it up to my TV via a VGA port (a.k.a. RGB port). The machine has a DVD writer and I also bought a keyboard for Rs. 160.</p>
<p>I required the TV, keyboard and DVD drive only for the one time installation of the operating system. Post the installation, I access the machine only across the network &#8211; via SSH (Secure SHell) or a web browser.</p>
<p>But I decided against the easy way of installation using my TV and keyboard. Instead, I challenged myself to install <a href="http://fedoraproject.org/get-fedora" target="_blank">Fedora 14</a> without using a monitor, keyboard/mouse and DVD drive on the server.<span id="more-1979"></span></p>
<div id="attachment_2005" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2011/02/vncviewer-showing-Fedora-14-installation-across-the-Network.png"><img class="size-medium wp-image-2005 " title="vncviewer showing Fedora 14 installation across the network" src="http://www.shekhargovindarajan.com/wp-content/uploads/2011/02/vncviewer-showing-Fedora-14-installation-across-the-Network-300x168.png" alt="vncviewer showing Fedora 14 installation across the network" width="300" height="168" /></a><p class="wp-caption-text">vncviewer showing Fedora 14 installation across the network</p></div>
<p>In a nutshell, such an installation can be achieved via PXE boot (a.k.a. network boot) wherein the operating system is installed across the network. The installation media itself can reside on any other machine on the network. What&#8217;s more, you can even interact with the graphical interface of the installation on any networked machine.</p>
<p>Note that while most modern desktops and servers have network booting, at times, you may need to enable it from the BIOS. This requires a monitor and keyboard defeating the very fun. In my case, network booting was enabled by default.</p>
<p>At the end of this exercise, I have an up and running Fedora 14 machine installed and configured completely across the network. Following is a jot down of how did I carry out this kind of installation.</p>
<p>As said above, you will need another machine connected to your network or your router.  In my case, I configured my laptop running Fedora 13 to serve the installation of Fedora 14 on my home server.</p>
<p>The installation and configuration mentioned below are specific to Fedora 13. But most steps, especially the configuration should apply to other flavors of Linux. The overall steps are as follows:</p>
<ol>
<li>Configure the network (on the router and laptop).</li>
<li>Install the services on the laptop to:
<ul>
<li>Assign IP to the home server during the network boot</li>
<li>Serve the required files to the home server to boot and start the installation</li>
<li>Serve the packages to be installed</li>
<li>Interact with the graphical installer for disk partitioning, package selection etc.</li>
</ul>
</li>
<li>Configure the services</li>
<li>Start the services</li>
<li>Switch on the target machine/server</li>
<li>Wait for the graphical installer to popup on the laptop, follow the onscreen instructions and ta-da!</li>
</ol>
<p><strong>Configure the network</strong><br />
At home, I&#8217;m on a network with IP 192.168.0.x. This means, machines at my home will have IP addresses like 192.168.0.2, 192.168.0.3 and so on.</p>
<p>First and foremost step is to stop any DHCP service, which provides dynamic IPs to machine. This is because the laptop will act as the DHCP server (as explained later). In my case, a D-Link DIR-615 router (with IP 192.168.0.1) is serving dynamic IPs. I logged into the router using a web browser and disabled DHCP by unchecking Enable DHCP Server (found under Setup&gt;Network Settings).</p>
<p>Since DHCP is disabled, setup a static IP address for the laptop. This can be done via a Linux command line or console using the following command:</p>
<pre>ifconfig eth0 192.168.0.2</pre>
<p>To save yourself from added troubleshooting, disable any running Firewall and SELinux as follows:</p>
<pre>service iptables stop</pre>
<p>SELinux was already disabled on my laptop. For more on disabling SELinux refer to <a href="http://www.crypt.gen.nz/selinux/disable_selinux.html">http://www.crypt.gen.nz/selinux/disable_selinux.html</a></p>
<p><strong>Install the services</strong><br />
Install the required services as follows:</p>
<pre> yum install dhcp syslinux tftp-server httpd tigervnc</pre>
<p>dhcp is the DHCP server which will serve dynamic IP to the server during PXE boot. syslinux provides the files required for booting. tftp-server (TFTP Server) will serve the boot files (provided by syslinux) and the kernel for the server to boot and start the installation. httpd (Apache Web Server) provides the Fedora 14 packages to be installed. tigervnc (TigerVNC) will be used to display the graphical installer on the laptop.</p>
<p><strong>Configure the services: DHCP</strong><br />
To configure DHCP, open the file named dhcpd.conf found in the directory /etc/dhcp and modify it as follows:</p>
<pre>subnet 192.168.0.0 netmask 255.255.255.0{
 range 192.168.0.10 192.168.0.20;
}
allow bootp;
filename "pxelinux.0";</pre>
<p>Save the file.</p>
<p><strong>Configure the services: TFTP Server</strong><br />
In a text editor, open the file named tftp found in /etc/xinetd.d and change the line:</p>
<pre>server_args = -s /var/lib/tftpboot</pre>
<p>to:</p>
<pre>server_args = -s /var/lib/tftpboot -v -v -v</pre>
<p>Appending &#8220;-v -v -v&#8221; will provide more information about the TFTP Server in /var/log/messages file which useful for troubleshooting. Next, change the line:</p>
<pre>disable = yes</pre>
<p>to:</p>
<pre>disable = no</pre>
<p>After the above modifications, the tftp file will look as follows:</p>
<pre># default: off
# description: The tftp server serves files using the trivial file transfer \
#	protocol.  The tftp protocol is often used to boot diskless \
#	workstations, download configuration files to network-aware printers, \
#	and to start the installation process for some operating systems.
service tftp
{
	socket_type		= dgram
	protocol		= udp
	wait			= yes
	user			= root
	server			= /usr/sbin/in.tftpd
	server_args		= -s /var/lib/tftpboot -v -v -v
	disable			= no
	per_source		= 11
	cps			= 100 2
	flags			= IPv4
}</pre>
<p>Save the file.</p>
<p>Next, copy the files named chain.c32, mboot.c32, memdisk, menu.c32 and pxelinux.0 found in the directory /usr/share/syslinux/ to /var/lib/tftpboot directory:</p>
<pre>cd /usr/share/syslinux
cp chain.c32 mboot.c32 memdisk menu.c32 pxelinux.0 /var/lib/tftpboot</pre>
<p>Create a directory named pxelinux.cfg (yes, it is a directory with .cfg suffix) under /var/lib/tftpboot. Under the directory /var/lib/tftpboot/pxelinux.cfg, create a file named default with the following content:</p>
<pre>default Fedora 14
timeout 0

MENU TITLE PXE Menu

LABEL Fedora 14
        KERNEL images/fedora/14/vmlinuz
	APPEND initrd=images/fedora/14/initrd.img lang=en_US keymap=us vnc vncconnect=192.168.0.2 ip=dhcp method=http://192.168.0.2/fedora/14/</pre>
<p>Here the IP address 192.168.0.2 is the IP address of my laptop (as setup in the section <strong>Configure the network</strong>)</p>
<p>Create a directory tree images/fedora/14 under /var/lib/tftpboot:</p>
<pre>mkdir -p /var/lib/tftpboot/images/fedora/14</pre>
<p>We also need to copy two files from the Fedora 14 CD/DVD into this directory. This is explained in the next section.</p>
<p><strong>Configure the services: Apache Web Server</strong><br />
As explained above, Apache Web Server will serve the packages to be installed. For this, we will download and mount Fedora CD/DVD under the directory /var/www/html (the default document root of the web server). Create a directory tree named fedora/14 under /var/www/html as:</p>
<pre>mkdir -p /var/www/html/fedora/14</pre>
<p>Next, download Fedora 14 DVD or CD ISO from <a href="http://fedoraproject.org/en/get-fedora-all">http://fedoraproject.org/en/get-fedora-all</a>. I wanted to do only a base install of Fedora 14 on the server. For this only the first CD of Fedora is required. So I downloaded Fedora-14-x86_64-disc1.iso from <a href="http://fedora.glug-nith.org/linux/releases/14/Fedora/x86_64/iso/." target="_blank">here</a>.</p>
<p>Mount the downloaded DVD/CD ISO as:</p>
<pre>mount -t auto -o loop &lt;path-to-downloaded-iso&gt; /var/www/html/fedora/14</pre>
<p>In my case:</p>
<pre>mount -t auto -o loop /home/shekhar/Downloads/Fedora-14-x86_64-disc1.iso /var/www/html/fedora/14</pre>
<p>Copy the files named initrd.img and vmlinuz found in the directory /var/www/html/fedora/14/images/pxeboot to /var/lib/tftpboot/images/fedora/14.</p>
<p><strong>Start the services<br />
</strong>Next, open a Linux terminal or console window and start the services as follows:</p>
<pre>service dhcpd restart
service xinetd restart
service httpd restart
vncviewer --listen</pre>
<p>Connect the server to the network/router and switch it on. Within a minute you should be able to see the graphical installer on your machine (laptop in my case). Follow the onscreen instructions and you should end up with a successful Fedora 14 installation on the server.</p>
<p>Note that while we didn&#8217;t attach a monitor and keyboard for the installation, we didn&#8217;t even burn a CD/DVD! We let Apache serve the packages via the mounted ISO.  Plus, with <a href="http://fedoraproject.org/wiki/Anaconda/Kickstart" target="_blank">Kickstart</a> you can even have an unattended and automatic installation without interacting with the graphical installer.</p>
<p>PS: Once the installation is done, don&#8217;t forget to stop the DHCP server on your machine (service dhcpd stop) and start the DHCP service on your router.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=1979&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/install-fedora-14-linux-without-a-monitor-headless-keyboard-and-cddvd/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Solved: Images load up partially when served by Apache Web Server</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-images-load-up-partially-when-served-by-apache-web-server/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-images-load-up-partially-when-served-by-apache-web-server</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-images-load-up-partially-when-served-by-apache-web-server/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 18:00:39 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[cifs]]></category>
		<category><![CDATA[enablesendfile]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[nfs]]></category>
		<category><![CDATA[samba]]></category>
		<category><![CDATA[smb]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=1647</guid>
		<description><![CDATA[This was a very strange issue which showed up at one of my client&#8217;s Web application. The application is hosted on a Apache Web server and serves JPEG images. These JPEG files reside on a different server and mounted via CIFS (loosely called Samba mount) on the Linux machine running the Web server. Now the [...]]]></description>
			<content:encoded><![CDATA[<p>This was a very strange issue which showed up at one of my client&#8217;s Web application. The application is hosted on a Apache Web server and serves JPEG images. These JPEG files reside on a different server and mounted via CIFS (loosely called Samba mount) on the Linux machine running the Web server.</p>
<p>Now the issue was, many JPEG images, especially the larger ones, loaded up only partially in a Web browser (both Internet Explorer and Firefox). What made them load fully was pressing CTRL+R or clicking on Refresh/Reload several times. Bandwidth wasn&#8217;t an issue here, since this problem occurred even when browsing the JPEGs from the local network.<span id="more-1647"></span></p>
<p>At first, I doubted that it could be an issue with the way the JPEGs are produced, something related to the progressive rendering et al. But then I came across an instance (too involved to explain it here) which proved me wrong.</p>
<p>Testing the case further, I found that the JPEGs load absolutely fine in the Web browser, when opened up via File&gt;Open &#8211; instead of hitting the Web Server. This made me turn my eyes onto the Apache Web server. Googling around and reading the comments in the Apache configuration file gave a few hints. With some hit-n-trial, the solution that worked for me is as follows:</p>
<ul>
<li>Login as root</li>
<li>Open the httpd.conf file (the configuration file of Apache Web server) in a text editor (like vi). On RedHat/Fedora/CentOS Linux, this file can be found in the directory /etc/httpd/conf</li>
<li>Append the following line to the end of the file:
<pre>EnableSendfile off
</pre>
</li>
<li>Save the file.</li>
<li>Reload or restart the web server. On a RedHat/Fedora/CentOS Linux the command &#8216;service httpd reload&#8217; can be used for the same.</li>
</ul>
<p>The EnableSendFile directive in Apache is documented as: &#8220;Control whether the sendfile kernel support is used to deliver files (assuming that the OS supports it). The default is on; turn this off if you serve from NFS-mounted filesystems.&#8221;</p>
<p>What caught my attention was &#8220;turn this off if you serve from NFS-mounted filesystems&#8221;. But, in my case, the JPEG files were mounted via CIFS and not NFS. But reading more about the EnableSendFile directive at <a href="http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile">http://httpd.apache.org/docs/2.2/mod/core.html#enablesendfile</a>, reveals the it affects even SMB (and hence CIFS) or any other network mounted files. Following is the snippet from the document:</p>
<p><em>With a network-mounted DocumentRoot (e.g., NFS or SMB), the kernel may be unable to serve the network file through its own cache.</em></p>
<p>Also, I guess, this solution is not specific to JPEG files. The above mentioned issue and the solution should be applicable to other file types too, which are served from a network mounted drive.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=1647&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-images-load-up-partially-when-served-by-apache-web-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Replacement battery for Android Dev Phone 1</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/replacement-battery-for-android-dev-phone-1/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=replacement-battery-for-android-dev-phone-1</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/replacement-battery-for-android-dev-phone-1/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 18:05:19 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[adp1]]></category>
		<category><![CDATA[android]]></category>
		<category><![CDATA[battery]]></category>
		<category><![CDATA[brightstar]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[htc]]></category>
		<category><![CDATA[mugen power]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=1598</guid>
		<description><![CDATA[This is a long pending post that I wanted to write. In April, after about a year of purchase of my Android Dev Phone 1 (a.k.a. ADP1), its battery started draining out. It became so bad that that I had to keep the phone always on charging. While at home/office, I used to charge it [...]]]></description>
			<content:encoded><![CDATA[<p>This is a long pending post that I wanted to write. In April, after <a href="http://www.shekhargovindarajan.com/google/anroid-to-india-a-shipping-faq/" target="_blank">about a year of purchase</a> of my Android Dev Phone 1 (a.k.a. ADP1), its battery started draining out. It became so bad that that I had to keep the phone always on charging. While at home/office, I used to charge it using USB/AC power. While driving, I kept it charging using <a href="http://twitter.com/shekharg/statuses/7306761717" target="_blank">a nifty car adapter</a>.</p>
<p>After about a week of frustration and laziness (to search for a fix), I decided to buy a replacement battery. But the question was, whom do I contact for the replacement battery? HTC? Google? or Brightstar (the distributor) ? Phew&#8230;.<span id="more-1598"></span></p>
<p>While I was Googling around to find an answer, I came across the site of Mugen Power <a href="http://www.mugen-power-batteries.com/">http://www.mugen-power-batteries.com/</a>. It looked interesting enough to try shipping a replacement battery from here. So I decided to chuck out Google, HTC and Brightstar and go for Mugen Power. But it wasn&#8217;t a joy ride to start with. The first stumbling block was as follows:</p>
<p><strong>Will Mugen Power&#8217;s &#8216;TMobile G1 Dream battery&#8217; work for ADP1?</strong><br />
The battery that Mugen Power sells is labelled for TMobile G1 Dream. While TMobile G1 Dream and ADP1 are the same hardware, I didn&#8217;t want to take any chances.</p>
<p>So, I filled up the <a href="http://www.mugen-power-batteries.com/contacts/" target="_blank">Contact Us</a> form on the website asking whether the same battery will work for my ADP1. I got an E-mail reply within 4 hours asking me to send the photographs of the phone&#8217;s battery. After sending the photographs, I got a reply within 7 hours confirming that the T-Mobile G1&#8242;s battery will fit in my ADP1. The E-mail also mentioned the link <a href="http://www.mugen-power-batteries.com/htc/htc-dream.html" target="_blank">http://www.mugen-power-batteries.com/htc/htc-dream.html</a> from where I could buy the battery.</p>
<p>The take home from the above are:</p>
<ul>
<li>While the responses were coming from a Gmail address <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  , Mugen Power&#8217;s support is quick and effective.</li>
<li><strong>The battery for T-Mobile&#8217;s G1, sold by Mugen Power, fits in and works for an Android Dev Phone 1.</strong></li>
</ul>
<p><strong>The shipping experience</strong><br />
Following the link, I bought &#8220;<a href="http://www.mugen-power-batteries.com/htc/htc-dream/mugen-power-htc-dream-t-mobile-google-phone-g1-1200mah-extra-eros-akkumulator.html" target="_blank">Mugen Power HTC Dream T-mobile Google Phone G1 1200mAh Extended Replacement Battery [HLI-G1SL]</a>&#8220;. Sorry for the long name, but that&#8217;s what it is called.</p>
<p>Note that I went for the 1200 mAh battery. The battery which ships with ADP1 is a 1150 mAh &#8211; so this Mugen Battery was hardly an extended battery. But, one can also go for 2400 or the 3900 mAh batteries which will keep your phone powered up for days! But note that the 2400 and 3900 mAh options need a extended battery cover due to the size of the battery. Fortunately the battery cover is shipped alongwith.</p>
<p>Coming back to my shipping experience, I ordered the 1200 mAh battery priced @ $26.95. I went for Free Shipping and not for the Speedpost option. The latter costs $36.13 (more than the cost of the battery!) but promises delivery within 2-6 business days. Free shipping quoted a delivery within 10-15 business days. But guess what, I received the battery in 8 days! I placed the order on 29 April and it got delivered to my residence at New Delhi, India on 8 May.</p>
<p>Seems I was lucky because one of my friends who ordered an extended battery for his HTC Touch, received the battery after 15 days at Gurgaon, Haryana, India.</p>
<p>Note that there were no import or customs duty to pay. That is, I owned the  battery at the cost of $26.95 (all inclusive).</p>
<p>To sum up, the Mugen Power battery came to rescue when I was desperate. When fully charged, the battery keeps the phone alive for about 7-8 hours under heavy usage &#8211; Twitter, Facebook and E-mail sync, WiFi and GPS at times, screen at its full brightness and active wallpaper! This performance is almost same as that of the ADP1&#8242;s battery &#8211; which it shipped with. My phone is powered by Mugen Power battery for more than a month now.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=1598&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/replacement-battery-for-android-dev-phone-1/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Solved: &#8216;requires bundle org.eclipse.wst.xml.core&#8217; error, while installing Google Plugin in Fedora Eclipse</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-requires-bundle-org-eclipse-wst-xml-core-error-while-installing-google-plugin-in-fedora-eclipse/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-requires-bundle-org-eclipse-wst-xml-core-error-while-installing-google-plugin-in-fedora-eclipse</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-requires-bundle-org-eclipse-wst-xml-core-error-while-installing-google-plugin-in-fedora-eclipse/#comments</comments>
		<pubDate>Sat, 12 Jun 2010 14:42:08 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Fedora 12]]></category>
		<category><![CDATA[Fedora 13]]></category>
		<category><![CDATA[Google App Engine]]></category>
		<category><![CDATA[google plugin]]></category>
		<category><![CDATA[google wave]]></category>
		<category><![CDATA[google web toolkit]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=1585</guid>
		<description><![CDATA[The simplest way to get started with developing for Google App Engine, Google Web Toolkit and Google Wave is to use the Google Plugin for the Eclipse IDE. This plugin installs the SDK as well. Eclipse&#8217;s built-in wizard to add new software (plugin) makes it very easy to install the Google plugin. This wizard can [...]]]></description>
			<content:encoded><![CDATA[<p>The simplest way to get started with developing for Google App Engine, Google Web Toolkit and Google Wave is to use the <a href="http://code.google.com/eclipse/" target="_blank">Google Plugin</a> for the <a href="http://www.eclipse.org/" target="_blank">Eclipse</a> IDE. This plugin installs the SDK as well. Eclipse&#8217;s built-in wizard to add new software (plugin) makes it very easy to install the Google plugin. This wizard can be supplied with a URL (http://dl.google.com/eclipse/plugin/3.5 in this case) to a download site. Henceforth, Eclipse takes care of downloading and installing the plugin, along with associated dependencies, bundle or required software.</p>
<p>However, for me, installing the Google Plugin didn&#8217;t go as smooth as expected. I have been using <a href="http://fedoraproject.org/" target="_blank">Fedora</a> Linux on my laptop since the last 5+ years. Fedora ships with the Eclipse IDE. When I tried installing the Google Plugin in Fedora Eclipse, I faced the following error.<span id="more-1585"></span> This error surfaced with Eclipse 3.5 on Fedora 12 and Fedora 13.</p>
<pre>Cannot complete the install because one or more required items could not be found.

  Software being installed: Google Plugin for Eclipse 3.5 1.3.2.v201003242055
                                        (com.google.gdt.eclipse.suite.e35.feature.feature.group 1.3.2.v201003242055)

  Missing requirement: Google App Engine Plugin 1.3.2.v201003242055
                                   (com.google.appengine.eclipse.core 1.3.2.v201003242055)
                                   requires 'bundle org.eclipse.wst.xml.core 0.0.0' but it could not be found

  Cannot satisfy dependency:
              From: Google Plugin for Eclipse 3.5 1.3.2.v201003242055
              (com.google.gdt.eclipse.suite.e35.feature.feature.group 1.3.2.v201003242055)
              To: com.google.appengine.eclipse.core [1.3.2.v201003242055]</pre>
<p>Googling around gives numerous solutions &#8211; from using a third party repository (with a broken link <img src='http://www.shekhargovindarajan.com/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' />  ) to installing &#8220;Eclipse IDE for Java EE Developers&#8221; from www.eclipse.org. But the solution that worked for me was the simplest. Please note that this issue and the following solution could be specific to Eclipse on Fedora and Google Plugin.</p>
<p><strong>The Solution</strong><br />
Launch Eclipse. Click on Help&gt;Install New Software.  On the subsequent window titled “Available Software”, click on blue link &#8216;Available Software Sites&#8217;. Look for the URL http://download.eclipse.org/releases/galileo in the list of Software Sites. Select and click on Enable (button on the right). Click on OK.</p>
<div id="attachment_1594" class="wp-caption alignleft" style="width: 310px"><a href="http://www.shekhargovindarajan.com/wp-content/uploads/2010/06/Enable-the-Galileo-software-site-before-installing-the-Google-Plugin.png"><img class="size-medium wp-image-1594" title="Enable the Galileo software site before installing the Google Plugin" src="http://www.shekhargovindarajan.com/wp-content/uploads/2010/06/Enable-the-Galileo-software-site-before-installing-the-Google-Plugin-300x222.png" alt="Enable the Galileo software site before installing the Google Plugin" width="300" height="222" /></a><p class="wp-caption-text">Enable the Galileo software site before installing the Google Plugin</p></div>
<p>Back on the “Available Software” window, type the URL  http://dl.google.com/eclipse/plugin/3.5  in the field labeled “Work with:” . Click on Add. This will show Plugin and SDKs in the bottom pane. Check the boxes against them and click on Next. Follow the onscreen instructions. This will install the Google plugin and SDK. When prompted, restart Eclipse.</p>
<p><strong>A few Troubleshooting Tips</strong><br />
On a freshly installed Eclipse, all software sites are disabled by default. This may not be true, if you have been updating or installing other plugins in Eclipse. I recall that, on Fedora 12, I faced the issue of numerous conflicts till I disabled all but the http://download.eclipse.org/releases/galileo site. Bottom line: before installing the Google Plugin, make sure that you only have the Galileo site enabled.</p>
<p>Second, this happened to me once that, even after following the above steps I got the same error. It seemed that Eclipse had problem in downloading the required software and ended up throwing the same error, instead of reporting a failed download. In this case, restart Eclipse, else you may keep getting the same error on retries. After restart, follow the steps mentioned in <strong>The Solution</strong> again.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=1585&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-requires-bundle-org-eclipse-wst-xml-core-error-while-installing-google-plugin-in-fedora-eclipse/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Solved: Garbled text in Putty</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/solved-garbled-text-in-putty/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=solved-garbled-text-in-putty</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/solved-garbled-text-in-putty/#comments</comments>
		<pubDate>Wed, 17 Mar 2010 07:19:17 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[gallery link=]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Microsoft Windows]]></category>
		<category><![CDATA[ncurses]]></category>
		<category><![CDATA[putty]]></category>
		<category><![CDATA[Secure Shell]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[utf8]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=1426</guid>
		<description><![CDATA[Putty is a popular and free Linux terminal/shell client for Windows. It allows one to connect to a Linux server using SSH (Secure Shell) or Telnet. I have been using it for as long as I can recall. But this issue of garbled text in Putty is what I have been ignoring, until yesterday. Yesterday, I had [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/" target="_blank">Putty</a> is a popular and free Linux terminal/shell client for Windows. It allows one to connect to a Linux server using SSH (Secure Shell) or Telnet. I have been using it for as long as I can recall. But this issue of garbled text in Putty is what I have been ignoring, until yesterday.</p>
<p>Yesterday, I had setup <a href="http://en.wikipedia.org/wiki/Paradox_(database)" target="_blank">Paradox</a> database using <a href="http://www.dosemu.org/" target="_blank">DOSEMU</a> on Linux, for a client. On Putty, the Paradox interface showed garbled making it unusable for the client. My instant suspect was DOSEMU. A quick check revealed that it&#8217;s happening with other apps too - those with a <a href="http://en.wikipedia.org/wiki/Ncurses" target="_blank">ncurses</a> or text based user interface.<span id="more-1426"></span>For example: The garbled text, around the borders of UI elements, showed in ntsysv (as shown in the screenshots). ntsysv is a nifty console app, found in RedHat/CentOS/Fedora Linux, to start services during boot up.
<a href='http://www.shekhargovindarajan.com/tips-n-tricks/solved-garbled-text-in-putty/attachment/before-ntsysv-showing-garbled-text-in-putty/' title='Before - ntsysv showing garbled text in Putty'><img width="150" height="150" src="http://www.shekhargovindarajan.com/wp-content/uploads/2010/03/Before-ntsysv-showing-garbled-text-in-Putty-150x150.png" class="attachment-thumbnail" alt="Before - ntsysv showing garbled text in Putty" title="Before - ntsysv showing garbled text in Putty" /></a>
<a href='http://www.shekhargovindarajan.com/tips-n-tricks/solved-garbled-text-in-putty/attachment/putty-settings-to-fix-garbled-text/' title='Putty settings to fix garbled text'><img width="150" height="150" src="http://www.shekhargovindarajan.com/wp-content/uploads/2010/03/Putty-settings-to-fix-garbled-text-150x150.png" class="attachment-thumbnail" alt="Putty settings to fix garbled text" title="Putty settings to fix garbled text" /></a>
<a href='http://www.shekhargovindarajan.com/tips-n-tricks/solved-garbled-text-in-putty/attachment/after-ntsysv-after-the-change-in-settings-in-putty/' title='After - ntsysv after the change in settings in Putty'><img width="150" height="150" src="http://www.shekhargovindarajan.com/wp-content/uploads/2010/03/After-ntsysv-after-the-change-in-settings-in-Putty-150x150.png" class="attachment-thumbnail" alt="After - ntsysv after the change in settings in Putty" title="After - ntsysv after the change in settings in Putty" /></a>
</p>
<p><strong>The Solution<br />
</strong>Launch Putty. On the Category pane (on the left), click on Windows&gt;Translation. For the dropdown labeled &#8220;Received data assumed to be in which character set&#8221;, select UTF-8. To save this setting, click on Sessions (in the Category pane). On the right pane, select &#8220;Default Settings&#8221; and click on the button labeled Save. This is what worked for me with Putty version 0.60.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=1426&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/solved-garbled-text-in-putty/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Drupal 6: Different Page Templates for different Content Types</title>
		<link>http://www.shekhargovindarajan.com/tips-n-tricks/drupal-6-different-page-templates-for-different-content-types/?&#038;owa_medium=feed&#038;owa_sid=&#038;utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=drupal-6-different-page-templates-for-different-content-types</link>
		<comments>http://www.shekhargovindarajan.com/tips-n-tricks/drupal-6-different-page-templates-for-different-content-types/#comments</comments>
		<pubDate>Thu, 11 Mar 2010 18:00:39 +0000</pubDate>
		<dc:creator>Shekhar</dc:creator>
				<category><![CDATA[Tips N Tricks]]></category>
		<category><![CDATA[Administrator]]></category>
		<category><![CDATA[content type]]></category>
		<category><![CDATA[designer]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[drupal 6]]></category>
		<category><![CDATA[page template]]></category>
		<category><![CDATA[page.tpl.php]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.shekhargovindarajan.com/?p=1412</guid>
		<description><![CDATA[Given the flexibility of Drupal, a different page template depending on the Content Type is not very demanding. The good news is, it is very much possible. The bad news is you may have to struggle like me to find the simplest, neatest and working method to achieve it. Reading the documentation and Googling would [...]]]></description>
			<content:encoded><![CDATA[<p>Given the flexibility of Drupal, a different page template depending on the Content Type is not very demanding. The good news is, it is very much possible. The bad news is you may have to struggle like me to find the simplest, neatest and working method to achieve it.</p>
<p>Reading the documentation and Googling would result in many methods &#8211; some are confusing, some are not so neat and others apply to earlier versions of Drupal. Following is my favourite method to setup different page templates, depending on the Content Type, in Drupal 6.<span id="more-1412"></span></p>
<p><strong>What is a Page Template<br />
</strong>This is the template which contains a Node. This must not be mistaken with the node template, for example, a Story node which displays the title, teaser, images, comment form and et al. In Drupal, the default page template is written in the file named page.tpl.php (and the node template is in node.tpl.php).</p>
<p>It is the page template with which you can display three columns for certain content types and two columns for others. It is the page template using which you can dictate the column which will show a Story, a Blog entry, a Forum topic or a <a href="http://drupal.org/project/webform" target="_blank">Webform</a>. This template is where you insert the Regions for Blocks and Views.</p>
<p><strong>A Neat Solution</strong><br />
Append or write the following code in a file named template.php in your theme&#8217;s directory:</p>
<pre>&lt;?php
function &lt;theme-name&gt;_preprocess_page(&amp; $vars) {
	if (isset ($vars['node']) &amp;&amp; $vars['node']-&gt;type == "blog") {
		$vars['template_files'] = array();
		$vars['template_files'][] = 'page-blog';
	}

	if (isset ($vars['node']) &amp;&amp; $vars['node']-&gt;type == "forum") {
		$vars['template_files'] = array();
		$vars['template_files'][] = 'page-forum';
	}

	if (isset ($vars['node']) &amp;&amp; $vars['node']-&gt;type == "webform") {
		$vars['template_files'] = array();
		$vars['template_files'][] = 'page-webform';
	}
}
?&gt;
</pre>
<p>In the above code replace &lt;theme-name&gt;, in the name of the function, with the name of your Theme&#8217;s directory. For example, suppose the name of your Theme&#8217;s directory is &#8220;blue&#8221;, then:</p>
<pre>function blue_preprocess_page(&amp; $vars)</pre>
<p>Now all you need to do is what you are most creative at. Write the templates for each content type. Drop files in your theme&#8217;s directory named page-blog.tpl.php, page-forum.tpl.php and page-webform.tpl.php for the Blog entry, Form topic and Webform  respectively. Feel free to set different page layouts and Regions in these files. Note that any Content Type which is not specified in the above code will use page.tpl.php &#8211; the default page template. For example, in this case, the Story content type will use page.tpl.php.</p>
<p><strong>Important: </strong>Log into Drupal as admin and goto Administrator&gt;Site configuration&gt;Performance and click on the button &#8220;Clear cached data&#8221; (at the bottom).</p>
<p>I prefer this solution because the template selection logic goes separated into a different file, leaving the Page templates friendly for a designer. Plus, template.php is the logical place to add overrides or specific behaviour. Most likely a seasoned Drupal developer will first look into this file for customizations.</p>
<p>Created or added a new content type? All you need is to add another IF block in the above code and drop a new page template. Before concluding that it is not working for you, do remember to clear the cache.</p>
<img src="http://www.shekhargovindarajan.com/?ak_action=api_record_view&id=1412&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://www.shekhargovindarajan.com/tips-n-tricks/drupal-6-different-page-templates-for-different-content-types/feed/</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
	</channel>
</rss>

