Block Gmail Webchat !!

Hi all 🙂
Today we are going to block Gmail’s webchat from the Linux Machine.

Now the trick here is that as soon as we login to the chat is enabled by connecting to one of the following servers.

  • chatenabled.mail.google.com
  • talkgadget.google.com
  • talkx.1.google.com

Now the trick is in the hosts file we set the loopback address to this name.

To do that we first open the file /etc/hosts

#vim /etc/hosts

In that give the following entries.

127.0.0.1 chatenabled.mail.google.com
127.0.0.1 talkgadget.google.com
127.0.0.1 talkx.1.google.com

And its done ..Now the gmail webchat will be blocked.

In the same way you can block the gmail chat using IM’s for that just add the following line in the above file.

127.0.0.1 talk.google.com

Remember that this is the simplest method to block. There are more advanced methods using IPTables and Squid proxy which will be discussed later.

Installing LAMP Stack in Ubuntu

Hai friends. Lets Setup the LAMP-Linux Apache MySql and PHP in Ubuntu Linux 🙂

First of all Install Ubuntu Linux in the Machine you wish to Install the LAMP Stack.

Step1: Hey Step 1 in setting LAMP Stack is installing a Linux Distro and by now you might have completed the  first step 🙂

Considering the installation as a fresh one.

First update the distro for that open a terminal and give the following commands :

$sudo apt-get update

The above command will fetch the softwares list from the Ubuntu repositories.

Next

$sudo apt-get upgrade

The above command will update your Ubuntu OS to date.

Step2:

The Second step is to install APACHE WEB SERVER. for that :

$sudo apt-get install apache2

this will install apache server on your machine

You can control apache using

$sudo service apache2 start/stop/restart

Step3:

The next step is MYSQL DATABASE SERVER for that:

$sudo apt-get install mysql-server mysql-client

while installing the server it will prompt for a password for mysql server. Enter is twice and continue.

You can control mysql server by

$sudo service mysql start/stop/restart

Here you can install mysql-gui-tools-common which will give you

1.mysql-query-browser

2.mysql-administrator

which will be of great help 🙂

step4:

Now the last step is to install php.

$sudo apt-get install php5

and everything is done. 🙂

Now goto /var/www and create a test.php

<?php

phpinfo();

?>

and open a browser and navigate to http://localhost/test.php

it shows the phpinfo page and the LAMP Stack is Ready 🙂

AtMail Open Webmail With Sendmail & Dovecot

Hai friends 🙂

Today we are going to see hom AtMail Open the opensource webmai which can be used to replace Squirrelmail. AtMail open is an Ajax based webmail and its very beautiful than Squirrelmail. 🙂

You can download AtMail Open from http://atmail.org/

1.Setting the Mail Server [Sendmail]

Here we are going to configure and setup the Sendmail Mail Server in RHEL5/Centos/Fedora. The following steps are just basic configurations and no case of security is considered in this configuration.

First of all install the sendmail-cf package(the sendmail server will be installed by defualt in most distributions). This package is necessary to reconfigure sendmail.

#yum install sendmail-cf

Now open the sendmail-mc file in a favorite text editor and make the following changes.

#vim /etc/mail/sendmail-mc

By default sendmail only listens on loopback address for LMTP(local mail transfer protocol) for listening on all interface just comment the “DEAMON_OPTIONS” in line 116.For that add  “dnl” infront of the file.

Now uncomment the following lines to set the mail server domain like user@domain.com instead of user@stationx.domain.com.[This feature is called Masquerading] 🙂 [Confusing????]

here replace “mydomain.com” with your domains name.

after making these changes for bringing the changes in effect use the command:

#make -C /etc/mail

Done 🙂

2. Dovecot [IMAP Server]

Dovecot is an OpenSource IMAP/POP3 Server for Linux/Unix Like Systems.

First Install Dovecot:

#yum install dovecot

now edit the dovecot configuration file to enable IMAP support.

#vim /etc/dovecot.conf

find the line with “protocols” and uncomment it to enable imap support

Now to start dovecot and sendmail on reboots use:

#chkconfig dovecot on

#chkconfig sendmail on

Just restart the services to see whether they run properly.

#service sendmail restart

#service dovecot restart

3.Installing Webserver-httpd [APACHE]

Install httpd webserver using :

#yum install httpd

We should install php,php-mbstring,php-ldap(to enable ldap authentication-optioanl)php-mysql

#yum install php php-mbstring php-ldap php-mysql

now start the httpd service using:

#service httpd start

3.Setting up atmailopen.

Now Download atmailopen from http://atmail.org and extract it to the document root of your webserver.

#wget http://atmail.org/download/atmailopen.tgz

#tar -xzf atmailopen.tgz -C /var/www/html

Now change the permission of the folder :

#chown -R apache /var/www/html/atmailopen

Now openup your browser and navigate to http://localhost/atmailopen

Now you are at the installer of atmailopen. 🙂

You can also edit various parameters as shown in the installer in /etc/php.ini file.

Now Click next Continue>> Accept the Apache License agreement Continue>>Now provide the various sql parameters [those who dont know please request/comment] click Continue>> and finish the installer.

Now use the browser to http://<domain>/atmailopen

Now the Joke comes.

first create two accounts on your machine:

#useradd -s /sbin/nologin user1

#useradd -s /sbin/nologin user2

now the email id for user1 is user1@yourdomain.com and for user2 is user2@yourdomain.com.

Now herecomes a small editing to atmails file for succesffull login.

use:

#vim /var/www/html/atmailopen/lib/IMAP_Client.php

function login($user, $pass)
{
list($user, $crap) = split(“@”, $user, 2);
$this->user = $user;

add the lines shown bold in that file and save it 🙂

done:)

now http://<hostname>/atmailopen

user: user1 @ yourdomain.com

mailserver: mailservers hostname.

passwd: password of the user

Login and thats it 🙂 try sending mail to user2 and create any number of users 🙂

Installing Google Chrome on RHEL5

As you know there is no official build for RHEL of Google Chrome.

Now we are going to install Google Chrome for RHEL5.

First of all download the source package for Google chrome(Chromium) from the following link.

http://www.cs.bham.ac.uk/~cxs548/chrome.tar.gz

Now get the following rpm and install it.

ftp://ftp.muug.mb.ca/mirror/centos/5.4/os/x86_64/CentOS/libXcomposite-0.3-5.1.i386.rpm

(Link corrected with the help of santosh below)

ftp://ftp.muug.mb.ca/mirror/centos/5.5/os/x86_64/CentOS/libXcomposite-0.3-5.1.i386.rpm

#rpm -ivh libXcomposite-0.3-5.1.i386.rpm

Now copy the chrome package to /opt and extract it.

Now just execute the following command to run Google Chrome

#/opt/chrome/chrome-wrapper

or

Create a custom launcher in desktop pointing to the above mentioned script

Enjoy Browsing.

Installing Google Chrome on Fedora Core 8

EXPLANATIONS WILL BE UPDATED LATER: or TRY http://macles.blogspot.com/2009/05/google-chrome-chromium-for-linux.html

Hai friends we are going to install Google chrome(chromium) on fedora core 8. Those who had tried to install would have found various dependency problems. Now with the help of the above link i am going to explain the installation procedure .Chromium requires more recent libraries than already installed, and yum cannot update them due to unresolved dependencies. But you can download and extract the required libraries and make Chromium use them, without interfering with the already installed system libraries.

1. First of all become root using su.and enter password when prompted

$su

.2. First step is to create a folder for working

#mkdir -pm 777 /opt/chrome-linux/libs

3. Now navigate to the folder created

#cd /opt/chrome-linux/libs

4. Now download some rpm’s and install it.

#wget ftp://archive.kernel.org/fedora-archive/updates/8/i386.newkey/nspr-4.7.3-1.fc8.i386.rpm\ ftp://archive.kernel.org/fedora-archive/updates/8/i386.newkey/nss-3.12.2.0-1.1.fc8.i386.rpm\ ftp://archive.kernel.org/fedora-archive/updates/8/i386.newkey/nss-tools-3.12.2.0-1.1.fc8.i386.rpm

5. Now install the downloaded packages and remove those rpms from the current directory either by deleting or copying it for later use.We here just delete those files

#rpm -Uh *rpm

#rm -f *rpm

6. Now get some more rpm’s

wget http://kojipkgs.fedoraproject.org/packages/gcc/4.3.2/7/i386/libstdc++-4.3.2-7.i386.rpm http://mirrors.kernel.org/fedora/updates/10/i386/pixman-0.12.0-3.fc10.i386.rpm http://mirrors.kernel.org/fedora/updates/9/i386.newkey/pango-1.20.4-1.fc9.i386.rpm http://kojipkgs.fedoraproject.org/packages/cairo/1.6.4/1.fc9/i386/cairo-1.6.4-1.fc9.i386.rpm

for i in `ls *rpm`; do rpm2cpio $i | cpio -idv; rm $i; done

7. Now move the new libraries to the root of the installation

#cp usr/lib/* $PWD

#cd /opt/chrome-linux/

#mv libs/* $PWD

8. Now create a custom launcher.

cat << EOF > /opt/chrome-linux/chrome.sh
#!/bin/sh
export LD_LIBRARY_PATH=/opt/chrome-linux/libs:$LD_LIBRARY_PATH
/opt/chrome-linux/chrome-wrapper
EOF

9. Recheck the script whether the item in bold displayed above is there or not

10. Now apply execute permission to the script

#chmod 755 /opt/chrome-linux/libs/chrome.sh

11. Download Chromium and extract it.

wget -N http://build.chromium.org/buildbot/continuous/linux/LATEST/chrome-linux.zip

sudo unzip -o chrome-linux.zip -d /opt
sudo chown -R user /opt/chrome-linux

12. Remember the user shown in bold is the username of the local user

13. Now create a custom launcher in dekstop with

name:Google chrome

location:/opt/chrome-linux/chrome.sh

or

in terminal just excecute

$/opt/chrome-linux/chrome.sh

Installing Google Chrome in Ubuntu

Hi, this post describes the simplest installation procedure of installing google chrome in ubuntu. This method is so simple that i think most of u will be knowing that.

first of all go to http://www.google.com/chrome



Click the Get Google Chrome Beta. Then select the appropriate version and click accept and install.

now just double click and install the downloaded package.

On any dependency errors just re-download and run the installer.

Ubuntu Karmic Koala- Xsplash Themes

As you all know that Ubuntu has introduced the Xsplash [New set of Boot screens] from the version 9.10 the Karmic Koala.This Post explains how you can configure the boot screen(as the default one is the most ugly you can find 😦 ).

1.Get some cool xsplash themes from http://gnome-look.org

Here are some of the xsplash themes i have found in gnome.look.org

http://gnome-look.org/content/download.php?content=116102&id=2&tan=9943184
http://gnome-look.org/content/show.php/XSplash-CF-GX?content=115657
http://gnome-look.org/content/show.php/QDark+Studio+Xsplash?content=115721
http://gnome-look.org/content/show.php/BlueNight-xsplash?content=115528
http://gnome-look.org/content/show.php/PackoXsplash+HD?content=115120
http://gnome-look.org/content/show.php/Xsplash-Quicksand?content=115420

2. Now for namesake lets just backup the default xsplash[even though you will never look back for it] by the following method.

a. Open Terminal

$gksudo nautilus /usr/share/images/xsplash

now you can see some image files.Just select all of them and cut it and paste it somehwere SAFE 🙂

b.Now extract the theme file(as it will be available in .tar.gz format. Copy all the files found after extracting to /usr/share/images/xsplash.

Thats all…Now to check xsplah just open a terminal and give

$sudo xsplash

and you can enjoy your new xsplash screen without rebooting. 🙂 Enjoy 🙂