Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Sunday, January 11, 2015

goto in bash

GOTO is frowned upon. Bash simply removed goto. this causes problems, particularly if you do have a need to skip to a particular section of code. Web search turned up various people recommending the use of functions instead. This still doesn't solve the problem of non-local resumption.

Closest I found was Bob Copeland's approach: http://bobcopeland.com/blog/2012/10/goto-in-bash/

It's an interesting use of sed to much up the script up to the "label" and then executing the script. Very Neat trick. I wanted something simpler within Bash itself.

My problem is pretty much the same as Bob indicates on his web-page: i have a script that must process things in several steps, each of which is time consuming and can fail. Re-running prior steps is prohibitive, so I need some mechanism to resume from where the script last failed (or close to it).

So here's what I came up with:



#!/bin/bash

function usage() {
  echo "$0 [step]"
}

label=$1;
if [ -z "$label" ]; then  label="step1"; fi

# do all common setup here. This stuff will be done each time the script is run

while true; do
 echo processing step [$label]; # to give a hint about where to restart from
 case "$label" in
  "step1")
      # add processing for step1 here
      label="step2"
      ;;
  "step2")
      # add processing for step2 here
      label="step3"
      ;;
  "step3")
     # add processing for step3 here
      label="end"
      ;;
  "end") echo done; break;;
  *)
    usage
    exit
    ;;
 esac

done

Here's how it runs:
 # /tmp/test_goto.sh 
processing step [step1]
processing step [step2]
processing step [step3]
processing step [end]
done

 # /tmp/test_goto.sh step2
processing step [step2]
processing step [step3]
processing step [end]
done


Thursday, January 2, 2014

Woes of dual-booting and DHCP NACK on Linksys E2500

I recently upgraded my main router to the Linksys E2500. Overall, I've been quite pleased with the router's performance, and while I haven't logged enough time yet to observe all its behavior quirks, I did notice something strange on my dual boot machine.

My linux server dual boots between Linux (primary) and Windows XP. Each time I change from Windows to Linux, I find that the machine doesn't have any network connectivity. Initially I suspected my client-bridge, but it looks like the isn't the client bridge, but DHCP (still haven't figured out if it is the DHCP server in the Linksys E2500, or the DHCP client implementation in Linux, or the DHCP client in Windows XP, or some packet munging but in the client-bridge).

Each time I boot into Linux, the network interface is brought up during boot (per the instruction in /etc/network/interfaces). Usually this works just fine, but IF I had been running Windows XP prior to booting into Linux, it seems that the DHCP server on the Linksys sends a DHCP NACK causing the DORA to kick-in. Funnily, after the first NACK, the DHCP server stays silent to all subsequent requests resulting in loss of connectivity on the Linux box. Windows XP doesn't seem to suffer from this if I reboot into Windows.

Once the workaround below is implemented, subsequent DHCP requests from Linux keep working till I boot into Windows and back to Linux.

Work arounds:

a) setup Linux network interface manually
b) delete the DHCP address entry for the Linux tower from the router's DHCP clients table
c) run dhclient on the Linux tower to renew DHCP lease

Setting up linux interface manually

sudo ifconfig eth0 up address 192.168.1.101/24
sudo echo nameserver 75.75.75.75 >> /etc/resolve.conf
sudo dhclient -v eth0

the -v in the dhclient causes debug verbose information to be printed to the screen during the DHCP request / discovery process.

Deleting the DHCP address entry is accomplished as below:
a) log into the router
b) Status | DHCP clients table
c) delete DHCP entry
d) save settings

running dhclient
sudo dhclient -v eth0

confirm that /etc/resolv.conf has been updated

Further research to determine if the issue is in the router or windows, or linux or the dd-wrt client-bridge:

a) run wireshark to examine the DHCP request packet from Windows and see if it is different from the one in Linux. E.g. if net mask is different, but requested address is the same, then DHCP server might think that the address was assigned by another
b) connect the Linux tower directly to the Linksys E2500
c) switch out the client-bridge for another
d) check with other dual-boot systems if the same thing is happening

background reading:
http://support.microsoft.com/kb/169289
http://support.microsoft.com/kb/167014




Thursday, December 5, 2013

Scale your expectations. A humble request to web designers from a mobile user to not restrict user scalability

I browse the web. 

Extensively. 

Both while I'm at work (for work purposes, of course), and when not (which means I'm researching something or reading up on what I should be working on next). In this endeavor, I employ any web capable device I can lay my paws on, be it a desktop (Linux, Windows, Mac), a laptop (MacBook Pro, Macbook Air, Ideapad Yoga, Satellite), a tablet (iPad Air, iPad 2, iPad Mini with Retina display), a smart phone (iPhone), or an e-reader (Kindle e-Ink, word!). And if I'm really, really, really desperate, through the embedded web browser on my TV. 

All of which means, that I experience the web in about as many ways as one possibly can (sorry Lynx hasn't gotten any love in a long, long, long time), and often have to contend with websites not necessarily designed with every browser in mind. I'm normally quite considerate to the web-site designer, especially if I'm using a device that probably isn't very widely adopted (e.g. kindle e-ink or TV browser); it is a special situation created by my choice of non-popular device, and so the onus of consumption is on me. On the other hand, quite often, my medium of consumption is an iPad or iPhone, and I'll land on a website that is "mobile friendly", and yet is infuriatingly ill fit to be browsed on a mobile screen. These are the ones I take strong exception too.

While mobile device capabilities have increased astronomically since the days of the hand-held monochrome LCD "video" games, mobile devices still often remain constrained in their screen real-estate (some necessarily due to their functionality: I can't imagine favoring a device the size of iPad Air as my phone for any length of time over a better sized hand-held). There is a fair number of websites that are still not "mobile friendly", i.e. which were designed with the facilities of a desktop browser and desktop sized screen in mind, and consequently browsing these on a hand-held requires constant panning and zooming. I don't take exception to these.

I don't begrudge these web sites and authors because the non-mobile websites were probably created before the mobile phenomenon, and haven't been updated since (either due to passivity of the original authors, or the lack of funds etc.).

The websites of late where I do take exception, are the ones that profess to be mobile "friendly", and in their efforts to be mobile compatible, go a little too far. I'm talking about the websites that recognize the mobile browser and prevent viewport scaling. What this means is that the user is UNABLE to pinch-zoom and pan to read the material.

I find this decision by web-designers increasingly frustrating. A humble and sincere request to all web-designers and web-masters of the world: PLEASE, PLEASE PLEASE, (emphasis and stress to indicate pleading and not yelling), do NOT limit the scaling, unless there is very good justification for why you need to solidly fix the web-site layout. If the text size isn't big enough, it makes for an incredibly infuriating experience for the reader. 

Just as law makers cannot know all the ramifications of their regulations on the society at large. web-designers too cannot ascertain how their users would prefer to consume their material. Unnecessary and ill-designed restrictions only lead to frustration in the populace.

I understand that not all content creators might be aware their template has this restriction built in. So here's a tip on what "causes" this particular frustration, and how to resolve it.

Website scaling is typically restricted with a meta content tag as below:

meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=no"


notice the maximum-scale and user-scalable fields. 

If a web site does not have a very strong functional need to stay fixed, please consider dropping the maximum-scale property and setting the user-scalable to yes (user-scalable=yes). 

Your mobile users will thank you. I certainly will. 


Monday, November 26, 2012

Getting backuppc to work after upgrading to Ubuntu 12.04.1 LTS "PRECISE"

I saw the latest notice saying Ubuntu 12.04.1 LTS was available, so I went ahead and bit the bullet and updated. So far, it's been a positive experience, but I'm sure there will be other things I'll find that broken or that need tweaking. Backupppc is just the first thing I've discovered. I've also seen several backup apps available in the Ubuntu Store, but I'm not yet sure which ones will work for my use-case (backing up windows laptop to server at home).

first things first: this is my current install:

# cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.1 LTS"


backuppc version: version 3.2.1

This string is available when you log in to the webadmin page.

During the install, i ended up selecting "Install distributor's version" of config.pl. Everything went nice and dandy till I logged in after the reboot. I found that my laptop was listed as before, but none of the backups were displayed.
This was understandable because I had changed the location of the backups from the default.

By default, backuppc wants to install at: /var/lib/backuppc However, I got a 1TB drive much after I had started backing up, so I moved the entire backup to the following path: /mnt/windowsE/backuppc 

YES, that's a windows NTFS partition. I wanted to do that so that I could have access to the data from native windows as well (backup isn't the only purpose for the drive, it's my media store as well, and keeping it windows, simplifies a whole bunch of other things. NFS / CIFS not withstanding)

 SIDEBAR: following is an excellent starting point for doing this switcheroo http://sourceforge.net/apps/mediawiki/backuppc/index.php?title=Change_archive_directory

However, I hadn't followed the instructions exactly: I manually edited /etc/backuppc/config.pl and changed $topDir to point directly to my new location /mnt/windowsE/backuppc.

It turns out that this is not cool per backuppc because the $topDir path in config.pl is "informational" only, and is used for updating. In the internals, the path is actually hard-coded during installation, and this can lead to various funkiness.

The better method is to set the appropriate path right during the initial install of backuppc, but this was not possible in my case. The alternative is to then mount the desired path on the expected location ("if you can't bring the mountain to Mohammad...")

 I set up my /etc/fstab with the following rule:
/mnt/windowsE/backuppc /var/lib/backuppc bind defaults,bind,uid=114,gid=127 0 0


uid=114 and gid=127 correspond to the userid and gropuid of the dedicated backup user on my machine. These can be retrieved using:
# id -u backup_user
114
# id -g backup_user
127


Also, since the default config.pl had been over-written, my backup method was no longer set to rsyncd. I restored these settings from the previous version (Ubuntu update was nice enough to store this as /etc/backuppc/config.pl.ufc-old).

After the above changes, I issued a reboot so that the system starts up cleanly (though I hate doing that!). Plus it let me see if there would be any issues with backuppc starting by itself at reboot.

None occurred and I'm cooking with gas.

Sunday, August 16, 2009

Wake on Lan: a different kind of magic (packet)

I was having trouble using ether-wake (or etherwake) to wake up my machines. However, I noticed that using wakeonlan (which is a Perl script!) seemed to always work. As an aside, I preferred wakeonlan because it is simpler and doesn't require the extra step of becoming root. Anyways, I wanted to use something that was program and not just a perl script, so I tried figuring out what was different.

A quick wireshark session revealed the packets to be different. And analyzing the packets made me understand what was already written in the manuals for both programs a little better: wakeonlan was using UDP packets (type 0x800), where was ether-wake was generating the "true" magic packet: a raw ethernet packet of type 0x802.

So essentially, the NICs on all my machines seem to not support the ether-wake generated magic packet. That also probably explains why my DDWRT router can't wake my connected machines (this is different from WOWL packets over the wireless link. DDWRT has a known issue about dropping WOL packets when acting as a wireless bridge, but I digress).

The solution to my problem was wakelan. More details at found at http://gsd.di.uminho.pt/jpo/software/wakeonlan/mini-howto/wol-mini-howto-3.html

source: ftp://metalab.unc.edu/pub/Linux/system/network/misc/

This is a simple one c-file program that spits out a UDP WOL packet on the specified port. The good thing is that it doesn't need super-user privilege and the great thing is that it works just as well as the wakeonlan script with my machines!

Tuesday, July 21, 2009

Printing in Ubuntu

I had my linux laptop printing to my Brother MFC-210c printer, but since i've changed laptops and now finally got a dedicated linux machine, I wanted to setup a print server. First things first, get the printer to work with CUPS.

Followed instructions from this website:
http://ubuntuforums.org/showthread.php?t=590793

Also very useful was Brother's linux support site (very happy that they're doing this! my next printer is probably going to be Brother too when this one fails!)

*http://solutions.brother.com/linux/en_us/index.html


*http://solutions.brother.com/linux/en_us/instruction_prn1a.html#dpkg1



machine arch: intel p4 HT running ubuntu 8.10

(repeated below for local record)

* install tcsh:


sudo apt-get install tcsh


* download lpd and cups drivers (.dep packages)
from here and here



cd ~/temp/brother-driver
sudo mkdir /var/spool/lpd
sudo dpkg -i --force-all --force-architecture mfc210clpr-1.0.2-1.i386.deb
sudo mkdir /usr/share/cups/model
sudo dpkg -i --force-all cupswrapperMFC210C-1.0.2-3.i386.deb


NB: replace above .deb package with appropriate ones if things change later.

check if the drivers were correctly installed:

dpkg -l | grep --ignore-case brother


The above should generate an output that looks like below:

ii brscan2 0.2.4 Brother Scanner Driver
ii cupswrappermfc210c 1.0.2-3 Brother MFC210C CUPS wrapper driver
ii mfc210clpr 1.0.2-1 Brother lpr Inkjet Printer Definitions


At this point, i was ready to print a test page. However going to System | Administration | Printing showed me two Brother MFC-210C printers. One was listed as a "text only printer", which I simply deleted (because it wasn't working to begin with). Check on the remaining icon that it is listed as "Brother MFC-210C CUPS v1.1" (right click, select Properties).

Print a test page!

Next step, getting the printer shared so that windows machines can print to it.

This needs samba installed and working, which i'm assuming is already done. if not, there's another page on this blog that should help you get up and running.

The following howto page is helpful

http://tldp.org/HOWTO/Debian-and-Windows-Shared-Printing/sharing_with_windows.html

However, these throw open the system to all, so i decided to make some modifications


cd /etc/samba
sudo vi /etc/samba/smb.conf.master


add / modify the following section

[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700
use client driver = yes



restart samba

sudo testparm -s smb.conf.master > smb.conf
sudo /etc/init.d/samba restart


Modify cups files

Windows printer drivers format their output for the printer before sending it across the network. You must configure CUPS to accept the pre-formatted output by uncommenting the following line from


sudo vi /etc/cups/mime.convs



application/octet-stream application/vnd.cups-raw 0 -

Also uncomment the following line from

sudo /etc/cups/mime.types


application/octet-stream

Now CUPS must be told to allow connections from other machines on the network. Add these lines to /etc/cups/cupsd.conf:



AuthType None
Order Deny,Allow
Deny From All
Allow From 192.168.1.*/255.255.255.0




This allows only machines on the local network to access the cups driver.

restart the cups daemon

sudo /etc/init.d/cups restart

Wednesday, December 24, 2008

Getting Gumstix to see Logitech QuickCam E2500

I finally got my Gumstix to recognize the USB Camera. Fairly easy once I got it going :)

E2500 needs the GSPCA driver. No not the German Short-haired pointer club of America http://www.gspca.org/, or the Guyana Society for the Prevention of Cruelty to Animals, but the Generic Software Package for Camera Adapters. The GSPCA is a reverse engineered driver for numerous camera chips deployed in several usb web-cams.

While compiling the gspca driver is, purportedly, fairly trivial for ubuntu 7.10, I did run in to a few kinks with Ubuntu 8.10. Also the camera I bought from Fry's added another twist in the imbroglio: the Logitech QuickCam Connect E2500 web-cam is not supported directly by the gspca driver.. So I had to hunt around with Google till I found the thread that answered my question. Given the fact that my knowledge about Linux drivers is vanishingly small, this was the only option left to me. However, this has been a great learning experience and I definitely spy myself writing a video input device driver in the near future.

The following links were very helpful in getting this to work under Ubuntu 8.1 (I needed to do this to ensure that the camera works)

1. http://nepbabu.livejournal.com/15650.html
2. http://www.actionshrimp.com/2008/08/logitech-quickcam-e2500-on-ubuntu-skype/
3. http://www.nabble.com/CCD-cameras-and-the-Quick-Capture-Interface-td19498519.html

Per the instructions in 1., I downloaded the gspca driver and un-tar-ed it to the appropriate folder (~/work/gspcav1-20071224)
I then downloaded the patch (quickcamE2500.tar.gz) from http://forums.quickcamteam.net/attachment.php?aid=86 and untar to download folder (~/work)
Next, I applied the patch

cd ~/work/gspcav1-20071224
patch -p1 < ../quickcamE2500.diff

Compiled the module

sudo ./gspca_build


And copied over the module (gspca.ko) to the appropriate place. To do this, I first figured out where the current gspca.ko module lived (it existed, but the one that came with the kernel didn't support my web-cam).

bash$> sudo modprobe -v gspca
bash$> sudo mv /lib/modules/2.6.27-9-generic/kernel/drivers/usb/media/gspca.ko /lib/modules/2.6.27-9-generic/kernel/drivers/usb/media/gspca.ko.2008-12-22
bash$> sudo cp gspca.ko /lib/modules/2.6.27-9-generic/kernel/drivers/usb/media/gspca.ko
bash$> sudo rmmod gspca # remove the currently installed module
bash$> sudo modprobe gspca

#check to ensure that it is installed
bash$> lsmod | grep gspca


Next I connected the camera and got /dev/video0. I also checked dmesg | tail for notes about the camera being mounted


[ 4.843394] input: Logitech USB Receiver as /devices/pci0000:00/0000:00:1d.7/usb5/5-5/5-5.2/5-5.2:1.0/input/input1
[ 4.850991] input,hidraw0: USB HID v1.10 Keyboard [Logitech USB Receiver] on usb-0000:00:1d.7-5.2


At this point, I tried to fire up Ekiga because several online forums had mentioned success getting a picture. However, I had no such luck. After trying for a few hours and hunting around, I came across Nep's page above and that mentioned xawtv. A sudo-apt-gets later, I had all i needed and I was able to get a picture of myself. However, it took a really long time (~5 minutes) to start getting a picture. Also, I think some parameters may be off and might need some tuning because the picture in xawtv kept steady if i had my hand blocking almost all of the view (no, no i didn't cover the entire lens), but for almost every other situation, the bottom half of the picture would keep jumping. I suspect it has something to do with the average lighting and auto correction, but I tried turning off the parameters, but it didn't help much.

I tried various combinations (didn't exactly do a 2k factorial test here, but hey) of the following parameters, but no luck.

cd /sys/module/gspca/parameters/
sudo echo 0>autoexpo
sudo echo 4>gamma
sudo echo 300>GRed
sudo echo 300>GBlue
sudo echo 300>GGreen


I had to make some modifications to have this run under buidlroot.
I created a gspca folder under gumstix-buildroot/packages, and created two files per instructions found in buildroot/docs/buildroot.htm, viz. Config.in and gspca.mk

Config.in looks as below:

config BR2_PACKAGE_GSPCA
bool "gspca"
default n
help
The GSPCA video driver module. This required to support
Logitech Quickcam E2500 USB Webcam

http://www.nabble.com/CCD-cameras-and-the-Quick-Capture-Interface-td19498519.html
http://www.ithinkthereforeiforget.blogspot.com



gspca.mk is essentially a modified version given by Pete here:


#############################################################
#
# Driver for GSPCA USB web cams.
#
#############################################################

GSPCA_VERSION=20071224
GSPCA_SOURCE:=gspcav1-$(GSPCA_VERSION).tar.gz
GSPCA_SITE:=http://mxhaard.free.fr/spca50x/Download/$(GSPCA_SOURCE)
GSPCA_BUILD_DIR=$(BUILD_DIR)/gspcav1-$(GSPCA_VERSION)
GSPCA_PKG_DIR=$(BASE_DIR)/package/gspca
GSPCA_CAT:=zcat
GSPCA_MODULE=$(GSPCA_BUILD_DIR)/gspca.ko
GSPCA_TARGET_MODULE=$(TARGET_DIR)/lib/modules/2.6.21gum/extra/gspca.ko

GSPCA_CFLAGS := "-DGSPCA_ENABLE_COMPRESSION"
GSPCA_CFLAGS += "-DCONFIG_USB_GSPCA_MODULE=1"
GSPCA_CFLAGS += "-DVID_HARDWARE_GSPCA=0xFF"
GSPCA_CFLAGS += -DGSPCA_VERSION=\\\"01.00.20\\\"

# following are required to make Logitech QuickCam E2500. Change for
# other cameras accordingly
# wget http://forums.quickcamteam.net/attachment.php?aid=86 -O patch.tar.gz
GSPCA_PATCH:=patch
GSPCA_PATCH_OPTIONS:=-p1
GSPCA_PATCH_FILE:=quickcamE2500.diff
GSPCA_PATCH_SOURCE:=$(GSPCA_PATCH_FILE).tar.gz
GSPCA_PATCH_SITE:="http://forums.quickcamteam.net/attachment.php?aid=86"


$(DL_DIR)/$(GSPCA_SOURCE):
$(WGET) -P $(DL_DIR) $(GSPCA_SITE)/$(GSPCA_SOURCE)
#TODO: fix this!
# $(WGET) -P $(DL_DIR) $(GSPCA_PATCH_SITE)/$(GSPCA_PATCH_SOURCE)

gspca-source: $(DL_DIR)/$(GSPCA_SOURCE)

$(GSPCA_BUILD_DIR)/.unpacked: $(DL_DIR)/$(GSPCA_SOURCE)
$(GSPCA_CAT) $(DL_DIR)/$(GSPCA_SOURCE) | \
tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
############ Unpack patches #########
# $(GSPCA_CAT) $(DL_DIR)/$(GSPCA_PATCH_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
# cp $(DL_DIR)/$(GSPCA_PATCH_FILE) $(BUILD_DIR)/gspcav1-$(GSPCA_VERSION)
# TODO: fix this!
# cd $(GSPCA_PATCH) $(GSPCA_PATCH_OPTIONS) < $(BUILD_DIR)/$(GSPCA_PATCH_FILE)
touch $(GSPCA_BUILD_DIR)/.unpacked

$(GSPCA_MODULE): $(BASE_DIR)/uImage $(GSPCA_BUILD_DIR)/.unpacked
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(KERNEL_CROSS)" \
ARCH=$(ARCH) \
CC="$(TARGET_CC)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS) $(GSPCA_CFLAGS)" \
SUBDIRS="$(GSPCA_BUILD_DIR)" \
modules
touch $@

$(GSPCA_TARGET_MODULE): $(GSPCA_MODULE)
$(MAKE) -C "$(LINUX_DIR)" \
CROSS_COMPILE="$(KERNEL_CROSS)" \
ARCH=$(ARCH) \
CC="$(TARGET_CC)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
SUBDIRS="$(GSPCA_BUILD_DIR)" \
INSTALL_MOD_PATH="$(TARGET_DIR)" \
modules_install

gspca: uclibc $(GSPCA_TARGET_MODULE)

gspca-clean:
-$(MAKE) -C $(GSPCA_BUILD_DIR) clean

gspca-dirclean:
rm -rf $(GSPCA_BUILD_DIR)

#############################################################
#
# Toplevel Makefile options
#
#############################################################
ifeq ($(strip $(BR2_PACKAGE_GSPCA)),y)
TARGETS+=gspca
endif


Next I started make menuconfig in and selected gspca from the menu. I still had to go in and patch the source manually for my logitech e2500. A make followed and created and installed the module in the proper location.

I fired up the gumstix, connected the camera and got the following:


[root@gumstix ~]# usb 1-2: new full speed USB device using pxa27x-ohci and address 2
usb 1-2: configuration #1 chosen from 1 choice
Linux video capture interface: v2.00
/home/hypo/gumstix/gumstix-buildroot-1614/build_arm_nofpu/gspcav1-20071224/gspca_core.c: USB GSPCA camera found.(ZC3XX)
usbcore: registered new interface driver gspca
/home/ot-1614/build_arm_nofpu/gspcav1-20071224/gspca_core.c: gspca driver 01.00.20 registered



Woohoo! /dev/video0 exists and is readable! Now on to porting spca-view!

Update (01/25/2009): Google seems to generate different results these days. Came across interesting post on atmel's site dealing with adding packages to buildroot while looking for something else.

http://www.atmel.com/dyn/resources/prod_documents/doc32082.pdf

Tuesday, July 1, 2008

Ubuntu gripes

I have had a long running argument with a few friends about the utility of Ubuntu. I started out as a Linux believer / fanatic when in school. I drank hook line and sinker the "academia" spiel about Linux being a better and more productive operating system than WinBlows to end. Till I met a few high respected practising academics and professionals who championed otherwise. Thus I decided to be a good engineer and become OS agnostic. I chose to create, in my head, a wet-ware database about what was good about each OS and use it for that purpose.

But the number of exceptions and uses has become far too much for me to bear and I must purge my knowledge in the pensieve of this blog, so that at a later date, I might refer to it without having to relearn history or reinvent the wheel. Hopefully others can use my experiences as well and make better informed and wiser decisions.

Things I do like about Ubuntu Linux:
1.

Things I don't like about Ubuntu LinSux:

1. Laptops aren't supported very well (I understand there is proprietary support required, but that doesn't mean I have to like shoddy things. I would love it if all hardware manufacturers got their act together and supported Linux all out, but then where's the monetary incentive?)

2. It seems to have an increase load of crapware or malformed experimentware. Take tracerd for instance: it is supposed to be a indexer tool to enhance searches. Nice and fine, except that it sucks. No I mean literally. It sucks all available memory and processing power away from the machine even while it is in use. At least windows products are mature enough to not do that. They may have a whole bunch of other things wrong with them (mem leaks for one, zombied processes etc.) but they tend to not cripple you while you work. Not so trackerd. It happily sucks the life of your hard drive and processing cycles from your tasks while it runs.

3. Hibernation doesn't work right. Now I'd like to accept the Ubuntu apologizer's claim "it's because of the broken M$ ACPI model", but I just can't get myself to do that. Each time the machine resumes from hibernation in windows, stuff comes back normal: the screen works, the sound works yada yada. Not so with Gutsy. NetworkManager is not going to work, in addition to sucking all processing cycles (something that isn't supposed to happen in Linux because of its excellent scheduler and extreme advantages against a micro-kernel architecture). Good luck if sound works right. Oh yeah and keep 'em fingers crossed or else the display might not come on right (though mostly, it does). Somehow ACPI under windows seems to be free from these afflictions.

4. sound card doesn't work right. In Winblows Vastage, when you connect a headphone jack, the audio in the speakers is killed (as expected). In Gutsy Linsux, connected a headphone gives you audio in two places! two for the price of one! so if you wanted to hear some music without disturbing those around you, fat chance! Also audio has never dealt very well with hibernation (see 3 above). Btw, FYI, I am currently using Gutsy as I type and I tend to do a lot of my non-work development in Gutsy.

5. Screen brightness goes to eye burning max each time the system resumes from suspend / hibernation. Have to go to Preferences | Power Management each time and jiggle screen brightness around to reduce it to comfortable levels.

6. (07/07/2008) More hibernation quirks: system resumes fine from suspend when idle, but then immediately hibernates. More here and here

7. Can't join the same wireless network after suspend / hibernate. There is an open bug on this.

8. Using Photoshop under Wine initially had the issue that the clone tool (Alt + Click) wouldn't work because it would always try to move the window. Figured out that this was because of Ubuntu's window manager (Gnome). Easily remedied in this case by changing System | Preferences | Windows | used Super "windows logo" plus click for move.



Things I do like about Windows Vista:

Things I don't like about Winblows WasteYa: