Difference between revisions of "Next steps"

From WebOS Internals
Jump to navigation Jump to search
(Removed all the deprecated material)
Line 1: Line 1:
{{deprecated|
+
=Install Preware=
'''If all you want to do is install an SSH or SFTP server''': Just go to the Optware section in [[Preware]] and install it from there. Then go to the [http://www.webos-internals.org/wiki/Application:OpenSSH OpenSSH package homepage] and read the instructions there to create an SSH key for use when accessing your phone via ssh or sftp.
+
To start getting the most out of your new webOS Device you should install Preware. Continue on to the [[Application:Preware|Preware]] page. There you will see all the ways to install Preware on your device. Including stand-alone installers, package installation and an automated script like you did here.
 
 
'''Otherwise''': continue as below.
 
 
 
Note that 99% of people should do the above.  If you don't have an extremely good and knowledgeable reason do progress past this point in the page, then don't.
 
 
 
}}
 
 
 
=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 (Manual)==
+
Then go to the Optware section in [[Preware]] and install OpenSSH and OpenSSH SFTP Server from there.
  
===Installing Optware in the Emulator?===
+
Then go to the [http://www.webos-internals.org/wiki/Application:OpenSSH OpenSSH package homepage] and read the instructions there to create an SSH key for use when accessing your phone via ssh or sftp.
If you're attempting to install these packages to your emulator, you must first add sufficient space by [[Adding_Disks_to_the_Emulator|enabling a virtual disk]].
 
  
After completing the process of obtaining access to your Pre, do the following:
+
If you want to access the optware command line package library, then also install the Optware Advanced Linux Command Line Installer package.
 
 
'''Type each line exactly as it appears.  Copying and pasting is probably a good idea.'''
 
''' This is confirmed to work with webOS 1.3.1 '''
 
''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.''
 
 
 
<div style="font-size:100%;">
 
<source lang=bash>
 
cd /tmp
 
wget http://gitorious.org/webos-internals/bootstrap/blobs/raw/master/optware-bootstrap-manual.sh
 
chmod 755 ./optware-bootstrap-manual.sh
 
sh optware-bootstrap-manual.sh
 
source /etc/profile.d/optware
 
</source></div>
 
 
 
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-manual.sh http://gitorious.org/webos-internals/bootstrap/blobs/master/optware-bootstrap-manual.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)
 
 
 
As part of this process, you will be creating an unprivileged user account that you can later use to log in to your device.  The username that you pick must be lowercase, longer than 3 characters, contain at least one letter, and may only be letters, numbers, dashes (-), and underscores (_).  Once you enter your username, you will enter a password.  Make sure to pick a strong password for your own security.  If you make a typo when entering your password, don't panic.  Once the script has finished running, simply type:
 
 
 
<div style="font-size:100%;">
 
<source lang=bash>
 
passwd username
 
</source></div>
 
 
 
"username" should, of course, be the username that you created.  This will allow you to re-enter your password correctly.
 
 
 
==Finishing==
 
 
 
There is no need to turn developer mode off.  If you do, you will not be able to use WebOS Quick Install, the SDK or Novaterm.  Leave it on.  
 
  
 
Once you are finished, you may SSH into your Pre with an SSH client like [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty]:
 
Once you are finished, you may SSH into your Pre with an SSH client like [http://www.chiark.greenend.org.uk/~sgtatham/putty/ Putty]:
 
*Find your IP address on your Pre with [http://checkmyip.com/ CheckMyIP.com]
 
*Find your IP address on your Pre with [http://checkmyip.com/ 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
 
**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
+
*SSH to that IP address on port 22
 
**If you're doing this over EVDO, there may be a lot of latency.  Be patient.
 
**If you're doing this over EVDO, there may be a lot of latency.  Be patient.
 
**You can optionally install [[Avahi]] and SSH to <tt>castle.local.</tt>
 
**You can optionally install [[Avahi]] and SSH to <tt>castle.local.</tt>
 
**[[Tutorials_Linux_DDNS_for_EVDO|Dynamic DNS]] is helpful for consistently accessing the Pre over EVDO with a simple name.
 
**[[Tutorials_Linux_DDNS_for_EVDO|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
+
*Log in as root using the ssh key you created during the Optware installation
**Many operations cannot be carried out with the permissions of that username.  You'll need to [[Basic_Linux_Use#sudo|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 [http://www.webos-internals.org/wiki/Setup_Bash 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.
 
 
 
=Install Preware=
 
To start getting the most out of your new webOS Device you should install Preware. Continue on to the [[Application:Preware|Preware]] page. There you will see all the ways to install Preware on your device. Including stand-alone installers, package installation and an automated script like you did here.
 

Revision as of 09:11, 13 August 2010

Install Preware

To start getting the most out of your new webOS Device you should install Preware. Continue on to the Preware page. There you will see all the ways to install Preware on your device. Including stand-alone installers, package installation and an automated script like you did here.

Then go to the Optware section in Preware and install OpenSSH and OpenSSH SFTP Server from there.

Then go to the OpenSSH package homepage and read the instructions there to create an SSH key for use when accessing your phone via ssh or sftp.

If you want to access the optware command line package library, then also install the Optware Advanced Linux Command Line Installer package.

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 22
    • 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 as root using the ssh key you created during the Optware installation