fetchmail to get the mails from your imap account

2014-03-11 1 min read Raspberry Pi

Now, that you have set the RPi to send emails, lets do the next best thing. Setup fetchmail so that we can setup a cron job to run and get us the emails on Raspberry Pi. What can we do with these emails, lots 🙂 (I hope you already have a Raspberry Pi, if not then head over to  element14.)

For now, first install fetchmail:

sudo apt-get install fetchmail

and if you are one of the guys who wants easy configuration then :

Continue reading

nautilis fork ( File manager ) with tree view in sidebar.

2014-02-09 1 min read Fedora GNOME

Was searching for this for sometime now, finally found it.

sudo yum install nemo
sudo yum list nemo*

First just install nemo. Configure nemo not to interfere with default desktop and also make it default handler. So, here are the settings that would do it.

gconftool-2 --set  /desktop/gnome/applications/component_viewer/exec --type 'string' 'nemo "%s"'
gconftool-2 --set  /desktop/gnome/url-handlers/trash/command --type 'string' 'nemo "%s"'
gsettings set org.nemo.desktop show-desktop-icons false

Now, if you need more functionality in file manager then check the list of nemo packages from the output of second command of yum. It has plugins like file preview and so on. Install and enjoy.

Continue reading

Disable a few cores when you want to save power.

2012-12-28 2 min read Bash Fedora Linux

If you have a lot of CPU power and working on battery. If you do not need that much of power and would like to rather save some battery power by disabling some cpus then you can use the below script. This script disables cpus from 4 to 7. You can change the number in the for loop. You would need the sudo to be setup or remove sudo and run the script as root. The script will show you the currently active cpu’s before and after disabling the CPU’s.

Continue reading

quick bash script for datewise backup of directory

2012-12-12 1 min read Bash Linux

I was working on something and the data was very critical and needed backup. I wrote a bash script to back up the data every 5 hours with cron and bash script. Thought I will share that with you. Here is the script.

#!/bin/bash - 
#===============================================================================
#
#          FILE:  backup.sh
# 
#         USAGE:  ./backup.sh 
# 
#   DESCRIPTION:  Backup all the current files.
# 
#       OPTIONS:  ---
#  REQUIREMENTS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka), amit.agarwal@roamware.com
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 08/19/2011 02:43:32 PM IST
#      REVISION:  ---
#===============================================================================
backupf=( a b c d) #Here you need to specify the directory you need to backup.
bkupdir="/tmp/backup/$(date +%Y)/$(date +%m)/$(date +%d)" #Here you can change the basedir for the backups
mkdir  -p $bkupdir
sudo tar cvfz $bkupdir/bkup_$(date "+%Y%m%d_%H%M").tgz $backupf[*] #Remove sudo if you do not need it.
echo "Backup created in dir $dir"

And then just add it to cron as “00 */5 * * * /home//bin/backup.sh”. Change the path if it does not match what is given here.

Continue reading

Shortcut to run current command with sudo in bash

2012-09-20 1 min read Fedora Linux

For me, I mostly forget to add “sudo” to the command until the time I am actually supposed to run it. Also sometimes, on some systems, bash completion does not work as expected with “sudo”. With these in mind, I wanted something such that when I have completed the command, I could insert sudo in the begining of the command without much ado. So, finally this is what I came up with in my “~/.inputrc” file. Note: If you don’t have this file, then simply create this file.

Continue reading

rpmconf – Tool to handle rpmsave and rpmnew files

2012-06-18 1 min read Bash Fedora

Install the utility:

sudo yum install rpmconf

Description:

Description : This tool search for .rpmnew, .rpmsave and .rpmorig files and ask you what to do
with them:
Keep current version, place back old version, watch the diff or merge.

And finally run the utility:

sudo rpmconf -a

and if there is a conflict or rpmsave or rpmnew file, then you will see something like this:

Continue reading

tora on Fedora 16 for mysql and Oracle.

2012-02-06 1 min read Database Fedora

Sometime back I had posted a article on Tora on Fedora. But that was a while back and things have progressed and we already have Fedora 16 (aka Verne).

So, awhile back I installed Tora on my Fedora 16 and here are the steps to do so:

First get the Tora sources from sourceforge.net . Download the source tar file and extract the same.

Continue reading
Older posts