Thursday, June 12, 2008

Web Mockups using Qt Designer

I teach a course in web usability and have been using a number of tools for the mockup assignments. We have used Visio, Denim, Mockup Screens and even PowerPoint! at various times but nothing has really worked well. I had taken a quick look at the osx development environment with the idea of demonstrating it as a UI builder.

This led me to looking at Ubuntu tools for designing user interfaces. We found Qt Designer and Glade and so installed them both.

First up was Qt Designer from Trolltech which was a blast. It has most of the widgets you want and an easy to use interface. Nice piece of work. The other neat thing is when you preview your form, not only to the widget work, but you get to choose which window manager look you want. We mainly choose windows and the result looks and acts like the interface you wish to demonstrate. Here is a silly example done in about 2 minutes just to get an idea of what could be done.

The end result is something you can demonstrate to end users so they can get an idea as to how the controls will work in the interface, so you can do usability testing on the design before starting the work of building the damn thing.

The linux version is really snappy and produces a nice looking form. However, our department is microsoft-centric so i needed to find a windows version, preferably free. It appears there is an older non commercial version which i downloaded from here. The Getting Started manual is on the Trolltech web site.

Tomorrow: install the windows version and see if it is any good.

BitTorrtent on Ubuntu

Today we decided to test out the BitTorrent peer-to-peer (P2P) protocol. BitTorrent has gained great popularity as a fast way to distribute large files - much quicker than using http or ftp to download from a web site. For example, I regularly download linux distros in .iso format for keeping and eye on what's new. There is a lot of innovation going on and this is a good way to find out. But it is time-consuming to download .iso files and vmware files - which are the other large files we regularly obtain. In fact, some sites ONLY make files available as torrents so you need to do this.

The official client is available from the BitTorrent site and is at release 5.2.0 (Linux). However, the synaptic package manager includes Transmission, a bittorrent client so we decide to try it out.

Transmission - Transmission is a simple BitTorrent client. It features a very simple,
intuitive interface (gui and command-line) on top on an efficient,
cross-platform back-end.

Installed with package manager and it places a Transmission menu item on the applications,internet menu. When you run the program it provides a simple interface. Select Torrent, Open and select a.torrent file that you downloaded from a web site. A torrent file (to quote from wikipedia)
...contains metadata about the files to be shared and about the tracker, the computer that coordinates the file distribution. Peers that want to download the file first obtain a torrent file for it, and connect to the specified tracker, which tells them from which other peers to download the pieces of the file.
In the screenshot you can see i am downloading Nostalgia, a vmware appliance to create a DOS virtual games machine with CD support.
See: http://www.vmware.com/appliances/directory/126.

It can use openDos but i have my original ms-dos floppies and even a sealed in plastic retail copy so I'll use those. I first unpacked the nostalgia.zip archive and extracted:

dos.nvram
dos.vmsd
dos.vmx
DR-DOS-1.vmdk

to a folder in my home directory. The question is - where do the VM's go? Ok we will see if it can be done from the home folder. From the menu we select Applications, System Tools, Vmware Server Console. It tells us an update is available from http://www.vmware.com/info?id=504

Tomorrow - vmware with nostaglia?

Update: I am really liking Transmission and i also discovered the devede can take most of the downloaded video files and turn them into regular dvds. I had used Roxio in the past to do this and it performs quite well. However, that program is windows only and it is a pain having to copy the large files over the network to the last windows machine (a shuttle XP).

Friday, June 6, 2008

Package Manager Problems

I've been busy trying out new programs and adding repositories and today the synaptic package manager stopped working. It would run and then disappear.

I did a quick test by opening a terminal and issuing the command:

sudo apt-get update

which resulted in an error message

Segmentation fault (core dumped)

which is serious. So did some digging around the net and found there is a bug that exhibits the following behavior:

  • Apt-get update starts to update then runs out of Cache-Limit space
  • This corrupts some files in the /var/lib/apt/lists folder
  • Next time you run apt-get it exits with a core dump error
The solution was to first back up all the lists by copying the folder to a safe location. Then i used the following command to delete the files:

sudo rm /var/lib/apt/lists/* -vf

Deleting the lists folder removes the corrupted files but there is still the Cache-Limit problem. The next step was to increase the default cache used by the package manager. This was done by editing the configuration file in /etc/apt/apt.conf.d with the following command:

sudo pico 70debconf

and inserting a new line with:

APT::Cache-Limit "118388608";

and saving the file. We then did:

sudo apt-get update

which recreated the lists. We were now able to run the synaptic package manager. For more details see the excellent post by Ray Ward at:

https://bugs.launchpad.net/ubuntu/+source/apt/+bug/113424

Thursday, June 5, 2008

Greenstone on OSX



The idea is to test how the Greenstone digital library software works on version 10.5 of OSX as there were issues with greenstone the last time i tried it on osx some years ago.

Greenstone has two dependencies, you must have a java virtual machine installed as well as the open source imagemagick software. OSX comes with a JRE already installed, unlike windows where it has to be downloaded and installed by the user.

Next it is off to http://www.imagemagick.org to download the apple osx binary which has a version for tiger (10.4) and leopard (10.5). The 10.5 package is downloaded.

We then goto http://www.greenstone.org and on the downloads page get the osx binary.

Once the files are downloaded we created a folder called ImageMagick in the Applications directory and dragged the ImageMagick-univeral-apple-darwin9.3.0.tar.gz file to that folder.

Next we navigated to the Applications, Utilities folder and double-clicked on Terminal

At the gnickers$ prompt we issued the following commands (pressing Enter after each command):

cd Applications
cd ImageMagick
ls -al

You should see the file ImageMagick-universal-apple-darwin9.3.0.tar.gz

Now we type the command tar xvfz ImageMagick-universal-apple-darwin9.3.0.tar.gz and press enter. A whole bunch of files are extracted into a folder called ImageMagick-6.4.1

We then set the MAGICK_HOME variable to the folder by typing the following command:

export MAGICK_HOME="/Applications/ImageMagick/ImageMagick-6.4.1"

Then we set the path to include the bin directory holding the executable files:

export PATH="$MAGICK_HOME/bin:$PATH"

Then we set the download path with the following command:

export DYLD_LIBRARY_PATH="$MAGICK_HOME/lib"

Now comes the test to see if this actually works. We issue the following commands, pressing enter after each one:

convert logo: logo.gif
identify logo.gif
display logo.gif

Success, we see the ImageMagick logo open in a window. So now we can process images in greenstone which is the next task.

We return to the downloads and double click on gsdl-2.80-macOSx.tar which extracts the files from the archive into a folder called gsdl-2.80-macOSx. Inside the folder is an installer called setupMACOSx.command so we double click on it.

A warning message appears about his being a script that was downloaded from the Internet. We click on OPEN. Just like the windows installer it begins searching for a java virtual machine but unlike the windows version it actually finds it and the install begins.

We select a language, click Next, accept the license agreement and it installs to /opt/greenstone. There is a major difference here that with the windows version which has a local install that setup up a mini-web server that only responds to localhost requests. The OSX version is a web library version that requires the apache webserver. This is interesting as the machine i am installing on is running OSX 10.5 Server edition so all it already has a web server. However for users of the desktop version this is usually not the case.

However, there is an excellent MAMP package for osx at http://www.mamp.info which i have used before. This is a big step tho - would the average user wanting to run greenstone be also willing to install a full web server? It certainly would be interesting and also allow OAI harvesting...

There is also a Custom option. This seems to have the same settings that are the default on the windows version, the librarian interface, the web library, plus the export to CD/DVD and the demo collection.

We choose the Custom option and click Next, Next and then click Install. It does not look as if the custom option installs a web server. The file /opt/greenstone/library.txt indicates that greenstone is setup to expect /opt/greenstone to be at http://localhost/gsdl and the greenstone cgi directory at /opt/greenstone/cgi to be accessible as a cgi executable directory.

This means you must edit the apache webserver configuration file which is http.conf and add the following directives:

ScriptAlias /gsdl/cgi-bin"/opt/greenstone/cgi-bin"
Options None
AllowOverride None

Alias /gsdl "/opt/greenstone"
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow.deny
Allow from all

Once this has been saved and the web server restarted you can then access Greenstone by pointing your web browser to:

http://localhost/gsdl/cgi-bin/library

Since we don't really intend to run greenstone on osx we will stop here. We might work at getting it installed on Ubuntu and will certainly have the students test out and document the web server install next term for the internet services course.




Tuesday, June 3, 2008

Greenstone Digital Library Software

We have used the GSDL software from UW in NZ under windows but it was orginally developed for Linux and then ported so we wanted to try it out on Ubuntu. The longer term goal is to then use the server install with the Ubuntu server machine so that it can do OAI and Z39.50 harvesting.

Anyway Greenstone has some dependencies, you need a JVM and the ImageMagick image processing utilities. We had installed Java a long time ago so all we needed to do is to run the package manager an install imagemagick.

Next it is off to the Greenstone home page at http://www.greenstone.org/download to get gsdl-2.80-unix.tar.gz and to open it with the archive manager. We drag the gsdl-2.80-unix folder to our home directory and take a look at the readme file. The home page says:

To install this distribution, extract the gzipped tar archive and run the setupLinux.bin Java-based Installer program. Alternatively, run the Install.sh shell script from within the gsdl-X.XX-unix/Unix directory (see the Installer's Guide for more detailed installation instructions).

The readme notes look a lot older and say Unix installation: execute setupLinux.bin but the date is Nov 2007 and the version is 2.75, however there is a setupLinux.bin file but it does nothing.

Ooops we forgot you have to do sudo ./ so we execute sudo ./setupLinux.bin and the installer runs. We get a similar problem with version 2.80 that we got under windows - it can't seem to find the JVM. In windows we had to point it to c:\program files\java\something\java.exe and from the error message it says it can't find a valid JRE.

This application requires a Java Run Time Environment (JRE)
to run. Searching for one on your computer was not successful.
Please use the command line switch -is:javahome to specify
a valid JRE. For more help use the option -is:help.

I must admit not to liking java very much - my experience has been it is a pain to install, you go to the sun site and there seem to be many versions all poorly explained, there are lots of updates that take tons of disk space - the clients seems very picky about versions so that lots of things fail due to incompatibilities on then it is dog slow to load on a web browser. So do we need a JRE?

So it's off to the package manager to search for JRE and yes it is there and no we do not have it installed so we now install it. I think the confusion was when we installed 'Java' before using either the restricted options or automatix it just installs a web browser plugin. The Sun Java 6 Web Start control panel is there and i tested the web browser using pages from our cold fusion server that have applets. The problem here is that 'java' is too generic a word. Anyway with the JRE installed we restart the installation program.

The Installshield installer runs and searches for a JVM. Can't seem to find one.

So tomorrow we have to find where java is located and run the install using the -is:javahome switch.

Sunday, June 1, 2008

Mac Emulation on Ubuntu

We had run Basilisk years ago on XP and found it useful. While it only emulated a motorola 040 mac and not a power pc cpu there were still lots of useful software it could run.

We found the CD we had stored the rom chips extracted from our bevy of beige machines. We have everything from a mac portable, mac plus, se, se/30, iisi, iici, 650, 680, 6100, 8550, color classic, 475, 575, 580, LC II, LC III, and so forth and some clones.

Before we got to test that we found something else we had to try. While researching programs for windows that could run off a USB stick without being installed we ran across mac-on-a-stick at

http://nothickmanuals.info/doku.php?id=minivmac

This uses the Mini vMac emulator to emulate a black and white mac plus. See: http://minivmac.sourceforge.net/

From the FAQ:

The biggest current difference is that Mini vMac emulates the earliest Macs, while Basilisk II emulates later 680x0 Macs. The fundamental technical difference is that Basilisk II doesn’t emulate hardware, but patches the drivers in ROM, while Mini vMac emulates the hardware (with the exception of the floppy drive).

This is a neat application. The mac-on-a-stick folder now contains a number of disk images and the rom file from a plus. It is easy to create disk images with macs and once i sort through the boxes of old mac cd and floppies i should be able to find some really old neat stuff like shufflepuck and mac write and mac draw.

The application we found is Mini Vmac.exe which means we can run it under Wine - so we have linux emulating windows emulating a mac. When you click on the app to run it you get a window called mini vmac and from here you can select a disk image from the file menu. We have a hard disk image formatted with the mac hfs file system that is 24mb in size. Once we open it the 'Welcome to Macintosh' splash screen appears and we are running a mac with system 7 and 4mb of ram.

This is not designed to emulate a recent mac but to enable you to run very old software of which there is a bunch stored around here. Will have to pull some out tomorrow.

We also used the package manager to install Basilisk2 which puts itself into /usr/bin so you have to root around the filesystem to find the executable file. This has a lot more settings so we need to remember what we did before. First we decide to create a basilisk folder in our home directory and copy the executable there and also the quadra and performa rom files.

Next in basilisk we need to create a mac volume. We select the Volume tab and click Create and createa 80 mb 'volume' called mac. We then set the Boot From to CD-ROM and insert a mac os 8.5 CD and click Start. This makes basilisk dissapear. We then run it again and goto the Memory/Misc tab and select 128 mb of ram, a Quadra 900 as the model with a 68040 cpu and the quadra rom file. In the Serial/Network tab we select eth0 as the network interface. Now we click start and the basilisk window appears briefly and the cd spins. The windows dissapears.

We decide to try again using the mac os 7.61 cd this time and emulating a IIci using the performa rom image. We also check to ignore illegal memory accesses.

We click START and the basilisk ii window appears and the 7.61 cd boots and recognizes the 80mb unformatted volume and offers to format it. We click the install macos icon. We the realize that while 80mb is fine for system 6.08 or 7.01 an install of 7.61 will take a whopping 70 mb - talk about bloat. So we cancel the install, rerun basilisk and delete the 80mb mac file and replace it with a huge 500mb volume and then click START. We initialize the giant hard disk and start the install, choosing to leave out the opendoc and cyberdog. maclink and those other optional stuff. The install flies through, a lot quicker than on the original mac.

Once the install is done we restart the mac but it reboots to the CD instead of the hard disk as it would normally do. No problem we use the Apple, startup disk control to choose the mac volume as the startup disk and restart. Up comes mac 7.61

Now we need to grab some of that old tyme software from the pile and do some installs.


Before that we went back to the video tab and changed the size of the window to 800x600 and then changed the boot from cd-rom to any so now it boots to a reasonably sized window from the hard disk.

Now to find the original civilization cd to see how it looks. I seem to recall the one of the problems with the original basilisk on windows was some pixellation of the graphics in that games which led me to getting an old mac just to play it...which somehow led to getting a lot of old macs.