<?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>Linux, Programming, Telephony, Asterisk, Apache, Tips &#38; Tricks &#187; Tips &amp; Tricks</title>
	<atom:link href="http://shahidz.com/category/tips-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://shahidz.com</link>
	<description>Passionate About Technology</description>
	<lastBuildDate>Sun, 10 Jan 2010 17:38:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>moving mysql data directory</title>
		<link>http://shahidz.com/moving-mysql-data-directory/</link>
		<comments>http://shahidz.com/moving-mysql-data-directory/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 17:38:11 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[Securities]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=104</guid>
		<description><![CDATA[In some cases you have to change the default MySql data directory, for doing this you have to follow some steps. Here I will explain each steps one by one.

Stop MySql server using following command.
$ sudo /etc/init.d/mysql stop
Copy the existing data directory (which is located in /var/lib/mysql) using following command.
$ sudo cp -R -p /var/lib/mysql /path/to/new/datadir
Edit [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://shahidz.com/wp-content/uploads/2010/01/logo-mysql-300x218.jpg"><img class="alignleft size-full wp-image-117" title="logo-mysql-300x218" src="http://shahidz.com/wp-content/uploads/2010/01/logo-mysql-300x218.jpg" alt="" width="300" height="218" /></a>In some cases you have to change the default MySql data directory, for doing this you have to follow some steps. Here I will explain each steps one by one.</p>
<ol>
<li>Stop MySql server using following command.</li>
<pre>$ sudo /etc/init.d/mysql stop</pre>
<li>Copy the existing data directory (which is located in <em>/var/lib/mysql</em>) using following command.</li>
<pre>$ sudo cp -R -p /var/lib/mysql /path/to/new/datadir</pre>
<li>Edit the MySQL configuration file with your favorite text editor.</li>
<pre>$ sudo vim /etc/mysql/my.cnf</pre>
<li>Find the entry for <em>datadir</em>, change the path to the new data directory.</li>
<li>Some Linux distributions uses some security software called <strong>AppArmor </strong>that specifies the areas of your filesystem applications are allowed to access. Unless you modify the AppArmor profile for MySQL, you&#8217;ll never be able to restart MySQL with the new datadir location. So edit the file <em>/etc/apparmor.d/usr.sbin.mysqld</em> using your favorite editor.</li>
<pre>$ sudo vim /etc/apparmor.d/usr.sbin.mysqld</pre>
<li>Duplicate the lines beginning with <em>/var/lib/mysql</em> and replace duplicated strings with /<em>new_datadir.</em></li>
<pre><em>/var/lib/mysql/ r,
/var/lib/mysql/** rwk,
/var/log/mysql/ r,
/var/log/mysql/* rw,
#
/path/to/new/datadir r,
/path/to/new/datadir** rwk,
/path/to/new/datadir r,
/path/to/new/datadir* rw,</em></pre>
<li>Restart the AppArmor profiles with the following command.</li>
<pre>$ sudo /etc/init.d/apparmor restart</pre>
<li>Restart the MySql server with the following command.</li>
<pre>$ sudo /etc/init.d/mysql start</pre>
</ol>
<p>MySQL should now start without any errors and your data will be stored in the new location.</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fmoving-mysql-data-directory%2F&amp;linkname=moving%20mysql%20data%20directory"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/moving-mysql-data-directory/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Configuring Iptables on system startup</title>
		<link>http://shahidz.com/configuring-iptables-on-system-startup/</link>
		<comments>http://shahidz.com/configuring-iptables-on-system-startup/#comments</comments>
		<pubDate>Wed, 03 Dec 2008 08:59:41 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Shell Script]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[Iptables]]></category>
		<category><![CDATA[start]]></category>
		<category><![CDATA[status]]></category>
		<category><![CDATA[stop]]></category>

		<guid isPermaLink="false">http://shahidz.com/configuring-iptables-on-system-startup/</guid>
		<description><![CDATA[In Ubuntu we don&#8217;t have a mechanism to start or stop iptables or we don&#8217;t have a mechanism to restore iptables after restarting the system. Now we will see how to create a script for start and stop iptables also to make the script to start on system startup.
1. Create a Firewall script
 vim /etc/set_iptables.bash
echo 1 [...]]]></description>
			<content:encoded><![CDATA[<p>In Ubuntu we don&#8217;t have a mechanism to start or stop <a href="http://shahidz.com/tag/iptables/" title="Iptables" target="_blank">iptables</a> or we don&#8217;t have a mechanism to restore <a href="http://shahidz.com/tag/iptables/" target="_blank">iptables</a> after restarting the system. Now we will see how to create a script for start and stop iptables also to make the script to start on system startup.</p>
<p>1. Create a Firewall script</p>
<pre> vim /etc/set_iptables.bash</pre>
<pre>echo 1 &gt; /proc/sys/net/ipv4/ip_forward

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -t nat -A PREROUTING -p tcp -i eth0 -d 192.168.0.10 --dport 555 -j DNAT --to 192.168.0.12:22
iptables -A FORWARD -p tcp -i eth0 -d 192.168.0.12 --dport 22 -j ACCEPT</pre>
<p>2. Change the file permission mod</p>
<pre>sudo chmod o+x /etc/set_iptables.bash</pre>
<p>3. Create a start.stop script</p>
<pre>vim /etc/init.d/iptables</pre>
<pre>#!/bin/bash

RETVAL=0

# To start the firewall
start() {
  echo -n "Iptables rules creation: "
  /etc/set_iptables.bash
  RETVAL=0
}

# To stop the firewall
stop() {
  echo -n "Removing all iptables rules: "
  /sbin/iptables -F
  RETVAL=0
}

case $1 in
  start)
    start
    ;;
  stop)
    stop
    ;;
  restart)
    stop
    start
    ;;
  status)
    /sbin/iptables -L
    /sbin/iptables -t nat -L
    RETVAL=0
    ;;
  *)
    echo "Usage: iptables {start|stop|restart|status}"
    RETVAL=1
esac
exit</pre>
<p>4. Change the file permission mod</p>
<pre>sudo chmod o+x /etc/init.d/iptables</pre>
<p>5. The final step is to make your script running on each boot of your computer:</p>
<pre>sudo update-rc.d iptables defaults</pre>
<p>Now you can use these commands to start/stop/restart/status your iptables.</p>
<pre>sudo /etc/init.d/iptables start
sudo /etc/init.d/iptables stop
sudo /etc/init.d/iptables restart
sudo /etc/init.d/iptables status</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fconfiguring-iptables-on-system-startup%2F&amp;linkname=Configuring%20Iptables%20on%20system%20startup"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/configuring-iptables-on-system-startup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ufw &#8211; Uncomplicated Firewall</title>
		<link>http://shahidz.com/ufw-uncomplicated-firewall/</link>
		<comments>http://shahidz.com/ufw-uncomplicated-firewall/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 16:12:17 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Iptables]]></category>
		<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[]]></category>
		<category><![CDATA[firewall]]></category>
		<category><![CDATA[ufw]]></category>

		<guid isPermaLink="false">http://shahidz.com/ufw-uncomplicated-firewall/</guid>
		<description><![CDATA[Description
ufw is stands for Uncomplicated Firewall, this program is for managing a Linux firewall and aims to provide an easy to use interface for the user, as well as support package integration and dynamic-detection of open ports. ufw  is not intended to provide complete firewall functionality via its command interface, but instead provides an easy [...]]]></description>
			<content:encoded><![CDATA[<h3>Description</h3>
<p align="justify">ufw is stands for Uncomplicated Firewall, this program is for managing a Linux firewall and aims to provide an easy to use interface for the user, as well as support package integration and dynamic-detection of open ports. ufw  is not intended to provide complete firewall functionality via its command interface, but instead provides an easy way to  add  or  remove simple rules. It is currently mainly used for host-based firewalls.</p>
<h3 align="justify">Installation</h3>
<pre>$ sudo apt-get install ufw</pre>
<p>For help use</p>
<pre>$ man ufw</pre>
<p>To enable firewall</p>
<pre>$ sudo ufw enable</pre>
<p>When we enable the firewall it will set firewall with default settings, it will deny ssh ports, telnet and many other services. So when we enable firewall on the remort servers we must enable ssh ports first, this can done using.</p>
<pre>$ ufw allow proto tcp from any to any port 22</pre>
<p>To disable a firewall</p>
<pre>$ sudo sfw disable</pre>
<p>Examples</p>
<p>Deny all access to port 53:</p>
<pre>$ sudo ufw deny 53</pre>
<p>Allow all access to tcp port 80:</p>
<pre>$ sudo ufw allow 80/tcp</pre>
<p>Allow all access from RFC1918 networks to this host:</p>
<pre>$ sudo ufw allow from 10.0.0.0/8
$ sudo ufw allow from 172.16.0.0/12
$ sudo ufw allow from 192.168.0.0/16</pre>
<p>Deny access to udp port 514 from host 1.2.3.4:</p>
<pre>$ sudo ufw deny proto udp from 1.2.3.4 to any port 514</pre>
<p>Allow access to udp 1.2.3.4 port 5469 from 1.2.3.5 port 5469:</p>
<pre>$ sudo ufw allow proto udp from 1.2.3.5 port 5469 to 1.2.3.4 port 5469</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fufw-uncomplicated-firewall%2F&amp;linkname=ufw%20%26%238211%3B%20Uncomplicated%20Firewall"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/ufw-uncomplicated-firewall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>URL Redirecting (301,302) in Varnish</title>
		<link>http://shahidz.com/url-redirecting-301302-in-varnish/</link>
		<comments>http://shahidz.com/url-redirecting-301302-in-varnish/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 17:37:04 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[301]]></category>
		<category><![CDATA[302]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[rewrite]]></category>
		<category><![CDATA[url redirection]]></category>
		<category><![CDATA[varnish]]></category>
		<category><![CDATA[vcl]]></category>

		<guid isPermaLink="false">http://shahidz.com/url-redirecting-301302-in-varnish/</guid>
		<description><![CDATA[There is no straight forward method for 301/302 URL redirection as we did with rewrite rule. But there are some situations where we need to redirect a URL on a host to some URL on different host. In this situation we need to use 301/302 redirection.  There are two ways we can implement this.
First method [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">There is no straight forward method for 301/302 URL redirection as we did with <a href="http://shahidz.com/apache-url-rewriting/" title="Rewrite Rule" target="_blank">rewrite rule</a>. But there are some situations where we need to redirect a URL on a host to some URL on different host. In this situation we need to use 301/302 redirection.  There are two ways we can implement this.</p>
<p align="justify">First method is to use  <em>set req.http.host</em> and <em>set req.url</em> in the vcl.conf file. Using these two methods we perform normal redirection. Using these method we will redirect the url to some other URL on the same host. For example say the URL http://example.com/error500.php will be redirect to the URL http://example.com/redirect.php. We specify 301/302 redirection to the URL http://foo.com/index.php in the redirect.php file using header method.</p>
<ul>
<li>In the sub vcl_recv method use the following code.</li>
</ul>
<pre>sub vcl_recv {
   if (req.http.host ~ "example.com") {
      if (req.url ~ "error500.php") {
         set req.http.host = "example.com";
         set req.url = "/redirect.php";
      }
   }
}</pre>
<ul>
<li>In the redirect.php file use the following method.</li>
</ul>
<pre>&lt;?php
header("HTTP/1.1 302 Moved Temperarly");
header('Location:http://foo.com/index.php');
exit;
?&gt;</pre>
<p>Second method is to use <em>vcl_error</em> error method. In this error method we can specify HTML tags, so using meta tags we can implement redirection. This option is available with the latest version of varnish.</p>
<ul>
<li>In the sub vcl_recv method use the following code.</li>
</ul>
<pre>sub vcl_recv {
   if (req.http.host ~ "example.com") {
      if (req.url ~ "error500.php")
         error;
      }
   }
}
sub vcl_error {
        set obj.http.Content-Type = "text/html; charset=utf-8";
        if (req.http.host ~ "example.com") {
                if (req.url ~ "error500.php") {
                        synthetic {"
                                &lt;?xml version="1.0" encoding="utf-8"?&gt;
                                &lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"&gt;
                                &lt;html&gt;
                                        &lt;head&gt;
                                                &lt;meta http-equiv="refresh" content="0;url=http://foo.com/index.php"&gt;
                                        &lt;/head&gt;
                                &lt;/html&gt;
                        "};
                }
        }
        deliver;
}</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Furl-redirecting-301302-in-varnish%2F&amp;linkname=URL%20Redirecting%20%28301%2C302%29%20in%20Varnish"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/url-redirecting-301302-in-varnish/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to synchronize the System Times</title>
		<link>http://shahidz.com/how-to-synchronize-the-time-of-a-system/</link>
		<comments>http://shahidz.com/how-to-synchronize-the-time-of-a-system/#comments</comments>
		<pubDate>Wed, 06 Aug 2008 18:51:14 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[clock]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[ntpdate-debian]]></category>
		<category><![CDATA[openntpd]]></category>
		<category><![CDATA[synchronize]]></category>

		<guid isPermaLink="false">http://shahidz.com/how-to-synchronize-the-time-of-a-system/</guid>
		<description><![CDATA[Introduction
OpenNTPD is a Unix system daemon implementing the Network Time Protocol to synchronize the local clock of a computer system with remote NTP servers.
OpenNTPD is primarily developed by Henning Brauer as part of the OpenBSD project. Its design goals include being secure (non-exploitable), easy to configure, accurate enough for most purposes and with source code [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p><a href="http://www.openntpd.org/" title="http://www.openntpd.org/"><em>OpenNTPD</em></a> is a Unix system daemon implementing the Network Time Protocol to synchronize the local clock of a computer system with remote NTP servers.</p>
<p>OpenNTPD is primarily developed by <a href="http://en.wikipedia.org/w/index.php?title=Henning_Brauer&amp;action=edit&amp;redlink=1" class="new" title="Henning Brauer (page does not exist)">Henning Brauer</a> as part of the <a href="http://en.wikipedia.org/wiki/OpenBSD" title="OpenBSD">OpenBSD</a> project. Its design goals include being secure (<a href="http://en.wikipedia.org/wiki/Exploit_%28computer_security%29" title="Exploit (computer security)">non-exploitable</a>), easy to configure, accurate enough for most purposes and with <a href="http://en.wikipedia.org/wiki/Source_code" title="Source code">source code</a> that can be distributed under a <a href="http://en.wikipedia.org/wiki/BSD_license" class="mw-redirect" title="BSD license">BSD license</a>.</p>
<p>This tool helped me a lot. Using openntpd we can set the same time on multiple system.</p>
<h3>Installation</h3>
<pre>$ sudo apt-get install openntpd</pre>
<p>Openntp configuration file /etc/openntpd/ntpd.conf</p>
<p>To set the time use the command <strong>ntpdate-debian</strong></p>
<pre>$ sudo ntpdate-debian
[sudo] password for shahid:
 7 Aug 00:20:33 ntpdate[26597]: adjust time server 59.165.131.82 offset -0.089443 sec</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fhow-to-synchronize-the-time-of-a-system%2F&amp;linkname=How%20to%20synchronize%20the%20System%20Times"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/how-to-synchronize-the-time-of-a-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Screen Command In Linux</title>
		<link>http://shahidz.com/screen-command-in-linux/</link>
		<comments>http://shahidz.com/screen-command-in-linux/#comments</comments>
		<pubDate>Wed, 25 Jun 2008 07:22:32 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux Commands]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[screen]]></category>
		<category><![CDATA[virtual terminal]]></category>

		<guid isPermaLink="false">http://shahidz.com/screen-command-in-linux/</guid>
		<description><![CDATA[Introduction
When screen is called, it creates a single window with a  shell  in  it and then gets out of your way so that you can use the program as you normally would.  Then, at any time, you  can create new windows with other programs in them (including more shells), kill existing windows, view a list [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Introduction</strong></p>
<p>When screen is called, it creates a single window with a  shell  in  it and then gets out of your way so that you can use the program as you normally would.  Then, at any time, you  can create new windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn  output  logging  on and off, copy-and-paste text between windows, view the scroll back history, switch between windows in whatever manner you wish, etc.  All  windows  run  their  programs completely independent of each other.  Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the user’s terminal.  When a program terminates, screen (per  default)  kills  the window  that  contained  it.  If this window was in the foreground, the display switches to the previous  window;  if  none  are  left,  screen exits.</p>
<p><strong> Usage</strong></p>
<p>To start screen us the command screen.</p>
<pre>$ screen</pre>
<p>In the virtual terminal you can start any applications as you normaly done in normal terminals. Even if you close the virtual terminal the application will continue running in the back ground.</p>
<p>To list how many screens where on use the following command.</p>
<pre>$ screen -ls
There are screens on:
        6475.pts-8.user-desktop        (Attached)
        6400.pts-6.user-desktop        (Attached)
2 Sockets in /var/run/screen/S-user.</pre>
<p>To reattaches a screen session use the following command.</p>
<pre>$ screen -d -r 6400.pts-6.user-desktop</pre>
<p>To removed the distroyed sessions use the following command.</p>
<pre> $ screen -wipe</pre>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fscreen-command-in-linux%2F&amp;linkname=Screen%20Command%20In%20Linux"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/screen-command-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 8.04 Desktop to look like Mac OS X</title>
		<link>http://shahidz.com/ubuntu-804-desktop-to-look-like-mac-os-x/</link>
		<comments>http://shahidz.com/ubuntu-804-desktop-to-look-like-mac-os-x/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 18:48:16 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Micellanious]]></category>
		<category><![CDATA[Tips & Tricks]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=31</guid>
		<description><![CDATA[MAC OS is one of the OS which gives impresive graphical ability and interface. My friends where planning to buy an apple laptop only because of its graphics, I myself attracted to MAC OS. There are some hardware compatibility issues for running MAC OS on Intel Hardware. So well other alternative to using MAC OS [...]]]></description>
			<content:encoded><![CDATA[<p>MAC OS is one of the OS which gives impresive graphical ability and interface. My friends where planning to buy an apple laptop only because of its graphics, I myself attracted to MAC OS. There are some hardware compatibility issues for running MAC OS on Intel Hardware. So well other alternative to using MAC OS is either to purchase MAC hardware(which would be naturally expensive) and run full fledged MAC OS or you could tweak and customize your Ubuntu desktop to look more like MAC OS X.</p>
<p><strong>Installing Cursor, GTK and Icon Theme</strong></p>
<p>To install cursor,gtk and icon theme first download the package from the link given below :</p>
<p><a href="http://rapidshare.de/files/38210507/MyTheme.tar.gz.html">http://rapidshare.de/files/38210507/MyTheme.tar.gz.html</a></p>
<p><span style="color: #000000">To install the theme package we have downloaded fro the above link, go to </span><span style="font-weight: bold; color: #000000">(System -&gt; Preferences -&gt; Appearance) </span><span style="color: #000000"> and click <strong>Install</strong>  and point to our newly downloaded Mytheme.tar.gz archive.</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/apperarences.png" title="Appearence"><img src="http://shahidz.com/wp-content/uploads/2008/06/apperarences.png" alt="Appearence" /></a></p>
<p><span style="color: #000000">This should start installing the theme package (Cursors/Icons/Theme) once installation is completed . Chose Customize in theme and click on <strong>Customize</strong>.</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-3.png" title="Customize Theme"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-3.png" alt="Customize Theme" /></a></p>
<p><span style="color: #000000">In this window  in Icons chose <span style="color: #000066">LeopardX</span> , in  Controls <span style="color: #000066">Mac4Lin_GTK_Aqua_v0.3</span> , in Window Border <span style="color: #000066">Mac4Lin_GTK_Aqua_v0.3 </span>and in Pointers <span style="color: #000066">White Cursor</span> .</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-4.png" title="Window"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-4.png" alt="Window" /></a></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-5.png" title="Icons"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-5.png" alt="Icons" /></a><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-6.png" title="Pointers"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-6.png" alt="Pointers" /></a></p>
<p><span style="color: #000000">If you have followed the steps properly the theme and icons should have been installed , and you should be able to see the new theme applied to your default desktop.</span></p>
<p><strong>Enabling Compiz Graphic Effects and installing Mac$lin Theme</strong></p>
<p>First Step is to install compiconf-settings-managerusing apt-get</p>
<pre>shahid@shahid-laptop:~$ sudo apt-get install compizconfig-settings-manager</pre>
<p>Before customizing Compiz you have to change <strong>Appearance Preference</strong> to <strong>Extra</strong> <strong>( System -&gt; Preferences -&gt; Appearence )</strong></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-7.png" title="Appearence"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-7.png" alt="Appearence" /></a></p>
<p><span style="color: #000000">After completing above steps , you can customize compiz by going to </span><strong><span style="color: #000000">System -&gt; Preferences -&gt; Advanced Desktop Effects Settings .</span></strong></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-8.png" title="Compiz Advanced Effects"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-8.png" alt="Compiz Advanced Effects" /></a></p>
<p>After this Install <strong>Emerald Theme Manager</strong> <span style="color: #000000"><span style="font-weight: bold">using apt-get</span></span></p>
<pre>shahid@shahid-laptop:~$ sudo apt-get install emerald</pre>
<p><span style="color: #000000">After installation is over download <strong>MacOS X Emerald theme</strong> from <a href="http://gnome-look.org/content/show.php/Mac4Lin+Leopard+Emerald+Theme?content=68409">this</a>  link : <a href="http://gnome-look.org/content/show.php/Mac4Lin+Leopard+Emerald+Theme?content=68409">http://gnome-look.org/content/show.php/Mac4Lin+Leopard+Emerald+Theme?content=68409</a></span></p>
<p><span style="color: #000000">Now open (<span style="font-weight: bold">System -&gt; Preferences -&gt; Emerald Theme Manager </span>)</span></p>
<p><span style="color: #000000">After Emerald theme manager opens click on import and point to the downloaded theme package from withing the Theme Manager , you will find Mac4Lin Theme listed select the theme , click on refresh and quit the application</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-9.png" title="Emerald Theme"><img src="http://shahidz.com/wp-content/uploads/2008/06/screenshot-9.png" alt="Emerald Theme" /></a></p>
<p><strong> Mav like Dock with Avant Navigator</strong><span style="font-weight: bold"><span style="font-weight: bold; font-size: 130%"></span></span></p>
<p><span style="font-weight: bold"><span style="font-weight: bold; font-size: 130%"></span></span>After the above steps Install Avant Window Navigator.</p>
<p><span style="color: #000000">Avant Windows Navigator is cool little tool that allows you to have a cute looking dock at the bottom of the screen . Even though AWN is still very buggy, still because it is so feature rich and cool looking you could install it .</span><adsense></adsense></p>
<p>To install AWN you need to <span style="color: #990000">add extra repositories, now adding any additional repository carries certain amount of risk of screwing up your system </span>so follow these step at your own risk.</p>
<p>To add  repository:</p>
<pre>shahid@shahid-laptop:~$ echo "deb  http://ppa.launchpad.net/awn-testing/ubuntu hardy main" | sudo tee -a /etc/apt/sources.list
shahid@shahid-laptop:~$ echo "deb-src http://ppa.launchpad.net/awn-testing/ubuntu hardy main" | sudo tee -a /etc/apt/sources.list</pre>
<p>After issuing above command type the following command to update your repositories :</p>
<pre>shahid@shahid-laptop:~$ sudo apt-get update</pre>
<p>and finally to install AWN issue the following command in the terminal window :</p>
<pre>shahid@shahid-laptop:~$ sudo apt-get install awn-manager-trunk awn-extras-applets-trunk</pre>
<p><span style="color: #000000">Now after completing above mentioned steps AWN should be properly installed ,  To Launch AWN go to (<span style="font-weight: bold">Applications -&gt; Accessories -&gt; Avant Window Navigator </span>) </span><span style="color: #000000"><br />
Now you could customize AWN by choosing to add more applets , configuring 3D effects for AWN etc by going to AWN Manager ( </span><span style="font-weight: bold; color: #000000">System -&gt; Preferences -&gt; Awn Manager </span><span style="color: #000000">)</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-2.png" title="Install Theme"><br />
</a></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/awan_manager.png" title="Awan Manager"><img src="http://shahidz.com/wp-content/uploads/2008/06/awan_manager.png" alt="Awan Manager" /></a></p>
<p><span style="color: #000000">Though the theme which AWN comes with preinstalled is also good , you might like to try this it&#8217;s cool and very Mac like </span><br />
<a href="http://rapidshare.com/files/71511920/Transparent.tgz.html" style="color: #000000">http://rapidshare.com/files/71511920/Transparent.tgz.html</a><br />
<span style="color: #000000">you could install this theme through AWN Manager go to <span style="font-weight: bold">(System-&gt;Preferences-&gt;AWN manager</span>) and go to themes there and click on &#8220;Add&#8221; and point it to the downloaded theme.</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/awan_theme.png" title="Awm Theme"><img src="http://shahidz.com/wp-content/uploads/2008/06/awan_theme.png" alt="Awm Theme" /></a></p>
<p>You will see a confirmation dialog box that theme has been added properly. Close AWN Manager and start it again and chose the theme just installed and press apply button to make this theme default theme of AWN.<span style="font-weight: bold"><br />
This is how my AWN Dock looks(with the above theme installed) like : -</span></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/dock.png" title="Dock"><img src="http://shahidz.com/wp-content/uploads/2008/06/dock.png" alt="Dock" /></a></p>
<p><a href="http://shahidz.com/wp-content/uploads/2008/06/screenshot-5.png" title="Icons"></a><span style="font-size: 130%"><span style="font-weight: bold"></span></span></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fubuntu-804-desktop-to-look-like-mac-os-x%2F&amp;linkname=Ubuntu%208.04%20Desktop%20to%20look%20like%20Mac%20OS%20X"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/ubuntu-804-desktop-to-look-like-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Get your fingerprint reader to work in Ubuntu</title>
		<link>http://shahidz.com/get-your-fingerprint-reader-to-work-in-ubuntu/</link>
		<comments>http://shahidz.com/get-your-fingerprint-reader-to-work-in-ubuntu/#comments</comments>
		<pubDate>Sat, 24 May 2008 17:30:48 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[fingerprint]]></category>
		<category><![CDATA[fprint]]></category>
		<category><![CDATA[ingerprint reader]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=26</guid>
		<description><![CDATA[First off, remember that fprint is not entirely stable, and may not work all the time. A list of supported devices is here, and the list of unsupported devices is here.
1. First thing to do is add the [third-party] fprint repository to your sources file &#8216;/etc/apt/sources.list'
# Fingerprint reader support (fprint)
deb http://ppa.launchpad.net/madman2k/ubuntu hardy main restricted universe [...]]]></description>
			<content:encoded><![CDATA[<p>First off, remember that fprint is not entirely stable, and may not work all the time. A list of supported devices is here, and the list of unsupported devices is here.</p>
<p><span id="fullpost"><span style="font-weight: bold">1.</span> First thing to do is add the [third-party] fprint repository to your sources file &#8216;</span><span id="fullpost"><code>/etc/apt/sources.list'</code></span></p>
<pre># Fingerprint reader support (fprint)
deb http://ppa.launchpad.net/madman2k/ubuntu hardy main restricted universe multiverse</pre>
<p><span id="fullpost"><span style="font-weight: bold">2.</span> Next, update your sources and install fprint:</span></p>
<pre>$sudo apt-get update
sudo apt-get install fprint-demo libfprint-dev libfprint0 libpam-fprint</pre>
<p><span id="fullpost"><span style="font-weight: bold">3.</span> Now you can enroll your fingers using either the terminal or a graphical user interface.<br />
Terminal:<br />
</span></p>
<pre>$ pam_fprint_enroll</pre>
<p><span id="fullpost"><span style="font-weight: bold">GUI:</span><br />
</span></p>
<pre>$ fprint_demo</pre>
<p><span id="fullpost"><span style="font-weight: bold">4.</span> Last thing to do is configure PAM so that the fingerprint reader can be useful. Open up your PAM authentication file and edit it:</p>
<pre>$ sudo gedit /etc/pam.d/common-auth</pre>
<p><span id="fullpost"><span style="font-weight: bold">5.</span> Edit it to contain:<br />
</span></p>
<pre>$ auth sufficient pam_fprint.so
$ auth required pam_unix.so nullok_secure</pre>
<p>Enjoy your Fingerprint Reader Support</p>
<p><span id="fullpost">Steps 4 and 5 tell Ubuntu to check your fingerprint, and if that fails, then ask your password. This rule has some exceptions, one that I have encountered is on the login screen. I have to scan my fingerprint before typing my password. One thing I did notice is that when you use sudo in the terminal, it asks for your fingerprint, which I thought was pretty cool. One disadvantage is that anything using gksu does not seem to work properly, specifically because it does not tell you to scan your finger when needed.</span></p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fget-your-fingerprint-reader-to-work-in-ubuntu%2F&amp;linkname=Get%20your%20fingerprint%20reader%20to%20work%20in%20Ubuntu"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/get-your-fingerprint-reader-to-work-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Webcam Woking On HP Pavilion dv2000</title>
		<link>http://shahidz.com/webcam-woking-on-ph-pavilion-dv2000/</link>
		<comments>http://shahidz.com/webcam-woking-on-ph-pavilion-dv2000/#comments</comments>
		<pubDate>Sat, 24 May 2008 07:07:02 +0000</pubDate>
		<dc:creator>Shahid</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Micellanious]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[dv2000]]></category>
		<category><![CDATA[ekiga]]></category>
		<category><![CDATA[hp]]></category>
		<category><![CDATA[linux-uvc]]></category>
		<category><![CDATA[web cam]]></category>
		<category><![CDATA[xawtv]]></category>

		<guid isPermaLink="false">http://shahidz.com/?p=25</guid>
		<description><![CDATA[Well, webcam started working on Ubuntu in my HP Pavilion dv2000 model.
Here is the details of what did to get the webcam running on  using Ubuntu.
$ svn checkout http://svn.berlios.de/svnroot/repos/linux-uvc/
$ cd linux-uvc/linux-uvc/trunk/
$ make
$ sudo make install
$ modprobe uvcvideo
Tested with &#8216;ekiga &#8216; and &#8216;xawtv&#8217;
]]></description>
			<content:encoded><![CDATA[<p>Well, webcam started working on Ubuntu in my HP Pavilion dv2000 model.</p>
<p>Here is the details of what did to get the webcam running on  using Ubuntu.</p>
<pre>$ svn checkout http://svn.berlios.de/svnroot/repos/linux-uvc/
$ cd linux-uvc/linux-uvc/trunk/
$ make
$ sudo make install
$ modprobe uvcvideo</pre>
<p>Tested with &#8216;ekiga &#8216; and &#8216;xawtv&#8217;</p>
<a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fshahidz.com%2Fwebcam-woking-on-ph-pavilion-dv2000%2F&amp;linkname=Make%20Webcam%20Woking%20On%20HP%20Pavilion%20dv2000"><img src="http://shahidz.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share/Bookmark"/></a>]]></content:encoded>
			<wfw:commentRss>http://shahidz.com/webcam-woking-on-ph-pavilion-dv2000/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
