Wednesday, April 22, 2009

Restoring Joomla Backup to XAMPP

The idea is to be able to restore different backups in jpa format submitted by students. This would allow for evaluation of student projects without requiring the IT staff to put in a server. Each project + joomla + xampp + portable app environment could then be burned to a CD for an archival copy of the project -ready to run.

First step was to copy the kickstart.php file into the /xampp/htdocs/joomla folder and to place a backup.jpa file in the same directory. Next we open a web browser and goto:

http://localhost/joomla/kickstart.php

select the backup file and click the green START button. It tells us it has:

Read: 60642 bytes
Written: 153846 bytes
Processed: 41 files

but there is no message about click here to run the joomla installer. We had chosen the default AJAX method. Let's try the javascript alternative. Actually the problem was a loose connection.

Seems to be a lot of 'waiting for localhost'...ah we are now up to 82 files...123 files...164...205...246...287...328...451...492...533...574...ah let's take a break! 1394 files...1845...4797...ah finally! Good thing we had set the php timeout to 999. At least i was able to do some vac on the bedroom and basement.

We click on the here link and it runs the joomla installer. The database is mysql the host is localhost, the username is joomla and the database is joomla.

Congratulations! End of file reached, assuming OK

Success so delete the /xampp/htdocs/joomla/installation directory and test out the web site. It comes up perfect.

Burning to CD

The last step is to burn the entire contents of the usb stick to a cd for a read-only demo. If this works then students can use Joomla to build their web sites using XAMPP running on Linux, OSX or even Windows and burn the whole thing to a CD for handing in. We could even create an autorun file that runs the portable apps executable.

To do this use Notepad to create a file called autorun.inf containing the following lines:

[autorun]
open=StartPortableApps.exe

Save the file somewhere and when burning the CD include this file in the top level (root) of the cd. We fire up toast and make a cd of the USB stick plus the autorun.inf file. We could just place the autorun.inf on the USB stick but the latest windows os malfunction created one to run it's malware/spyware/virus so we got in the habit of deleting the autorun.inf and in fact i find the windows autorun 'feature' really annoying anyway.

Whew - had to remove i bunch of stuff from the cd project, forgot that the USB stick is 8gig. A pared down portable apps environment that had a bunch of apps installed (firefox, compozer, notepad +, analog, report writer etc) plus a bunch of mysql databases ran to 699 mb!

oops - forgot to shutdown the portable apps.exe - so some files were probably open - so we put in the CD and it runs the portable apps environment automatically. We start up XAMPP, open a web browser and goto http://localhost/joomla and of course the windows firewall blocks it - the firewall never seems to figure out that localhost is the same, if you goto localhost from a cd or the hard drive or a usb stick it treats them all differently so you end up making tons of exceptions.

The page errors - why? Ok looking at the XAMPP control panel the servers have stopped. If you try and start them up they terminate almost instantly. Ah we spot the culprit, the joomla configuration.php file was not set up for mobile operation. It has:

var $log_path = 'J:\\xampp\\htdocs\\joomla\\logs';
var $tmp_path = 'J:\\xampp\\htdocs\\joomla\\tmp';

This backup was produced from a MAMP or WAMP installation, not XAMPP. So it's a coaster. No problem, plug in the USB stick and remove the drive letters from the file and burn a new cd.

Ok the new cd goes in an portableapps runs and we start up XAMPP. Apache is running and stays running but mysql has gone down. And now so has apache. Probably they are trying to write log files?

Some further research is needed on how to run XAMPP off a CD-ROM. I found a digg to a blog post called How to run XAMPP server from CD on Windows, but their server is down.

I did find information on a program called AMPstart.exe that goes in the XAMPP folder and uses an AMPstart.ini file in the same folder that should contain:

[database]
overwrite=1
folder=


We go to http://www.ampstart.com/download.php and download ampstart.exe version: 1.2.4.6 and then look at the documentation. Ah - Ampstart is a replacement for the XAMPP control panel - it erases all files needed to start xampp and can also start the web services and open a web application automatically. Add to the .ini file:

[WEBSITE]
website=\path\to\web\app

You can also auto open firefox if it is not the default web browser with:

[WEBSITE]
ExtBrowser=\path\to\browser\executable\file

If you want to make the site seem more realistic in a demo (such as a real looking url instead of localhost) use:


[WEBSITE]
ServerName=somedomain
website=\path\to\web\app

To auto shut down the web server when the web apps ends use:


[WEBSITE]
ShutdownOnClose=1

And to set the duration for the ampstart splash screen use:

[LOGO]
duration=n_second
;default 0 (depending on loading time of web server)

Ok - this will have to be done tomorrow...

Joomla on OSX

Decided to mount some of the joomla projects on the best machine which is the dual g5, now upgraded to 4 gig of ram. The dell 470 is similar in specs but not quite as nice a machine.

First step was to download MAMP and to drag it to applications and then drag the mamp control panel to /library/widgets and start up mamp. The address is on a different port so you have to go to:

http://localhost:8888/MAMP/?language=English

in your web browser and the phpmyadmin control panel is located at:

http://localhost:8888/MAMP/frame.php?src=%2FphpMyAdmin%2F

The next step was to download the current version of Joomla. After unpacking the archive we have a folder called joomla_1 which we need to copy to the htdocs folder of mamp which is located at:

Applications/MAMP/htdocs

First we rename the folder to joomla. With this done we are ready to setup joomla. 

Create the mySQL Database

  1. In phpmyadmin select the Create New Database box and type in joomla and click CREATE
  2. Now click on Privileges
  3. Click the Open New phpmyadmin Window icon on the right hand side
  4. Click Add a New User
  5. We create a user called joomla on localhost with a password of joomla
  6. For global privileges we select Check All
  7. Click GO

Once the new user is added we close off the phpmyadmin windows and go to:

http://localhost:8888/Joomla/installation/index.php

to run the joomla install. In the database configuration screen we enter mysql as the database type, localhost as the host, and joomla as the user, password and database names. We do not enable the ftp layer for now. We name the site gnickers and set up an password for the admin user and install the sample data.

The last step is to delete the installation folder in /htdocs/joomla and then run safari to:

http://localhost:8888/Joomla/ 

to see the sample data and the default theme. We verify we can log in as the admin user. Clicking the Administration menu item loads the back-end control panel. Now let's restore some joomla backups from the USB sticks and take a look.

oops first we better install joomlapack. Off to sourceforge to get version 2.2.1 and then to the control panel to install the extension.

Once installed we configure joomlapack to use joomlapack jpa format instead of .zip and set the backup directory above the htdocs folder. Now to get the restore files from the network. Ok, we copy them to the /backup folder.

Ok - how do we restore? We try administer backup files but there are none listed. We search and find:

JoomlaPack uses the installation procedure of Joomla! to do the restore of the database. The questions that the installation prompts you for and the installation of the "sample" data provide all the information that you need to do a restore, on the original server or a new server. The Joomla! sample data is replaced by your site's backed up data during the reinstallation process. To restore, FTP the files back to your site and go through the Joomla! installation again to restore the database.

Not impressed. First of all you have to extract the files from the archived backup which is not in .zip format because the install suggested changing to .jpa format which is not associated with any program.  Ok, some more searching finds a 'workaround':

download kickstart.php from our download page. Upload kickstart and your backup archive to where you want the root of the site to be and point your browser to "http://www.mysite.com/kickstart.php". Kickstart will extract your archive and then give you a link to start the installer. When the installer finishes, close that window and return to kickstart. The second link is to delete the kickstart.php file, the archive and the /installation folder. 

Let's try it out. We try to install it and the jputils through the extensions control panel but neither work. We look inside the ..zips and they are just php files so we extract them and copy them to the htdocs folder. There is also a native joomlapack tools but this is platform specific - looks like windows executables. So now we have:

kickstart.php
jpa.php
unjpa.php
unzip.php

It would be useful if these programs were incorporated into a RESTORE function bound to a menu item. Hopefully in a future release. We goto:

 http://localhost:8888/joomla/kickstart.php

but it complains there are no backup files in the current folder. duh - for security reasons listed in the install we moved the backup folder out of the htdocs tree. We could use ftp - and in fact we may have to. This is the bottom of the screen.

FTP Options

Host
Port
Username
Password
Initial Directory

Of course that means turning on FTP. For now let's cheat and copy a .jpa backup file to this directory and refresh the page. Ok, now the file is show so we click the START button. It runs through the archive, extracting the files at very impressive speed and the displays:

Please click here to open JoomlaPack Installer restore script in a new window.
DO NOT CLOSE THIS WINDOW!! 
When you have finished restoring your site please click here to activate your .htaccess (if you had one in the first place) and delete the backup archive and this script.


OK. We click the here link and it runs the joomla installer. Since all the options are already filled in we just click next, next, next etc. When finished this message is displayed:

Congratulations! End of file reached, assuming OK

Please press next to continue the restoration process


Ok. We set up the admin user password and it restores the site and when finished this is displayed:

PLEASE REMEMBER TO COMPLETELY
REMOVE THE INSTALLATION DIRECTORY


Which we do and the web site is restored. Ok, let's restore a different site to make sure.

Todo List:

The next step is to try and restore to a portable app environment and then to burn the whole portable app + XAMPP + Joomla to a CD disc. This would allow for multiple joomla web sites to be demonstrated and might be a good method for handing in student projects. You could also just hand in the usb stick...

The test will be the putting of a cd into a drive and then running portable apps, xampp and brining up the joomla web site.

Monday, April 13, 2009

Asus eee PC and Ubuntu

Installing eeeXbuntu

I downloaded an ISO of eeexbuntu (http://wiki.eeeuser.com/ubuntu:eeexubuntu:home) and burned to CD.

My first thought was to boot the cd as a livecd and install from there. This does not seem possible at the eee does not seem to recognize the usb cd as bootable. Here is what i did:

  1. Plug in an ethernet cable
  2. Press F2 while starting up to enter the BIOS
  3. Goto Boot, Hard Disk Drives and set the USB CD-ROM first
  4. Goto Boot, Boot Device Priority and set the USB CD first
  5. Goto Boot settings and disable Quick and Quiet boot
  6. Save and exit the BIOS
  7. When booting press ESC for boot menu

The problem is the boot menu only contains two choices, the internal ssd and the usb/ cardreader. The card is still a vfat partition with just files on it so it can not boot. It is interesting that you can set the card reader to be the 1st hard drive and then set the
removable device to be the 1st boot priority. This should mean you could install to the 16 gig sd card and boot from it using the internal 4 gig for storage. You would have to gparted the sd card as ext2 most likely but it is an idea...

As for now - we need to create a bootable USB stick. The web site list a number of methods so we will try those next.

Making the Bootable USB

We boot an spare ubuntu machine using the burned cd of eeexbuntu. It comes up as a live cd and we do:

  1. Select “Start or install Xubuntu” at the boot menu
  2. Select Applications, Accessories, Terminal from th xbuntu menu
  3. At the terminal prompt we type:
   sudo /cdrom/mkusbinstall.sh --autodetect

Which runs a shell script to set up the USB drive as a bootable device. The script runs and asks us to Insert the flash drive, which we do and it now formats it with a parted /dev/sda1 set 1 boot on command and starts copying files.

We ignore the one cp error message about the checksum file not being found. Once this is done we remove the usb stick and place it in the eeePC.

Booting the EEE

We boot and press F2 to go to the BIOS. We change the boot device priority so that Removable Device is first. In the hard disk drive section there are now 3 drives listed - the internal ssd, the usb stick as 2 and the cardreader usb as 3. We make the USB stick the 1st Drive and press F10 to save the setttings.

We reboot and up comes xubuntu so we select the first option live/eeepc, on the menu and the liveUSB stick starts loading and the x desktop appears.

Installing

We double click the install icon and the ubuntu installer appears. The Ubuntu graphical installer is too large to fit on the screen. To accept a setting press ALT F to move forward to the next screen and ALT B to go back. You can also holding down ALT and drag the installer around.

The main decision is when the gparted partition tool runs. We want to format and to install on the sdhc without a swap partition. We have 1 gig and plan to upgade to 2 gig.

We select manual. The screen lists the following partitions:

dev/sda which is the interal 4 gig ssd has sda1, 2467 mb, sda2, 1513 mb and sda3 and ads4 which are both 8mb. The sdhc card in the slot is /dev/sdb which has sdb1 with 16066 mb and the usb stick is /dev/sdc1.

We select /dev/sdb1 and choose ext2 as the file system with a / mount point and click OK. We decide to leave the ssd partitions alone for now. The idea is if we boot off the sd we can also gparted the ssd later. The result is an error:

"File System has an incompatible feature enabled"

Ok, after some reading i decided to make this a primary ext3 partition with a / mount point but the same error message turned up. We went back and deleted the existing partitions on the internal ssd and created a primary ext3 with a / mount point and selected the sdhc as ext2 with a /home mount point. This was ok. When we go forward it asks us about swap space because we did not create a swap partition. The reason is that a swap needs to be as big as the physical ram and a 1 gig swap on a 4 gig ssd doesn't make sense. We select continue and press enter.

The system sets up the partitions and formats them and installs. When finished we reboot and remove the stick and press F2 to change the bios settings back to quiet and to make the ssd the 1st hard disk.

The system comes up the the xbuntu logo but then the file system check fails and a maintenance shell is opened. We press CTRL D to close the shell and resume booting and login at the prompt.

We get a message ' battery may be broken' and there are 171 updates available. There are also 4 desktops, which seems a bit much on a netbook but it might make sense as each app could be full screen. CTRL-ALT-left/right will move between the 4 desktops

Fixing the Problems

The default installation leaves a line at the top of /etc/apt/sources-list that references the Xubuntu CD. This means that if you try to install some packages apt-get will fail because it can't find the CD. To fix this open a terminal and do:

sudo mousepad /etc/apt/sources.list

and put a '#' in front of the cdrom line. Next we remove the power manager and use the Battery Status Plugin from XFCE:
sudo apt-get remove gnome-power-manager
sudo visudo

and followed the rest of the instructions at:
http://wiki.eeeuser.com/ubuntu:eeexubuntu:customization

Note:
The eee has a really neat built-in BIOS upgrade utility. Just put the new BIOS on a USB stick, rename it to 701.ROM, hold Alt-F2 at boot, and it will perform a BIOS flash automatically. The utility is built into the BIOS itself. Or you could make a bootable DOS USB stick, put the flash utility and BIOS image on it, and boot from it. There's no need to with the built-in utility, though.

Well, it's taken all evening and the results are not perfect - many dialog boxes are set to a fixed size (windows also does this) and thus hard to use. I must say i'd rather have a netbook that worked with the standard ubuntu distro - you would think this is a selling point - maybe cannonical should start issuing 'Works with Ubuntu' stickers like those win95 and xp stickers microsoft used. The machine would be so much better if they had removed the webcam and speakers from the lcd panel and made the screen bigger it would have been 1" wider and over half and inch taller making a 800x600 resolution and so avoiding the problems. This could be done without changing the nice form factor.

I looked at a Dell mini 9 and in fact made the purchase until the checkout - they had some new program with mastercard in which i had to sign up and remember some number for all future online purchases. What brainiac thought that up? Make things more difficult to buy, gee what an idea...so i cancelled at checkout and left the cart. Wrote Dell to explain why they lost the sale.

Update

Well, i was not happy with xbuntu and did not want to waste more time with ebuntu or easy peasy. So i decided to restore the original os. Since i had reformatted the internal ssh which contains two 8 mb hidden partitions for the auto-restore (press F9 at startup) this is not as easy. Here is the procedure

Restoring the OS

  1. Put the system DVD in a windows machine and run the Restore utility
  2. Place a 2gig minimum USB stick in the windows machine
  3. The software formats the stick into a bootable system
  4. When done put the usb stick in the eee pc
  5. Start up the eee PC and press F2 to go to the BIOS
  6. Change the os install setting from Finished to Install or Setup
  7. Goto the hard drives setting and make the USB stick the 1st hard disk
  8. Set the USB stick to be the 1st device in the boot devices list
  9. Press F10 to save the settings and restart the machine

It should now boot up to the usb stick and ask you to install. Type yes and away it goes. When it is finished:

  1. Reboot the eee pc and press F2 to enter the BIOS
  2. Change the OS install setting to FINISHED
  3. Change the hard drives so the internal ssd is 1st
  4. Change the boot priority so that the internal ssd is 1st
  5. Press F10 to save the changes and restart

Now the system should come up and ask you to create and account, choose a time zone, etc. Then you can go to settings and re-install the updates. On the plus side this fresh installation runs much faster than the install it came with and the desktop update now works. On the minus side - why does every install require a reboot? Linux installs rarely require reboots, that is more a windows 'feature'.  Another minus is that if you want to re-use the usb stick you have to reformat it with the asus update utility which sets it to a fat16 partition, however once that is done you can then reformat the stick in windows as fat32.

Friday, April 10, 2009

The ipod PIM part II


Networking the iPod

The next stage in our quest for the perfect PIM is in being able to connect to the iPod to transfer open-source 3rd party programs. There are two approaches to this problem:

1. Use the USB cable an find a linux program that supports the new itouch models. Right now it mounts as a camera where the old ipod mounts fine and uses the installed music programs. I found a lengthy article on how to do this at https://help.ubuntu.com/community/PortableDevices/iPhone but it is a bit of work.

2. Setup the ipod to load 3rd party apps through iTunes. Since i have itunes running on the dual G5 this might be easier. I can just download apps to that machine and copy them over.

SSH Your iPod

We decide on option number 2. This means we have to modify the default ipod configuration which is designed only to use apps from the ipod store. I dislike business models that restrict the device you bought to their 'island' - one reason i did not buy a kindle. There is a replacement for the mobileframework that comes with the ipod which you can download - the question then becomes how do you get the 3rd party app on the ipod so that you can copy 3rd party apps?

The solution is to use the wireless network in the ipod. We can use SSH (the secure shell protocol) to connect to the ipod and transfer the new mobileframework file. First we need to get SSH running on the ipod.
  1. We run the cydia package manager installed last week and download SSH
  2. We also download Toggle SSH a small utility to enable/disable SSH
  3. And since the ipod is using DHCP we need it's IP address so we also get WhatIP which is a faster way that using the settings
And why we are there we also grab a version of Network Stumbler to search out wireless networks - it even provides the lat and lon of the wireless access point! We had been going to Google Maps/Google Earth and putting in an address to determine where we were - this is so much neater.

SSH From Ubuntu

Now that we have SSH running on the ipod we need to connect from \\godzilla, a unbuntu 8.04 machine.
  1. Select Places, Connect to Server from the menu
  2. Select SSH from the drop down menu
  3. In the Server: box we put in the ipod ip address of 192.168.1.112
  4. In the Port: box we enter 22
  5. In the Username: box we enter root
  6. Click Connect
  7. In the Password: box we type alpine

After a few moments we are connected to the ipod and the directory structure is displayed. Now we navigate to the following folder:

/System/Library/PrivateFrameWorks/MobileInstallation.framework

Modify the ipod

Now we copy over the new framwork file we downloaded.

1. Rename MobileFramework to MobileFramework.bak
2. Copy the new MobileFramework file to the folder
3. Change the permissions on the new MobileFramework file

The new file needs the permissions set to 755, or if you prefer this notation:

-rwxr-xr-x

which translates as user read/write, group read/execute and other execute. Once this is finished you can now reboot the ipod. One problem during this process was that the ipod screen keeps blanking and the unit goes into 'slide to unlock' mode very quickly which seems to affect the SSH connection. Ir probably powers down the wireless? I could not find a setting to turn this on/off or adjust in the ipod settings. I did notice cydia had a constantly reconnect ssh app - maybe this is the solution to the problem? Will try it later.

For now we need to move to the other room to the dual G5 and try installing some apps.

WARNING - the last bit where i changed the MobileFrameWork seems to have bricked my ipod. Have to do some emergency work on it!

Ok, i was able to restore after some tense moments. Itunes would start the restore and then it would fair with the error message 'ipod cannot be restored, error 1611 occured'. The problem was that classic was running (civ II) and this seems to cause a problem. The clue was found at http://support.apple.com/kb/TS1275 so turning off classic caused the restore to take place. Now i have to re-do all i did earlier - a good reason to document....

Appendix: Stylus

Steve Jobs must have tiny hands. Rachmaninov had big hands and I have small hands but typing on the touchscreen keyboard is error-prone even for my little fingers. My son's DS has a stylus so why not the ipod - well the ds stylus does not work on the itouch because it uses a heat sensitive screen so you need a special stylus. Off to Best Buy where the teenage clerk had no idea what i was talking about and they had no ipod stylii. What i really, really want is a case with a stylus pouch and a stylus. Going online i have found a stylus for $20 but so far no case design that has a stylus pouch.

Tuesday, April 7, 2009

Adding Google Maps to Joomla


Mashing up with Maps

Today we wanted to add a map to our mockup library web site. One of the commonly asked questions of public libraries is where is branch x located? (and where can i park?). It is amazing how many library web sites make such commonly requested information so hard to find. Our students usability tests on library web sites provide the proof. Anyway, Google maps provide an elegant solution to the problem. So how do we add a map to our web site?

In the bad old days we would take a screen shot of a map in Microsoft Mappoint and added the static image to the web page. Today we want to hook up with the Google Maps application programming interface (API) to use it's functionality in our web application.

The beauty of Joomla lies in its open and extensible structure, someone needs a map function so they write a small plugin to provide it and all users benefit. Sweet. Off we go to the extensions site and download plugin_googlemap.2.12f.zip, a massive 216k file.

Installing Google Maps Plugin
  1. Extensions, Install/Uninstall
  2. Click Browse and select plugin_googlemap.2.12f.zip
  3. Click Upload and install
  4. Select Extension, Plugin Manager
  5. Select Google Maps and enable
  6. Click on Google Maps to edit
Note the box for a Google Maps API Key in the parameters section. We don't have a key so we need to get one.

Obtaining a Google Maps API Key

We go to http://code.google.com/apis/maps/signup.html to obtain a key. It wants the URL of our web site, assuming we are running a server and not a USB stick. No problem, we enter http://localhost as the URL and it works! We copy the very lengthy key which looks something like this:

ABQIAAAAYHDFlhuoA-3Ae04VLK3UlRT2yXp_ZAY8_ufC3CFXhHIE1NvwkxSl9L-Ted

but longer to a text file to keep a record of it. We also paste it into the Google API parameter box and then click SAVE.

Now we need to create an article and put in the code for the map which involves inserting a squiggly bracket { the word mosmap, a bunch of parameters seperated by a vertical pipe |, and a closing squiggly bracket }, something like this:

{mosmap width='300'|height='200'|lat='71.0'|lon='81.4'|Zoom='12'|etc etc}

What's Your Vector, Victor?

One of the parameters is the centered location of the map based on latitude and longitude (a very ancient GPS system). Most people do not know this address but it can be obtained from Google Earth by putting in an address. The lat of my current location is 43 degrees N 00'20.36" and the long is 81 degrees W 14'30.96" but in fact there is an easier way.

Alex Ashman has a great post that includes a neat trick - use Google maps to get your lat/long. Just find a place in google maps and then paste in the following javascript into the URL window and it returns the lat/long in the exact format used by the google maps plug-in!

My current location is (43.00569, -81.241991) so i add that to the {mosmap} tag along with some other options and SAVE the article. Of course it did not work the first time, the {mosmap code was visible, the problem is that the google maps code MUST be on a single line and it was hard to see if it was in the little editor window. When i used the 24" monitor full screen i saw the code was not a single line so i reformatted it and SAVEd again and it worked. When working on a small screen add tags at the end of the lines to fix the problem.

The author of the plug-in, Mike Reumer, has a web site that contains examples and some documentation. Here is a quick summary (edited slightly) of his explanations on the various options:

  • Set width, height in pixels (400px) or a percentage (60%.) The default is pixels and you can leave off the px and it works ok
  • Use lon and lat for the coordinates
  • zoom can be anything as specified in the Google Maps API.
  • zoomType, can be Small or Large, this controls the type of zoom function displayed. For no zoomcontrol use the None setting
  • zoomNew, can be 1 for continuous zoom or 0 for click to center (the default is 0)
  • zoomWheel, can be 1 for mousewheel zoom and 0 for no mousewheel zoom (the default is 0)
  • mapType can be Normal (default), Satellite, Hybrid, Terrain or Earth
  • showMaptype is 0 for no Maptype controls and 1 shows Maptype controls (the default is 1)
  • Overview is 0 for no overview window in bottom right corner and 1 shows the overview and 2 for overview enabled but closed initially (the default is 0)
  • text is for the marker, that will show on the map with a balloon. If you don't want to see the text, just set text=" and it will not display, the text is the data displayed above the location pin. Usually it would be used to display an address or hyperlink. A hyperlink is possible. Use the format: linkName. Don't use (double) quotes!
  • marker is for opening the infowindow (1 default) or close the infowindow (0) initially
  • dir for adding get directions form for a route at maps.google.com to the coordinates
  • tooltip is for the marker to have a tooltip when the mouse is on the marker (don't use HTML)
  • icon is the url to a icon for the marker so it can be different than the Google default
  • address is for a address to search for the coordinates
  • gotoaddr is for a searchfield and button so the user can search a address on the map (default 0)
  • kml is for a url to a kmlfile to load as a overlay on the map for multiple markers or a route
  • traffic is for showing traffic on the map (Only USA currently)
  • align is for placement of the map in the content (left, right, center or none)
  • lightbox is for placing a link/button to show a lightbox of the map (default 0)
  • show is for making the map displayed (default 1) or not. With lightbox on then the map only appears in lightbox.

Friday, April 3, 2009

Asus EEE PIM

Asus 4g

Writing this on the new Asus 4g. It´s the 4 gig ssd m0del running a modified xandos Linux. The wireless is excellent, better signal strength than any other laptop. The keyboard is small but better than typing on a ipod or psp or badberry. Just upgraded the ram from 512 to 1 gig.

Ram upgrade

Very simple, unplug and remove the battery. Remove 2 screws from the bottom compartment and take out the ddr2 sodimm. Replace with a bigger sodimm. I had to reset the system using a very thin needle to get it to boot back up and thenF2 to go into the BIOS to turn on the web cam as the default is off.

Trackpad is a bit jumpy like all the new ones - will have to adjust it. Also need to add another repository to the apt pkg mgr and buy a 16gig sd for storage.

Update

Started configuring the system to my needs. First up was to add some storage with a 16 gig SDHC card.

Problem 1 - cannot write to 16gig sd card

We think about adding a line to fstab, something like:

/dev/sdb1 /mnt/disk vfat auto,exec,rw,async,user 0 0

And then discover a simplier fix - the switch on the SD card was set to read only! Problem solved. We are able to copy the my documents folder to 'drive d' which is the sd card. Later we will figure out how to change the location of my documents to point to the sd card (which is going to stay in the machine for all time) and remove those folders from the SS drive. This will both free up space for more appz and seperate documents from the system drive - which is something i always do.

Problem 2 - Some packages appeared broke -could not install he asus-update pack 105

Some packages appeared broke,we could not update open office.
So we opened terminal with ctrl alt T and did:

sudo apt-get update

But we still can't install the update . We open a terminal shell with CTRL ATL T and do:

sudo synaptic

to get to the package manager. We try and install asus-updatepack-105 and find it fails on a dependency of:

atheros-swan-modules

Which is listed as installed. So we mark the package for re-installation and apply the changes. No joy - more research needed on this one. Not impressed by Asus with this - broken packages on a shipped product is a bit lax. We see the manual is available in .chm format - let's give it a read...wait there is no chm viewer.

Problem 3 - cannot view manual

We need the excellent gnochm reader as the included manual is in .chm format but no chm reader is installed. Trying to install gnochm resulted in 'couldn't find package' error. Let's add some repositiories to the package manager. In the terminal window we do:

sudo kwrite /etc/apt/sources.list

We add a new repository with this line:

deb http://www.geekconnection.org/ xandros4 main

And save the updated list. Back in the terminal we type:

sudo apt-get install gnochm

but it couldn't find gnochm either! Since this asus distro is a custom jobbie we are somewhat hesitant about installing things without a bit more research. It would also be useful to have icons for the text editor and terminal added to the 'desktop'. The use of kwrite implies this is a KDE environment undeath and i am a Gnome but that is probably killer for such a lightweight machine. We would need more space on the internal 4 gig ssd.

Problem 4- move home directory

Move from the internal ss drive to the external sdhc card. Free up space and seperate
document files from the system drive. We need to research this.

Problem 5 - Add icons

There is no terminal icon or text editor icon. Need to research this.

TODO

Install XAMPP

Summary

Thinking that when ubuntu comes out with a netbook version i will switch the eee to that. Actually, i discovered that some people have installed ubunutu on the machine, there basically seem to be two approaches:

- install regular version and then tweak for the small screen and limited storage
- install eeeXubuntu, a customized version of ubunutu 7.10

The first option provides a more recent version plus updates but requires more fiddling, the second is an older version but should work 'out of the box'. What to do?

We decide to install eeeXbuntu first and see how it goes, if we don't like it then we will try regular ubuntu. Time to find the external usb cd rom and download an ISO of eeeXbuntu.

Wednesday, April 1, 2009

PSP Pim gets touched by an iPod


iPod PIM?

While it is possible to surf on a PSP and to install new applications it is hard to find one with the older 1.5 firmware and surfing is a bit of a pain. Sony wants this to remain a portable games platform for young males so who am i to argue.

So i ordered an ipod touch from apple. When it arrived i plugged it into the Dual G5 and updated the firmware to 2.21 which was the latest version. I checked the settings to get the mac address and added it to the router.

The firmware update cost $9.95 at the app store, although i also downloaded the firmware file from the internet in case of problems.

Once this was updated i jailbroke the ipod which took a couple of tries but the instructions are very good. This installs cydia a nice GUI app front-end for the apt package manager. Sweet.

I fired it up and browsed the repositories and downloaded a pacman game and a VNC server so i could connect to my land line server. Went to the server no problem and also browsed the internet.

This is where i first encountered a serious problem - the typing keyboard is small and the letters are close together. I have small hands and it was still very error prone to type, so i got my son's stylus from his DS which helped a lot. This thing could really use a fold-up keyboard like the old palm had.

The interface is pretty good although i need to figure out how to hide the icons for apps i don't use like stocks and the screen is really bright - you could read a book by it. I don't like the quick setting for screen blanking, put the unit down for a minute and the screen blanks, but i can adjust.

The real problem so far is in figuring out how i will administer the unit - i don't like iTunes much it seems really inflexible and arbitary. For example, the dual G5 has thousands of songs that i do not want to automatically sync with the itouch, they won't fit! So how do i copy some? This was not intuitive at all and nether was copying some photos.

In fact, what i would like to do is what i did with the previous ipod, which is hook it to linux and use a 3rd party application to manage files between a desktop and the device. Only problem was when i hooked it to a ubuntu 8 box it got mounted to the desktop as a camera and not a drive.

I think the solution probably involves a 3rd party app.