Mod and hack the GNome main menu with automated scripts to create a menu of the directory.

2010-03-04 2 min read GNOME Linux

Problem:
I had a directory with very good collection of my scripts and very organized in folders. The structure is something like this, first I have the broad classification of the category. Then I have the name of the tool/script as the name of the directory. All these are perl/python or shell scripts and luckily labelled so with the extension. I want to add these to the GNome main (Applications) menu.
Solution:
Lets take it stepwise:
1)  Add new menu tools to the Applications menu. Go to /etc/xdg/menus
Open the file applications.menu and add the following before

Continue reading

Bash histoy – common history in different terminals

2010-03-04 1 min read Bash Linux

I have been looking to do this for sometime. The bash history is per
session basis and the last session to quit overwrites the bash_history
file and thus all other terminals started between the time last terminal
lasted does not get to write the commands in the history file. Secondly
the history gets cluttered with lot of duplicate entries and entries
with ls and cd commands. So finally I added these to the bashrc file:

Continue reading

Happy New year and invitation to become author.

2010-03-03 1 min read Linux

Wish all of you a happy and prosperous new year.. Now I am opening inivitation for authors. If you like linux and want to write on the same, please register yourself and leave a comment on this post with your username, and as soon as I am back I will do the required.

Once again Happy New Year.

Bash Sub Shells

2010-03-02 1 min read Bash

Taken from <a href="http://www.linuxjournal.com/content/bash-sub-shells" target="_blank">here.

<span class=\"c\">#!/bin/bash</span>

<span class="nv">server_cmd</span><span class="o">=</span>server <span class="nv">pid_file</span><span class="o">=</span><span class="k">$(</span>basename <span class="nv">$server_cmd</span> .sh<span class="k">)</span>.pid <span class="nv">log_file</span><span class="o">=</span><span class="k">$(</span>basename <span class="nv">$server_cmd</span> .sh<span class="k">)</span>.log

<span class="o">(</span> <span class="nb">echo</span> <span class="s2">"Starting server"</span> <span class="nb">echo</span> <span class="s2">"Doing some init work"</span> <span class="nv">$server_cmd</span> <span class="c"># server becomes a daemon</span>

&lt;span class=\"k\">while &lt;/span>&lt;span class=\"nb\">true&lt;/span>

<span class="nb"> </span><span class="k">do</span> <span class="k"> if</span> <span class="o">[[</span> -f <span class="nv">$pid_file</span> <span class="o">]]</span>; <span class="k">then</span> <span class="k"> </span>sleep 15 <span class="k">else</span> <span class="k"> </span><span class="nb">break</span> <span class="nb"> </span><span class="k">fi</span> <span class="k"> done</span> <span class="k"> </span>mail -s <span class="s2">"Server exitted"</span> joe@blow.com <<<CRAP

Continue reading

Happy holi to all.

2010-03-02 1 min read Uncategorized

A very happy Holi to all.

<a href="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/03/DSCN1119.resized.jpg"><img class="size-medium wp-image-1559" title="Holi" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/DSCN1119.resized-300x168.jpg" alt="Holi" width="300" height="168" />

Airtel does not need old customers

2010-03-01 3 min read Uncategorized

Couple of days back, I shifted my house. No big deal, right. Not for Airtel :).

I applied for a change in installation address and applied for the same. And promptly they told me that it will be done in 4 days time. I was a very happy person, but the happiness did not last long. After 4 days also there was no response and thus I called the call center again and they told me that the area I shifted to was not feasible for them (PS: It was just the opposite side of the road). Great, so I called the Area Manager whose number I had from a conversation I had with him. (BTW, I was the first customer for Airtel in my area).

Continue reading

Minimize the download size for updates.

2010-02-10 1 min read Fedora Linux

Fedora has rolled out presto repositories. What this means to the users is that the download size for the updates would be greatly reduced. To use the feature, first install the yum plugin:

sudo yum install yum-presto.noarch

Presto uses delta rpms. These delta rpms are quite small in size (eg few kbs instead of 15 MB for firefox 3.5). These delta rpms are used to re-create the original rpm and this is completely transparent to the end user. So, next time when you update with the plugin installed you will see the difference in the download size.

Continue reading
Older posts Newer posts