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.

7 comments:

  1. A user indicated this:
    "Enter /opt/Palm/novacom/novacomd should probably be removed and put /opt/Palm/novacom/novacomd-upstart instead, thats the script"
    They requested that I delete their posts, so I have added it myself, and updated the tutorial.

    ReplyDelete
  2. Thanks a lot for your informative post on this subject. Your instructions put me on the right path, but there are some changes in the latest package
    palm-novacom_1.0.46_i386.deb
    When you install it, it still gives the error about the job not existing, although this time it says
    Unknown job: palm-novacomd
    but it doesn't put anything in /etc/event.d
    It does, however, put
    /etc/init/palm-novacomd.conf
    which has the right syntax and starts
    /opt/Palm/novacom/novacomd
    Now thankfully the upstart init works the same way as regular init with regard to rereading its configuration files if you send a HUP signal to it. so all you have to do is do
    kill -1 1
    and you're good; the job is defined and
    start palm-novacomd
    works.
    And of course when you reboot next time it should start right up.
    I did a lot of messing around with this before I figured it out, so I just thought I would share my results.

    ReplyDelete
  3. One more thing; if you have a clean 9.10 install /etc/event.d does not even exist. But I created it to see if the package would put something there and it did not. For the record, perms were 755 with root owningthe directory.

    ReplyDelete
  4. Thanks for the additional info! I'm glad my post was helpful for you!

    ReplyDelete
  5. As an added note-
    As of now (3/22/10), The Palm SDK is not yet compatible with the VirtualBox 3.1 packages- stay with VirtualBox 3.0.0 to 3.0.12 for the emulation to work.

    ReplyDelete
  6. Cool man. It works perfectly. The only problem is: how can you alternate between the active windows??? I guess it doesn't work without a multitouch screen.

    ReplyDelete