Monday 8 June 2009

Quick tips for Ubuntu 9.04

One of the beauties of starting your OS afresh is, well, you get a new and better OS. Ubuntu 9.4 (or 'jaunty jackalope') is a slick version of my previous Ubuntu 8.04 ('hardy heron'). So far, I've ascertained that it looks better, it has better support for hardware, and it boots really fast.

One of the pains of starting your OS afresh is having to reinstall all your software and set your preferences. I thought I'd put a little 'as I do it' guide which may take some of the pain away. This list has a few of the 'biggies' and maybe a couple of items more suited to my personal taste, but what the hey!

1. configure the firewall
sudo apt-get install gufw

2. install wine (windows emulator, for those windows programs you cant live without - an ever decreasing number horray!)
sudo apt-get install wine

3. This one is crucial if you want to run java - it takes ages, and at the end when it installs java, you need to be able to use the tab and 'pg dwn' keys to get to the end of the license agreement
sudo apt-get install ubuntu-restricted-extras

4. VLC is still the best media player around
sudo apt-get install vlc

5. skype -
sudo wget http://www.medibuntu.org/sources.list.d/jaunty.list -O /etc/apt/sources.list.d/medibuntu.list

wget -q http://packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add - && sudo apt-get update

sudo aptitude install skype

6. Google Earth (version 5) - install the binary from here. Right click - Properties - Permissions - make executable. Then double click, and it will install - easy! It will create a desktop icon which, by default, you cannot see because you do not have permission. In the terminal type (here, replace 'daniel' with your username):

cd ./Desktop
sudo chown daniel:daniel Google-googlearth.desktop

7. Expand the capabilities of nautilus file browser

sudo apt-get install nautilus-actions nautilus-gksu nautilus-image-converter nautilus-open-terminal nautilus-script-audio-convert nautilus-script-collection-svn nautilus-script-manager nautilus-sendto nautilus-share nautilus-wallpaper

8. Adobe AIR

wget http://airdownload.adobe.com/air/lin/download/latest/AdobeAIRInstaller.bin
chmod +x ./AdobeAIRInstaller.bin
./AdobeAIRInstaller.bin

9. Adobe acrobat reader

sudo gedit /etc/apt/sources.list

Add the below line in sources.list

deb http://archive.canonical.com/ubuntu jaunty partner

sudo apt-get update
sudo apt-get install acroread

G'night!

Sunday 7 June 2009

Never do this

 sudo mv filename.file /bin/sh  


Just don't mess with your bin/sh, and secondly don't attempt to restart your computer after you mess with your /bin/sh (which is the symbolic link to /bin/dash - low level crazy stuff which ordinarily you shouldnt ever know or care about, but which ensures your computer can do some vital things, like initialise).

This I discovered to my cost, and now I'm having to spend my weekend recovering all my files

This is a worrying and heartbreaking exercise, as I'm sure you'll understand - my computer is my livelihood and most of my hobbies, and I havent backed stuff up for ages, and recently I've been doing some cool stuff which exists only on the computer which now needs a complete OS overhaul!!

I'm writing this for instruction and warning rather than pity, you understand. You can't reboot, not even in any safe mode. I did a bit of internet forum research, and there was little guidance (mostly, instructions for windows users to use Ubuntu to recover their files, but not Ubuntu users to recover their files)

It turns out it's thankfully simple.

1. download an Ubuntu distro iso, and burn it to CD (instructions here and here)
2. place in optical drive of bummed out computer, and use BIOS to instruct it to boot from disk
3. select option to 'try Ubuntu without installing it on your computer' (or whatever the exact wording is - should be the first option in most versions)
4. then wait for it to boot - the OS running from the CD can recognise your hard-drive, but won't let you automatically access it. Open a terminal and type the following (assuming you want to access drive sda1 - you may want sdb1 or something):

 sudo mkdir /media/ubuntu  
sudo mount -t ext3 /dev/sda1 /media/ubuntu


for ease of copying and later access, change the permissions to all directories so anyone can have read/write privileges:

 sudo su  
chmod 777 -R /media/ubuntu


this will take a while if you have a lot of files and directories, but when it's done you're ready to plug in a large external hard drive, and save your precious files away - exactly what I'm doing now! The next step will be to reinstall ubuntu (I'm going to go for the latest - 9.04) and spend weeks reinstalling all my software and getting it to my specification - weeks I really don't have!

Friday 5 June 2009

Flower Bed

Recently I investigated Apollonian gaskets (a type of space-filling fractal composed of ever-repeating circles) for use as 'pore-space fillers' in a model I am creating for synthetic sediment beds. I came across a most excellent script here:

http://www.mathworks.com/matlabcentral/fileexchange/15987

In my Friday afternoon boredom, I have just modified some aspects of the program to create a function which simulates a pretty flower bed Some example outputs below - enjoy! Right, now back to work ...