Wednesday, December 19, 2007

NextPlease! An Essential FF/Iceweasel plugin

Update(Sep 21, 2008) : As of now Nextplease! plugin doesn't work with Firefox 3

Here is plugin that I can't do without.

NextPlease! is a highly configurable extension that allows you to jump to next and previous links on search results pages, like Google, Yahoo, Ebay, Amazon, and many other sites. NextPlease! can be triggered via keyboard shortcuts, toolbar...

The older version of this plugin used to work fine with the Next/Previous links were image links but simple simple hypertext links were an issue. In the screenshot of the NextPlease! menu you can see it that only image links can assigned. The newer versions of plugin allows the use of simple link phrases too.
NextPlease! Menu

The plugin comes along with a comprehensive documentation too. Usually firefox plugins don't have great documentation, but this one does!!!. Overall this plugin is neat and makes surfs a hundred of more page listings easy.

Monday, December 17, 2007

MySQL Server Gotcha

Sorry folks been busy for a while but I am back now!!

The mysql server had been absent on my desktop Debian box for long time now as I haven't been doing any web app development. A little time I took to set things the way I liked ( my standard development setup is disable mysql from listening on public TCP port and serve local database requests via sockets and use lighter start-when-you-need webserver instead of apache2 with all its crowning glory) I see that the skip-networking is not default for mysql-server package on debian (unstable/sid) anymore .

A look at the /etc/mysql/my.cnf from the package revealed the new defaults have indeed changed.

 # Instead of skip-networking the default is now to listen only on # localhost which is more compatible and is not less secure. bind-address            = 127.0.0.1 

Tuesday, November 27, 2007

OLPC XO Laptops for Africa

OLPC XO Laptop

BBC News special report on the OLPC XO Laptop experience in Nigeria.
The rugged, energy efficient laptops have been designed to be used in remote and environmentally challenging areas. They are currently being tested around the world, including at the LEA primary school, Galadima, on the outskirts of Abuja, Nigeria.
Don't miss this BBC News Special Report Audio slideshow: Laptops for Africa

Hyderabad based iChip Technologies to offer @box Linux powered sub-10k Home PC

Today's newspaper mentioned this new product powered by Linux called @box ® from a Hyderabad based company Ichip. The company product page proclaims @Box ® as " a complete entertainment device that plugs into your existing TV - no special skills or knowledge needed - if you can watch TV , then @Box can show you that entire web has to offer".

The product is yet to launched, we can expect it to hit the shelf's next summer (March 2008) but the overall cost of the product is not clear. The report in The Hindu puts it Indian Rs. 10,000 and the add-ons(don't ask me, I don't know) required for running it at home would cost almost an equal amount. Where as the Ciol.com says the product could be priced at about the cost of a mobile phone (say, about Rs 4,000), but it all depends on how the services associated with the box get bundled with the telco

I wonder how both reporters who covered the same press conference provide such conflicting details. We need to wait and see how this device fairs in Indian market.

Setting Timezone On Debian

Oops something went wrong with the last package upgrade on my Debian Desktop. This morning I observed that my system date had reverted back to UTC. Its not a big issue but let me take this opportunity to show how to change the timezone on your GNU/Debian Linux system.

The /usr/bin/tzselect tool from the libc6 package allows to set the proper timezone interactively. As I live in India (Asia) it is Indian Standard Time (IST) for me so I have to set TZ environmental variable to "Asia/Calcutta".

 $ /usr/bin/tzselect  Please identify a location so that time zone rules can be set correctly. Please select a continent or ocean.  1) Africa  2) Americas  3) Antarctica  4) Arctic Ocean  5) Asia  6) Atlantic Ocean  7) Australia  8) Europe  9) Indian Ocean 10) Pacific Ocean 11) none - I want to specify the time zone using the Posix TZ format. #? 5 Please select a country.  1) Afghanistan           18) Israel                35) Palestine  2) Armenia               19) Japan                 36) Philippines  3) Azerbaijan            20) Jordan                37) Qatar  4) Bahrain               21) Kazakhstan            38) Russia  5) Bangladesh            22) Korea (North)         39) Saudi Arabia  6) Bhutan                23) Korea (South)         40) Singapore  7) Brunei                24) Kuwait                41) Sri Lanka  8) Cambodia              25) Kyrgyzstan            42) Syria  9) China                 26) Laos                  43) Taiwan 10) Cyprus                27) Lebanon               44) Tajikistan 11) East Timor            28) Macau                 45) Thailand 12) Georgia               29) Malaysia              46) Turkmenistan 13) Hong Kong             30) Mongolia              47) United Arab Emirates 14) India                 31) Myanmar (Burma)       48) Uzbekistan 15) Indonesia             32) Nepal                 49) Vietnam 16) Iran                  33) Oman                  50) Yemen 17) Iraq                  34) Pakistan #? 14 The following information has been given:          India  Therefore TZ='Asia/Calcutta' will be used. Local time is now:      Tue Nov 27 02:31:35 IST 2007. Universal Time is now:  Mon Nov 26 21:01:35 UTC 2007. Is the above information OK? 1) Yes 2) No #? 1 You can make this change permanent for yourself by appending the line         TZ='Asia/Calcutta'; export TZ to the file '.profile' in your home directory; then log out and log in again.  Here is that TZ value again, this time on standard output so that you can use the /usr/bin/tzselect command in shell scripts: Asia/Calcutta  

After you set the TZ='Asia/Calcutta'; export TZ line in your /etc/profile or ~/.profile file. Type source ~/.profile and run 'date' to check if the changes has been reflected properly.

Sunday, November 25, 2007

Is "OLPC Stomped" By Tech Giants (Intel) ?

OLPC XO Laptop

I haven't written about OLPC since the G1G1 (Give 1 Get 1) program started. Yesterday Wayan Vota of OLPCNews posted his views on Wall Street Journal's story A Little Laptop With Big Ambitions (How a Computer for the Poor Got Stomped by Tech Giants).

There is an interesting front page article on One Laptop Per Child this morning in the Wall Street Journal. Steve Stecklow takes the position that OLPC's computer for the poor was stomped by tech giants Intel and Microsoft.

I'd like to take the position that if OLPC is getting stomped (and I don't think its being "stomped" at all), its due to its own foolishness and arrogance, as much or more than any underhanded competition form Intel or Microsoft.

I've detailed my opinion here: www.olpcnews.com/commentary/press/wall_street....microsoft.html and I welcome your comments, opinions, and convictions.

Friday, November 23, 2007

Where to buy Asus Eee PC in India

Asus Eee PC

While sitting in a computer showroom today I glanced through a computer reseller magazine. It had an article reviewing the Eee PC from Asus but it did not mention the price of the product in India. However the article mentions Mr. S Jacob (phone #91-9444489272) in the contact section. I don't know if he works for Asus India or a retailer for this product in India. If you get in touch with him do leave the information as a comment.

Thursday, November 22, 2007

How To Start StumpWM

Stumpwm Logo

That seems to be on minds of many who want to use the swanky StumpWM Lisp-based Window Manager for X. Written entirely in Lisp StumpWM takes REPL programming paradigm to the next level, some people have compared this one to the original Symbolic Lisp machines feature wherein any running program's source can be displaced and modified on the fly.

There is an open bug for StumpWM package (#356948) on Debian BTS for explaination about starting the StumpWM. Instead of launching StumpWM from Emacs or SLIME here created myself a simple shell script called "startstumpwm".

#!/usr/bin/env clisp (asdf:operate 'asdf:load-op 'stumpwm) (stumpwm:stumpwm)

After setting the execute persmission to file with chmod a+x startstumpwm I set an entry into my ~/.xinitrc and start the X server with 'startx' command.

exec startstumpwm

There you go ! Perhaps this will help you until the StumpWM gets its proposed /usr/bin/startwm binary in the next package upload.

Wednesday, November 21, 2007

Yahoo! Webcam support in GNU/Debian Linux

GYachI Voice / Video Chat IM client on Debian Linux

Following the Noumaans post "Debian Ubuntu - Webcam in Yahoo! Chatrooms" I checked out to see if GyachI (GyachE Improved) IM client was installable on my GNU/Debian Linux Sid box. Last time I tried this, the .deb package released by the project was hogged by package dependency problems. To my utter surprise the GyachI version 1.1.0-1 debian (.deb) package for Ubuntu Dapper installed right away and is working fine.

About GYachE Improved (a.k.a. GYachI)

Welcome to the home of GyachE Improved (GyachI) program. This is a fork from Gyach Enhanced Yahoo! client for Linux operating systems. It was born purely out of impatience. Since there was no progress on Gyach Enhanced for about a year, a couple of impatient GYach Enhanced users decided to continue development of that client, fearing that original author Erica Andrews lost interest or abandoned project altogether. Therefore, in the true spirit of Open Source we, the developers, thought of simply "carrying on the torch".

This Yahoo! client for Linux operating system supports almost all of the features you would expect to find on the official Windows Yahoo! client: Voice chat, webcams, faders, 'nicknames', audibles, avatars, display images, and more. Yet, it remains very light-weight and memory-friendly. GyachE Improved uses Gtk-2 for its user interfaces (Gtk-2 2.0.6 or better required).

GYachI IM Client Running on Debian Linux Sid

If you have the w32codecs from Debian-Multimedia.org (Christan Marillat's Debian Repository)then you can ignore the gyachi-codecs.deb package.

The GYachI program needs much work, but not bad at all!. Watch out this space for more news of any problems and bugs I find in next few days.

Review The New Debian Reference (v2) Draft

Osamu Aoki announced the new draft of the Debian Reference v2. The idea of new update-to-date Debian Reference was in the works for quite sometime now, kudos to Osamu for finally bringing out a draft. Please do try to read it and provide suggestions.

Here the Osamu's post on Debian-doc mailing-list "Request for review: Debian Reference v2"

Hi, As has been repeatedly pointed out, Debian reference was getting old. It needed major rewrite. I finally got the initial draft of Debian Reference v2 ready. Please give me your feed back. RESULT: http://people.debian.org/~osamu/pub/getwiki/en_US.UTF-8/ I appreciate if someone revise my English to more readable one. This can be easily done by editing the wiki page as the source file. SOURCE: http://wiki.debian.org/DRIndex You may need to create account to login to wiki. http://wiki.debian.org/DebianWiki/EditorQuickStart Some special things on Debian Reference is mentioned at the bottom of : http://wiki.debian.org/DRIndex Regards, Osamu

Review The New Debian Reference (v2) Draft

Osamu Aoki announced the new draft of the Debian Reference v2. The idea of new update-to-date Debian Reference was in the works for quite sometime now, kudos to Osamu for finally bringing out a draft. Please do try to read it and provide suggestions.

Here the Osamu's post on Debian-doc mailing-list "Request for review: Debian Reference v2"

Hi, As has been repeatedly pointed out, Debian reference was getting old. It needed major rewrite. I finally got the initial draft of Debian Reference v2 ready. Please give me your feed back. RESULT: http://people.debian.org/~osamu/pub/getwiki/en_US.UTF-8/ I appreciate if someone revise my English to more readable one. This can be easily done by editing the wiki page as the source file. SOURCE: http://wiki.debian.org/DRIndex You may need to create account to login to wiki. http://wiki.debian.org/DebianWiki/EditorQuickStart Some special things on Debian Reference is mentioned at the bottom of : http://wiki.debian.org/DRIndex Regards, Osamu

Monday, November 19, 2007

Firefox/Iceweasel Tip: Use Safe Mode To Fix Broken Extensions and Themes

Recent Gray Richmond's article on Free Software Magazine "How to fix broken Firefox extensions" covered this issue extensively. The article talks about getting dirty with XPI files (a.k.a extension files) but not everyone is familiar with XUL so disabling a troublesome extension/theme/custom setting using safe mode is the best way out.

If you are still having problems, your best bet is to start Firefox in what is called Safe Mode. To do this you will need to fire up a console and type firefox -safe-mode. Firefox should now start but all extensions will now be disabled, including any offending ones which caused the problem in the first place. It is simply a matter of disabling/removing the relevant extensions, closing Firefox and restarting it in the normal manner. You can find out more about using Safe Mode from Mozillazine.

Lets see the safe mode in action here. First get rid of any existing process of the browser with killall command. And then start the browser with --safe-mode option on the console (Firefox users use "firefox-bin" instead of "iceweasel").

killall -11 firefox-bin iceweasel --safe-mode

The browser will start in the safe mode with a dialog box which temporarily allows you to disable the offending extension/theme/custom setting. Either you can choose to continue loading the browser in safe mode and disable the extension from Tools > Add-ons manager or just disable everything and restart the browser in normal mode.

Firefox runnning in safe mode

Wednesday, November 14, 2007

Emacs Annoyance with Multi-line SSI directives

Talking about SSI(Server Side Includes) is out of place in the world abuzz with web applications developed with programming languages like PHP, ASP, JSP, Python, Ruby and Perl. But do note that there are a lot of web pages out there( perhaps like your universities information pages ;o) that are still powered by SSI.

Here is one annoyance that I face while editing SSI directives using Emacs. When I type a SSI directive with a certain value that spans more than a line Emacs warps around the line which it is not what we want. To avoid this try turning off the "Word Wrap in Text Modes (Auto Fill)" setting in Emacs.

Editing a SSI Directive in Emacs

Emacs Word wraps the line (ooops!)

Emacs SSI word wrap problem

Turn off Emacs Auto Fill Mode

emacs disable auto fill

PS: After writing this entry I realised that the file name in screenshot is ".shmtl" instead of ".shtml". Please kindly excuse I am getting too lazy

Monday, November 12, 2007

Running Debian on Asus Eee PC

Asus Eee PC

If you are one of the few who brought the tidy new Eee PC from Asus (lucky buggers!) then you need not stick with Xandros for long. A new project is currently underway to provide GNU/Debian Linux as an alternative Free OS for Asus Eee PC.

For now you can resort to apt-pinning to install Debian packages on Eee PC. Hang around for more updates on debian-eeepc project.

Stopping Bittorrent client after finishing downloads

Leaving your bittorrent client running after finishing download is a generally a good idea. However for sake of geek curiosity I tried a simple method of stopping my transmission bittorrent client after finishing the download with ....

/usr/bin/transmission-cli -f 'killall transmission-cli' elephantsdream-1920-hd-mpeg4-su-ac3.avi.torrent

The -f, --finish <shell script> is used to launch shell scripts. The 'killall transmission-cli' command kills (all) transmission-cli bittorrent clients running on this computer. It seems to work for me, do share your experiences

Sunday, November 11, 2007

Xchat Tip: Binding actions to mouse clicks

Xchat2 L Chat Program for windows and linux

Here is a tip for XChat IRC client users. Wouldn't it be fun to just click a user's nick in a IRC channel and your IRC client automatically sends a "hi" message to that nick right away ;p .

Well, don't worry I won't suggest you to use any scripts for this. We can just bind this action to the mouse double click in XChat by changing the Action Upon Double Click execute command to "MSG %s hi %s" (%s variable holds the nick name string) under Xchat Settings Preferences > Interface > User List. Next time you start up Xchat,just click a nick to say hi!!.

Xchat Preferences dialog box on Debian Linux

Friday, November 9, 2007

Debian Beer & Wine (Humour) !!!

Debian Beer!!

An excellent take on the issue of unnatural delays in the GNU/Debian Linux release cycles. Kudos to Artem "artiomix" Nosulchik for this Linux Humour post.

Update: And found Debian Wine too

Disable emacs backup files on remote machines

Like most systems administrators of the day I learnt vi and used it extensively. Unlike Emacs, vi was standard text editor across many Unix platforms. However times have changed Emacs is now available almost everywhere and also that I have now moved away from system administration towards academics I find myself using emacs more often.

Whenever you save a file, emacs copies the current version to file with same name followed by a tilde(~). Its a good idea to allow emacs to back up files like this since you can revert back to older version of the edited files easily. However this not a good idea when editing files say on publicly accessible remote web server. Since I use AngeFtp to retrieve and edit file in emacs I set ange-ftp to disable backup files in my ~/.emacs file.

(setq ange-ftp-make-backup-files nil)

Wednesday, November 7, 2007

Entertaining Lisp Tutorial From Lisprati.com

Casting SPELs In Lisp Book Cover

Here is a very entertaining Lisp Tutorial Casting SPELs In Lisp from Lisprati.com's Conrad Barski, M.D . This comic book like tutorial teaches the basics of lisp programming language by writing a text based adventure like game.

If you are a Emacs user like me, then there is a Emacs Lisp Edition of the book too. However the book is only translated into only one language Turkish. I guess translating this book into other languages would be a wonderful idea. Get in touch with Conrad if you are interested.

Lastly, If you don't like lisp then you may try the examples in Ruby and Haskell (almost) too.

Happy Spell Casting!!

Changes in Debian Transmission package (transmissioncli renamed)

I just noticed that the light-weight bittorrent client Transmission package on GNU/Debian Linux has renamed its CLI(Command Line Interface) program name from transmissioncli to transmission-cli .

Here is note from transmission (0.90.dfsg-1) package changelog.
* debian/transmission-cli.*: binary upstream rename from transmissioncli to transmission-cli (Leo "costela" Antunes)

I have updated my old post Using Transmission Bittorrent client on console to suit this.

Tuesday, November 6, 2007

Fluxbox menu example launching multiple programs with single click

Always a lightweight desktop fan, my current window manager is Fluxbox. Here is a simple example that allows us to launch multiple programs like my pidgin (formerly gaim) Instant messenger client and Iceweasel (firefox) graphical web browser with a single click of fluxbox menu item.

Here is my flux menu configuration (~/.fluxbox/menu) for your perusal

[begin] (fluxbox) [exec] (Go) {/usr/bin/pidgin&/usr/bin/iceweasel} [exec] (xterm) {xterm} [separator] [include] (/etc/X11/fluxbox/fluxbox-menu) [separator] [exec](About Fluxbox) {fluxbox -info 2>/dev/null | xmessage -file - -center} [end]

You can read the Fluxbox Menu documentation for further information

Using Debian Reportbug

Reportbug is easy to use program for reporting bugs in GNU/Debian Linux. If you are using webmail services like yahoo, MSN, gmail and don't run a SMTP daemon on your computer, you can configure reportbug to reflect both.

Here is my ~/.reportbugrc configuration.


 
# reportbug preferences file
# Version of reportbug this preferences file was written by
reportbug_version "3.18"
# default operating mode: one of: novice, standard, advanced, expert
mode standard
# default user interface
ui text
# offline setting - comment out to be online
#offline
# name and email setting (if non-default)
realname "Rakesh 'arky' Ambati"
# email "My_Nick@yahoo.com"
# Disable fallback mode by commenting out the following:
no-cc
header "X-Debbugs-CC: My_Nick@yahoo.com"
smtphost bugs.debian.org
# You can add other settings after this line.  See
# /etc/reportbug.conf for a full listing of options.
 

You can also generate your custom configuration settings using the --configure option of reportbug.



 reportbug  --configure
Please choose the default operating mode for reportbug.

1 novice    Offer simple prompts, bypassing technical questions.

2 standard  Offer more extensive prompts, including asking about things that a
            moderately sophisticated user would be expected to know about
            Debian.

3 advanced  Like standard, but assumes you know a bit more about Debian,
            including "incoming".

4 expert    Bypass most handholding measures and preliminary triage routines.
            This mode should not be used by people unfamiliar with Debian's
            policies and operating procedures.

Select mode: [standard] 



Lastly, don't forget to read the How to report a bug in Debian page before rolling your sleeve's to report bugs to Debian BTS.
Happy Bug Hunting!!!!

Sunday, November 4, 2007

Yahoo don't like linux! (Solution: Firefox / Iceweasel User Agent Line Fix )

Yahoo! Web page showing Unsupported Browser / Unknown User Agent Error I have few hours before leaving for Hyderabad for some R&R. I saw this post Yahoo don't like linux! . These reports of Yahoo! and other sites not working with Firefox / Iceweasel is not entirely uncommon there is a detailed fix available see if it works for you.

Saturday, November 3, 2007

Reading RSS/XML feeds in Elinks Line Browser

Raggle RSS Aggregator on ConsoleThis one is for console monkeys out there. Reading RSS/XML feeds in your web browser is not limited to graphical browsers alone, even our light weight console based Elinks line browser can do it with Raggle console RSS aggregator written in ruby.

Using WEBrick-based Raggle web interface allows us to use raggle from your Elinks line browser itself instead of its default console interface (see above image). The raggle web interface listens on port 2222 by default (you change it with command line parameters), point your Elinks browser to http://localhost:2222 and enjoy reading RSS/XML feeds at your leisure.

Its a good idea to run 'raggle --server' inside a screen session, once raggle is started, open a new Elinks window and give the type this URL http://localhost:2222

$ raggle --server Raggle: Loading config... Raggle: Loading feed list... Raggle: Loading theme... Raggle: Loading feed cache... Loading templates from "/home/arky/.raggle/web_ui/inc". localhost - - [03/Nov/2007:20:45:05 IST] "GET / HTTP/1.1" 200 681 - -> / localhost - - [03/Nov/2007:20:45:08 IST] "GET /raggle/desc HTTP/1.1" 200 2186 - -> /raggle/desc localhost - - [03/Nov/2007:20:45:08 IST] "GET /raggle/item HTTP/1.1" 200 6934 - -> /raggle/item localhost - - [03/Nov/2007:20:45:10 IST] "GET /raggle/feed HTTP/1.1" 200 72146 - -> /raggle/feed localhost - - [03/Nov/2007:20:45:12 IST] "GET /titlebar.html HTTP/1.1" 200 1001 - -> /titlebar.html localhost - - [03/Nov/2007:20:45:20 IST] "GET /inc/default.css HTTP/1.1" 200 7345 http://localhost:2222/raggle/desc -> /inc/default.css

Here you can see raggle web interface in Elinks. There are some issue and bugs with the raggle web_ui but I guess they would be solved in near future.
Elinks page showing Raggle Web interface

Resume Downloads in Firefox / Iceweasel

After my recent post about Firefox Annoyances: Download Resume Problems I observed that some of my readers were trying to find out how to resume their half-downloaded files in firefox/iceweasel. Sorry, the Firefox / Iceweasel doesn't yet continue half-downloaded between network failure or crashes. However you can try this alternative method.

Here is how you can continue the download from a crashed firefox / iceweasel using wget. First lets get rid of '.part' extension that the browser adds while downloading.

mv BigFile.zip.part BigFile.zip

Now resume/continue the download with wget's "-c / --continue" option.

wget --continue http://www.SomeSite.com/files/BigFile.zip

Wednesday, October 31, 2007

OLPC India Experience

Indian Children exploring OLPC XO laptop

OLPC learning consultant Carla Gomez Monroy writes about the OLPC experience in Khairat school, Maharashtra (India). The site for OLPC pilot project in India.

At the entrance, there was a black dog taking a rest. Beside the dog was Rajiv, in first standard, working on his XO while it was charging, plugged to the outlet on the wall. At the foot of the wall, on a long mat, there were some XOs, being charged.

On the other side of the door, sitting on long, thin mats on the floor, there was a small group of girls and boys working on eToys. Some were trying out all the sample projects while others were making their own.

Read the Complete Khairat Chronicle on OLPC wiki.

OLPC (one laptop per child) XO Laptop Explained

OPLC XO laptop case and motherboard with labels BBC takes a comprehensive look at the hardware, software and design of the MIT's $100 OLPC XO laptop. The smart design of this machine is going to make the computer industry sit up and take notice.

Tuesday, October 30, 2007

RIP Greenphone, Welcome OpenMoko's Neo1973 (FIC GTA01)

Trolltech discontinued Greenphone booting linux I had long given up hope on open platform for mobile phones until Trolltech's Greenphone. It offered a glimmer of hope that hacker friendly devices powered by GNU/Linux would be a reality in otherwise closed source mobile platforms.

However the party didn't last long, within one year of hitting the retail market Trolltech announced its decision to the end of Greenphone productions and but keep supporting the now popular Qtopia Greenphone community with yet another another device from OpenMoko project.

Openmoko.com's Neo 1973

The Neo1973 produced by FIC can also run Qtopia.
The Neo 1973 boasts the following hardware specifications

  • 2.8" VGA TFT color display
  • Touchscreen, usable with stylus or fingers
  • 266MHz Samsung System on a Chip (SOC)
  • USB 1.1, switchable between Client and Host (unpowered)
  • Integrated AGPS
  • 2.5G GSM – quad band, voice, CSD, GPRS
  • Bluetooth 2.0
  • Micro SD slot
  • High Quality audio codec

I reckon we have now come a long way from scrogging flea markets for used hardware and creating custom boards. Now you can buy a "Neo Hacker's Dream Box" off the shelf!! that is, if you have enough money to buy these devices.

Running automated package updates with Cron

LinuxLove.org's recent post about automatically running apt-get upgrades daily with cron using a simple bash script can be easily done using Cron-Apt package itself.

Please do note that such automated package upgrades in apt based distro's is a very bad idea. Joe had rewritten a detailed account about the problems and security issues involved in Debian-Administration.org few years back.

By default, cron-apt will only download updates -- it will not install them. I know other packages for other distributions like up2date will automatically install the updates for you, but I've learned to like this and that in the long run, automatically installing updates is a Bad Thing. Why? Well when I was experimenting with auto-installs, I ran into problems:

  • Even though I told apt to say Yes to everything, it still prompted me for input on config file conflicts (was I doing something wrong?). This caused the script to hang indefinitely in the background until it was killed.
  • Auto-accepting configuration changes can ruin your day. With Debian, it's fairly easy to back out of a change and hopefully you have a backup copy of the config file, but that's not the point. Good System Administration means you should never be in that position in the first place. "OK, what if I just deny all configuration changes and leave my copy?", you ask. Well, what if the upgraded program uses new syntax in its config file. Your program is now broke and you're in the exact opposite position as you were with auto-accepting.
  • Just as you should always review configuration file changes, always review what packages are being installed. If you know that installing that new version of Samba will mean some extra work in other places, don't install it yet.

Bottom line: Yes, it can be very tedious to manually review each update batch -- especially if you have several servers -- but that is part of your job when you are running a server. Deal with it!

cowsay: a configurable talking and thinking cow

Today's Debian Package of the day Cowsay reminds me of a dull day few years back when I wrote this 'cowwords' script to amuse myself.Even a useless tool like cowsay can be interesting with creative use, CrunchBang has another cool hack using vrms and cowssay Happy Hacking! :) .

Cowsay is a useless but very fun text filter written in Perl. If you send some text into cowsay, you get an ASCII cow saying your text. For example, cowsay Hello, World! prints


_______________
< Hello, World! >
 ---------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||


Script in public domain originally posted on FSUG-Bangalore Mailing-list

#!/bin/sh # # SCRIPT: cow-words.sh # AUTHOR: Rakesh 'arky' Ambati (http://www.linuxgazette.com/blog/4864) # DATE: 17 January 2005 # VERSION: you_must_be_kidding # # CREDITS: I Thank Karma_Police for the 'cow file randomizer code' # # PURPOSE: Retrieves the Dictionary.com 'Word of the Day" RSS Feed and # a random character teaches them. # # DEPENDS: 'xmlstarlet' # 'cowsay' # Both are available packages in Debian (Sid) repository. # To install them just type 'apt-get install xmlstarlet cowsay' # # # set -x # Uncomment this for debugging. # # ##################################### # Use 'cowsay -l' to the full list of cow files in your system # # (Sorry fellas I removed possible offensive 'sodomized*, head-in,telebears, # # kiss' cow files # ###################################### cows=(apt beavis.zen bong bud-frogs bunny cheese cower daemon default dragon dragon-and-cow elephant elephant-in-snake eyes flaming-sheep ghostbusters hellokitty kitty koala kosh luke-koala mech-and-cow meow milk moofasa moose mutilated ren satanic sheep skeleton small stegosaurus stimpy supermilker surgery three-eyes turkey turtle tux udder vader vader-koala www) random=RANDOM%44 ######################################### ## Get the XML feed and do the selection ## ######################################## /usr/bin/xmlstarlet sel --net -t -m "/rss/channel/item/description" -v "." "http://dictionary.reference.com/wordoftheday/wotd.rss" | /usr/bin/cowsay -n -f ${cows[random]} # End of the script

Load Balancing Apache Servers on Debian with HAProxy/Keepalived

A fine article shows you how to set up a two-node load balancer in an active/passive configuration with HAProxy and keepalived on Debian Etch.

Not only does the load balancer distribute the requests to the two backend Apache servers, it also checks the health of the backend servers. If one of them is down, all requests will automatically be redirected to the remaining backend server. In addition to that, the two load balancer nodes monitor each other using keepalived, and if the master fails, the slave becomes the master, which means the users will not notice any disruption of the service. HAProxy is session-aware, which means you can use it with any web application that makes use of sessions (such as forums, shopping carts, etc.)

From the HAProxy web site: "HAProxy is a free, very fast and reliable solution offering high availability, load balancing, and proxying for TCP and HTTP-based applications. It is particularly suited for web sites crawling under very high loads while needing persistence or Layer7 processing. Supporting tens of thousands of connections is clearly realistic with todays hardware. Its mode of operation makes its integration into existing architectures very easy and riskless, while still offering the possibility not to expose fragile web servers to the Net." http://www.howtoforge.com/haproxy_loadbalancer_debian_etch

Sunday, October 28, 2007

Indian Debian Repositories (sources.list for sid)

Here is a very basic Apt sources.list configuration example for my GNU/Debian Sid/Unstable machine. The Indian IITM Debian Mirror is the first entry the sources.list file given below, I'll call it my primary repository. It is geographically close (just few hundred miles from here) and only few network hops away.

The Indian GNU/ Debian Linux Mirror is not always fresh so I use another second repository entry which I keep changing according to the Debian Mirror Checker results.

The idea behind having a primary and secondary repository is for added redundancy and also I'll get the latest uploaded version of the (certain) package from the fresh secondary repository. Thus limiting much of the bandwidth traffic to my primary Debian mirror.

The last entry is Christan Marillat's Debian-Multimedia.org which provides the mplayer and its non-free codec's

############################################ ## GNU/Debian Linux Sid (Primary Repo) ## ############################################ deb http://ftp.iitm.ac.in/debian sid main non-free contrib deb-src http://ftp.iitm.ac.in/debian sid main non-free contrib ############################################ ## GNU/Debian Linux Sid (Secondary Repo) ## ############################################ deb http://debian.yorku.ca/debian unstable main non-free contrib deb-src http://debian.yorku.ca/debian unstable main non-free contrib ####################################################### ## Debian-Multimedia.org (Christan Marillat's Repo) ## ####################################################### deb http://mirror.home-dn.net/debian-multimedia unstable main

Ripping Radio Streams With Mplayer

Here is my response to the shane's great post introducing streamripper.

Nay, Do I need to use another tool just to rip a radio stream, when I can do it with my favorite mplayer itself.

/usr/bin/mplayer -dumpstream -playlist http://www.bbc.co.uk/worldservice/meta/tx/nb/live_news_au_nb.ram

There, you see it action ripping BBC Live News realmedia stream with mplayers's -dumpstream option. The mplayer merely dumps the radio stream to a file named "stream.dump" in the current directory.

Firefox Annoyances: Download Resume Problems

"When it comes to heavy duty download jobs, Firefox's default Downloads manager just doesn't cut the mustard" wrote Gina Trapani on the popular Lifehacker.com site. Do I need to say more? . Apart for a lousy download manager my firefox/iceweasel browser has trouble continuing active downloads between network failures or router problems. Perhaps this is the most annoying problem, coming right next only to memory hogging and the dreaded browser freezes .

There is a page on mozilla wiki discussing this issue and some possible solutions at length. And I guess its been there for a while now just by looking at the last modified date of the page( 18:04, 20 October 2006). Would any developer (anyone!!!) fix this issue in the next release?

A short excerpt from the above mentioned page on Mozilla wiki.
I recently started several larger downloads in Firefox and had to reboot my router while downloading. After this, I got to see several Firefox inadequacies or bugs, which I'll tell you about here:

0: After the temporary network connectivity disruption, my downloads were left in limbo, with Firefox only giving me the option to Pause or Cancel; with the progress bar still showing, but not increasing, and the numbers (rate of transfer, ETA) not showing. At this point I could not get Firefox to resume the downloads, not even by clicking Pause and Resume. However, looking at the Desktop, I could see that the partial files where there. I then found that I could resume the downloads with wget -c from the command line. If I can resume from the command line, why can't I resume from Firefox?

Friday, October 26, 2007

OLPC XO Production Delays, Microsoft Monster Catches Up

OLPC XO is on my mind, the OLPC's Children's machine XO is up for grabs with its Give 1 Get 1 program from November 12. The low power consuming XO laptop with its open hardware specifications running Fedora Linux OS is on many geeks wish-list including mine for a while now. The news of production delays mean shortages, Aieee.

Elsewhere the Microsoft Corp seems to be "spending a non-trivial amount of money" into the works to make its Windows XP run on OLPC XO's hardware. Its Corporate Vice President Will Poole comments "We're spending a non-trivial amount of money on it, We're working hard. But we're still at least a few months away. We've made progress"

Yeah right, I guess a thousand slaves are working in dark dungeons trying to squeeze the Windows XP white elephant into the XO. :0)

Update: Mary Lou Jepsen, chief technology officer at the One Laptop Per Child organization here in Cambridge. Jepsen says that a Reuters report yesterday asserting that production delays will cause the organization to miss promised delivery dates for its famous (to some infamous) XO-1 Laptop was misleading.Complete Story here

Thursday, October 25, 2007

Bittorrent Mainline Port Randomizer / Custom Settings script

Here is a quick and dirty bash script that I used when Bittorrent Mainline removed the random port option.

  • The script uses a random port to listen from a given range
  • Sets custom upload limits,refresh intervals and client address(IP)
  • Disables Linux uPnP
  • Changes the default data directory (default is ~/Desktop/Bittorrent)
  • Saves the downloaded file to current directory

Copy the code to text file and save it as Bitty.sh and set execute permission with 'chmod a+x Bitty.sh' and launch with ./Bitty.sh <torrentfile>.torrent

You may need to change the values to suit your needs. Also note that the You the /usr/bin/bittorrent-console is commandline client from the bittorrent Mainline for GNU/Linux and change the location on your Linux distro.


#!/bin/sh
#
#
#set -n
# Bitty.sh - a port randomizer for bittorrent mainline
#set -x 
#
MAXPORT=25000
MINPORT=20000

number=0

while [ "$number" -le $MINPORT ]

do 
  number=$RANDOM
  let "number %= $MAXPORT" 
done 


exec /usr/bin/bittorrent-console  --ip debbox.no-ip.org  --display_interval 30 
--no_upnp --minport $number  --maxport 25000 --max_upload_rate 5120 
--max_initiate 70  --save_incomplete_in /mnt/BigMaMa/.bittorrent/incomplete
 --data_dir /mnt/bigMaMa/.bittorrent  --save_in . "$1"


Please feel free to improve the script !

Monday, October 22, 2007

Disown, nohup : Bash Commands

Life of a geek is not without its temptations, they come sometimes in the guise of friends asking me to join for a steaming hot cup of coffee or the company of a sweet young thing :o)

Mostly I give in to temptations and allow myself to be drawn away from my computer terminal. Being a little paranoid about security I don't leave my console unattended instead I prefer to log off completely. But that's not always possible since I have quite a few jobs running in background, now what is fastest and the best way to get rid of them so that I can log off and leave them running after I am gone? disown is the answer. This bash specific command allows us to unbind various jobs from the current login session. I use 'disown <jobid>' to get rid of the job(s) running on my console login session. Volia now I can logoff and run.

But wait why not use some computing time while I am gone, perhaps I can compile a new kernel or download a package with wget. Using the nohup command is apt here since I am planning to logoff leaving the computer to do the tasks. Just prefix nohup before any command and run it in the background by placing "&" at the end of the command, that's it.

How does disown and nohup commands work? What they do is that they connect all your process to the parent process of the computer which happens to init (the granddaddy of all process running on the computer). Viewing all the process on the computer help us understand it better, Look a the the output of the pstree command below. The init is first (root of the inverted tree) process which radiates all the other process in the computer. Here you can see various daemons like cron,dbus etc, and also various programs like emacs, iceweasel (firefox), pidgin, xterm, xpdf.

$ pstree init-+-cron |-daemon |-another-daemon |-emacs |-getty |-login---bash---links |-login---bash---startx---xinit-+-Xorg | `-fluxbox-+-bash-+-firefox-bin---7*[{firef+ | | `-pidgin | `-xterm---bash-+-pstree | `-xpdf.bin |-preload |-syslogd `-udevd

You might ask me why I don't use screen instead of nohup ? Well, I tend not to use screen for those commands that don't need my supervision. I might run my rss reader raggle under screen but not commands like updating locate databases, downloading packages or files using bittorrent I leave it to nohup.

Sunday, October 21, 2007

Booting GNU / Debian Linux in Verbose Mode

Nobody with a sane mind watch their computer boot up, its not very interesting to watch messages of kernel being loaded and services started flashing by.

If you read my last nights post on understanding the GNU / Debian Linux boot process then you have a fairly good idea of the importance of learning about the GNU / Debian Linux booting process. This knowledge will aid you in troubleshooting Linux boot problems.

The GNU/Debian Linux by default boots in a quiet mode with very few messages printing to the computer console (as you can see in the video). Let's make the computer be more verbose by turning on the VERBOSE variable in /etc/default/rcS file .

# Set VERBOSE to "no" if you would like a more quiet bootup. VERBOSE=yes

Save the file and reboot the machine. Watch and learn what goes on when the machine boots up. What next ? if you are done understanding how it works its time to hack the system find ways to speedup the boot process and try to free some system resources by getting rid of unused services and kernel modules. Happy Hacking !!!

Saturday, October 20, 2007

Understanding the GNU / Debian Linux Boot Process

Learning a Unix-like operating system is like a Herculean task for most of us. Most people even those working in the IT industry break into cold sweats on hearing words like Unix, Linux and Debian. Such aura of mystery and wizardry commonly associated with it is perhaps much to do with fear is unknown rather than the difficulty of learning the operating system(s).

One of the important advantage of learning a Unix-like operating system is in its transparency. If you want to understanding the intrusive details of how an operating system works you can dig right into the bowls of the operating system and to its source code. A closed source Operating system like Microsoft Windows NT XP or Vista will not allow you do that thus a very bad choice for learning OS concepts.

The boot process starts the moment you power up your PC and until the time the computer is able allow you to log on. Understanding this booting process of a GNU/ Debian Linux is an essential part of mastering the OS, the From Power Up To Bash Prompt HOWTO written a decade ago provides a detailed look at the boot process from Power up to the bash prompt . Even the experienced Linux users will learn from this HOWTO.

The author(s) of the HOWTO document sums it up as thus.

I find it frustrating that many things happen inside my Linux machine that I do not understand. If, like me, you want to really understand your system rather than just knowing how to use it, this document should be a good place to start. This kind of background knowledge is also needed if you want to be a top notch Linux problem solver.

This HOWTO is can be found in doc-linux package on GNU/Debian in text and html formats.The Debian Documentation page has an extensive list of manuals that are available to aid the learning the OS. Also visit the The Linux Documentation Project(TLDP) for more such HOWTO's , Guides and FAQ's.

Friday, October 19, 2007

Install Debian In Window (Video)

Sometime back I wrote about new official method for installing Debian from Microsoft Windows using the latest Debian Win32 Installer.

Here is the videos(two videos!!) of the debian windows (win32) installer in action.

The Second video, bit incomplete since it doesn't seems to show loading of the Debian installer after reboot.

Monday, October 8, 2007

Using Transmission Bittorrent client on console

Update: A change in package since this post was published, read the update here
Here is an another light-weight bittorrent client Transmission which really works well. One of the highlight of this program is that its easy to use even for those who are new to Bittorrent P2P system and the bittorrent old hands would like Transmission because it stays out of their way and integrates nicely with your environment. I primarily work on command line console and like to run my bittorrent downloads in a screen session in the background and this bittorrent clients fits the bill for me.

You can learn more about this program from its features page.
Transmission runs natively on over five operating systems. Seamless configuration of your network, intelligent banning of peers who send corrupted data, and built in Peer Exchange are some of the features which enable Transmission to download your files as quickly as possible. All this is done in the background, without the user having to worry about complicated settings.

So, lets get started with transmission shall we, We will download the latest GNU/Linux Debian (Stable) CD ISO from the Internet. I already downloaded the torrent file of the first CD in my current directory. And installed transmission-cli package which provides the transmission-cli program on Debian Sid. This is a command-line only version of transmission, if you are interesting GUI version use the GTK version which is also available on Debian Sid or from the project page.

Here we launch the transmission with screen, the -p tells transmission to listen on port 25000. You can stop the program by pressing Ctrl+C .

screen -a -S 'Bittorrent' /usr/bin/transmission-cli -p 25000 debian-40r1-i386-CD-1.iso.torrent

Happy Torrenting !!!!

To learn about screen read the One minute Screen tutorial .

One minute Screen Tutorial

For those of you who love the command line screen provides a definitive way of organizing your work into a set detachable console sessions called screens which can be added and removed on demand. This removes the limitation of the number of virtual consoles(tty) you can have. Think of screen as a virtual windowing system for the console. ;o)

$ screen -a -S 'New Screen Session' $ sleep 60 #Press Ctrl+A+D for detaching the screen [detached] $ screen -list Your inventory: 4660.New Screen Session (Detached) 1 Socket in /var/run/screen/S-arky. $ screen -r 4660 $ sleep 60 $ #Press Ctrl+D for terminating the screen [screen is terminating]

Here we first started a new screen and ran a command 'sleep 60' then detached the screen session. Later we listed out (all) the current screens running on this system along with the their process ID's and re-attached our old screen session. Once the sleep command is completed we terminated the session. Also you can try pressing keys for command completion whenever possible.

  • screen -a Starts a new screen, -S add a title to the screen session, you can use either the process ID or the screen title with '-r'
  • screen -list Lists the currents screen sessions
  • screen -r Reattaches a existing screen with the given process ID

Friday, October 5, 2007

Clock skew error

Have you ever tried fixing acomputer problem while talking to your friend or co-worker over the phone?
Hold on before you start rolling your eyes muttering "Hell yeah" and skip reading this post here is my geek survival tip. Don't even try to fix the problem, postpone it until you can get to that computer yourself. Meanwhile provide a quick fix so that the person on the other end of the line can get back to whatever he or she is doing quickly.

Now watch my tip action, I received a frantic call (it *was* frantic, the phone kept on ringing and I kept ignoring it until I lost the content and picked it up) from a friend who was getting these 'clock skew' error messages.

I assured him it was just another harmless message. 'It means what is says brother' I said 'your system clock is screwed and it must have set the timestamps on your files to sometime in 2029'.

That didn't seems to satisfy him, so I asked him what was he doing when he noticed this message(s) (Tip two: Ask very specific and pointed question, avoid using big technical words). It seems he was using sudo to run some commands. That gave me a clue, so now for my quick fix, I asked him to type sudo -k or sudo -K couple of times, that seemed to get rid of the messages and thus ended the call happily (no sparks flying and no curses exchanged, whew ).
Later in the evening I went over his place and found out that the BIOS battery on the PC motherboard was running weak and got it replaced. That seems to fix the problem. If you got any similar stories or tips to share, please do post a comment.

Wednesday, October 3, 2007

Recovering a runaway console

Sometimes a program dies leaving your console in a totally unusable state. All you see is a bunch of random numbers and unreadable characters like this.
a normal Linux console Instead of seeing a normal console with a blinking cursor and bash prompt like this.
linux console with random characters

Don't worry, the solution is rather very simple. So, the next time your console goes haywire like this, just type reset (the console won't display what you are typing, since its still in an abnormal state) and press enter. Voila, the console is reinitialized and back in its normal state.

The reset command is the little brother of tset (terminal settings) command and is provided by ncurses-bin package.

Saturday, September 29, 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 prevents accidental overwriting of existing files while using IO redirection on bash shell or badly written shell scripts. It is better to set it with set -C than losing a very important file .

$ set -C # Enable it $ ls > foo bash: foo: cannot overwrite existing file $ set +C # Disable noclobber $ ls > foo # exiting file overwritten!!!

Just include a line with set -C option somewhere in .profile or .bashrc file inside your home directory.

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.

Friday, September 28, 2007

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, wether
  we have a boot CD at hand or not.
  - Advocating Debian to Windows users.  Rather than give them a CD
  (expensive), give them a piece of paper with an URL.


Frontend site for Windows clients to visit is at:


 http://goodbye-microsoft.com/

Further details (screenshots, GPLed source code) at:

 http://goodbye-microsoft.com/more.htm 

Hope you like it,

-- 
Robert Millan


The screenshots of the D I L in action would look familiar to those who used loadlin to start installation from Microsoft Windows 95/98 long back.
Debian Windows installer screenshots

Watch The Video

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 attached
  • vfat - 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 if you want your windows partition to check for errors with fsck.vfat at boot time check the last entry in the line from 0 0 to 0 1 .

Pidgin Sound Notifications

Pidgin Purple logo 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!
  • Zephyr

Now, 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, amixer.

Pidgin Preferences dialog box

So in Sound Panel of Pidgins Preferences (see image above) which available under tools menu, I selected the sound method as *command* and sound command as "aplay -q %s".



If you don't want to play any sounds and happy with just console beeps then you can set the sound method to *beep*.



Pidgin Sound Preferences dialog box



And don't forget to test the sounds by using test button in the *Sounds Events* section below. If you still don't hear any sounds, either the sounds are muted in Pidgin or you must have messed up something.

Thursday, September 27, 2007

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" package provides /usr/bin/7zr program which I here use to list (l) and extract (x) our archive file. Listing with "l" parameter shows the contents of the archive. $ 7zr l archive.7z 7-Zip (A) 4.55 beta Copyright (c) 1999-2007 Igor Pavlov 2007-09-05 p7zip Version 4.55 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Listing archive: archive.7z Solid = - Blocks = 0 Date Time Attr Size Compressed Name ------------------- ----- ------------ ------------ ------------------------ 2007-09-27 16:18:37 ....A 0 0 bar1 2007-09-27 16:18:58 ....A 0 0 bar2 2007-09-27 16:18:58 ....A 0 0 bar3 2007-09-27 16:18:58 ....A 0 0 bar4 ------------------- ----- ------------ ------------ ------------------------ 0 0 4 files, 0 folders Lets extract the files in the archive with "x" option. This uncompress the files to the current directory. $ 7zr x archive.7z 7-Zip (A) 4.55 beta Copyright (c) 1999-2007 Igor Pavlov 2007-09-05 p7zip Version 4.55 (locale=C,Utf16=off,HugeFiles=on,1 CPU) Processing archive: archive.7z Extracting bar1 Extracting bar2 Extracting bar3 Extracting bar4 Everything is Ok Total: Folders: 0 Files: 4 Size: 0 Compressed: 130

Popular Posts