Ikke's blog » virtualbox http://eikke.com 'cause this is what I do Sun, 13 Feb 2011 14:58:55 +0000 en-US hourly 1 http://wordpress.org/?v=3.4.1 VirtualBox launch script http://eikke.com/virtualbox-launch-script/ http://eikke.com/virtualbox-launch-script/#comments Thu, 31 Jan 2008 01:55:55 +0000 Nicolas http://eikke.com/virtualbox-launch-script/ I’ve been playing around with VirtualBox some more today (more on it, and other virtualization related stuff might follow later). I got a Windows XP instance running fine (and fast!) in it. Still got some issues (shared folders seem not to work when logged in as a non-administrator user in XP, although I tend to blame Windows for this issue, not VirtualBox), played around with a little Linux installation acting as an iSCSI target for its virtual block devices, accessing them from Windows using the Microsoft iSCSI initiator, etc. Here’s a screenshot of all this.

I added a launcher for my Windows VM to my panel, which was simply running ‘VBoxManage startvm <VM UUID>’. This was not an optimal solution though, as I wanted it to show a little error dialog when something went wrong when attempting to launch the VM (eg because I forgot it was already running), when the virtual disk files aren’t accessible (because I forgot to mount the volume they reside on), etc.

So I cooked a little script which runs some sanity checks before launching the virtual machine, and reports any errors. Here it is:

#!/bin/bash

# This script was written by Nicolas Trangez <eikke eikke com>
# It can act as a launcher script for VirtualBox virtual machines
# and provides some basic error checking/reporting when doing so.
# It might be useful when using a shortcut to launch machines in a
# desktop environment.

VBOXMANAGE=$(which VBoxManage)
ZENITY=$(which zenity)
VBOXVMUUID=$1

if [ ! -x ${ZENITY} ]; then
        echo "Error: The zenity tool could not be found."
        exit 1
fi

if [ ! $# = 1 ]; then
        ${ZENITY} --error --title "Argument required" --text "This script should be called with one argument: the UUID of the VirtualBox virtual machine you want to start.

To find out this UUID, run \"${VBOXMANAGE} list vms\"."
        exit 2
fi

if ! ${VBOXMANAGE} list vms | grep ^UUID | grep ${VBOXVMUUID} > /dev/null; then
        ${ZENITY} --error --title "Unknown Virtual Machine" --text "No VirtualBox virtual machine with UUID \"${VBOXVMUUID}\" could be found."
        exit 3
fi

if ${VBOXMANAGE} showvminfo ${VBOXVMUUID} | grep ^Primary\ master > /dev/null; then
        DISKFILE=$(${VBOXMANAGE} showvminfo ${VBOXVMUUID} | grep ^Primary\ master | sed -e "s/Primary\ master:\ *//" -e 's/\ *(UUID.*$//')
        if [ ! -r ${DISKFILE} ]; then
                ${ZENITY} --error --title "Primary master not found" --text "The image file for the primary master disk, ${DISKFILE}, could not be found."
                exit 1
        fi
fi

if ${VBOXMANAGE} showvminfo ${VBOXVMUUID} | grep ^Primary\ slave > /dev/null; then
        DISKFILE=$(${VBOXMANAGE} showvminfo ${VBOXVMUUID} | grep ^Primary\ slave | sed -e "s/Primary\ slave:\ *//" -e 's/\ *(UUID.*$//')
        if [ ! -r ${DISKFILE} ]; then
                ${ZENITY} --error --title "Primary slave not found" --text "The image file for the primary slave disk, ${DISKFILE}, could not be found."
                exit 1
        fi
fi

if ${VBOXMANAGE} showvminfo ${VBOXVMUUID} | grep ^Secondary\ slave > /dev/null; then
        DISKFILE=$(${VBOXMANAGE} showvminfo ${VBOXVMUUID} | grep ^Secondary\ slave | sed -e "s/Secondary\ slave:\ *//" -e 's/\ *(UUID.*$//')
        if [ ! -r ${DISKFILE} ]; then
                ${ZENITY} --error --title "Secondary slave not found" --text "The image file for the secondary slave disk, ${DISKFILE}, could not be found."
                exit 1
        fi
fi

VBOXOUT=$(${VBOXMANAGE} startvm ${VBOXVMUUID})
VBOXCODE=$?

if [ ! ${VBOXCODE} = 0 ]; then
        echo -e ${VBOXOUT}
        VBOXERROR=$(echo ${VBOXOUT} | grep "\[\!\]\ Text" | sed "s/.*\[\!\]\ Text\ *=\ *//")
        VBOXERROR=$(echo ${VBOXERROR} | sed "s/\ \[\!\].*//")
        ${ZENITY} --error --title "Error starting Virtual Machine" --text "An error occured while starting the virtual machine:

${VBOXERROR}

Run \"${VBOXMANAGE} startvm ${VBOXVMUUID}\" to see more details."
        exit 4
fi

Enjoy!

]]>
http://eikke.com/virtualbox-launch-script/feed/ 3
KDE4 reviewed http://eikke.com/kde4-reviewed/ http://eikke.com/kde4-reviewed/#comments Sun, 13 Jan 2008 11:57:02 +0000 Nicolas http://eikke.com/kde4-reviewed/ I’ve been able to download the KDE4 LiveCD by now, so I wanted to give it a test ride and write a basic KDE 4 review. These are my findings. I first and foremost want to stress I do not ever want to attack, offend or whatever anyone in this post (as reactions of vocal users on posts like these can be fierce sometimes ;-) ). These are my findings, both positive and negative.

One reason to read this until the end (in case you wouldn’t ;-) ):

KDE 4.0 Button Overflow

At first bootup the OpenSuSE bootsplash theme attracts your attention. I really like it, very smooth.

After a successful bootup (using VirtualBox virtualization) the KDE desktop starts. This takes a while, but this can be blamed on the use of a LiveCD, and a virtual machine. The splash screen is very clean, the use of black and rounded corners reminds me of Apple OS X a little, don’t ask me why. The icon animation is nice, although I think the transparency shouldn’t go all the way to completely transparent (at least, that’s what it looks like), an maybe it should change somewhat slower. Next to this, the last icon in row (the KDE icon) is much bigger than the others, which doens’t look nice. Anyway, minor details.

Once booted, the user is presented with his desktop and a ‘Useful Tips’ dialog:

KDE 4.0 First login

One can immediately notice the new themeing (at least, compared to what I remember of KDE 3.5). The window borders are pretty nice (I like the fact they’re integrated with the window content, notice the curve on top), icons in the dialog are slick. One detail I really dislike is the use of centered text. No clue why this isn’t simply left-aligned.

Once the dialog is closed, one can explore the desktop. As I mentioned in my previous KDE 4 post, I dislike the panel width. I could not figure out how to change this though: when right-clicking the panel in search of some “Properties” function, only panel applet-specific properties can be changed, and the panel border is not draggable. Maybe this setting is hidden somewhere else, but it’s not available in the (IMHO) most logical place.

There are 6 panel applets enabled by default: a menu (which integrates applications, places and system settings, as before, somewhat like the GNOME panel menu Novell created), a task manager, a desktop switcher, the clipboard manager, an applet to manage removable devices, and a clock.

There’s a minor issue with the applet represented by the computer screen: unlike the other applets, when hovering with your mouse above it, no tooltip is displayed denoting what this icon is all about. I could only figure this out once clicking it.

On the upper right corner there’s a hotspot which allows the user to add widgets to his desktop, or to ‘Zoom out’:

KDE 4.0 Desktop zoom out feature

I, honestly, have no clue what the use of that is. Luckily you can zoom in again too, although the hotspot context menu is zoomed out to one quarter of its original size too, which is really small (actually, not readable). Bug?

]]>
http://eikke.com/kde4-reviewed/feed/ 17
KDE4 released: more Free Desktop progress http://eikke.com/kde4-released-more-free-desktop-progress/ http://eikke.com/kde4-released-more-free-desktop-progress/#comments Fri, 11 Jan 2008 21:08:08 +0000 Nicolas http://eikke.com/kde4-released-more-free-desktop-progress/ KDE4 was released today. Most likely not a big surprise for most readers, but hey ;-) Congratulations to the KDE team!

I’d love to give KDE 4 a test-run asap, been trying to download the LiveCD ISO to boot it in my VirtualBox virtual machine, but the torrent is extremely slow here. Maybe my ISP also implemented BitTorrent bandwidth capping as iirc some others did in Belgium, which is completely unfair as this is, obviously, 100% legal content. Some of the screenshots I saw both during development phases and today do look pretty cool, especially taking into account I’m not a big fan of the KDE3.x look. I’m still a little afraid the bottom panel is very high (just like the KDE3.x one), which removes quite a lot of my precious display size… A 14.1 widescreen laptop isn’t thát big, using GNOME I only loose 2×21 pixels.

One thing made me wonder: Plasma, Solid, Phonon, Dolphin, Okular, Akonadi, Oxygen,… Where’s the K* guys? ;-)

I remember some really long and heated threads on GNOME 3 (Project Topaz, which I still consider to be a great name) some months ago, maybe those should be revamped too, to keep the vibe alive :-)

Last couple of years have been very interesting Free Desktop-wise: we got more integration of system components, very flashy UI stuff, great new iconsets and themes, more stabilization of desktop components, several great and innovative new applications,… PDE (Perfect Desktop Environment) doesn’t exist yet (most likely it never will… does such a thing exist, after all?) but current projects are progressing very nicely, each with their proper strengths, targeted user base and features, which can only be applauded and stimulated. Keep on rocking, all of you, so the years ahead of us will be even more surprising, creative, constructive and fun!

]]>
http://eikke.com/kde4-released-more-free-desktop-progress/feed/ 4