Wednesday 3 December 2008

Thanks for all the visits

Thanks to this post my blog has over 1,000 hits per month, bringing in over 6,500 hits in November 2008 alone!


Here's the stats to prove it:
Page Loads Unique Visitors First Time Visitors Returning Visitors
Total 14,430 12,505 10,066 2,439
Average 1,203 1,042 839 203
Month Page Loads Unique Visitors First Time Visitors Returning Visitors
Dec 2008 344 297 234 63
Nov 2008 6,593 5,773 4,547 1,226
Oct 2008 2,597 2,291 1,921 370
Sep 2008 1,213 1,044 811 233
Aug 2008 1,145 964 786 178
Jul 2008 1,652 1,371 1,096 275
Jun 2008 830 714 624 90
May 2008 49 44 41 3
Apr 2008 1 1 1 0
Mar 2008 2 2 2 0
Feb 2008 0 0 0 0
Jan 2008 4 4 3 1


But I don't mean to show off - this is only possible with you, the reader. And if my howto's were complete rubbish I hope that they wouldn't be linked to!

VMWare and the fubar keyboard effect

Welcome to the Ubuntu community! See my note about this at the end.

Note:
As this is my most popular blog entry, it looks like a lot of people are suffering the same problem. I'm grateful for all the positive feedback - thanks! Feel free to continue to leave feedback, especially if you have more information (or something that doesn't work), or links to related pages. Thanks :)

For what seems like 300 years I've been struggling with the horrible effect of VMWare workstation on my keyboard. I have a perfectly good license for VMWare workstation 4, so I continued to use it regardless of the fact that version 6 is available. (I've since upgraded to version 6, and from the responses from others this fix still works).

This never used to be a problem, but it got successively worse: Once VMWare grabbed the keyboard, many function keys (ctrl, shift, alt, etc) would remap to nothing, or worse, some other key function!

Solution 1
I solved this out-side of vmware thanks to a gentoo-user thread:
  • Run `setxkbmap` from your terminal
    (Ubuntu: install x11-xkb-utils; Gentoo: install x11-apps/setxkbmap). This fixes some keys, but not all
  • Then put your cursor over the VMWare menu bar somewhere, but not in the client window
    (don't let the keyboard/mouse get grabbed automatically)
  • Press Ctrl-g
    (this grabs the keyboard/mouse). You should see the cursor jump to the middle of the VMWare screen. If this doesn't work, focus a different window, and try again.
  • Press Ctrl-Alt
    (This un-grabs the keyboard/mouse)
This solved the problem outside VMWare (on the host), but still didn't solve the problem where within VMWare (on the guest), my arrow keys, del and ins, etc. were still screwed. For a keyboard-shortcut lover such as myself, who uses the keyboard more than the mouse, this is very annoying.

Finally I thought I'd try VMPlayer (and wow, does the suspend / resume feature work fast!). The problem was even more evident - now every use of VMWare many non alpha-numeric keys were unusable.

Solution 3:
(no, you didn't miss the 2!)


Some readers have had success with the one line:
xkeymap.nokeycodeMap = true
in the file /etc/vmware/config. As the root user (sudo won't work in this case), this command should do it for you:
echo "xkeymap.nokeycodeMap = true" >> /etc/vmware/config
or:
echo "xkeymap.nokeycodeMap = true" >> ~/.vmware/config

If you don't have root access. See Solution 2 for more locations of this config file.

Solution 2:
This is the original Solution 2, and since many comments reference it I have left it numbered so. However, Solution 3 is much simpler (and newer) so I've put that first.

Apparently this issue arrises with the evdev input driver. Thanks to "doranikov", The solution is simple: Tell VMWare what your keyboard really does! Put this in either /etc/vmware/config, or /usr/lib/vmware/config if you have root access, or in ~/.vmware/config otherwise. (Do this in the host OS, not the client) If the file doesn't exist, just create it:
xkeymap.keycode.108 = 0x138 # Alt_R
xkeymap.keycode.106 = 0x135 # KP_Divide
xkeymap.keycode.104 = 0x11c # KP_Enter
xkeymap.keycode.111 = 0x148 # Up
xkeymap.keycode.116 = 0x150 # Down
xkeymap.keycode.113 = 0x14b # Left
xkeymap.keycode.114 = 0x14d # Right
xkeymap.keycode.105 = 0x11d # Control_R
xkeymap.keycode.118 = 0x152 # Insert
xkeymap.keycode.119 = 0x153 # Delete
xkeymap.keycode.110 = 0x147 # Home
xkeymap.keycode.115 = 0x14f # End
xkeymap.keycode.112 = 0x149 # Prior
xkeymap.keycode.117 = 0x151 # Next
xkeymap.keycode.78 = 0x46 # Scroll_Lock
xkeymap.keycode.127 = 0x100 # Pause
xkeymap.keycode.133 = 0x15b # Meta_L
xkeymap.keycode.134 = 0x15c # Meta_R
xkeymap.keycode.135 = 0x15d # Menu
done!

Getting keycodes

What if your keycodes are different? To get the keycodes, you'll need xev or xmodmap. Run xev and place your cursor in the xev window. Then press the key you want (eg, right Control).

You'll get output like this on the terminal:
KeyPress event, serial 33, synthetic NO, window 0x3200001,
root 0x1cb, subw 0x0, time 749698, (167,181), root:(1793,706),
state 0x10, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x3200001,
root 0x1cb, subw 0x0, time 749810, (167,181), root:(1793,706),
state 0x14, keycode 105 (keysym 0xffe4, Control_R), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Look at the value after keycode. In this case 105. Change the xkeymap.keycode. to 105:
xkeymap.keycode.105 = 0x11d # Control_R
0x11d is the scan code.

For xmodmap, use:
xmodmap -pk
Further help:
Where'd you come from?
P.S. hello to all the planet larry readers, and the Ubuntu community. Thanks to you guys (and some great linking from other bloggers, VMWare forums, etc) I now have over 1000 hits a month! In November 2008, I got over 6500 hits! blog on!

Thursday 27 November 2008

The Closest Book Meme

(better late than never!)
  1. Grab the nearest book.
  2. Open it to page 56.
  3. Find the fifth sentence.
  4. Post the text of the sentence in your journal along with these instructions.
  5. Don’t dig for your favorite book, the cool book, or the intellectual one: pick the CLOSEST.
The British party had hoped to leave their cold-weather clothes in Hong Kong; but their rapid transit had frustrated that plan, and Neill was still carrying his waxed jacket, which was fine for Yorkshire, but not entirely suitable for Brunei.
from SOS, a story about an army expedition to Borneo's "Death Valley" which went wrong and turned into a fight for survival.

Monday 10 November 2008

Movember

Movember - Sponsor Me
It's Movember!

During Movember (the month formerly known as November) I'm growing a Mo to help raise awareness about men's health issues and being proactive in the fight against men's depression and prostate cancer.

You can follow my progress on my Mo Space!

To donate to my Mo you can either:

  1. Click this link https://www.movember.com/au/donate/donate-details.php?action=sponsorlink&rego=2049857&country=au and donate online using your credit card or PayPal account, or
  2. Write a cheque payable to ‘Movember Foundation', referencing my Registration Number 2049857 and mailing it to:

Movember Foundation
PO Box 292
Prahran VIC 3181

All donations over $2 are tax deductible in Australia. Other countries may have similar benefits.

The money raised by Movember is used to raise awareness of men's health issues and donated to the Prostate Cancer Foundation of Australia and beyondblue - the national depression initiative. The PCFA and beyondblue will use the funds to fund research and increase support networks for those men who suffer from prostate cancer and depression.

Did you know:

  • Depression affects 1 in 6 men....most don't seek help. Untreated depression is a leading risk factor for suicide.
  • Last year in Australia 18,700 men were diagnosed with prostate cancer and more than 2,900 died of prostate cancer - equivalent to the number of women who will die from breast cancer annually.

For those that have supported Movember in previous years you can be very proud of the impact it has had and can check out the details at: [ Fundraising Outcomes ].

Movember culminates at the end of month Gala Partés. If you would like to be part of this great night you'll need to purchase a [ Gala Parté Ticket ].

Thanks for your support

Thursday 11 September 2008

You know you're using the computer too much when

Last Sunday morning, I was actually trying to sleep in longer by dreaming something like --extend-sleep=1h. I am not joking *sigh*.

It didn't work - but for a good reason - my family was waking me up with a breakfast in bed for Fathers day :)

Thursday 14 August 2008

nVidia xinerama on a Dell M6300

I wrote recently about my efforts to get two screens going, with the primary screen not coming off the primary video output. I used a neat trick, the option:
Option         "UseDisplayDevice" "DFP-0"
The downside with that method of separate X screens, is that you can't drag a window from one to the other.

Now I decided I should try using xinerama. The use should be almost identical, with the advantage that I can drag windows from one screen to the other. There are other subtle advantages such as better panel integration, and general WM goodness.

1. Firstly, compile everything with xinerama support.

If you use a binary distribution, this is probably done for you. For gentoo, add this the /etc/make.conf:
USE="... xinerama"
I prefer this to using /etc/portage/package.use in this case, because you want to catch all future installations that can support this USE flag.

Now, recompile everything that can use the USE flag:
# emerge -vauDN world
(v)erbose, (a)sk, (u)pdate, (D)eep, (N)ewUSE

It shouldn't be necessary to include nvidia-drivers in the recompile, but you will need them installed.

2. edit xorg.conf

You must start with a working xorg.conf, and you must have only one display set up or this step will fail:

# nvidia-xconfig -c /etc/X11/xorg.conf-20080728 -o /etc/X11/xorg.conf --twinview --dynamic-twinview --twinview-orientation=LeftOf --twinview-xinerama-info-order=DFP-2,DFP-0 --constant-dpi --use-edid --use-edid-dpi --damage-events --render-accel

The options are:
  • -c uses a specified input file. I do this so I can start from the same point each time, rather than a constantly changing xorg.conf file
  • -o writes to this file
  • --twinview enables twinview
  • --dynamic-twinview enables dynamically change twinview settings
  • --twinview-orientation=LeftOf sets the second monitor to be left of the primary
  • --twinview-xinerama-info-order=DFP-2,DFP-0 says that DFP-2 (DVI) is the primary display
  • --constant-dpi --use-edid --use-edid-dpi --damage-events --render-accel are other settings I play with to fine tune performance.

3. Restart X

You probably know how to do this. Logging off usually does the trick.

If everything worked you should have:
  • log in screen on one display only
  • desktop extended to second display
  • windows open completely on one display and not in the middle
  • windows snap to the edge of one display
  • windows can be dragged to the second display
  • both displays can be treated like one large screen (my geometry is now 3840x1200!)

Monday 28 July 2008

TwinView with a Dell E248WFP

So I received my Dell 24 inch LCD finally, after being told they were out of stock for a while... The colour is certainly more vibrant than my new Precision M6300 laptop screen, but I don't know if it's a good vibrant...

My setup is two X screens side by side. The laptop is on the right, and the LCD in the centre. You can use the real nVidia twinview, which should require xinerama support where available, but I didn't like the second display not having it's own gnome panels.

Both displays are 1920x1200. I used nvidia-xconfig and some manual tweaking to get it right. Note I backed up my xorg.conf file first to xorg.conf-20080728 so that I could run nvidia-xconfig multiple times from the same starting point:

sudo nvidia-xconfig -c /etc/X11/xorg.conf-20080728 -o /etc/X11/xorg.conf --separate-x-screens --no-constant-dpi --use-edid --use-edid-dpi --damage-events --render-accel

Now, this default setup creates an xorg.conf file that places the login screen on the primary display - the laptop. Annoying if you have the LCD in the centre. Simply swapping "Screen 0" and Screen 1" in the ServerLayout doesn't work, as the first screen will still be assigned to the laptop. You must force which screen is the primary screen by using UseDisplayDevice. In each "Screen" section, add:
    Option         "UseDisplayDevice" "DFP-0"

for the laptop LCD (or DFP), and
     Option         "UseDisplayDevice" "DFP-2"

for the external LCD. You may find yours is DFP-1. I use the DVI so perhaps DFP-1 is for the VGA.

Take note of the Identifiers for the two screens, and change the serverlayout to show:
    Screen      0  "DefaultScreen (2nd)"
Screen 1 "DefaultScreen" RightOf "DefaultScreen (2nd)"


Then restart X. The 0th screen is the "primary" screen, which will have your log-in window and all your usual panels and applets. The 1st screen has a default blank Gnome installation (if you use Gnome), but with the same background.

You could rename the Identifiers to make them a bit more readable.

The resultant xorg.conf file is on pastebin.

poRblems:
So far, the EDID DPI detection doesn't work, so applications that support the DPI and resize themselves aren't doing so for me, depending on the screen. Emacs does look a bit wierd on a 24 inch monitor, when the DPI is set for a 17 inch LCD!

Saturday 26 July 2008

hibernate a Dell Precision M6300 with nvidia-drivers

This is not a howto, just a collection of information that helped me.
$ uptime
22:05:42 up 9 days, 46 min, 1 user, load average: 1.78, 1.41, 0.91
Unfortunately, that will go back to 0, as I have to reboot for a new kernel!

So it appears there is some difficulty getting Nvidia's proprietary drivers to hibernate nicely. Had I known I might have stuck with an ATI video card for my next laptop (enter the Nvidia vs ATI flamewar. Of course, the whole argument is pointless, because everyone makes ultimatums like "I will never buy <brandname> again", based on one or two experiences, often with known old or buggy hardware.)

I have tried in the past to hibernate this laptop, but not succeeded. Common problems include:
  • Suspend ok, but resume locks up
  • Suspend locks up
  • Corrupted video, etc
Recently I decided to have another go. To my surprise, it worked without much hassle! Firstly, the specs:
  • Dell Precision M6300 (laptop!)
  • 64-bit Intel core-2 duo
  • nVidia Quadro FX 1600M with 256Mb RAM
  • 17" WUXGA 1920 X 1200 LCD
lspci identifies the video card as: 01:00.0 VGA compatible controller: nVidia Corporation Device 040d (rev a1) with the id: 10de:040d.

Now for the software. I use gentoo, but you'll be able to glean the relevant version number from these names:
  • tuxonice-sources-2.6.25-r3 and tuxonice-sources-2.6.26*
  • v86d-0.1.5.2 (Note: so far hibernate is incompatible with fbcondecor)
  • hibernate-script-1.99
  • nvidia-drivers-173.14.09
  • gcc version 4.1.2 (Gentoo 4.1.2 p1.0.2)
Instructions for installing and configuring are all over the web. Google is your friend! Two useful links:
Note1: I think the results are quite version specific, so try a number of combinations before you give up (yes, it's time consuming)
Note2: I use the filewriter, because I don't use swap <boast Who needs it with 4Gb RAM?!/> Look at my kernel config for more details.
Note3: Make sure you can suspend successfully without the nvidia kernel module installed first, otherwise this info will be of little use to you!

Also, my config files:
[Note these will be paste-binned soon]
Problems:
  • on resume, GL actions all have a delay of a few seconds before operating. eg. a GL screensaver will show nothing for 3 seconds before starting. You can fix this by stopping X, reloading the nvidia module, and restarting X.
*2.6.26 works much better with resuming - no great pauses, however Intel Wireless WiFi 4965AGN (IWL4965) doesn't work...

I think that's all you'll need to replicate my setup. Let me know your success / failure with other versions / distros!

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!

Monday 26 May 2008

No Mio P560 for Australia :(

Earlier this year I enquired about the Mio P560 - a great looking PDA/GPS with windows mobile 6. At the time it was "due to be released within a few months". I just got an email saying it will no longer be released in Australia:
Dear Iain

You enquired about the Mio P560 a little while ago and this is to let you know that this model will not be released in Australia.

Sorry we are unable to assist you at this time.

Kind regards
mioEshop
I have looked through so many GPS models it's not funny - that elusive perfect handheld is proving to be very... well, elusive!

Compare the .com product list with the .com.au product list!

Tuesday 20 May 2008

CeBIT, day 1

I woke up early (strange bed, you know the drill) so I headed off for CeBIT early, and got there around 9am. The Sydney Exhibition Centre is built under part of the freeway:


The open wasn't till 10am, so I watched people turn up, people have trouble with the magic registration machine, booth babes wander around lost, crowds milling, etc.

The open source conference was interesting. I would like more guts and bolts, but it was aimed more at people slightly more unaware of open source. These photos were taken at the end during the "panel".
Speakers were (left to right) Mike Cannon-Brookes (Atlassian)
Don Christie (Catalyst IT)
Frank Feldmann (RedHat)
Matt Palmer (Engine Yard)


... Alex Lee (Lateral Minds)
Grant Allen (Google)
and...

Shane Owenby (Oracle)


I was mildly surprised to find Shane and Frank in the same room :)

After the conference I had about half an hour to check out the stalls. I saw a very big TV:


and a Stereoscopic LCD:

tomorrow I'll take two photos of it, so you can get the 3D effect!

That's all for now!

Hello from CeBIT

CeBIT Sydney, that is!

Well, it hasn't officially started yet (that's tomorrow). I'm here till Thursday. Tomorrow I'm going to the open source conference.

Here's part of Darling Harbour from my hotel window (made from hugin on Gentoo:)

Monday 12 May 2008

Dell Precision M6300

I've just come back from a three and a half week holiday interstate to see my new Dell Precision M6300 has finally arrived! If it wasn't for a new toy to play with, I would have found it hard to get out of bed this morning (first day back after a great holiday is usually like that...)

Anyway, now to install Gentoo Linux on it!

The first problem I encountered was the classic install cd "no bootable medium found":
Attempting to mount media:- /dev/sda
No bootable medium found. Waiting for new devices...
Could not find CD to boot, something else needed!
I used the minimal install cd, which booted but couldn't "find itself" (after booting the kernel, the cd tries to mount itself so it can use the files contained on it). I tried all-generic-ide, acpi=off, playing with AHCI vs ATA in the BIOS and various options to no avail. In the end, I copied the install cd to a usb key, and booted from the CD. The install found the usb key media and continued to run! Thanks to here for this solution!

Now I've finished installing the basic system and I have the machine booted and logged in. I'm currently compiling gnome! I'll provide more details here soon...

Edit: 20/5/08
The system was mostly installed within a day. This is my success so far:

Processor frequency scaling
works (2.6GHz, 2GHz, 1.6GHz, 1.2GHz and 800Mhz. Conservative scheduler works well)

LCD WUSXGA
works (1920 x 1200 native resolution)

LCD backlight control
mostly works (DPMS works, but I haven't got the lid to switch off the display yet)

Touchpad (synaptics driver)
works


Hibernate to disk
doesn't (resume properly yet!)


ACPI and power button
works


Speakers / sound card
works


LAN, WLAN
works


MMC reader
works


multimedia keys
mostly works (Some issue with play, pause, etc buttons)


DVD burner
untried (DVD / CD reader works)


firewire
untried


USB
works


VGA / DVI / TV out
untried


modem
untried

I'll post more details again soon!

Wednesday 2 April 2008

SetiAtWork

I got my hands on a nice Intel 64bit Quad-Core Dual-CPU Dell Poweredge the other day - not for keeps unfortunately! It is one of two new servers for work. The first one is being tested by the SysAdmin and I asked if I could play with the second. If I can get virtualisation working properly, then I may be able to administer it for it's final use (migrating a few old servers onto it), we'll see.

So what better way to burn it in, than to run SETI or something similar. It's been a while since I last ran SETI. In fact, there was no boinc way back then, and my old 2GHz Pentium 4 got me into the 2nd percentile in just a few months.

After struggling with various issues with the new boinc client not connecting, and not downloading anything, I finally got it all working. One trick was to use the full account key, not the limited key. I also had some problems with the amd64 binary. Apparently there's an even faster one out there, but I haven't looked into that yet.

I was suprised to learn that SETI now provides the source code - when I first used it they kept the source code closed so that they could verify the results were genuine.

I migrated my account from the "classic" to the new style and joined the Gentoo Linux Users Everywhere team. I was dismayed by my apparently slow "recent average credit" total, but after a few weeks, this gradually improved, culminating in todays effort: I'm now at the top of the ranking for this group, based on recent average credit :) I have a long way to go until my total credit gets me noticed however!

I wonder whether I should join another group, or even try out a different project. While SETI holds my favourite spot for being one of the originals, there are possibly more humanitarian efforts! We'll see.

Friday 7 March 2008

Hopetoun, WA

Edit: sorry about the broken links! Picasa has played up on me! I'll try to fix them soon...

I've travelled to Hopetoun 3 times now. Each time was for business - installing, re-installing, and maintaining part of the Hopetoun Wind Diesel project. I've gathered a lot of photos and stories, so I thought I'd share some of them.

The first visit was September-October 2004. Our objective was to upgrade the existing Power Station with an Enercon E40 Wind Turbine, two new "Low Load Diesels", and our high penetration control system.

The Enercon E40

is an inverter-connected variable speed drive machine, which means that it responds very nicely to our setpoint requirements - essential when aiming for high penetration.

The Low Load Diesels

are capable of running at low loads (0% - 40% load) for extended periods of time without glazing or damage. The control system controls setpoints, trends, alarms, remote monitoring, and all the usual stuff, to achieve wind penetration figures quite often up to 80% - 90%. (ie. 80% if the electrical load of the station is being generated from wind energy).



The intention was always to move the power station eventually, as the old power station was in the middle of town and too noisy for a growing place. The second visit in March 2007 saw a new power station with 8 Low Load Diesels (2 from the old power station), a second Enercon E40, and two 65,000L fuel tanks! The total capacity of diesel and wind is now about 3.7MW.

The third tip later in 2007 saw an upgrade to the control system, to provide more features requested by the customer, and more efficient operation. Here are some photo's we took during this third trip:

(left) Four of the six town feeders.

(right) The two wind turbines, as viewed from the power station. The small structure in the foreground is the water tank. The power station is self sufficient for water.

(left) Fill-er-up!

(right) Seven Low Load diesels all in a row, out to the garden they started to go...


And that's some quick info on the Hopetoun power station. I enjoyed the experience of the projects from design, through to implementation, and maintenance. We continually monitor the project remotely, however the power station is owned by Verve Energy, who provide the power to Horizon Power. Our main support contract is now over, which means we now only provide the warranty.

Thursday 21 February 2008

Nautilus scripts

Here's a nautilus script that I find very useful! If you find yourself zipping or tarring a lot of files, this will save you lots of time!

I miss the right-click zipfile functionality that I used to get in Windows from the winzip add-on. With Nautilus, you can make up your own scripts and drop them in the scripts directory. They appear on the right-click context menu under "Scripts". You won't see this menu if you have no scripts yet.

It's easy to use:
  1. Copy the following text into ~/.gnome2/nautilus-scripts/tar-bzip2-here
  2. make it executable: `chmod u+x ~/.gnome2/nautilus-scripts/tar-bzip2-here`
  3. right click a file / folder that you want to archive, or select multiple files and right click on one
  4. select "Scripts > tar-bzip2-here"
  5. If you've selected multiple files, you will be prompted for an archive name. Otherwise, the file name will be selected automatically.
  6. A message appears saying "The archive should now be ready". You will find it in the same folder that your original files were in.
Easy and time saving! No more terminals just to tar -cf blah; bzip blah blah!

Here's the code. Copy it exactly (use cut-n-paste):
version 0.2, updated on March 7, 2008

#!/usr/bin/perl -w

#
# tar-bzip-here version 0.2
#
# This program is free for whatever use you want. You break it you get to keep
# the pieces! I would appreciate fixes / improvements being sent back to me.
#
# Changlog:
# 0.2: quote filenames so that certain characters don't confuse bash, such as
# "(". Some more error messages.
# 0.1: initial release
#
use strict;

#my $logfile = '~/tar-bzip2-here.log';
# my @NAUTILUS_SCRIPT_CURRENT_URI = split /\s/, $ENV{'NAUTILUS_SCRIPT_CURRENT_URI'};
my @NAUTILUS_SCRIPT_SELECTED_URIS;
if (defined $ENV{'NAUTILUS_SCRIPT_SELECTED_URIS'}) {
@NAUTILUS_SCRIPT_SELECTED_URIS = split /\s/, $ENV{'NAUTILUS_SCRIPT_SELECTED_URIS'};
}
else {
`zenity --error --text "Run this from nautilus!"`;
die "Run this from nautilus!\n";
}


#`echo > $logfile`;

my @files = ();
foreach my $file (@NAUTILUS_SCRIPT_SELECTED_URIS) {
next unless defined $file;
chomp $file;
if ($file !~ s|^file://||) {
`zenity --error --text "I don't know how to handle the URI '$file'"`;
#`echo 'skipped $file' >>$logfile`;
next;
}

$file =~ s/(%..)/&unq($1)/ge;
# `echo 'ok: $file >> $logfile`;
push @files, "\"$file\"";
}


my $numfiles = $#files + 1;
my $fname;

#`echo 'files are @files'>>$logfile`;
# if mixed files and dir, then ask for archive name
if ($numfiles > 1) {
$fname = `date +%Y%m%d`; chomp $fname; $fname .= '.tar.bz2';
$fname = `zenity --file-selection --save --confirm-overwrite --filename=$fname --title="Select a name for the archive"`;
chomp $fname;
&end ("Cancelled by user") unless ($fname ne '');
}

# if single file or directory, then compress to dirname.tar.bz2
elsif ($numfiles == 1) {
$fname = "$files[0].tar.bz2";
}

else {
&end ("You need to select some files in nautilus to use this script");
}

# now tar a bzip2!
`tar -c @files | bzip2 > "$fname"`;
#`echo 'tar -c @files | bzip2 > "$fname"'>>$logfile`;

# done!
`zenity --info --text "The archive '$fname' should now be ready"`;

# functions
sub unq {
my ($percent) = @_;

if ($percent eq '%20') { return ' '; }
elsif ($percent eq '%20') { return ' '; }
else {
&end ("Don't know how to handle '$percent'");
}
}

sub end {
my ($err) = @_;
`zenity --error --text "$err"`;
die "$err";
}

Friday 25 January 2008

Gentoo 2008.0

So it's no secret that I use Gentoo. If you've been following the rumours lately you would think that Gentoo is in strife. Daniel Robbins made lots of people believe that there were project, legal, developer, and direction issues. Most of his facts appear to be correct, however I cannot agree with his conclusions.

The State of New Mexico NFP status is not a big deal - sure it's a little embarrassing, but papers got lost, people got preoccupied, and now the papers have been re-filed[1]. Sure the council has had a few resignations, but a new council will be instated, followed by elections, followed by a better process for ensuring it doesn't happen again.

Sure there wasn't a release in 2007 - but there were various security concerns and a breakdown in communication. What you may not realise is that Gentoo doesn't need regular releases, because the entire system of packages goes through a constant upgrade cycle anyway. For example, when I used to install Redhat and then Fedora, major releases would usually introduce a new major Gnome or KDE version. Without the new release CD, you wouldn't be able to get a lot of new packages. Even with the new release CD, Fedora would often blow away my filesystem anyway. With Gentoo, KDE 4.0 is currently in the tree, and people are successfully installing and using it.

Nevertheless, a new release is on the way[2]. Pencilled in for final release in mid-march, there are a lot of new features and processes. Including linux kernel 2.6.24[3], if testing goes well. A new security discussion has been set up, so that Release Engineering knows what the issues are directly.

The final issue, IMHO is the communication between devs and users. They will never completely agree on everything, but that's a fundamental difference that shouldn't be changed. At the least there should be some communication - and the releng looks to be addressing that too. There is a new mailing lists to help new developers (gentoo-dev-help), a user survey planned, and a call for comment on the new release[4].

So Gentoo is not perfect, nor is any distribution. At least from what I've seen over the last few days is they continue to learn from mistakes, which means the will continue to improve and grow.

[1] http://archives.gentoo.org/gentoo-nfp/msg_01347.xml
[2] http://www.gentoo.org/news/20080123_releng_beta.xml
[3] http://www.gentoo.org/news/20080125-2.6.24-kernel.xml
[4] http://www.gentoo.org/news/20080124_releng-feature-request.xml
 
Copyright 2009 Another Blog. Powered by Blogger Blogger Templates create by Deluxe Templates. WP by Masterplan