August 17, 2009, 9:43 am

Since Arch’s official kernel26 package 2.6.16.2-1, IPv6 is no longer compiled directly into the kernel, but as a module. Many don’t require the features, and may benefit from added performance (many programs will query IPv6 addresses first, unaware that you don’t have an IPv6 connection) and free memory (250k, that’s a mighty big module).
The ipv6 module is loaded at boot. There are many programs which will load the ipv6 module if they detect that it’s available. In fact, they’re loading net-pf-10, which is an alias to ipv6. Adding the following line to /etc/modprobe.d/modprobe.conf will disable the automatic loading of ipv6, while also allowing you to load it manually, if needed.
# disable autoload of ipv6
alias net-pf-10 off
August 12, 2009, 3:22 pm

Create a entry in Openbox menu with:
feh --rcfile /home/me/.fehrcwall "/home/Me/MyWallpaper"
And create a file with name
.fehrcwall
and put in your Home.
This file is a copy of .fehrc with simple change. Just put this:
# Set the default feh options to be recursive and verbose
feh -qrNA "feh --bg-scale "%f"" --title "Wallpaper" -g 320x240
Now, when you click in openbox menu, an image will appear in small window. You can navigate with your mouse scroll wheel or left/right arrows. To se the wallpaper just press Enter.
August 7, 2009, 8:21 am

The NERD tree allows you to explore your filesystem and to open files and directories. It presents the filesystem to you in the form of a tree which you manipulate with the keyboard and/or mouse. It also allows you to perform simple filesystem operations.

Download NerdTree Here.
Install
Unzip the archive into your ~/.vim directory.
That should put NERD_tree.vim in ~/.vim/plugin and NERD_tree.txt in ~/.vim/doc.
August 6, 2009, 9:50 am

Ever left some longer running script/process/something at home and than wished you could control it via ssh and it wasn’t started in a screen session? Fear not, retty is here to rescue! To demonstrate this:
$ irssi
# switch to new terminal
$ screen -S irssi
$ retty `pgrep irssi`
/redraw
To explain what is going on here, first we start a normal application in one terminal, this could be any other thing, like a script doing heavyweight processing. In the new terminal we start the screen session, this is an optional step, it allows us to be able to later on detach/reattach the session at will. Inside the screen session we hijack the irssi PID. The last step, /redraw is only necessary because we are dealing with complex ncurses stuff which does weird stuff when it’s in operation . For the same reason you have to run “reset” in the first terminal if you want to keep using it normally. This by itself isn’t really useful, however you can use the exact same procedure to reattach something via ssh.
August 4, 2009, 5:54 pm

Bitlbee is a “console-based IRC to IM chatting gateway, including ICQ/MSN/Jabber”. Basically, it allows the user to interact with popular chat networks (ICQ, MSN, Jabber, AIM, YIM) within their IRC client.
The users’ buddies appear as normal IRC users in a channel and conversations use the private message facility of IRC.
Continue reading ‘Chat with AIM, MSN, Gtalk, and Yahoo through Irssi with bitlbee’ »
August 3, 2009, 9:58 am

1. sudo vim /etc/cron.hourly/pacmansy
2. and place this within
pacman -Sy
3. then :wq the file and make it executable:
chmod a+x /etc/cron.hourly/pacmansy
4. vim ~/bin/getupdates.pl
and place this within:
#!/usr/bin/perl
use strict;
use warnings;
print ((`pacman -Qu` =~ m/^[^\s]+\s\((\d+)\):/m) ? $1 : 0);
5. vim ~/.screenrc and do this: (relevant parts are bolded)
caption always “%{= KW}%-w%{= Gk}%n %t%{-}%+w %-=”
hardstatus alwayslastline “%{= kW} %-= %{= kC}Session:%u%{= kW} %5` | %{= kC}Host:%{= kW} %H | %1` |%{= kC} MEM:%{= kW} %2`MB /%{= kC} SW: %{= kW}%3`MB | %{= kC}Unread %{= kW}%4` | %{kC}Updates:%{kW} %7` | %m/%d %c”
#Backticks to display information in status bar
backtick 1 60 60 /home/username/bin/get_uptime
backtick 2 60 60 /home/username/bin/get_freemem
backtick 3 60 60 /home/username/bin/get_freeswap
backtick 4 60 60 /home/username/bin/get_gmail
backtick 5 60 60 /home/username/bin/get_sessionname
backtick 7 60 60 perl /home/username/bin/get_updates.pl
Now run screen and the number of updates awaiting for you in pacman should be displayed. Enjoy.
August 3, 2009, 9:50 am

I recently got hold of a 1 GB USB memory stick. It is a Kingmax 1 GB flash drive (U201G – U2GMHDWG) which is (believe it or not), half the size of my little finger. In fact, it is so small that there is a good chance I might misplace it somewhere if it was not tethered to a chain. Anyway, the USB stick has a FAT partition on it and contain some data which I wanted to access in GNU/Linux. I was using Ubuntu and it straight away detected the device as soon as I inserted it and it was automatically mounted in the /media/USB DISK location.
But when I tried to mount it in a bare bones Linux distribution (a distribution which has just enough software as is needed), it was not mounted automatically. This is because the auto mounting takes place by means of a program known as hotplug which detects the USB device that is inserted in real time and then mounts it in the desired location.
Continue reading ‘Manually mount a USB flash drive in Linux’ »
August 1, 2009, 12:27 pm

This script use tr command to convert uppercase file name to a lowercase file name. The tr utility copies the given input to produced the output with substitution or deletion of selected characters. tr abbreviated as translate or transliterate. It takes as parameters two sets of characters, and replaces occurrences of the characters in the first set with the corresponding elements from the other set i.e. it is used to translate characters.
Continue reading ‘Shell Script To Rename File Name To Lowercase’ »
August 1, 2009, 8:38 am

This took me a little bit, so i write it down.
In ~/.wmii-3.5/wmiirc, replace the following line:
xsetroot -solid ‘#0b1014′
with a command to set the background image, such as
eval `cat $HOME/.fehbg` &
(requires feh)
Now i don’t have to bother anymore with the configfile,
feh –bg-center ~/path/to/image sets the backgroundimage
and after a reboot the last shown picture is set.