Saturday, December 11, 2010

Music of the day: Phantasia

What was that background music used by Patrick Chan (Canadian Figure Skater)? That's the question I had when it was on TV. And I was not the only one who asked the same question!

Wednesday, December 08, 2010

Tech of the day: Dockstar as print server

It seems that one major use of embedded device/plug computer is print server. Setting up printers on Linux was not known for being a user-friendly process though. It has changed a lot thanks to CUPS. (I wrote about it before for my Arch Linux install)

For Debian, I found its Wiki entry very useful. What I did was very similar:
1) apt-get install cups cups-client hplip
I used hplip because I have a HP PhotoSmart printer.

2) I edited cupsd.conf as suggested.
So I was able to administer CUPS on port 49631 from other PCs (which is necessary 'coz I am not running X on my Dockstar!)
Then I added my HP printer as a local printer by picking one of the choice listed: HP photosmart 7350 USB MY25S3308N3Y HPLIP (HP photosmart 7350)
However, I was not able to add the printer on my Windows 7 PC using HTTP URL.

To do that, I followed the steps from CUPS Mini-HOWTO at LinuxFoundation and edited /etc/samba/smb.conf.

Finally my Win7 box was able to see the printer on Dockstar automatically when I chose to add a network printer. The only remaining step is to manually pick the driver in the Generic section labeled MS Publisher Color Printer as suggested by the aforementiond Debian Wiki.

I found lots of info from other links like 1 and 2 but these are kinda outdated.

BTW, my root partition became full quickly halfway through installing CUPS and became unusable. My fix was to move /var and /usr out of it (by following the instructions found here):
1) use fdisk to create a new partition. Don't forget to format with mke2fs or it won't mount.

2) mount the new filesystem in /mnt
# mkdir /mnt/new
# mount /dev/hda3 /mnt/new

3) tar up /var/*

4) untar in /mnt/new

5) Rename the /var directory (to make sure this has worked before deleting it!)
# cd /
# mv var var.old

6) Make new var directory
# mkdir var

7) Unmount the new partition
# umount /dev/hda3

8) Remount it as /var
# mount /dev/hda3 /var

9) Edit /etc/fstab to include the new partition, with /var given as the mount point

I also did something similar for /usr. Instead of a primary partition, I created an extended partition (sda4) and then a logical partition out of it (sda5, which is the one to be formatted and mounted) (or I would have used up the maximum of 4 primary partition and won't be able to create any other partition in the future)