Tuesday, November 3, 2009

Installing WebOS SDK in Ubuntu 9.10

Installing WebOS SDK in Ubuntu 9.10:

----------------------
EDIT (03/22/10): Make sure that you go to the updated WebOS installation page and get updated versions of the WebOS SDK and novacom packages before using the statically linked packages listed in this article. They are no longer up to date.
----------------------

It appears that the Palm Pre WebOS SDK/Emulator no longer installs properly in Ubuntu 9.10, though it worked fine in Ubuntu 9.04.
I attempted to follow my own WebOS HOWTO from Linux Journal, but I ran into some issues.
After installing the two current SDK packages and typing palm-emulator, I was met with the following error message:

For those that can't read the image, it says:
"Novacom Not Running
In order to install or debug applications in the Palm Emulator, the novacom service must be running on your desktop. Please verify that you have the latest Palm SDK installed correctly."

As I had just finished installing both the novacom (palm-novacom_0.3-svn196852-hud21_i386.deb) and the WebOS SDK (palm-sdk_1.2.0-svn202408-sdk77-pho33_i386.deb) packages, I was a little discouraged by this message. I know that I need the novacomd daemon running, but apparently I wasn't successful in getting it going. I checked the Palm SDK install page, but was unable to get novacomd up and running given their suggestions. When I tried sudo stop palm-novacom and sudo start palm-novacom
I got the error message:
start: Unknown job: palm-novacom
I figured that novacom must not have been installed in my $PATH.

I logged out and logged back in, just in case the novacomd daemon was already configured to start at boot and was simply waiting for me to reboot. No luck. It was here that I stumbled upon the problem. The release notes for Ubuntu 9.10 indicate:

/etc/event.d no longer used

The version of upstart included in Ubuntu 9.10 no longer uses the configuration files in the /etc/event.d directory, looking to /etc/init instead. No automatic migration of changes to /etc/event.d is possible. If you have modified any settings in this directory, you will need to reapply them to /etc/init in the new configuration format by hand. (402759)
I then looked in /etc/event.d on my system, and what did I find? Well, I found the palm-novacomd upstart file! That explains why novacomd isn't starting at boot like it did for Ubuntu 9.04!
If you want to start it up without having to reboot, you can manually start novacomd by typing:
sudo /opt/Palm/novacom/novacomd
and then starting palm-emulator in a different terminal. A screenshot of the Palm WebOS emulator is below (the output of novacomd is listed in the terminal behind the emulator):


Photobucket

EDIT:
I figured out a way to get novacomd going at startup with minimal fuss.
  • Go to System --> Preferences --> Startup Applications
  • Choose to add a new application.

  • Enter /opt/Palm/novacom/novacomd-upstart as the command.
  • Fill in an appropriate name and comment.
  • Save the startup program.
  • Log out, and log back in.
novacomd should now be running, and you can start the palm-emulator command without any of the extra fuss that I mentioned above.