Thursday Jul 30, 2009

Using Cygwin to manage script Virtual Box tasks

The Virtual Box GUI doesn't do everything one needs and so I have been experimenting with using cygwin, a free to use bash shell library. Having installed CYGWIN the first thing to do is add the Virtual Box program folder to the PATH, in my case,

    export PATH=/cygdrive/c/Program\\ Files/Sun/xVM\\ VirtualBox:${PATH}

I want this placed in the .bashrc so its always invoked, and thus need to test if is already in the path. I use this code,

    type -p VBoxManage.exe > /dev/null
    case $? in
    0)   # Its already there
         : ;;
    1)   # Add Path
         export PATH=/cygdrive/c/Program\\ Files/Sun/xVM\\ VirtualBox:${PATH} ;;

Now I need to associate a script file type with an execution program. I have tried to use the distributed batch file and binary and neiter of these work, so I have copied cygwin.bat to bash.bat and amended it so that it reads as follows

    @echo off

    :: Dave Levy (c) 2009         Is this GPL?
    :: bash.bat                   Version 1.0

    :: Wrapper to run \*sh scripts from windows explorer/desktop

    c:\\ksh\\bin\\bash --login %\*

I have deleted the -i flag from the bash line, I have made the bash program call absolute, %\* is the DOS batch command file syntax equivilant to $\* i.e. all the command line arguments, so the command line invokes bash.exe in login mode to force the execution of .bash_profile and .bashrc and appends all the other command line parameters including the script file name. :: is a neater comment delimiter than REM. I have associated my batch file with the file type .ksh as the open method using explorer.

Much of CYGWIN is distributed under the GPL and I am unclear if the batch file is included, If so, its GPL since I created the file by copying it.

keywords: howto invoke cygwin scripts from the windows desktop, write a dos batch file to invoke shell


Good British Universities

Why is the LSE not one of the top Universities in the world according to the Academic Ranking of World Universities? I scattered some thoughts on the UK Higher Education system in an article on my blog the other month and promised to look and see what Shanghai Jiao Tong University's methodology thought of, what I thought to be three highly competitive British Universities, i.e. LSE, Sussex and Warwick, which had failed to make the top 100 of their 2007 ranking. I have come to the conclusion that what seems to me an anomaly, illustrating either a flaw in the methodology, or a misuse by me as the ranking's design goal does not meet my needs. However the same criticisms I have discovered are also mentioned on Wikipedia in their article on ARWU as part of a discussion on University Ranking. On further study, I feel the breadth of the index is incredibly narrow. I also question the appropriateness of the individual scores for the purposes they claim. The use of the survey by the Economist and EU Commission and its eco-system really needs to be questioned. I have some more detailed comments about the index and the Guardian's scores if you Read More.

[Read More]

Tuesday Jul 28, 2009

Twitter grows on me

I have been unable to resist twitter and so have become regularly in breach of my original manifesto. I still make posts which imply my location and that I am not likely to be online for a period but have become involved in conversations and more recently I have been trying to build karma on lazytweet. As a result I have removed the twitter widget, which displayed my most recent tweet from this blog, and replaced it with a twitter button, which takes you to my twitter page.


Thursday Jul 16, 2009

And Google's Android

In case you havn't heard, Google have ported their mobile phone OS, android to x86, and made a live- cd version and so it can run inside Virtual Box. It looks like this..

Android in VB Screenshot

Since the hardware to make calls isn't available the functionality's a bit limited :)


Another Virtual Box screenshot, this time Windows 7

This is what Windows 7 beta looks like running inside a Virtual Box.

W7 in VB Screenshot

I have downloaded objectdock and opened a sticky window. Its not very quick, but my first suspicion is that its a bit short of memory. That's the problem with using a 32 bit host.


Sunday Jul 12, 2009

The personal is the professional, using Google calendar

I have been using Google calendar and the Sun calendar for a while now, and ideally like to read them through one viewer. Today I had to upgrade one of the laptop's I use to connect to Google calendar. The best viewer I have found is Thunderbird via the Lightning add-on. This also needs a second add on, the Provider for Google Calendar. I had to reinstall these earlier today and found this blog post entitled How to integrate Google calendar into Thunderbird very helpful. The other tricky bit is how to find out the login credentials and while one should be able to remember one's Google login and password,the URL of the calendar is a bit trickier. (You need to use the web interface and examine the calendar settings, which the article above describes.)


[Read More]

Thursday Jul 02, 2009

You'd think I know where I am when at home

Been mucking around with the ipodtouch having rescued it from the family for the last week. I have been subject to the "can't find your location" feature while at home. Google points me at Skyhook Wireless' site at GetSatisfaction and I discover that like Plazes, it uses a database solution, in this case run by Skyhook, who explain how it works on their site. This means that you need to be connected to the net to discover your location, but since that's true of the map application, its not too onerous a constraint.

For a 'touch, I need to find out my router's MAC address, which is harder than I'd like; it doesn't seem to display in the control panel. I was pointed at NetStumbler, but it has to run on an operating system it supports with wireless. NB this seems to exclude Vista 64 and obviously in retrospect my desktops, so on my third install I finally discover the address and use it to update SkyHook's database. I need my Longtitude and Latitude for this, which I have never bothered to record, so I used to get this because its easy.

I had to wait ten days, but its working now.


And now I have a Centos VM

The reson for upgrading my Virtual BOx config is to install a Red Hat Centos image. I chose 4.7 because this seems jolly popular within the hosting community and I need a new host for my web servers. Two pieces of advice

  1. Download the x86 DVD image, I couldn't see how to use the multiple disk images with Virtual Box.
  2. It installs an SMP and uniprocessor version and grub is configured to start the SMP version as default. This thread, entitled CentOS 4.7 guest won't start, suggests that one should configure PAE/NX=on for the SMP image. This is not the default. Anyway works for me.

Now I need a manual to help through all those little differences between it and Ubuntu. Is been a couple of years since I played with Red Hat's Linux.



I have reduced the number of tags available in the banner. You can still use Google, or the Yesterdays Words page here which has a number of search tools for this blog.

Virtual Box 2.2.4 & Windows XP

And with one might bound he was free..................

I downloaded Virtual Box 2.2.4 a couple of days ago, but when I tried to install it on my XP SP/3, the install process failed and rolled back. This trouble ticket, #3701 details how to fix the windows registry which was damaged at v2.2.0.

Thanks to those who helped me find it.

tags: ""




« July 2009 »