Skip to main content

Posts

Showing posts from September, 2007

Bash's noclobber

If there is something I don't miss is a chance of thumbing through a new book. It always seems that I never have enough money to buy them all, so the resort to the next best option. To seek out engineering students who buy books in the feverish days before the examinations only to banish them to the dark and dusty corners. Needless to say these are technical books explaining basics of languages or Unix shell environment, a particular favorite of mine.
Perhaps it is my insatiable curiosity that drives me to read all books even the 'for Dummies' books which are looked down with disdain by other geeks, I find them amusing and entertaining. Lately I have started noticing that some information was missing here and there. For instance, the setting of no clobber of existing files is nowhere to be seen in shell books these days , I guess the authors of these technical books consider it unimportant and almost trivial. The no clobber setting however is life saving sometimes, it …

Wget Re-tries!!

Its just that kind of day, nothing just works. I need to get this huge source pack and the Internet connection is acting up again. I have long since given any hope of ISP fixing the connection timeouts and total connection failures. So, the wget program grabbing the file from the Internet running in background sputters after 20 or so tries and gives up. This calls for extreme measures. $ wget -t 0 -c http://examplesite.com/pub/xxxx.bz2 The -t ( --tries ) set to 0 (zero) which means it keeps on trying infinitely until the hell freezes over. And -c ( --continue ) is to continue grabbing the half downloaded file.

Install Debian from Web in Windows

While going through old archives of emails I didn't read I stumbled upon this announcement of Debian-Installer Loader, a win32 loader for Debian Installer.This is very good tool that would help new users start off the installation from the Web while still in Microsoft Windows OS environment. This is the announcement of "Debian-Installer Loader", a win32 loader for Debian Installer. Overall, the process is very simple (it's been inspired by a similar project with Ubuntu). D-I-L runs on the users' win32 system, auto-detects wether the CPU supports 64-bits, picks the appropiate linux and initrd.gz images for netboot, and uses GRUB for DOS to chainload into it. This has a few interesting applications: - Migrating to Debian on hardware without CD drive (or USB boot capability). - Migrating to Debian for users who have no idea how to burn an ISO and/or how to configure their BIOS for CD boot. - Migrating a system to Debian inmediately, at any time, wet…

Killing Sluggish Iceweasel

Sometimes my Iceweasel (unbranded firefox) web browser seems sluggish after rendering flash heavy web page or stops responding all together. I hope this behavior is not uncommon at all. Instead of waiting for(ever) the browser to start responding normally I resort killing the web browser with killall 11 (eleven) HUP signal. After-all its me who is uses the computer not the other way around. ;o) killall -11 firefox-bin Note: Please note that -11 is hyphen followed by two numeric one's not ' l ' English alphabet.

Mounting a Windows partition automatically at boot time

If you have setup a Microsoft Windows and Linux dual boot system you may want to mount the windows partition automatically when you boot into GNU/Linux. As usual I don't suggest using any special scripts or packages for this. We will use the standard *nix files system table (fstab for short) file which stores all the entries about all known filesystems on the system and place an entry for our partition. Lets get started,Just place the following line into your /etc/fstab (filesystem table) file and you are done. /dev/hdaX /mnt/C vfat defaults,auto 0 0 /dev/hdaX if you are using a IDE harddrive, X is the number of the partition (use fdisk -l to list your partition info)/mnt/C the mount point, where the windows partition is attachedvfat - vfat for 98x or ntfs for NTFS partition auto - Mount the partition at boot time Other possible parameters you can use uid/gid , showexec, umask etc.. the fstab manual page (man fstab) has detailed information about all the options. Also…

Pidgin Sound Notifications

If you haven't used Pidgin (formerly gaim) then you should give it a try. The USP of the program is that it supports a wide range of Instant messaging protocols. AIM Bonjour Gadu-Gadu Google Talk Groupwise ICQ IRC MSN MySpaceIM QQ SILC SIMPLE Sametime XMPP Yahoo! ZephyrNow, you *now* know what I am talking about ;o).Being a fantical lightweight desktop user, I am currently running custom complied Fluxbox as my window manager and I don't use a sound daemon like ESD too.So when the pidgin package on GNU/Debian suggested that I use gstreamer to play the silly pings and pongs my geek soul quivered. $ apt-cache show pidgin Package: pidgin Priority: optional .... Some extra packages are recommended to use the core functionality present in most pidgin installations: * gstreamer0.10-plugins-base, gstreamer0.10-plugins-good - Sound support. . Instead of installing gstreamer and plugins I decided to use aplay from the alsa-utils packages which also has commonly used alsamixer…

Decompressing 7-zip ( 7z ) archive files

7-zip is toted to have a higher compression ratio than the regular zip archives. The 7-zip compressed files usually have a .7z extension , but lets check with 'file' command to find what kind of file it is. $ file archive.7z archive.7z: 7-zip archive data, version 0.2 ( For this tutorial I created a 7-zip compressed archive (archive.7z) with few blank files beforehand.) Alright now lets find out what packages in GNU/Debian Sid provide tools to handle 7-zip files. $apt-cache search 7-zip advancecomp - collection of recompression utilities krusader - twin-panel (commander-style) file manager for KDE (and other desktops) lzma - Default and general compression method of 7z format in 7-Zip program p7zip - 7zr file archiver with high compression ratio p7zip-full - 7z and 7za file archivers with high compression ratio p7zip-rar - non-free rar module for p7zip Hmm, Lets go with "p7zip" package and install it. $ apt-get install p7zip The "p7zip"…

Installing Flash Plugin in Debian

Lets install Shockwave Flash plugin from Macromedia Adobe on Debian. We will be using the flashplugin-nonfree package from Debian Non-free. This package will install plugin for any Netscape or Mozilla based browsers like Mozilla, Mozilla-Firefox, Firefox, Iceweasel, and Iceape, along with few others like Galeon and Epiphany. Before we begin make sure you have non-free repository added in your apt-get sources.list file. Here is example from my sources.list file. deb http://ftp.iitm.ac.in/debian sid main non-free contrib Alright update the apt list and install flashplugin-nonfree package. $ apt-get update ... $ apt-get install flashplugin-nonfree Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: konqueror-nsplugins x-ttcidfont-conf msttcorefonts ttf-xfree86-nonfree xfs The following NEW packages will be installed: flashplugin-nonfree 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get…

Creating files the hackers way!

In *nix is all about text files, Let it be the costly piece of hardware that you brought or just some configuration setting to your favorite programs everything is humbled down to be a simple text file. Alright creating a new file doesn't necessarily mean opening your favorite editor pico or vi. There are quite faster ways for creating blank files on the shell, tell me find any simpler method. ;) Touch happens to be the standard way to create a blank file but that means I have to type five characters ( t o u c h ) being a lazy typist I use a much simpler method. $ touch testfile $ ls -l -rw-r--r-- 1 arky arky 0 Mar 23 22:31 testfile My hack is using the standard shell redirect operator > which does save some typing. ;) $ > testfile2 $ ls -l -rw-r--r-- 1 arky arky 0 Mar 23 22:31 testfile -rw-r--r-- 1 arky arky 0 Mar 23 22:31 testfile2

Bittorrent complains unable to setrlimit not allowed to raise maximum limit

Ever wondered why Bittorrent complains that it is unable to setrlimit not allowed to raise maximum limit while starting. Most people would ignore this harmless warning but I just had to know why. First I posted a support request on Bittorrent Support site , I am still waiting for any response from them. Meanwhile here is the error message if you haven’t seen it before. $ bittorrent-console >>> unable to setrlimit not allowed to raise maximum limit In plain speak, its the python interpreters way of saying “look I need more system resources”. So,lets try to do just that. In gnu/Linux the Pluggable Authentication Modules (PAM) are used to place a cap on system resources. The /etc/security/limit.conf is the configuration file where the limits are, raise the limits and the warning will go away. Here is a example of the /etc/security/limits.conf configuration. * soft core 0 * hard rss 10000 @student hard nproc 20 @faculty soft nproc 20 @faculty hard nproc 5…