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} ;;
    esac

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

tags:

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.

tags:

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 :)

tags:

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.

tags:

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.)

tags:

[Read More]

Thursday Jul 02, 2009

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.

tags:

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: ""

About

DaveLevy

Search

Archives
« July 2009 »
MonTueWedThuFriSatSun
  
1
3
4
5
6
7
8
9
10
11
13
14
15
17
18
19
20
21
22
23
24
25
26
27
29
31
  
       
Today