Tag Archive: Script

As we saw earlier, Rsync can be a nifty tool to transfer data across the systems in an organization while taking backup. However, its prompt for password during transfers can irritate everytime you transfer. Even having a cron-job for automatic backups using rsync will mean you having to enter password which defeats the purpose of cron-job. Here I will show you how you can use rsync over ssh to sync data across computers without password. That’s right, password less transfers with rsync.

First on your server(IP:192.168.100.101) create a ssh key using ssh-keygen,

#ssh-keygen

It will ask you for a location, hit enter for the default location. Next you’ll be prompted for a pass-phrase, hit enter & confirm it with another enter. We want the pass-phrase to be blank. You’ll get the following.

Generating public/private rsa key pair.Enter file in which to save the key (root/.ssh/id_rsa):Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /root/.ssh/id_rsa.Your public key has been saved in /root/.ssh/id_rsa.pub.

Next we will need to copy the public key to the remote system(192.168.100.102). On the local system(192.168.100.101) enter the following;

#ssh-copy-id -i /root/.ssh/id_rsa.pub 192.168.100.102

You’ll be prompted for password for the remote system. Once you enter it, the key will be copied on the remote host. Now you can use rsync to connect & transfer to the remote system(192.168.100.102) without any password prompt.

GIMP is a good free software for photo-editing. It has most of the capabilities you will require of its commercial counterpart Adobe Photoshop. What’s more with the right plugins, you can extend its capabilities. Here I’ll tell you about some GIMP plugins which will primarily be of interest to photographers. They will make your photo work-flow easier & faster.

Vignette – As the names suggests, this adds a vignette to your photo. Vignette can be used creatively to allow viewer’s eye to stay within the frame. Most of the photos will benefit from a small amount of vignette. The vignette plugin allows you to choose parameters like vignette colour, softness, darkness etc. It does its job very well.

Lomo – Want to mimic the look of a LOMO camera? This plugin will do it for you. It saturates the colour, adds a vignette(there is also an option for double vignette) & some other parameters for fine-tuning the output. Have fun!

Split Tone – Split toning is another beautiful effect. This plugins lets you select the two colours for split toning(as oppose to just two offered by most other programs) & end up with results beyond your imagination. Give this a try.

Darla Contrast Fix – This plugin aims to normalize the contrast in the photograph. With the right settings, it can make a photograph. However, this plugin requires some practice & knowledge of the parameters before one can get consistent results regularly.

National Geographic – Have you always wondered at the quality of the photos published by Nat Geo? They are sharp, contrasty & look as if edited by professionals. This simple plugin will put the same power in your hands too. This is a great plugin & as Darla Contrast Fix, this too requires practice before you’re able to get consistent results on a regular basis.

G’MIC – Stands for GRECY’s Magic for Image Computing. This is a grand-daddy of plugins. It is so packed with various image manipulation tools that I wonder even if someone will discover all of them in lifetime. Right from the basic sharpening, noise reduction to advanced like soft glow. This covers it all. And did I say, each of the tools come with several more options to fine tune the output? Yes, this is one hell of a plugin.

Off-course, there are many more plugins in the GIMP repository but these are the few I use on a regular basis & find to work properly. If you have your favourite GIMP plugin not listed here, do share it below. Will benefit all. :)

There are times when you need to post the outcome of a particular command(s) from a shell on a forum or somewhere else. It might be for troubleshooting or demonstration. However, copy-paste is not exactly a good option if your shell is filled with tons of information. Not to mention, you would spend a lot of time just selecting the text & then pasting it into a word processor. Wouldn’t life be easy if there would be a script which would gather all the data from a terminal & save it to a file? It does exist.

Before starting to run the command(s) whose output you wish to capture, enter;

$script -a filename

You will get,

[shuttertux@localhost ~]$ script -a filename

Script started, file is filename

[shuttertux@localhost ~]$

Now one can begin entering the required commands. Once done, type;

$exit

You’ll get,

[shuttertux@localhost ~]$ exit

exit

Script done, file is filename

[shuttertux@localhost ~]$

Now you can view the output file simply by,

$cat filename

Wasn’t that easy? Just remember, the output file is saved in your present working directory.