Wednesday, 11 June 2008

8bit paintball

This is damn funny! Especially since my state has just legalised paintball (no-one has set it up yet though - I'm waiting...)



And now for the gratuitous ad. which I nicely didn't remove:

See more funny videos at CollegeHumor

For those RSS and syndicate followers, try this link!

Gentoo Linux Live USB key

From live CD image, to bootable USB key in only a few minutes! I didn't believe my friend when he told me how easy this is, and yet he was right!

Here's what I did, you may need to tweak it a bit for your setup (especially your usb device - it could be /dev/sd[a|b|c|...]. Firstly I used one 1Gb USB key / thumbdrive / flashdrive / whatever, because I use the live CD image. You could use the minimal CD image and use a smaller key. It appears to me as /dev/sdb.

Your PC might need to be capable of treating the USB filesystem as a CDROM, otherwise this may not work for you. Tell me about your success!

0. dd if=/dev/zero of=/dev/sdb bs=512 count=1

The reason I did this is because I had corrupted both the mbr and partition table of the usb key. fdisk simply told me "unable to seek on /dev/sdb" and wouldn't continue. Skip this step if you can fdisk ok.

1. fdisk -l; fdisk /dev/sdb; fdisk a partition!

I join these steps together, cause they're all related to creating the partition. Make one partition covering the entire device. Something like "n p 1 t 1 83 a 1 w" should do it. Note I made it bootable, and I'm not using FAT.

2. mkfs.ext2 -L liveUSB /dev/sdb

You'll notice I'm using ext2 here. Wait for the device to finish writing, then unplug and re-plug it, or mount it manually.

3. sudo mount -t iso9660 -o loop /home/iain/Desktop/livecd-i686-installer-2008.0_beta2.iso /mnt/tmp/

There are multiple ways to do this. This is the one I chose.

4. sudo rsync -avP /mnt/tmp/ /media/liveUSB

5. sudo grub-install --root-directory=/media/liveUSB --no-floppy /dev/sdb

6. reboot!


Remember to set your BIOS to boot from your USB drive. Now you have a live CD on a USB key. Much nicer than burning!

YMMV.

Edit: There are some more comprehensive and detailed howto's available with slightly different techniques:
http://www.gentoo.org/doc/en/liveusb.xml
http://gentoo-wiki.com/HOWTO_Gentoo_LiveCD_and_LiveUSB

Wednesday, 4 June 2008

GoogleEarth flight simulator

Last night I was thinking "GoogleEarth imagery would make a great backdrop for a flight simulator"...
  1. Start GoogleEarth (I have version 4.2.205.5730 on Gentoo Linux)
  2. Turn on the "terrain"
  3. Press ctrl-alt-a
  4. Choose between an F16 jet fighter, or an SR22 4 seat propeller aeroplane.
  5. Fly! The mouse works as the usual joystick controller (down=pull up; up=down, just as I like it!)
You have some other controls too: g (landing gear); up/down arrows (throttle); f (extend flaps); F (retract flaps). And yes - since you have landing gear you _can_ crash! Turn on the terrain option for a 3D view. I landed at my local airport! Not quite as smooth as my good ole Janes FA/18, but still very cool...

It may be a bit buggy - if it locks up just restart GoogleEarth, and choose from one of the default starting points.

Of course, I'm not the first to know - Google has fully documented the keyboard shortcuts!

Thursday, 29 May 2008

Step 6... Profit!

Them good 'ole spam messages are getting more cryptic! This is the latest one I just recieved:
1. Find a girl
2. Invite her to your appartments
3. Use subject product V (or C)
4. Have fun
5. Take her number
6. Profit?
Beats me what that means! Maybe it's really a secret code...

Wednesday, 28 May 2008

Logitech MX Revolution in Linux

With my Dell Precision M6300, I was given a Logitech MX Revolution Rechargeable Cordless Laser Mouse. There's a review here. This is a great looking mouse with a good feel (if you're right-handed). It has the usual buttons and wheels. Compared to other laser mice, it has the same smooth flow and precision.

The greatest feature however, and it's stand-out point is the wheel. The wheel can change from a click-wheel to a free wheel. By default in Linux (no special drivers loaded) The wheel button itself changes this behaviour, which means you don't have a middle-button (button 2). If you use this for Firefox tabs, or pasting, you will find this a real pain!

Windows users get an extra feature: Depending on how fast you scroll the wheel, the click-scroll will automatically disable, allowing the wheel to free spin for quite a few seconds. When it stops, the click-feature automatically sets back in. You can hear this with a small "clunk". Logitech claims this is great for navigating very large documents quickly. I like it because I like watching shiny things spin :)

I assumed I would be left without this in Linux however, as weird Windows driver stuff is usually not available. Think again! Thanks to Some Guy there is a program called revoco to control it. Petteri Räty (betelgeuse) has created an ebuild for Gentoo. Follow his instructions, and be sure to read the comments, as you will find some useful info there. I had to do the following:

  1. Edit revoco-0.3.c and change the value of #define MX_REVOLUTION to the value you get for you mouse from `lsusb`. Mine is c525.
  2. The auto setting was a bit whacko by default - the solenoid was clicking on and off without even moving the wheel. This worked:
    $ sudo revoco auto=10
  3. Setting the manual click change to button "6" (find button) gives you the middle click (button 2) back *woot*
    $ sudo revoco manual=6
    and also gets rid of that annoying "search" keyevent which I have a keyboard for :)
  4. But unfortunately, when I set the manual=6 option, the auto scroll feature turns off again :| But that's a small price to pay!
Now I can show off to my friends :) What fun!
 
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan