Wednesday, July 20, 2011

Running UbuntuChroot on #webOS

Recently I just managed partitioning my Pre to make it possible running UbuntuChroot in it. Yes, you've got it right, UbuntuChroot running on my Pre. You can see here for the Wiki. The hard thing is the first part, because you have to Meta-Doctor-ing your Pre, so it will have separate ext3fs partition. I'm Doctor-ing using webOS 2.1.0, and skip the "git" part, you have to search for it in the internet.

1. Here's the command I used:
$ make DEVICE=preplus CARRIER=wr VERSION=2.1.0 ENABLE_DEVELOPER_MODE=1 DISABLE_UPLOAD_DAEMON=1 DISABLE_UPDATE_DAEMON=1 CUSTOM_MODEL_LIST=P100UEU CUSTOM_BOOTLOGO=scripts/WebOS-Internals.tga EXT3FS_PARTITION_SIZE=2GB clobber all
2. After it done, run the installation process. And continue with configuration to automounting ext3fs partition at device boot.
3. Using Preware, activate the testing feed, then installing Xcecutah, Xserver and UbuntuChroot 11.04
4. Launch Excecutah to run Xserver and UbuntuChroot 11.04, here's what I've got:



5. You can use usual Ubuntu apt-get command to update repository and installing packages. And you can also use apt-cache search to look for certain packages that works on ARM processor.
6. This is the screenshot of htop running on my Pre:


Friday, July 15, 2011

Google Latitude on #webOS

The lack of Latitude feature on Google Maps for #webOS is really unpleasant, but people at precentral already manage to enable it, easily.

All you have to do is launch your #webOS browser, then open up this URL: http://maps.google.com/maps/m?mode=latitude






Magically it will launch Google Maps with Latitude feature in it.





To make it easy to launch everytime I need it, I installed patch like I explained in my previous blog post, so I make Launcher icon and named it "Google Latitude"



Set Permanent Compcache on #webOS 2.1.0

If you're using Pre and meta-doctored it to #webOS 2.1.0 like I did, you should install and using Govnah + custom kernel (UberKernel). And then, since Pre only has 256 MB of memory, you can tweak the compcache (from Linux compcache that already porting to custom kernel by webos-internals) to make the value changed from only 10 MB to 32 MB, so the performance will enhance.

I tend to make it permanent, so here's what I did:
1. Connect Pre using USB cable to your PC
2. Accessing linux:
$ novaterm
3. Type following command:
# /usr/sbin/rootfs_open -t
# vi /etc/event.d/compcache
4. Change the value:
Look for value 10240 in line 10, then replace it with 32768, save and quit (:wq)
5. Reboot the device:
# /sbin/reboot

After it rebooted, you can check the compcache value using Govnah. For complete how-to, you can check here.

Monday, July 11, 2011

Installing Dropbox on Ubuntu Server 10.04

Just installed on my PC running Ubuntu Server 10.04, a little hard to find source to add to repository. But here it is, all you need to do is just follow these steps:

1. Make sure you have installed Nautilus
$ sudo apt-get install nautilus
2. Install public key to authenticate Dropbox's Ubuntu repository
$ sudo apt-key adv --keyserver pgp.mit.edu --recv-keys 5044912E
3. Add source to repository
$ sudo vim /etc/apt/sources.list
#Dropbox
deb http://linux.dropbox.com/ubuntu lucid main
4. Update repositories
$ sudo apt-get update
5. Install Dropbox integration for Nautilus
$ sudo apt-get install nautilus-dropbox
6. Starting Dropbox daemon
$ dropbox start -i


You have to restart all intances of Nautilus, then start Dropbox and fill in your account information. That's it! :)



Friday, July 8, 2011

How to Make MacPorts vim default in Mac OS X Terminal

If you, like I did, ever wanted to use vim with more option, e.g. support for python, or ruby.. then you have to re-compile vim in order to use it in your Mac OS X. You can compile from source, or using Macports like me. You can also view several daily used command for macports in my blogpost here.

First, you can check what version of vim you have by typing "vim" in your Terminal apps. Then, using macports, you just execute this command:
$ sudo port -v install vim +python
After finished, you can find that newest version of vim (compare to built-in version of vim), is located in: /opt/local/share/vim/ directory

Or you can find it using find command:
$ sudo find / -name "vim"
After that, you need to put the path into $PATH, because if you're not doing that, Terminal apps in Mac OS X will execute the default built-in vim. Also, you need to put it in the beginning of your path:
PATH=/opt/local/share:/opt/local/bin:/opt/local/sbin:$PATH
That's it. Close your Terminal window/ tab, and start a new one. Type "vim" on your shell, and you'll see that you already have the new version of vim. Enjoy! :)

Show hidden files in Mac OS X Finder

While accessing my #webOS device, there comes a time when I need to show hidden files. But you can't find anywhere in the menu, just like you did with Folder Properties in Windows operating system. All you have to do is simple, using Terminal apps. Here's what you have to do:

1. Open Terminal apps
2. Type this command:
$ defaults write com.apple.finder AppleShowAllFiles TRUE
$ killall Finder
And suddenly you'll find changes in your Finder. If you ever want to get the already-revealed hidden files to default, just type the same command as above and change TRUE to FALSE:
$ defaults write com.apple.finder AppleShowAllFiles FALSE
$ killall Finder


Adding Flash Support in #webOS 2.1.0 Meta-Doctor

I've contributed to this wiki page, with the help of many homebrew developers. And also, although step no. 6 is obsolete as in written in the wiki page, I've already done this 3 times and always succeeded if I'm doing step no. 6. So, I put it in here :)

Adobe Flash

Adobe Flash is not included in this webOS 2.1 doctor, but can be added with files from a VZW Pre 2 2.0.1 doctor.

Adding Flash Support

The easiest way to enable Adobe Flash on your webOS 2.1.0 legacy device is by creating a modular package and installing that, along with a patch to make the Adobe Flash preferences visible in the browser.

Step 1. Prerequisites

  • Download the Verizon 2.0.1 Pre 2 Doctor (here)
  • Download Jason Robitaille's IPK Packager (here)
  • Download webOS Quick Install (here)
  • Download temporary directory (here) and unzip the FlashPluginContainer folder to your desktop
  • Download patch to enable Flash preferences in the browser (here)

Step 2. Unpack

  • Open the 2.0.1 doctor with an archive manager, like 7zip. Navigate to "resources/webOS.tar/./nova-cust-image-roadrunner.rootfs.tar.gz/./" This is where the Flash files are stored.
  • Extract the following files from the webOS ROM:
/etc/adobe/mms.cfg
/etc/adobe/oem.cfg
/usr/lib/BrowserServerPlugins/libflashplayer.so
/usr/lib/BrowserServerPlugins/resource/plugin-icon-noplay.png
/usr/lib/BrowserServerPlugins/resource/plugin-icon-play-down.png
/usr/lib/BrowserServerPlugins/resource/plugin-icon-play.png
/usr/lib/BrowserServerPlugins/resource/plugin-icon-unknown.png
/usr/lib/BrowserServerPlugins/resource/plugin-scrim.png
/usr/lib/libFlashGraphics.so
/usr/lib/BrowserServerPlugins/FlashMiniAdapterData/plugin-icon-noplay.png
/usr/lib/BrowserServerPlugins/FlashMiniAdapterData/plugin-icon-play.png
/usr/lib/BrowserServerPlugins/FlashMiniAdapterData/plugin-icon-unknown.png
/usr/lib/BrowserServerPlugins/FlashMiniAdapterData/plugin-scrim.png
/usr/lib/BrowserServerPlugins/FlashMiniPlugin.so

Step 3. Drag 'N' Drop

  • Simply place the files from the ROM into the FlashPluginContainer folder in their respective locations.
  • Pay close attention to where each file/folder is stored inside the webOS ROM.

Step 4. Packaging

  • Open Jason's IPK Packager and point the program to the files folder. Do NOT point to FlashPluginContainer, as the install will fail.
  • The rest of the fields will populate on their own.
  • Save the IPK file somewhere using "Create IPK Package." You may want to keep it handy.

Step 5. Wrap Up

  • Use webOS Quick Install to install both IPK and patch.
Note: The patch to enable Flash preferences is also available in Preware.
Note: People are reporting problems with installing the IPK with WOSQI v4.04, installing it via Preware seems to work well.

Step 6. Edit system files

Open /usr/palm/applications/com.palm.app.browser/app/controllers/preferences-assistant.js (either in your MetaDoctor or on your live device -if on a live device, remember to make a backup!)

Find the following two lines (should be lines 46 & 47) and comment them out by adding // to the beginning of each line:
this.controller.get("flashPref").hide();
this.controller.get("autoLoadPref").hide();

Step 7. Reboot

Reboot your devices for changes to take effect