Thursday, October 27, 2011

Generate X.509 CER File For #webOS Using openssl

Recently I've got a problem with SSL certificate for outgoing mail server on my Palm Pre. Here's what the error look like:


I looked around in the internet to find a solutions, then I found this page (forgot about the link, but I'm certain that was Palm Support page) that says mail server's certificate should be in X.509 (CER) file format:


Already asked System Administrator to send me the file, but it takes too long. So initiatively I look another way to provide the certificate file myself, and I can do it using openssl command in Ubuntu Linux (You can use openssl in Windows as well). First, I create a script that generate the certificate I need from mail server, name the file any name you want (you can see in the script I used retrieve-cert.sh):
#!/bin/sh
#
# usage: retrieve-cert.sh remote.host.name [port]
#
REMHOST=$1
REMPORT=${2:-443}

echo |\
openssl s_client -connect ${REMHOST}:${REMPORT} 2>&1 |\
sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'
Add execute (+x) on file properties, then run the files:
$ chmod + retrieve-cert.sh
$ ./retrieve-cert.sh mail.server.hostname 465 >> coid.cer
As you can see, I'm adding '>> mycert.cer' to save the results directly to mycert.cer file, at the command above. Sure I can add this to the script, but this way I can generate any file name I want :)

Then, you must convert that .cer file into X.509 format:
$ openssl x509 -in coid.cer -out coidx509.cer
And you're finish. You can send coidx509.cer file via email that already setup on your Pre, or you can transfer it via USB mode and open it using Internalz.

When you tap on that file, Certificates Manager window will open and ask what do you want to do with it:


Just tap on 'Trust Certificate'. If you want to see it later, open 'Device Info' on your launcher, then tap drop-down menu on top left, tap on 'Certificate Manager...'


That's it. I setup my mail account once again, and sure it can sent email without any error :)

Sunday, October 23, 2011

Recovery Mode in #webOS

Once, I had a difficulty to put my Pre in USB Update Mode. The usual way to turn off the device then turn it on again by holding down volume up button and power button didn't work. So I search the internet for any clue, and I found it here.

These what you need to do:
a. Connect the USB cable to the AC charger, then into a working outlet
b. Turn off your webOS device
c. Remove and reinsert the battery
d. Press and hold volume up button, and connect your USB cable (which already connected to AC charger and working outlet) to the device
Note: You can press and hold R key as an alternative to volume up button
e. Release the volume up button (or R key),  when the screen showing large USB icon







f. run webOS Doctor

I've tried this and it works. Hope this works for you, as well :)

Thursday, October 13, 2011

BingMaps go forth and back to Google Maps

If you haven't know yet, there's an update for Google Maps on your webOS smartphone (Pre, Pixi, Veer), not to another version, but to BingMaps, which is the Maps apps pre-installed in TouchPad.

Like the HP Palm Blog says, you just open App Catalog and download Maps apps from there in order to update your Google Maps.

I did that myself, and not too long after that I decided to get my old Google Maps back. So I open up webOS doctor file and look for Maps application. With the help from #webos-internals on freenode, I found it under /usr/palm/applications in com.palm.app.maps folder. So I re-package it using IPK Packager from Jason Robbitaile.

After deleting Maps apps, I installing this file using webOS Quick Install (wOSQI), again from Jason, and I've got my Google Maps back :)

Newest Firefox Version for Ubuntu 10.04

Default repository on Ubuntu 10.04 prevent us to have version of Firefox above 3.6.x, but with this simple workaround, you can get newest version (7.0.1) for Firefox and Thunderbird, also.

What you have to do is adding this line into /etc/apt/sources.list:
#Firefox-Stable
deb http://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu hardy main
deb-src http://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu hardy main
Do the regular:
$ sudo apt-get update
$ sudo apt-get install firefox
And it's done! :)

Fluxbox installation on Ubuntu Server

Here's what you need to have a decent Fluxbox windowmanager on Ubuntu Server. After all, you don't need a heavy windowmanager on your server :)
$ sudo apt-get install fluxbox fbpager fbdesk xserver-xorg xfs xfonts-terminus-oblique xfonts-100dpi xfonts-75dpi xfonts-scalable xinit
 And that's it! :)

update-notifier-common error on Ubuntu

After doing Ubuntu double upgrade (from 10.04 to 10.10, then continue with 10.10 to 11.04), I've got this error while logging in into the system:
exec: 3: /usr/lib/update-notifier/update-motd-cpu-checker: not found
run-parts: /etc/update-motd.d/20-cpu-checker exited with return code 2
run-parts: failed to stat component /etc/update-motd.d/50-landscape-sysinfo: No such file or directory
exec: 3: /usr/lib/update-notifier/update-motd-updates-available: not found
run-parts: /etc/update-motd.d/90-updates-available exited with return code 2
exec: 3: /usr/lib/update-notifier/update-motd-reboot-required: not found
run-parts: /etc/update-motd.d/98-reboot-required exited with return code 2
Apparently, some package were removed during the upgrade process. All I need to do was installed one packaged:
$ sudo apt-get install update-notifier-common
And everything's back to normal afterwards :)

SSL Certificate Errors on MacOS X

Credit goes to loopkid, for I only put several parts that I used into my blogpost.

Last time I tried to wget a libnotifyperl.pl file from the web, I got this error:


The workaround is by installing curl-ca-bundle using MacPorts:
$ sudo port install curl-ca-bundle
Then, create .wgetrc file in your home directory:
$ vim ~/.wgetrc
And put this line:
CA_CERTIFICATE=/opt/local/share/curl/curl-ca-bundle.crt
That way, you don't need to include the path everytime you want to do a wget.


Monday, October 10, 2011

How To Overcome GPG Errors on Ubuntu Linux (Lucid 10.04)

If you ever got the GPG errors while updating your Ubuntu sources, here's what you have to do to overcome it:

Example of the error might be like this:
W: GPG error: http://ppa.launchpad.net lucid Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EF4186FE247510BE
And you just need to execute these two commands:
# gpg --keyserver hkp://subkeys.pgp.net --recv-keys KEY
# gpg --export --armor KEY | sudo apt-key add -
Just replace ke KEY with the one that exist on the error. According to the example, the command should be like this:
# gpg --keyserver hkp://subkeys.pgp.net --recv-keys EF4186FE247510BE
gpg: requesting key 247510BE from hkp server subkeys.pgp.net
gpg: key 247510BE: public key "Launchpad PPA for Ubuntu Mozilla Daily Build Team" imported
gpg: no ultimately trusted keys found
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)

# gpg --export --armor EF4186FE247510BE | sudo apt-key add -
OK
Then you can continue with:
# apt-get update
That's it. Why don't you try it yourself now :)

Tuesday, October 4, 2011

Install sun-java6-jre Package on Ubuntu 10.04

I need this package to be able run Go Aruna Desktop client on my Ubuntu 10.04. Here are what I did:
1. Add new sources
# sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
2. Then do the usual update
# sudo apt-get update
# sudo apt-get dist-upgrade
3. Installing the package
# sudo apt-get install sun-java6-jre
4. Done