Tuesday, 1 November 2011
Getting VirtualBox to run on Debian 6
I got sick of seeing the "Could not load the host usb proxy service verr_file_not_found" error message when starting VirtualBox. What was even more annoying was that it worked under Ubuntu 11.04 without any problems.
I am running VirtualBox version 4.1.4 r74291 and have installed the VirtualBox 4.1.4 Oracle VM VirtualBox Extension Pack (available here: https://www.virtualbox.org/wiki/Downloads).
After a bit of poking through documentation I found this page https://forums.virtualbox.org/viewtopic.php?p=33944.
Next tried adding the usb file system to fstab
1. Find the group id
$grep vbox /etc/group
vboxusers:x:121:g6ujj,ns
and as root, added the following to fstab:
none /proc/bus/usb usbfs devgid=121,devmode=664 0 0
Success! Or at least I now get a different error message "VirtualBox is not currently allowed to access USB devices. You can change this by adding your user to the 'vboxusers' group."
Checked my groups settings, and no: I wasn't a member of the vboxusers group (although I am an administrator - go figure!)
Logged off and on again and that did the trick.
Now I can enjoy the delights of testing under Windows XP again. Yes, I know I can run most of my cross-compiled code under Wine, but there is nothing quite like being certain, is there?
Friday, 21 October 2011
Burning images using a Mac
I have had recent need to create bootable images from iso files.
Burning a CD or DVD.
This is perhaps the easiest using OSX. Open the Utilities folder in Applications and start the Disk utility package.
Drop the iso into the left hand pane, insert your CD/DVD and hit burn. I'm a touch paranoid, and like to verify the file has burned correctly. This can take a while, so have a cuppa or check Facebook while you're waiting. The disk will automatically eject when finished.
Job done.
Creating a flash drive image
This also is quite easy, open a terminal window.
- Convert the iso file into an img using hdutil.
hdiutil convert -format UDRW -o ~/path_to_target.img ~/path_to_iso.iso - Run diskutil list to see what devices are currently connected.
- Insert your flashdrive and type diskutil list again. On my machine I got /dev/disk2.
- Unmount the disk
diskutil unmountDisk /dev/diskN (N is the drive your flash device is called).
- dd if=/path_to_image.img of=/dev/diskN
- When done, eject the media diskutil eject /dev/diskN
Decision made
I thought I'd give Windows 7 a try, but the interface feels so slow and clunky compared with (pre-unity) Ubuntu. The task bar eats up so much screen space it was really annoying me!
I am just doing an install from the DVD, and will add the other packages I am interested in when I have a working system.
What joy: setting up my environment again this week. I'm so looking forward to it.
Having said that, I have barely cut a line of code this week, and am starting to get a little antsy about it.
Back to the install...
Thursday, 20 October 2011
Goodbye, and thanks for all the fish
This was, apparently, the last thing the dolphins said to mankind just before the Earth was destroyed by the Vogon constructor fleet. If you want to know more, you need to read the trilogy in five parts.
Although I would enjoy talking about the Hitchhikers Guide to the Galaxy universe, that's not what I'm going to vent about today.
I've been a happy user of Ubuntu for several years now, I don't even remember the version that I first used and have upgraded to the latest and greatest versions. I will admit to the occasional difficult install and having to do a fresh reinstall and recovering my files from backups.
I'm not even complaining about the new Unity interface: although I wasn't fond of it, I could become used to the different layout over time.
I got used to having the window buttons on the left (after all, that's where they are on my macbook). Even more amusing, after I found out how to put them back on the right, after a few days I reverted back to the "official" new Ubuntu position.
However, the 11.10 release just doesn't do it for me.
I tried performing the distribution update (which took quite some time) and rebooted to find the machine wouldn't boot. At all.
Thinking how glad I was that I had made a full backup, and copied my files to another drive I downloaded the ISO and burned to CD. Rebooted to find myself stuck in the Grub recovery mode and unable to persuade it to boot for me.
No worries, I thought, I burned a 11.04 build and booted from that. Also to find myself looking at Grub recovery. So I created a usb boot drive with 11.10 and booted successfully from that.
I copied my important files back to my partition, switched to dual monitors to find the desktop background white, and Firefox also was pure white.
Rebooted, and all seemed to be fine. Except that every now and again a window (Firefox, Nautilus or empathy) would become all white. Sometimes adjusting the size of the window helped, but often it made no difference until a reboot.
This morning, after leaving the machine on downloading podcasts, I was not able to log back on. ssh also wouldn't connect, so another reboot to see...
Nothing. A blank screen.
ssh'ing in gave me a desktop and access to nautilus, but not clue why the display on the laptop would co-operate and let me access email or the web.
So the point of all this rambling is to say goodbye to Ubuntu. Although it is interesting tracking down why applications misbehave, and at the moment I seem to have more time on my hands than I'm used to, what I really need from a machine is to reliably boot and let me get on with life.
It looks like I'm going to be spending some time hunting for a new distro to live with, and I suspect that I'm starting with Debian - my macbook is busy creating the flashdrive boot image for me and then I'm going to have the fun of learning a new distribution...
Tuesday, 18 October 2011
Who reads manuals?
Instead of trying the man command to find out how to get the ssh fingerprint, I googled first.
I found this post, and copy/pasted into my command line and it did the trick: one ssh fingerprint in all it's glory. Then I thought a little, and typed in:
man ssh-keygen
Guess what? It gave me the options I needed. Isn't that a welcome surprise? Of course I do know how about the unix online manual options, I have no idea why I Googled first.
Who reads manuals, after all?
Monday, 17 October 2011
Backups and upgrades
Out of paranoia (and because I had a problem with the filesystem recently), I decided to do a full backup of my home directory first.
Two days later the backup was complete. Not surprisingly, I had done some work on the machine and needed to do a backup again, but this time I just backed up the files that have changed.
Today is the big day: starting the upgrade process. I found it amusing that it might take some time to download the updates. Only might?
Currently using my MacBook, and (as always) it is taking me a while to get used to the different key layout.
It takes a little while to reprogram my muscle memory into finding the ~, | and # keys again. I am never sure if Apple actually looked at a UK keyboard before setting up their keyboards, but it is most certainly not following the standard.
For those slightly less trusting than me, how do you know if a backup is successful? The only way I know is to do a restore. Comparing the backup to the original only says the files have the same contents, after all. It does not mean that the backup will be able to be restored to your machine.
My usual method for upgrades is to buy a new hard disk for the laptop, do a clean install then copy my files over onto the new install. This time I have bitten the bullet and went for a direct upgrade.
Monday, 30 May 2011
A working setup
- Add new build targets OSXDebug and OSXRelease based on the default Debug and Release setups.
- Change the compiler and linker to include the -arch i386
- In the post-build steps add the following
- Having the compiler automatically generate an install routine for the windows (mainly to put the dll's into the windows system folder)
- Getting the Linux build to cross-compile for the OSX platform
- Writing an application that works across all three platforms
Further frustrations and a brief moment of joy
I had set up my code in a dropbox folder so I could access the same codebase across all my machines, and booted my laptop running Ubuntu 11.04.
Sunday, 29 May 2011
Back to making progress
mkdir -p $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).app/Contents/MacOS/
/Developer/Tools/SetFile -t APPL $(TARGET_OUTPUT_FILE)
/Developer/Tools/Rez -d __DARWIN__ -t APPL Carbon.r -o $(TARGET_OUTPUT_FILE)
cp $(TARGET_OUTPUT_FILE) $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).app/Contents/MacOS/$(TARGET_OUTPUT_BASENAME)
/usr/local/bin/dylibbundler -od -b -x $(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).app/Contents/MacOS/$(TARGET_OUTPUT_BASENAME) -d ./$(TARGET_OUTPUT_DIR)$(TARGET_OUTPUT_BASENAME).app/Contents/libs/
The only thing that is (mildly) irritating is getting the cocoa application to execute when the ide is trying to run the code.
Next step: get the basic code to compile and execute on the Linux box, and following that cross-compiling for windows (not sure if there will be different variants for XP, Vista and 7 though). And after that? Creating a useful (or otherwise) application.
>About to switch machines. After tea (gammon with honey glaze mmmmm)>
Famous Last Words
Friday, 15 April 2011
Getting Closer
Update: a step I missed out was to set the Output filename for the build targets to point to the modfied file name. For my app I had to set it to bin/osx/Debug/Sim65.app/Contents/MacOS/Sim65.