I came across streamtuner a few days ago and installed it from Debian apt when it sparked my interest.
It talks to radio directories like SHOUTcast and Live365 and lists them in a nice gui. Click on any station and up pops xmms!
I never got into the whole streaming radio thing before, but there’s every sort of station out there! I’m amazed!
Tag Archives: Linux
How to become l33t
How to become l33t – made me chuckle and laugh. Very entertaining read, especially when I remember all the l33t people I’ve come across over the last few years!
Linux: Auto-mounting USB camera memory
I have 2 cameras. One takes Flash cards, the other takes SD cards. If my Sony still worked, I’d also add memory sticks to that list.
I’ve got a routine, a workflow, for copying photos off camera media but it’s slightly more complicated with multiple memory types!
Kevin Lyda kindly mailed me a script he had for auto-mounting his camera and copying the files off. It uses the usb hotplug program to do that but I couldn’t get it to work with my card reader so I wrote the following script. Bits of it are from Kevin’s scipt, so thanks!
I insert my camera media, and run “copyfromcamera.sh” and it find the Flash card and copies all files off it into a directory with today’s date!
Make sure you have your media mount points setup in /etc/fstab. Here’s what mine looks like:
----------/etc/fstab----------
/dev/sdb1 /mnt/cfcard vfat users,noauto,rw,uid=1000 0 0
/dev/sdd1 /mnt/sdcard vfat users,noauto,rw,uid=1000 0 0
----------/etc/fstab----------
Copy and paste this into a file and save it to /usr/local/bin/copyfromcamera.sh and make it executable (chmod 755 /usr/local/bin/copyfromcamera.sh)
----------/usr/local/bin/copyfromcamera.sh----------
#!/bin/shexport YEAR=`date +%Y`
export TODAY=`date +%Y-%m-%d`
export DIR=/home/donncha/Photos/$YEAR/$TODAY/
mount /mnt/cfcard/ 2> /dev/null
if [ -d /mnt/cfcard/dcim/ ]; then
mkdir -p $DIR
find /mnt/cfcard/dcim -type f -print0 | xargs -0i mv -vi '{}' $DIR
umount /mnt/cfcard/
df -h
fi
mount /mnt/sdcard/ 2> /dev/null
if [ -d /mnt/sdcard/dcim/ ]; then
mkdir -p $DIR
find /mnt/sdcard/dcim -type f -print0 | xargs -0i mv -vi '{}' $DIR
umount /mnt/sdcard/
df -h
fi
----------/usr/local/bin/copyfromcamera.sh----------
Spreadsheet Templates
Every now and again I need to dig into Open Office to create a document, be it a report, or a spreadsheet.
Thankfully Linux has been able to read Word and Excel files for some time as that’s what the world and it’s dog use!
Anyway, I needed an invoice template, and came across these Open Office extras listing lots of templates for Writer, Calc and Draw. Several very useful examples there too!
Here’s a few sample reports in PDF format. Obviously it’s harder to edit, but at least they’ll provide for inspiration when creating your own documents!
Firestarter – Linux firewall
I tried Firestarter a few minutes ago and I’m very impressed! It’s a firewall application that makes it easy to modify policies, keep track of who’s knocking and gives a nice summary.
Much easier than learning the ins and outs of IP Tables!
Simple MySQL Backup
If, like me, you have a database full of small tables, but all amounting to a large amount of data then dumping the data from it into a single file is handy, but not very useful when it comes to retrieving a backup of one single table.
Instead, wouldn’t it be easier to dump each individual table into it’s own file? What about keeping a week’s worth of backups? Here’s one way I backup my WordPress db with a little Bash script:
export d=`date +%u`
mkdir -p backup/$d
for i in `echo "show tables" | mysql -u username -ppassword database|grep -v Tables_in_`;
do
echo $i; mysqldump --add-drop-table --allow-keywords -q -a -c -u username -ppassword database $i > backup/$d/$i.sql
rm -f backup/$d/$i.sql.gz
gzip backup/$d/$i.sql
done
Struggling to Manage Your Ever-Growing Digital Photo Collection?
In this (what looks like a promo) article John Grand explains some of the issues with organizing your photos.
After reading this I went looking, and found Lodju (also available from Debian – apt-get lodju), and then looked into gThumb. It allows you to put photos into categories, and I spent an hour last night sorting some of my snaps! I backup to DVD almost once a month so hopefully my photos are reasonably safe! Now, if only gThumb would remember when I rotate my images! I don’t want to modify the originals, but having a rotated thumbnail would be great. Lodju does it!
Nikon on Linux
Nikon on Linux – useful guide to getting your Nikon D70 working with a Linux system, and the steps required to get them into a state the GIMP can edit.
He has some useful scripts I might modify for use by my Canon 20D and Panasonic FZ5! Not sure about the auto-rotating. I like to keep my images as clean as possible off the camera.
Debian package management Overview
In this email to the ILUG, Justin Mason posted a very good overview of Debian package management. It covers all the usual suspects such as apt-get, apt-cache and dpkg, but also a few others I didn’t know about.
A little light reading later perhaps?
(While you’re waiting, you might like to poke a penguin!)
Wolverine SixPac and Linux
The 20 GB SixPac Media Reader & Storage Drive is an external drive with integrated card readers for 6 of the most common Flash cards. It works fine with the CF and SD cards I’ve thrown at it, but I couldn’t get Linux to recognise it. The partition table of the device isn’t a standard drive table, instead being more like a floppy which is fine for Windows but fdisk returned some strange results!
None of the partitions were aligned correctly, and the partition type was all wrong: originally it came up as “OnTrack DM6” but after reformatting in Windows appeared as a Novell drive!
Device Boot Start End Blocks Id System
/dev/sdf1 ? 379950 937327 570754815+ 72 Unknown
Partition 1 does not end on cylinder boundary.
/dev/sdf2 ? 82368 1027695 968014120 65 Novell Netware 386
Partition 2 does not end on cylinder boundary.
/dev/sdf3 ? 913029 1858355 968014096 79 Unknown
Partition 3 does not end on cylinder boundary.
/dev/sdf4 ? 1409025 1409052 27749+ d Unknown
Partition 4 does not end on cylinder boundary.Partition table entries are not in disk order
A quick email to Wolferine support found the simple answer – treat the drive like you would a “superfloppy” and mount the whole device somewhere:
mount -t vfat /dev/sdf /mnt/hd
That works a treat and I get access to my new 20GB removable drive!
Here’s my mini-review. If you’re thinking of buying, Ritz Camera have it for $150 right now which seems like a good deal.
Be warned that the interface is very simple. There’s no indication of how much space has been used, but when backing up full CF cards it’s easy to calculate space used. It will warn when space is exhausted but there’s no way of deleting data without hooking it up to a PC. It beeps when the copy is completed. Even using USB 2.0, copying gigs of data takes a while so don’t rely on it as a primary storage device.
Battery life isn’t great. It uses an internal rechargable battery that lasts about an hour. Reading from a 1GB CF card can take more than 10 minutes so if you’re nowhere near a power plug you might be in trouble. You have to contact the manufacturer for replacement batteries.
In conclusion, it worked very well as storage for my 6GB of photos from Chicago and I’m happy with it!