04 May 2009

Mounting ISO images and creating shell scrips

Problem: Mount an ISO image file
  • Good old terminal
To make a mount point "iso" and mount the CD image "image.iso"
$ sudo mkdir /media/iso && sudo mount -o loop image.iso
To unmount the ISO and clean up the /media directory
$ sudo umount /media/iso && sudo rmdir /media/iso
Always good to know the terminal commands, thanks nixCraft.

  • Add a script to nautilus
$ cd ~/.gnome2/nautilus-scripts && sudo gedit mount
Add this text to make the 'mount' script
# nautilus-mount-iso
gksudo -u root -k /bin/echo "got r00t?"
sudo mkdir /media/"$*"
if sudo mount -o loop -t iso9660 "$*" /media/"$*"
if zenity --question --title "ISO Mounter" --text "$* Successfully Mounted.
Open Volume?"
nautilus /media/"$*" --no-desktop
exit 0
sudo rmdir /media/"$*"
zenity --error --title "ISO Mounter" --text "Cannot mount $*!"
exit 1
Now make the umount script
$ sudo gedit umount
and here is the code
for I in "$*"
foo=`gksudo -u root -k -m "enter your password for root terminal
access" /bin/echo "got r00t?"`
sudo umount "$I" && zenity --info --text "Successfully unmounted /media/$I/" && sudo rmdir "/media/$I/"
Set the files as executable
$ chmod 755 mount umount
This should have added the two new scripts to the context menu. Thanks to animacide @ ubuntu forums.

  • Install gMount
$ sudo apt-get install gmountiso
While it's good to know the other methods this one is by far the easiest to use. Thanks gMount

Wrap <pre> text on blogger

handy to know if you ever use <pre> formatting

Dashboard > Layout > Edit HTML

/* Posts
and paste this in on the next line down
.post pre {
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: o-pre-wrap;
Thanks go to Mike Tremell @ TL&UM

Essential Ubuntu Apps

This is the distilled version of Lifehacker's recent Top 10 Ubuntu apps.
A handy console app, just hit F12 (or what ever key you configure the shortcut to) and a console drops down from the screen top aka Quake style.
sudo apt-get install yakuake

Great keystroke launcher, has loads of plugins (such as google contacts, google docs etc) and can index a small (<3000)>$ sudo gedit /etc/apt/sources.listpaste this text to the end of the file and save
deb http://ppa.launchpad.net/do-core/ppa/ubuntu jaunty main
deb-src http://ppa.launchpad.net/do-core/ppa/ubuntu jaunty main
add the keys
$ gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --keyserver keyserver.ubuntu.com --recv A5D19FDCAA6ABB440CD3464628A8205077558DD0
$ gpg --no-default-keyring --keyring /tmp/gnome-do.keyring --export --armor A5D19FDCAA6ABB440CD3464628A8205077558DD0 | sudo apt-key add -
$ rm /tmp/gnome-do.keyring
then install it
$ sudo apt-get update && sudo apt-get install gnome-do

Handy GUI with loads of settings that you would have otherwise never known about.
$ sudo apt-get install ubuntu-tweak
That's it for now, they are all very handy.. whats next?
  • Still waiting for S-Video out support for my ATI graphics card.. fglrx is not an option at the moment
  • Testing out open office to be sure I know how to use all the features I used to use in MS office before making the big switch.. TOCs in text citations etc
  • Might have to test out a windows emulator just incase.. looking at Wine winehq.org or VirtualBox virtualbox.org

03 May 2009

Geocaching on a Blackberry 8900

Had some visitors this bank holiday weekend and got an introduction into Geocaching. This is a great combination of computer geekary and getting outside for fresh air and seeing some nice sights. The most surprising thing is to discover so many interesting places in and around your home that you never saw before. In summary Geocahcing is "a sport/hobby where you use multi-billion dollar satellite technology to find plastic boxes hidden in the woods".

Managed to find the tools to play this kinda odd but rewarding GPS game using a blackberry.
This is a nice waypoint application, add co-ords by hand or download the free LOC file from geocaching.com/ and import it as a new waypoint. (BlackStar App > Menu: New Waypoint > Menu: Import GPX/LOC File).

Profile for andywingate