Sunday, January 31, 2016

KDE Dolphin Add Context Menu

Following are the instructions to a create context menu "Open with GVim" entry in KDE Dolphin file manager.

Create a service menu file with the following contents. Give the file any meaningful name. I named it "open_with_gvim.desktop".

[Desktop Entry]

[Desktop Action OpenWithGVim]
Name=Open with GVim
Exec=gvim %u

To install this service menu for all users copy the file to the following location.

Fedora 23 (KDE 5)

# cp open_with_gvim.desktop /usr/share/kservices5/ServiceMenus/

Fedora 20 (KDE 4)

# cp open_with_gvim.desktop /usr/share/kde4/services/ServiceMenus/

Restart Dolphin and when you right click on any file "Open with GVim" context menu will be displayed.

Monday, November 23, 2015

Building Go 1.5 from source

I was trying to build Go v1.5 from source and ran it to the following error.

$ git clone
$ git checkout -b v1.5.1 go1.5.1
$ cd src
$ ./all.bash
##### Building Go bootstrap tool.
ERROR: Cannot find /home/arun/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.
./make.bash: line 121: /home/arun/go1.4/bin/go: No such file or directory

After some googling [1] [2], it turns out starting with version 1.5 Go requires Go to build itself.

Bootstrapping Go 1.4

We cannot use Go 1.5 to bootstrap itself. So, first build Go 1.4 which will be used to build Go 1.5.

$ mkdir build
$ cd build
$ git clone go-1.4
$ cd go-1.4
$ git checkout -b v1.4.3 go1.4.3
$ cd src
$ ./make.bash

Building Go 1.5

Use Go 1.4 we built in the earlier step to build Go 1.5.

$ cd ~/go/src
$ GOROOT_BOOTSTRAP=~/build/go-1.4 ./make.bash

Go v1.5 is now installed in ${HOME}/go.

$ go version
go version go1.5.1 linux/amd64

Test Installation

Add the location of go binaries (${HOME}/go/bin) to the PATH. I have the following in ${HOME}/.bash_profile file.

export GOROOT=$HOME/go
export PATH=$PATH:$GOROOT/bin

Write a customary "helloworld" program and run it to ensure that the Go build is working.

$ go run helloworld.go
Hello, world!


When building Go from source, we can run ./all.bash instead of ./make.bash to build and run all the unit tests. Only downside is it increases the build time.

Thursday, January 19, 2012

Getting started with Puppet on CentOS 6

This is a how to for setting up Puppet on machines running CentOS 6. Instructions were tested on CentOS 6.2 machines.


Instructions below assume you have two machines named which will be the Puppet master and which will be the Puppet client.
Puppet requires machines to have full qualified domain names (FQDN). Also, the clocks on machines must be in sync. Enable NTP daemon on both machines to sync the machine clock to NTP servers.
# service ntpd start


Puppet requires "ruby" and "ruby-lib" packages installed.
To view puppet command-line help, you need "ruby-rdoc" package installed.
# yum ruby ruby-lib ruby-rdoc
Puppet is not available in CentOS "base" repository. PuppetLabs provides a Yum repository for puppet. You can install a RPM provided by PuppetLabs to configure the Yum repository.
# wget -c
# yum install puppetlabs-release-6-1.noarch.rpm

Puppet Server

Install Puppet server package on
[root@master ~]# yum install puppet-server
Start the Puppet master daemon.
[root@master ~]# service puppetmaster start

Puppet and SSL

Puppet clients uses HTTPS to communicate with the server. In order to communicate with the server Puppet clients require valid SSL certificate. Puppet master daemon acts as CA (certificate authority) for SSL certificates.
During the first run of the puppet client it generates a SSL certificate and sends to puppet master.
[root@client ~]# puppet agent --no-daemonize --onetime --verbose --debug
Before the client can successfully connect to the master, master has to sign the client certificate.
[root@master ~]# puppet cert list --all
[root@master ~]# puppet cert --sign

Puppet Client

Install Puppet client package on
[root@client ~]# yum install puppet
Test Puppet client from the command-line. We will assume that the master has valid signed certificate for
[root@client ~]# puppet agent --help
[root@client ~]# puppet agent --no-daemonize --onetime --verbose --debug
See the "puppet agent --help" to understand the command line flags.

In the next post, we will see how to setup a "helloworld" example for Puppet.

Monday, October 10, 2011

Location of userContent.css in Linux and Windows 7

Windows 7




Sunday, October 9, 2011

View Gmail conversations in fixed width font using Firefox

Add the following lines to "$HOME/.mozilla/firefox/{profile-directory}/chrome/userContent.css" to view Gmail emails in fixed width font using Firefox.
@-moz-document domain(
    /* GMail messages and textarea should use fixed-width font */
    .gs .ii, textarea.Ak {
        font-family: MonoSpace !important;
        font-size: 10pt !important;
That's it. Enjoy.
Edit: 13 Feb 2016 (Originally published on 09 Oct 2011)
This still works on Firefox 44 on Fedora 23. The "chrome" directory was missing in profiles directory. Just create the directory and put "userContent.css" file inside it.

Friday, November 5, 2010

Google Yum repository configuration on Fedora

To install and update Google programs like Chrome and Picasa using Yum, create a new configuration file named "google.repo" under /etc/yum.repos.d/. The contents of "google.repo" would like below.

name=Google - i386

With this setup in place, you should be able to install Google Chrome using the following command.

# yum install google-chrome-unstable
# yum install google-chrome-stable

For more information, refer to [1].

Monday, July 13, 2009

Accessing Microsoft Exchange with Evolution on Fedora

Install Evolution if it not already installed. To make Evolution work with Microsoft Exchange you will need to install "evolution-exchange" package.

$ yum install evolution-exchange

Launch Evolution.
Go to Edit->Preferences->Mail Accounts
To create a new account choose "Add"
"Mail Configuration" window click "Forward"
"Identity" enter your name and email address
"Receiving Email": Choose Server Type: Microsoft Exchange
User Name: domain/username
OWA URL: Click Authenticate. Click Forward.
"Receiving Options": The defaults are fine. If you want to customize them you can do so later. Click Forward
"Account Management": The defaults are fine. If not, choose a name. Click Forward
In the next screen, once you click "Apply" your account will be setup.