Next steps

From WebOS Internals
Jump to navigation Jump to search

The old, manual setup of Optware and users can be found here.

Automated Setup of Optware, Users and Access

The webOS community asks that users who have obtained access to the Linux subsystem install a standard set of software to ensure everyone has the necessary tools in place to use the resources the community is providing.

In particular, this includes the Optware package manager. Palm's webOS uses the ipkg package manager internally. The community has a version of ipkg called ipkg-opt which accesses the Optware library of over 1300 Linux programs available for installation on the Pre.

Palm has indicated that they have no intention of using the /opt directory, so we direct our installs to /opt/bin rather than /bin to avoid being overwritten by future Palm software upgrades.

In addition, the standard package creates a non-root user, installs sudo, and includes a SSH program (Dropbear) and SFTP program.

For your convenience, we've packaged all this up into a simple script.

Optware Setup

Installing Optware in the Emulator?

If you're attempting to install these packages to your emulator, you must first add sufficient space by enabling a virtual disk.

After completing the process of obtaining access to your Pre, do the following:

Type each line exactly as it appears. Copying and pasting is probably a good idea.

Note to Windows Putty users: To paste in putty, simply right-click and the program pastes into the terminal whatever you have copied to the clipboard.

<source lang=bash>

cd /tmp
wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/optware-bootstrap.sh
#Alternately you can use this tiny url http://tinyurl.com/n8q2vy
sh optware-bootstrap.sh
source /etc/profile.d/optware
</source>

Follow the on-screen instructions.

If you want to review the script before you run it, you can look here:

http://gitorious.org/webos-internals/bootstrap/blobs/master/optware-bootstrap.sh

Note that using the WiFi connection for the above steps is to be highly recommended over the 3G or GSM options, which are reported as sometimes failing. (Turn on aeroplane mode then turn on and connect to WiFi)

Quilt setup

Optionally, you can then install the quilt patch manager which allows multiple-file patches. (Yes, the pun was intentional. Quilt manages multiple patches.) This installation process has also been packaged into a simple script. It will install quilt, and all of its dependencies, and create a local clone of the WebOS-Internals patch repository. Applying Patches provides a more thorough guide on the use of quilt.

Again, type each line exactly as it appears. Copying and pasting is probably a good idea.

<source lang=bash>

cd /tmp
wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/quilt-bootstrap.sh
sh quilt-bootstrap.sh
</source>

If you want to review the script before you run it, you can look here:

http://gitorious.org/webos-internals/bootstrap/blobs/master/quilt-bootstrap.sh

Finishing

To finish off, turn Developer Mode back to "Off" (which will reboot your Pre).

Once you are finished, you may SSH into your Pre with an SSH client like Putty:

  • Find your IP address on your Pre with CheckMyIP.com
    • In many cases, you are in a local network, but checkmyip.com gives you the WAN addess. Install whatismyip from the homebrew catalog to get your pre's ip address within the local network and use that
  • SSH to that IP address on port 222
    • If you're doing this over EVDO, there may be a lot of latency. Be patient.
    • You can optionally install Avahi and SSH to castle.local.
    • Dynamic DNS is helpful for consistently accessing the Pre over EVDO with a simple name.
  • Log in with the username and password you created during the Optware installation
    • Many operations cannot be carried out with the permissions of that username. You'll need to sudo those operations with the new username's password

Only the default shell (/bin/ash) will work for ssh. To change your shell to bash (which will be located in /opt/bin/bash, once you've completed the quilt install procedure above), you will have to create an /etc/shells file, and add the following lines:

/bin/ash
/bin/sh
/opt/bin/bash

Then you will be able to edit /etc/passwd and change the shell parameter for the user you created. Note that if you try to change your shell without adding an /etc/shells the SSH server (Dropbear) will look like it is rejecting your password on subsequent connections.