Wednesday, November 14, 2012

How to make your Google+ status Bold, Italic or Strike through

Google+ Tips and Tricks

Styling Status Message

Unlike facebook or twitter, Google+ allows you to style your status messages .

  • To make Bold : Use star(*) infront and back of the sentence . For example, to make my status as "Watched Skyfall" , you should type "Watched *Skyfall* "
  • To Italicize : Use underscore(_) . For example, to make my status as "Watched Skyfall" , You should type "Watched _Skyfall_ "
  • To Strikethrough : Use Hyphon(-). To get your status as "I Quit" , You should type "-I Quit-"
  • You can also try the combinations also like for both Bold and Italics, *_Hello World_*

Monday, November 12, 2012

Author information in Google Search result

How to get your profile picture in google search result ?

Google Plus profile - Author information - In googel search results
This can be done in three steps :

Delete lines inside a file matching a pattern

You can use pattern matching of sed to do so !

sed -i '/pattern/d' filename
Example: To remove the lines containing "server" from foo.txt ,do this
sed -i '/server/d' foo.txt

I felt this usefull often . For more SED tutorials , visit

Sunday, November 11, 2012

Accessing Ubuntu server using XDMCP Clients

Disadvantage of VNC Server

VNC Server will just replicate the session which is already active on the server to be accessed remotely. But if say , you've logged out of the server , then you cannot use VNC server to start a new session. For that you can use any XDMCP clients like XManager or XMing. I will demonstrate here how to use XMing in Windows Vista to start a new remote sessions with Ubuntu Server.

Settings to be done in Ubuntu Server:

You must enable XDMCP server on Ubuntu. For that go to /etc/gdm folder and edit custom.conf file present there. If not present, Create a new custom.conf file. In this add as follows:


Now restart your GDM using sudo service gdm restart or get a full restart of the server.

MRTG Start Up Script for Ubuntu

MRTG as a Start Up Service in Ubuntu

I am monitoring a lot of routers and switches of my organization using MRTG ( Multi Router Traffic Grapher ) . It is one of the best tools to give you an overview of bandwidth utilizations, CPU/Memory Utilizations etc. Here is a small bash script to make all these MRTG process act as a service which is automatically start up at reboot.

Details of MRTG

I am using MRTG with RRDTool using routers.cgi script. My MRTG configurations arrangements are like
  • Location1 Folder
    • router.cfg
    • switch.cfg
    • servers.cfg
  • Location2 Folder
    • router.cfg
    • switch.cfg
    • servers.cfg
  • Location3 Folder
    • SubLocation1 Folder
      • router.cfg
      • switch.cfg
      • servers.cfg
    • SubLocation2 Folder
      • router.cfg
      • switch.cfg
      • servers.cfg
    • router.cfg

Saturday, November 03, 2012

What is happening in GMAIL in the background ?

Do you wonder how this GMAIL works ? What is happening when you click the Send button in Gmail ? Here is the presentation from Google which is really informative . I would like to share this with you all .

Friday, November 02, 2012

Firewall in Ubuntu

How to set up a firewall in Ubuntu ?

Firewall is already in built into your Linux kernel. You just want to configure it properly for your needs !

Firewall is for filtering all the traffic which is headed into or out of your computer. In Linux Kernel , netfilter subsystem take care of this traffic. You just add the rules for accepting, rejecting or denying the traffic.

How to add rules into netfilter ?

 Use the IPTABLES . Iptables are really complex and flexible . See Basic How to of Iptables here  . 

UFW, Uncomplicated FireWall

There are many high level user interfaces for this Iptables. One is pre-installed with all Ubuntu distros higher that 8.04 , ie UFW or Uncomplicated FireWall . See more here .  

GUFW, a Graphical Interface for UFW

GUFW is a GUI interface for UFW which is very easy to use and add rules .See more here

Keyboard shortcut to Open terminal in Ubuntu

is the default key combination to open command line terminal ( BASH terminal ) in Ubuntu. This can be further changed by going to System -> Preferences -> Keyboard Shortcuts

Thursday, October 25, 2012

Installing / Uninstalling .deb files in Ubuntu

In Ubuntu , the package files are in .deb files . To install the packages file , you should be having administrative password.

Installing .deb debian package file in Ubuntu

  • Double click the .deb file , it will be automatically opened with the GDebi Package manager and you can install it
  • From command line , use this command to install a package .
    sudo dpkg -i PACKAGEFILE.deb

Uninstalling a package in Ubuntu

  • From command line, use this command
    sudo dpkg -r PACKAGENAME

Internet Proxy authentication in Ubuntu

How to solve "407 Proxy Authentication Required" error in Ubuntu ?

This was one question i was behind from last few days.  Use CNTLM , that's the best answer I got.
CNTLM will make your ubuntu server act as a proxy server and in behind authenticates with your actual proxy server .

Step 1:  Download the package file from the CNTLM website . While writing this, version 0.92.3 is the latest and the link to it is

Step 2: Install .deb file . See How to install .deb files in Ubuntu here

Step 3:  cntlm configuration file is located at /etc/cntlm.conf . Open it using your preferred text editor in edit mode . If you use gedit , type " sudo gedit /etc/cntlm.conf "

Step 4:  In cntlm.conf ,  edit the following fields
    Domain     YOUR_ORGANIZATION_DOMAIN(Contact your Active Directory admin if you don't knw this)
    Password YOUR_PASSWORD
    Listen SOME_PORT
Sample config here:
   Username   0906895
   Domain     ABC
   Password   rndmpasswd@123
   NoProxy  localhost, 127.0.0.*, 10.*
   Listen  8080

Step 5:  After changes in configuration files, restart the cntlm service .
 sudo service cntlm restart

Now cntlm started working and your ubuntu server is acting as another proxy server . So add localhost as the system proxy server.

System Proxy setting:

Go to System -> Preference -> Network Proxy
In the Network Proxy Preference window,  Set Manual proxy configuration . Proxy server as localhost and port as the port number you specified in " Listen SOME_PORT" .

Friday, October 05, 2012

How to monitor Windows machine using NAGIOS - NRPE

For monitoring system parameters of a windows computer using NAGIOS or Icinga , the best tool available is NSClient++ ( Visit

 Here I demonstrate NSClient++ isntallation to monitor Windows Vista machine using NAGIOS installed on a Ubuntu server. Without  NAGIOS or Icinga , NSclient++ is meaningless .

Step 1 :  Download NSClient++ tool in your Windows PC . ( is the latest one as of now. )

Step 2 : Install it . Type your NAGIOS server IP as allowed hosts . Also enable common check and NRPE server during installation .
 Step 3 :  Finish the installation . Installation directory will be C:\Program Files\NSClient++ . Go to that directory and find the configuration file .  In NSClient++ version 0.4 , it is nsclient.ini   . In version 0.3 it is NSC.ini  .

Step 4:  Make sure that in the [modules] section contains lines NRPEListener.dll , CheckExternalScripts.dll and some checks like CheckSystem.dll , CheckDisk.dll , CheckEventLog.dll , CheckHelpers.dll

My modules section is as follows:


Step 5: For NSClient++ version 0.4 ,  In the section [/settings/NRPE/server]

Add these lines.
allowed hosts= is my NAGIOS server IP , give yours here!)
allow arguements=1
allow nasty characters=1

For NSClient++  version 0.3  , In the section  [NRPE]

Uncomment these options .

Step 6: Go to Run and type services.msc . Find the NSClient++ service and restart that .

Now we have finished the configuration in Windows machine . Now in the ubuntu machine running nagios , try to get the NRPE check statuses in the command line . If it is working fine , we will add services in NAGIOS .

Step 1 :  Check whether you installed nagios-nrpe-plugin . If not , install it . You can use the command  "dpkg -L nagios-nrpe-plugin " to check it .

Step 2 .  Now try to get some status from the windows machine(IP address is ) by command
"/usr/lib/nagios/plugins/check_nrpe  -H  -c alias_cpu" .  If this gives
OK CPU Load ok.|'5m'=4%;80;90 '1m'=5%;80;90 '30s'=5%;80;90  as the output, you configured NSClient++ properly .

If not working please check whether the port you mentioned is not blocked .

Step 3 : If working ,  you can add the commands to NAGIOS .
For the host you want to monitor , add a service .

define service{
        use                             generic-service         ; Name of service template to use
        host_name                       vistamachine
        service_description             Drive Usage
        check_command                   check_nrpe!alias_disk