Palm Pre Tips and Tricks

I keep finding myselg (re)scouring the Internet for these instructions...maybe having them here will help me next time. If they helped you, leave me a note!

Run WebOSQuickInstall on Ubuntu Linux

1. Connect the Pre (in dev mode) to the usb port/cord

2. Change to the directory where novacom is installed
cd /opt/Palm/novacom

3. run the novacom daemon
sudo ./novacomd

4. Run WebOSQuickInstall.jar (right-click, 'Open with Sun Java 6 Runtime')

SSH Into the Pre

1. Get into Dev Mode:
upupdowndownleftrightleftrightbastart

2. Get SSH access from the linux terminal:
novacom -t open tty://

Resource:
http://palmpre-hacks.com/palm-pre-hacks/palm-pre-hacks/how-to-hacktether...

Alter the Auto-Replace file the Pre uses to correct spelling errors

1. Get SSH access (see above)
2. Mount the filesystem as read-write
mount -o remount,rw /

3. Upload your modified version of 'text-edit-autoreplace' to an ftp server somewhere

From the Pre's SSH terminal:

4. Switch to the directory where 'text-edit-autoreplace' can be found
cd /etc/palm/autoreplace/en_us/

5. Protect the original version of 'text-edit-autoreplace' for use later
mv text-edit-autoreplace text-edit-autoreplace_original

6. Retrieve your customized autoreplace file to the pre
'wget ftp://user:pass@yourftpserver.com/path/to/text-edit-autoreplace'

7. Mount the filesystem as read-only again
mount -o remount,ro /

8. Quit SSH
exit

Resource:
http://palmpre-hacks.com/palm-pre-hacks/how-to-ssh-into-your-palm-pre/

Installing PreWare

From the Linux command prompt
cd /tmp
wget http://bit.ly/preware-bootstrap
sh preware-bootstrap

Resource:
http://www.webos-internals.org/wiki/Application:Preware#Installing_Prewa...

Running - probably dehydrated

Runner's Log, 2010-01-06: After the third running step on the treadmill, I notice that my brain is slapping against the inside front of my skull with each step. That hurts, enough to quit, but I'm only 4 seconds into a 25 minute run. Probably not much value in today's run if I stop now. I wonder why the lights are so dim in the room today; kids must have turned the dimmer switch down. Or maybe I'm having a stroke; that might explain the brain pain. If I collapse here, no one will notice for another half hour or so, at least. Probably more. Why do we still have a 3' tall basketball hoop in the room when all our kids are (at least a little bit) taller than the hoop? I wonder if I could run the treadmill in the dark; might be able to stay asleep for a few minutes more that way, and my brain might hurt less. This room has 6 recessed can lights, each with a 65W bulb; that's....too much math to do right now. I wonder if I should document today's run in some kind of "runner's log" for the world to read; I'm so entertained by the stupidity so far, I'm sure it will be hilarious to everyone else. Brain is still pounding. Can you even have a "runner's log" when you're on your 4th run in a row? I doubt it. I do have a blog, though, and I can pretty much do whatever I want with that.

H1N1 Information

Given the number of questions from friends and family about the H1N1 outbreak, I thought I'd re-publish this information, originally assembled by my favorite Infection Control expert. There are a few related attachments that include some more details. Stay healthy everyone!
-----
Q:
Why is the media playing this flu up so terribly strong - like everyone is going to die as soon as they get the H1N1? Why and how is the H1N1 so different?

A:
Two reasons:

  • The H1N1 is more adversely affecting the younger population instead of the older population (Pediatrics deaths in the US are already at 53 versus 43-70 in a normal flu season (and "seasonal flu" has yet to hit - we get another round of this in January), and H1N1 hasn't peaked. In general the "seasonal" flu mainly cause the most severe outcomes in the immunocompromised population. The H1N1 is affecting healthy people and causing significant complications, which we don't normally see in healthy people with seasonal flu (the average age of a H1N1 patient is 22 years old). In fact, because many of the older population may carry some immunity from the 1976 outbreak of Swine Flu - they are not even considered high risk and are not a priority for the H1N1 vaccination (quite opposite the seasonal flu).
  • Since all communities in general have what is considered "low immunity" to the H1N1 (as there hasn't been a vaccine since 1976, so no one is considered immune) - Without immunizations it has the potential to affect a much larger population then that of the seasonal flu (because many people do get immunized against this). A good example was no vaccine at all for the flu outbreak of 1918 - it caused 40 million deaths worldwide. We have just begun in the past week immunizing the "high risk" population against the H1N1, but it's still not readily available for the general public.
AttachmentSize
H1N1 Patient Education.pdf545.9 KB
H1N1 fact sheet.pdf80.47 KB
General Questions and Answers on 2009 H1N1 Influenza Vaccine Safety.pdf132.56 KB

Don't call it a shutdown

So, the State of Michigan's government was officially shut down for a couple hours today, before a budget could be passed by the Legislature. Why we had to get 2 hours into the new fiscal year before a budget could get pushed through is way beyond me, especially given the notably 'soft' schedule maintained by the Senate and House.

I found out I should probably return to work by reading an article at DetNews.com, but I thought I'd share my favorite sections of the article:

The fourth grade class of St. Martha's Catholic School in Okemos came to the Capitol on Wednesday to see legislators do their job. A tour guide told the students that they'd come on a busy day. But when the class settled into seats in the balcony overlooking the Senate chambers, no one was on the floor.

"We waited, but nothing happened," teacher Heidi Wood said. "They must have been on a bathroom break."

Most of the day, senators and representatives stood in the halls of the Capitol, texting on BlackBerrys and munching M&Ms provided by the Rossman Group, a Lansing public relations firm. There were no protests, and only a smattering of visitors, most of whom seemed more interested in the Capitol's architecture than the budget battle.

I realize there's a certain reporter's slant on the article, but this one sums up the frustration pretty well.

Palm Pre Update to WebOS 1.2

...went without a hitch. Even FileCoaster and the other HomeBrew Apps from PreCentral are intact and working well.

Whew!

DenyHosts was shutting me out!

After a couple years without problems, suddenly DenyHosts started blacklisting my own computers when I tried to ssh into the server. I wouldn't even get a chance to login; the ssh connection would just get dropped and that was it.

I've gotten myself blacklisted before (twice) by fat-fingering my password in wrong (twice in a row), but was always able to edit hosts.deny, remove my IP address, and go back to it. This time, when I would restart DenyHosts, my IP would go right back into hosts.deny and lock me back out.

I found this article which describes the fact that DenyHostsholds onto IP addresses in multiple places...something I didn't know until now. The technique described there worked perfectly on my Ubuntu Jaunty server installation, with one substitution..."/var/lib/denyhosts", in place of the described "/usr/share/denyhosts".

Configure Local Development environment (Netbeans) for php (Drupal) debugging

I have several Drupal (php/mysql) sites in production, and several more on my local development machine. I've had plenty of experience moving sites from the dev machine to a production server, but recently ran into a different problem. I needed to move an exact copy of a production Drupal 5 site to the local machine (running the XAMPP stack), and be able to debug the code to find a problem with a specific Drupal module. Here is the path I followed:

First, follow this script to get XDebug installed and configured on XAMPP.

Download (FTP) the entire site to my local machine (under 'C:\xampp\htdocs\clientName'). This should make it accessible on the local machine as 'http://localhost/clientName'.

I needed to download the database too, because firewalls were preventing the connection from my local (web) server to the production database server...and I didn't want to muck with the production database anyway.

Create a new, empty database on the local machine's server, with a user/password combination to use for testing/development.

Change the settings in the 'default' site folder (C:\xampp\htdocs\clientName\sites\default\settings.php) to match the local machine's database (and not the production database).

Use phpmyadmin on the production server to 'Export' the entire database and its data to a file. Use the matching 'Import' feature on the local machine's phpmyadmin to populate the database. After three unsuccessful tries (out of memory errors that crashed Apache), I realized I needed to Export to a file, and let it use zip compression. Even then, it took two tries to complete the whole Import (phpmyadmin happily 'resumes' the Import after the timeout...very slick).

I started getting 'out of memory' errors at this point. This article pointed out that a change in the memory_limit in php.ini (and an Apache restart) was all I needed.

I found that Drupal's 'clean urls' were broken. I couldn't get past the site's front page. This tip cleared that up (the mod-rewrite change suggested there did the trick).

I started up NetBeans, and created a 'new PHP project from existing source', pointing it to my site's folder (C:\xampp\htdocs\clientName). Debugging just magically worked from NetBeans, as long as I Run/Debug the project from within the Netbeans IDE. I could set break points and 'watches' to see what's happening as the pages load.

By default, xdebug was breaking on the first line in the first file loaded, which got annoying pretty fast. I found this article that fixed that in a jiffy.

Voila! Everything works! I'm debugging php apps from within the Netbeans 6.7 IDE.

Using 'foremost' to recover deleted files

I have a program for recovering deleted files from a Windows-based PC, but it only runs when you can boot into Windows. This works pretty well, but if you're trying to recover files from the drive Windows is mounted on, you risk losing over-writing files (while booting into the OS) before you get a chance to recover them. Plus, it cost money to license it, so there has to be a better way...

I found a neat answer in an Ubuntu LiveCD, with an app called 'foremost' doing the heavy lifting. Here's the recipe and run-down, probably not suitable for the absolute beginner, but good enough for me to re-use a year from now when I've forgotten again:

  1. Boot from an Ubuntu LiveCD (I used Ubuntu 8.10 Deskop Edition)
  2. Mount the Windows partition for viewing (mine was /dev/sda1)
  3. Plug in, and turn on, an external USB drive; make sure it mounts and shows up on the desktop (mine was /media/disk)
  4. Switch to the USB drive ('cd /media/disk')
  5. Enable the Universe and Multiverse repositories
  6. Run 'sudo apt-get install foremost' in a shell window to install foremost (it doesn't come installed on Ubuntu Live)
  7. Run 'sudo dd -i /dev/sda1 -o recover.iso' to copy the contents of sda1 to an iso image on your usb drive
  8. Run 'sudo mkdir recovered' to create a target directory for your recovered files
  9. Run 'sudo foremost -i recover.iso -o recovered/ -v' to actually recover the files (to the 'recovered' folder)
  10. Run 'sudo chown -R ubuntu:ubuntu recovered/' to make the contents of the 'recovered' folder accessible

Foremost will have created a series of folders inside the desitination folder ('recovered', in my example), categorized by files type. Any recovered files will be found inside them.

A couple thoughts:

  • You probably don't really need to create an iso image of the drive first, though I didn't try it without. I like doing it this way, because once you've got the iso, you can leave the 'real' disk alone and work from the iso.
  • You may have to 'force mount' the Windows partition, especially if it was so corrupted that it wouldn't boot. I won't cover that here, but Google will snap up plenty of examples of how to do it
  • Thanks to this blog post for much of this idea and instruction. Also check out the man page for foremost
  • Foremost comes pre-configured (check /etc/foremost.conf for details) to recognize a number of the most popular file types. Adding more files types is beyond the scope of this little article - and probably a step out of my own reach, for that matter. No matter, though...most of the files that are going to be important fit in that 'popular type' category.

Which browser is for you?

If you've been browsing the Internet for long, you're probably familiar with Internet Explorer, the web browser bundled with every Microsoft Windows installation. IE, as it's called, is a very popular browser, though some would argue it's popular only because of that bundling.

Did you know there are plenty of other web browsers out there, and that many of them can beat IE in important areas like security, speed, and features? The most popular browsers are free for you to download and install, and will integrate into your Windows computer seamlessly.

Web site developers often have several browsers installed on their computers so they can test their new web applications in as many different browsers as possible. I find that I prefer a certain browser for specific kinds of web surfing. For example, Google's Chrome browser is great for listening to Pandora Radio and interacting with Google applications like Reader, Calendar and Docs.

I won't go into a detailed comparison here, because it's been done thousands of times before and any comparison done here will be invalid in a few days. Instead, I'll offer a short list of popular browsers, along with some advice that you might want to try installing and using them. There's no risk in giving them a shot, and you might find a new favorite...

Firefox - Firefox is a product of the Mozilla project, and is a strong contender. It's generally more secure and feature rich that Internet Explorer, and is supported by a whole array of 'add ins' that you can install to extend it's ability WAY beyond 'just' browsing the web.
Chrome - a relative newcomer, Chrome has some very technical differences (behind the scene stuff) that many users won't care to hear. What those differences mean, though, is you get a very stable and clean web browser.
Opera - touted as a very fast browser, Opera is a mature product that leads the way with some neat features (like the 'speed dial' interface/startpage).
Safari - Apple's major web browser offering. If you're reading this from a Mac, you're probably using Safari already. If you're reading this from a Windows machine, you can install Safari and see the web world like a Mac user.

One last comment I'll offer is that some web pages behave better in one browser than another. If you have a couple browsers installed, when you run into that page that just won't load correctly, you might be able to load it up in another browser and have better luck. Have fun!

Engrish.com

Two sites (or one, really, divided into parts) finding humor in the difficulty that is the English language.

Rated 'PG':
http://www.engrish.com

...and it's Rated 'R' counterpart:
http://adult.engrish.com

My sides ache after reading through them...

The Septic's Companion

OK, so I've already posted about this on FaceBook, and I'm sure I had something about it 2 years ago on my (old) blog, but Chris Rae has a really funny book out that compares the American definition of various words to their British counterparts.

Here's the link...if you go check out the site, you can get a very good sample of Chris' writing style and sense of humor, without paying a penny.

The Septic's Companion: A British Slang Dictionary - A dictionary of British slang, written by a Scotsman living in America

I'm waiting for my copy to arrive, so I haven't confirmed this personally yet, but Chris assured me via email that my name is given proper credit somewhere inside...presumably in painfully tiny print, for a definition I gave him to include. That's probably as close to being published as I'll get, but I'll take it. Thanks Chris!

In the spirit of full disclosure, Chris has also promised a free copy of the book, just for posting this and promoting for him. Since I'll then have 2 copies, I'll take bids/bribes for giving one of them up, if you're interested. Or maybe you'll get lucky and I'll give you one for Christmas or something.

Faxing by Email

With (especially business) users on the go more and more, we're finding ourselves less tied to a 'real' office environment. One of the classic tie-downs, though, is the fax machine. Still a useful tool, is there any way to keep the convenience of a fax, but take advantage of new technology and cut the ties to the office? If not, this would be a short article; read on for an explanation and example:

"Email to Fax" and "Fax to Email" services are available from various online companies. Essentially, you pay a monthly service charge to the company, and they give you a phone number you can use for fax transmissions. When someone sends a fax to your number, the fax is converted by the service into an email message that shows up in your email inbox. Usually, the original fax message is attached to the message in pdf format, but other options are available.

To send a fax using these services, you (usually) are given a special email address to send your fax. You compose the email message and attach documents if you want (pdf, doc, xls, etc.). The service converts your message into a fax transmission and delivers it to the destination fax machine. Most of the time, the recipient has no idea the fax came from your mail account and not from a 'real' fax machine.

Pricing for fax>email services varies widely, but (as of this writing) GoDaddy.com offers plans as low as $9 per month, or $13 per month for a toll free fax number.

IMAP vs. POP mail accounts

More and more users are taking their email on the road with connected devices (i.e. Blackberry, Palm, Windows Mobile phones), so staying connected is easier than ever. It can get a little complicated, though, if your mail account isn't set up properly for your growing needs. If you're struggling because some of your email is only available at your desk, and some of it is only available only on your phone, read on for (hopefully) some help...

Most consumer (and business) email accounts are set up as POP (or POP3) accounts. POP stands for Post Office Protocol...and this kind of email account works a lot like the real Post Office. The server (the Post Office) holds your mail/email until you 'pick it up' by clicking 'Send/Receive' in Outlook Express, or some other email client. From that point on, the mail only exists on your local computer...the copy on the server is deleted afte the mail is downloaded to your local computer. Since mail can only be delivered to one place by the post office, you also can't get access to those messages from any other computer.

The other major option for email is called an IMAP account. With IMAP, the mail always stays on the server. When you want to view it, you open up a program (like Outlook) and that program goes out the server to get a list of messages for you to view. You read, compose, reply, forward, and delete the messages just like in a POP account, but you're just looking at a local copy of what the server is holding for you...the messages don't actually exist on your computer. This allows you to move to a different computer, access your email account, and see the exact same message list. IMAP gives you 'anywhere-access' to your messages.

The downside of IMAP is that it requires you to be connected to the Internet constantly...it's not very good at working offline. If you have a steady, high-speed Internet connection, this isn't usually a problem...but it's worth considering if you use dial-up.

Cost-wise, there isn't much difference...but IMAP is slightly more expensive. This is especially true if you have a lot of email, and you're not the deleting kind of user, because you have to pay for constant online storage of those messages.

Here are links to other discussions about IMAP vs. POP mail accounts.
http://www.helpdesk.ilstu.edu/kb/index.phtml?kbid=1172
http://www.washington.edu/computing/windows/issue13/imap_pop.html
http://www.imap.org/papers/imap.vs.pop.brief.html

Google Chrome's crash dialog

Hey, if your web browser is going to crash anyway, it might as well have a little personality. This is better than the cold messages you normally get from applications.

inline:screenshot.5.png

Globetrotter action

Photo_012709_002.jpg

Cold morning

Photo_012709_001.jpg

That's -22F. Sheesh.

View/Copy Windows RAID0 array from Ubuntu Live CD

I had a customer computer, which was running Windows XP Pro on a RAID 0 array (striping). There were twin 230GB hard drives, striped into a 460GB RAID0. Customer bought new 1 TB drives, and wanted them installed. This time, though, there would be no RAID, just one drive for the OS and programs, and one for the customer's data.

I wanted to see if I could get Ubuntu's Live CD to copy the RAID0 partition from the old drives to a new partition on the new terabyte drive. The Ubunut (Ibix, 8.10) Live CD comes with GParted on it, so copying partitions from one disk to another is a snap. THe issue is that you have to get Ubuntu to recognize the Windows FakeRaid before you can copy anything...GParted won't (by itself) see the RAID0/striping, and it wil look like two unformatted disks.

The solution, it turns out, is pretty simple. You only have to install one more package to let Ubuntu Live see your RAID. Boot to the Live CD, make sure the machine has an Internet connection, and issue the command:

sudo apt-get install dmraid

Once that's is complete, (re)start GParted, and your RAID devices will show up in the list. Note that they'll have some craxy-long complex names, but there's logic to the naming. The one without the numeric identifier is the actual RAID, the others are the participating partitions. This is what mine looked like:

iswbfjbdhhceaARRAY
iswbfjbdhhceaARRAY1
iswbfjbdhhceaARRAY2

You can now use GParted as normal to copy the partitions from your array to the new hard drive.

Small issue with eeePC dial-up over Palm Treo 755p

In a previous post, I wrote about setting up a tethered dial-up connection using a Palm Treo 755p and an eeePC.

It seems that during the upgrade process from Ubuntu 8.04 (Hardy) to 8.10 (Intrepid), something changed in the networking modules and broke this...a little bit.

The problem was that after the upgrade) the system was holding onto the 'default gateway' of my wired connection, even after dialing up the ppp connection, so it wasn't properly routing requests (trying to send requests through the ppp network, via the the wired default gateway).

I found this post where a suggestion to include 'replacedefaultroute' in ppp-script-treo solved the problem.

Installing an APC UPS to support an Ubuntu server

I just had an opportunity to install a new APC (Model BN1250LCD) UPS to support an Ubuntu Linux server. Configuration was really easy thanks to this post on the Ubuntu forums and this post in Ubuntu's Community Help documentation.

The only oddity I noticed was that after starting apcupsd, there was no notice in the /var/log/apcupsd.events of the successful start. No big deal, I guess...it still responds to /etc/init.d/apcupsd status with all the happy details of the UPS' condition.

I ended up plugging my cable modem, wireless router, printer, and scanner into the UPS too, just to try to keep some 'extra' services alive for as long as possible. Even with all that plugged in, the UPS still reports only about 16% load.

Incidentally, Sam's Club had the best price for this device...pretty cheap insurance at $140, me thinks.