Friday, November 25, 2011

Upgrading to Ubuntu 11.10

We decided to upgrade the HP compaq 8510p laptop to the latest desktop and then to add the server stuff we need (LAMP, various lamp apps, etc). The old 80gig hard drives were too small and we were running ver 9.x which did not support the wireless. So we replaced the hard drive with a new 500gig Seagate hybrid hard drive (SSD/SATA) that should be a lot faster.

Installing was quick and it did fix the wireless problem. However, there are a number of issues with the new release (some minor, some major)

  • The Unity interface is annoying (slower to find what you want)
  • Windowshade is not longer an option for windows
  • Synaptic package manager is not longer included
The first issue was to switch back to Gnome.  First we installed it by entering the terminal and doing:

   sudo apt-get install gnome-shell

and then restarting and logging in again. This provides some login option. First time around we choose Gnome but the screen menus were scrambled and the unity right side dock would appear!  Logging out and choose Gnome Classic at login solved that problem. I can't figure out to how to get windows to roll up, a feature i've been using since mac os 7 and one that is much more usable than having to minimize windows in the way and then go all the way down to the bottom bar to retrieve them. I also seem to recall Unity had that annoying Windows 7 behavior that when you move a window to the side of the screen it maximizes the window. What dumb idea, you move windows to the side to get them out of the way because you can't roll them up. It is fast to just throw a window to the side, doing that does NOT mean i now want it to take up the whole screen. Dumb usability ideas - don't they test these things with real users?

The next step is to download and install all my regular apps and then install LAMP. I did this many versions ago using TASKSEL and the results were awful - lots of problems. So i have to decide between 3 install methods:

Method 1 - TASKSEL(easy but does it work better now?)

sudo apt-get install tasksel
sudo  tasksel
select LAMP Server

Method 2 - Manually (more work to install but possibly most stable?)

sudo apt-get install apache2
sudo apt-get install mysql-server
sudo apt-get install php5 libapache2-mod-php5 php5-mysql
sudo /etc/init.d/apache2 restart
sudo apt-get install phpmyadmin

Method 3 - 'Bundle' method (newer so maybe give it a whirl?)

sudo apt-get install lamp-server

Of course I have yet to find an informed article that can discuss the pros/cons of the 3 approaches. So it is trial and error.

On the plus side, the laptop is very snappy. Next to get back my apps... Ah good, the Ubuntu software center has synaptic so let's start with that...

PS - one new app that is interesting is under Internet, Desktop Sharing. We will be trying this out as we need to find a good way to showing distance ed students how to do particular tasks. We having been taking screen shots and turning them into movies using Camtasia Studio but that is proprietary and you have to update them when things change. I'd like to be able to stream my desktop to 1 or more students so they can see a process and ask questions.

Friday, November 11, 2011

Lucicat eBook Server

We downloaded the .zip file from http://lucidor.org/lucicat/ and unzipped them into a lucicat folder in the root of the web site.

Next we opened lucicat.ini in a text editor and set the following settings:

db_type: mysql
db_host: localhost
db_name: lucicat
db_user: lucicat
db_password: lucicat
db_prefix: luci_

We then go to the phpMyAdmin page and create the blank lucicat database and a user called lucicat with a password of lucicat who has all privileges on that database on localhost.

Next we edit lucicat/server/lucicat_settings.php and set the following:

$db_addr = 'localhost';
$db_name='lucicat';
$db_user='lucicat';
$db_password='lucicat';

Next we have to figure out how to set the catalog but i can't seem to load the manual into Calibre.

Tomorrow

Read manual and create a catalog


Thursday, October 27, 2011

Adding MARC Records to Koha


Now that the laptop is running fine we decide to add some records to our system. We have a number of downloaded MARC records from various sources such as the library of congress, weldon library, in batches of 25, 50, 500, 2000 etc for testing.  All files have an extension of .MRC

To batch load records

Log in to the staff menu (http://localhost/kohaadmin)

  1. Select Tools, Stage MARC records for import
  2. Click Browse
  3. Select a .mrc file
  4. Click Upload File
  5. Click Stage for Import
  6. Click Manage Staged Records
  7. Click Import This Batch into the catalog

We first try 2000 records and begin the import into the catalog at 10:11am. This took 40 minutes! Obviously we are not running a fast server but a low-end laptop (2ghz duo core, 3 gig ram).


Tuesday, October 18, 2011

New Koha Laptop

We had been using Mizstik's Koha Live CD to install Koha to USB sticks. This worked fine for the 32bit version and on my old Eurocom labtop but the new release 8 is 64 bit and that poses a problem.  It is harder to create a USB stick in newer versions of Ubuntu as it is now a install with manual partitioning of the USB 'hard disk'. The old version had an install to USB option that was automatic. The other problem is that students may have 32bit systems at home so their USB stick may not work. Finally the Eurocom had a 32bit cpu and only 1 gig or ram so time to upgrade.

The 'new' Koha laptop is a compaq 8510p with 4 gig. I tried installing a mini-pci wireless card but the machine uses a proprietary connector but the wireless USB stick that came with my DVD worked fine. It ran the 64bit liveCD no problem and installed perfectly to the hard drive. This version is 3.2.5,  has all the language packs, Zebra support and is a Z39.50 server. There is a Google discussion group at http://groups.google.com/group/kohalivecd

Next we set up Koha:

  1. run firefox and go to http://localhost/kohaadmin
  2. the username is kohaadmin and the password is kohalivecd
  3. we select en as the language
  4. the mysql database is koha running on port 3306 under user kohaadmin
The mysql root password is kohasqlpwd, we will install a mySQL client for database admin, although you can also use the web-based phpMyAdmin (http://localhost/phpmyadmin).

The public Z39.50 server uses:

  • port 9998 for bibliographic records with a database name of biblios
  • port 9999 for authorities with a database name of authorities

No username or password is required to search the Z39.50 databases.

Once the tables are populated it's time to set the configuration for Koha We select the MARC21 format for our records (see: http://www.loc.gov/marc/bibliographic/)
We select the following options:

  • Matching Rules for bibliographic records
  • Fast Add minimal record format (for ILL)
  • Simple MARC format (for multimedia)
  • Default values for departments, status etc
  • Coded Values
  • Z39.50 servers list
  • Sample patron types and categories
  • Sample Label and Patron Card data
  • Item Types
  • Sample Libraries
  • Sample News
  • Default Messages
  • Message Transports
  • Sample patrons
  • Sample Holidays and all the rest
The import process starts at 3:02 and finishes in under a minute. The next question is the indexer/search engine. Koha can use Zebra but it is a manual process to configure and to update. Since it is only required if you go over about 10,000 records and for doing demos on a laptop we don't need that many records we decided to skip Zebra for now.

Once installed we decide to test it out. Running a terminal and typing ifconfig procides us with the IP address of the koha laptop. First we test out the admin login by goint to http://192.168.1.114:8080/ and the staff client page is displayed.


Next we test out the OPAC by going to http://192.168.1.114/opac (which is running on port 8081) and the OPAC screen is displayed.



If you just go to the default port for the web server you get a message that:

This is the default web page for this server.
The web server software is running but no content has been added, yet.

This means you can create a library portal that incorporates a number of services or apps along with the library catalog in Koha. I've always wanted to show students how to install a CMS and then to create a portal that is linked to Koha.

To test out the Z39.50 we run Greenstone 2.84  and click the Download tab and fill in the z39.50 settings


Only problem is the Greenstone Z39.50 client seems broken again. It was working before as we had downloaded batches of 500 records from the Library of Congress LCDB database server (lx2.loca.gov:210).  A search for SQL in the book title would be @attr 1=4 "SQL", a search for books on php and mysql would be @attr 1= 21 @and mysql php and an author search for JK Rowling would be @attr 1 = 1003 Rowling,J.K. I'll have to try this in the lab where i think it was working correctly last term. See: Library Of Congress Z39.50

We decide to look for a standalone client and end up at http://www.biblio-tech.com/html/z39_50_clients.html which lists 5 clients and http://www.loc.gov/z3950/agency/resources/software.html which has a lot more information. We hit on the
Mercury Z39.50 freeware client which we download from http://www.basedowinfosys.com/projects/mzc in ZIP file format. Once installed we click search, database and it has goodly list of servers from Acadia to York. The Add button allows you to add a server. But there is no place to put the 9998 port number. There is a list of port numbers used but no 9998 and no way is indicated of adding a number although we suspect you could edit \Mercury Z39.50 Client\databases\ztargets.xml. We try anyway and as expected:

192.168.1.114
Result Count: 0
Records Returned: 0
Error Message: Connect failed (10000) 192.168.1.114

Then we try adding the port number to the address and we get:

192.168.1.114:9998
Result Count: 0
Records Returned: 0
Error Message: Database unavailable (109) Default

Which seems to indicate the connection was successful. We test against LC and it works and we export the results as a MARC file and view the .mrc file in MARCedit and it looks ok:

=LDR  00775nam  22002295a 4500
=001  13962025
=005  20050511163127.0
=008  050511s2006\\\\inu\\\\\\\\\\\000\0\eng\\
=906  \\$a0$bibc$corignew$d2$eepcn$f20$gy-gencatlg
=925  0\$aacquire$b2 shelf copies$xpolicy default
=955  \\$apc03 2005-05-11
=010  \\$a  2005927399
=020  \\$a0672328429 (pbk.)
=040  \\$aDLC$cDLC
=042  \\$apcc
=100  1\$aFells, David.
=245  10$aAdvanced MYSQl database programming /$cDavid Fells; [edited by] Shelley Johnston.
=250  \\$a1st ed.
=260  \\$aIndianapolis, IN :$bSams Pub.,$c2006.
=263  \\$a0602
=300  \\$ap. cm.
=963  \\$aVanessa Evans; phone: (317) 428.3211; fax: (317) 428.3310; email: vanessa.evans@pearsoned.com; bc: vanessa.evans@pearsoned.com

ToDo:
The thing to do now is to load up Koha with some records which means i'll have to refresh myself on how Koha works. I bought the packt "Koha 3 Library Management" book so will give it a read tonight.

Friday, September 23, 2011

Bootable USB Stick and Ubuntu 11


It's taken awhile but i've gotten to like 11.04 but there is one function from 9.04 that i truly miss. In the older version you could easily create a bootable usb stick by selecting System, Administration, USB Startup Disk Creator which automated the process.

That is now gone and the Startup Disk Creator just installs a bootable 'LiveCd' on your USB stick which is not the same thing. A google search reveals lots about installing Ubuntu from a USB but nothing much on installing a real system to a USB. Eventually i figured it out and the process is logical as it is the same as any manual install, but it takes more work than the old USB startup disk creator functionality.

In case someone has to do this here is how i did it. This process used an 8 gig usb stick and the 32bit desktop LiveCD for widest compatibility, a larger stick is better. I decided to create 4 partitions and to use all the space on the stick.

Boot a computer with the LiveCD. This requires your boot priority to have the optical disc 1st. If the Live CD does not boot check your BIOS boot settings (press DEL or F1 or F2 or F10 at startup to enter the BIOS)

When Ubuntu has started insert your USB stick and double-click the Install Ubuntu 11.04 icon

Tick the Install 3rd Party Software checkbox and click FORWARD

At the Allocated Drive Space dialog select the Something Else radio button and click FORWARD

This displays the drive partitioning tool which is used to manually set up Ubuntu. A single existing hard drive in the computer is listed as /dev/sda  formatted as NTFS. Your USB stick is listed as /dev/sdb1 with a FAT32 partition and a size of 8018mb


Select /dev/sdb from the Device for boot loader installation pull-down menu and then select your USB stick (/dev/sdb1) and click NEW PARTITIONTABLE to wipe out any existing data

You need to create the following drive partitions:

/boot which is the boot partition. This is where programs critical for booting the system reside
/ which is the root directory. Programs used for running the OS are installed here
swap which is reserved disk space for use as virtual memory
/home which is your home directory for storing files

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 128 in the New Partition Size text box, select /boot from the Mount Point pull-down menu and click OK

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 2000 in the New Partition Size text box, select swap area from the Use As pull-down menu and click OK

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 3000 in the New Partition Size text box, select / from the Mount Point pull-down menu and click OK

Select Free Space under /dev/sdb and click ADD to display the Edit Partition dialog. Type 2891 (or whatever is the remaining space) in the New Partition Size text box, select /home from the Use As pull-down menu and click OK






Click INSTALL NOW to being the Ubuntu installation process

When the Who Are You? Dialog is displayed type in your full name and choose a name for your computer like gnickers, enter a username and a password and select the Log in Automatically radio button
Click FORWARD and Ubuntu is installed to your USB stick (this takes awhile....)
When complete Remove the LiveCD and press ENTER to restart the computer to the USB stick


Saturday, July 2, 2011

Music Center Project






This has been kicking around in my head since i found three discarded Profusion/X music center devices. They ran a customized version of Red Hat and connected to a licensed music server to stream audio to stores in a mall. Gave one away but kept two to play with.



Obviously, the license had expired but the audio form factor of the case intrigued me and upon opening it up i found a Via mini-ITX board with a C3 533mhz processor, 128 mb of DDR ram and a 40 mb hard drive. May not seem promising but that board packs a lot of tech into a small space, there are 2 DDR ram slots, two USB 2.0 ports, 10/100 ethernet, onboard vga video, PS/2 for keyboard and mouse and 3 pci slots plus a front panel DVD drive. Not too shabby.



After rummaging around in the parts cabinet i came up with two 512mb DDR 400 sticks, a 200 gig IDE hard drive, a pci angle bracket and a ATI rage pro pci video card and a Packard Bell Fast Media remote plus the Cambridge Audio 2.1 speaker set. Unfortunately the pci angle card was not quite the right form factor but i was able to find one on eBay for $5. So for now we upgraded the ram and the hard drive and replaced the stock optical with a combo drive. Not that we will be burning cd's on this unit but it helps to be flexible. When the angle card arrives we can upgrade from the onboard video.

The system booted fine and we went to the BIOS to change the settings. First we assign 64mb to the onboard video, optimize the BIOS and do an 8X overclock of the C3 cpu resulting in a whopping 1Ghz of speed (while you can go above 8x the board locked up at boot). The board's BIOS is a wonder of flexibility with lots of settings. So now we have a 1gig pc with P3 performance - what to install?

We used to run XBMC on a revo so it was a first choice. Unfortunately the live CD does not run on such old hardware, in fact all the media distros we tried failed to initialize the x-windows GUI or failed to boot. Many are optimized for i686 and won't run on an i386 clone cpu. So we tried Microsoft Windows XP pro which did install but failed to install drivers for the network (which is realtek chip), the audio etc. It ran but slowly and hunting down XP drivers on the internet is always a frustrating experience. What about an older version of Ubuntu? So we haul out the 9.04 desktop 32 bit cd and it boots and installs perfectly. Video is not bad, internet works and so does the audio and USB. We remove some of the uneeded services and apps and get a reasonable performance, hey to even runs the GIMP and OO at 2002 speed. You could even use this as a desktop in a pinch, except no flash in the web browser.

The only problem here is that just about any media software won't run on the C3 cpu. The included movie player and the included rhythmbox audio player works but xbmc and vlc won't install. However, we set rhythmbox to run automatically at boot and have in inhale 3 gig of FLAC audio files from the network.

Next we attach the speakers and put it in shuffle mode. How does it sound? - Excellent as a near-field sound system in a small room. Quite pleasurable while working. It's like listening to 70's FM radio. In fact I am using this with singles from 70's/80's and who knew Alice Cooper, ELO, Deep Purple, et al could sound good? I should hook up the Roland monitors to test and then the Spherex 5.1 system to compare.

The suprising thing about audio is that you never know what might sound good for certain applications. I recently hooked up a pair on 1969 Dynaco A-25 speakers to a 20 watt amplifier and fed it from a original Sony walkman cassette. This is certainly not an 'audiophile grade' system but it sounded quite good. In fact i ended up listening to it all week, trying out different kinds of music and inputs. The conclusion was this system sounded best when fed early 80's and 90's funk from analog sources (not CD's!). Gap Band, Dee-Lite, Morris Day, etc all sounded very good in a small room at middle field distance.

Time for some lunch...

Upgrades:

  • better video using a fast pci video card
  • customize LIRC to use the packard bell remote
  • replace default unbuntu window manager with a lighter one
  • wireless
  • replace current board with a modern mini-ITX or mini-ATX board?

Tuesday, May 17, 2011

Calibre Content Server



The Calibre content server is working fine on the home network. It is currently running on the macbook/win7 laptop. When a device with an OPDS-capable ereader software like Stanza is running the Get Books icon displays the calibre content server library and it is easy to download books to the device such as an iPad, iTouch or Android tablet. Once the course is over i may install a permanent content server using an old G4 macbook.

The problem is the work network. Devices cannot detect the content server when the laptop is running on the UWO wireless network. Devices just display 'Searching....'. This is a problem - you can't demonstrate how it will all work.



The hack i am testing now is to run a rogue wireless access point that is not connected to the internet. A standard linksys wireless router should enable the macbook to get an IP address from the linksys DHCP server and then running calibre should make it available on this wireless network which a device then connects to. Once on that wireless network the content server should be found.

Step 1 - configure the wireless Router

Had to run Fing (look@lan replacement) as the new firmware for the router doesn't display a very good dhcp clients table. Armed with the IP address i set up the linksys to be a dhcp server with an ip range of 192.168.1.20 to 192.168.1.30. We then unplug the cat 5 cable from the linksys to the network router so that it only serves ad hoc connections.

Step 2 - connect laptop to the wireless router

We set the macbook to connect to the LIAM network and lo it picks up the dhcp server and gets issued the IP address of 192.168.1.20 which is as it should be.

Step 3 - run the calibre content server

Done!

Step 4 - connect ipad to content server

Odd, iPad says unable to join LIAM network. It can see the network but refuses to connect. Ok , next we fire up the iTouch and change it's network to LIAM. It connects. We run Stanza and click Get Books. The calibre content server on macbook is listed and there are all the books! We select one and it downloads ok. I wonder if the iPad mac address is not in the allowed table, yes it was not so we add it. We run Stanza, click Get Books, Shared and success. We can now read the Saskatoon Star Phoenix articles we downloaded from the RSS feed in class today.

So the solution to uwo network problem is to bring in our own wireless device and run an ad hoc wireless network. We will test this tomorrow for saturday's THATcamp session.