<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cyclic</id>
	<title>WebOS Internals - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.webos-internals.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Cyclic"/>
	<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/wiki/Special:Contributions/Cyclic"/>
	<updated>2026-04-15T20:07:28Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18245</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18245"/>
		<updated>2011-09-03T18:11:53Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Libraries''' ==&lt;br /&gt;
Once you have your toolchain configured and you have had a chance to get your SB2 cross compiler working with one of the applications above, you might be looking to add libraries or compile libraries and &amp;quot;stage&amp;quot; them into your cross compiler /usr directory. The /usr directory in your toolchain is the directory that contains the lib files and include files necessary to compile libraries or applications against the toolchain. Since the TouchPad is targeting armv7, we have to compile libraries to target the armv7 architecture and stage them into the architecture's root /usr/lib and include directories.&lt;br /&gt;
&lt;br /&gt;
Don't worry, once you get the hang of it, it's pretty straight forward. You just have to trust that this is the fastest and easiest way to pull down code, compile dependencies, and get the ball rolling on your own library or application.&lt;br /&gt;
&lt;br /&gt;
You might also be interested in using additional libraries in your projects. Your best bet for getting the latest source is to look in the locations of the existing libraries used in other packages.  &lt;br /&gt;
&lt;br /&gt;
It's a good idea to first take a look at the directories for all of the common libraries that were downloaded when you setup your toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/cross-compile/packages/common/x&lt;br /&gt;
ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each directory here is a separate library. The library folder contains a Makefile, which links to other Makefiles.  The Makefiles download source for the library and compile the various dependencies of the library that kicked off the make command.  &lt;br /&gt;
&lt;br /&gt;
Let's start by simply compiling libxcb and take a look at the different pieces involved in getting the library to compile properly.  If you crack open the Makefile for libxcb:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano /srv/preware/cross-compile/packages/common/x/libxcb/Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the name of the project, the version number for libxcb (this is used to download the package from the tar) and the SRC_BZ2 url.  The SRC_BZ2 url can be changed to point to the package that you're looking to compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME = libxcb&lt;br /&gt;
VERSION = 1.7&lt;br /&gt;
&lt;br /&gt;
DEPENDS = x/xcbproto         \&lt;br /&gt;
                  x/libpthread-stubs \&lt;br /&gt;
                  x/xau&lt;br /&gt;
&lt;br /&gt;
SRC_BZ2 = http://xcb.freedesktop.org/dist/${NAME}-${VERSION}.tar.bz2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For most instances, the above text is the only text you will need to modify (for most cases where you need to compile your own library folder in the packages directory).  The process is pretty straight forward from here. Keep in mind, any folder you list in the DEPENDS section will need to exist and have a Makefile containing similar logic as the makefile you created for the library that lists it in its Makefile depends section.&lt;br /&gt;
&lt;br /&gt;
If you want to test out compiling and staging (installing the library into your target architecture /usr/lib and include folder like we mention above), just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make stage package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Note:''' some packages might need additional work to compile (e.g. compiling libxcb requires that you create the full path for the documentation before it will install properly /usr/local/share/doc/libxcb/tutorial).&lt;br /&gt;
&lt;br /&gt;
Now when you want to configure your own application or library outside of the toolchain or preware directory (such as a library or application you downloaded or are using Eclipse to develop) simply cd into that source directory and enter the toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
./configure&lt;br /&gt;
make all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Making and packaging builds the goods, packages them for you in a neat little ipkg and places the code where it needs to go for other apps and libraries to link to.  That's about all there is to it!&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18243</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18243"/>
		<updated>2011-09-03T18:07:33Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Libraries''' ==&lt;br /&gt;
Once you have your toolchain configured and you have had a chance to get your SB2 cross compiler working with one of the applications above, you might be looking to add libraries or compile libraries and &amp;quot;stage&amp;quot; them into your cross compiler /usr directory. The /usr directory in your toolchain is the directory that contains the lib files and include files necessary to compile libraries or applications against the toolchain. Since the TouchPad is targeting armv7, we have to compile libraries to target the armv7 architecture and stage them into the architecture's root /usr/lib and include directories.&lt;br /&gt;
&lt;br /&gt;
Don't worry, once you get the hang of it, it's pretty straight forward. You just have to trust that this is the fastest and easiest way to pull down code, compile dependencies, and get the ball rolling on your own library or application.&lt;br /&gt;
&lt;br /&gt;
You might also be interested in using additional libraries in your projects. Your best bet for getting the latest source is to look in the locations of the existing libraries used in other packages.  &lt;br /&gt;
&lt;br /&gt;
It's a good idea to first take a look at the directories for all of the common libraries that were downloaded when you setup your toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/cross-compile/packages/common/x&lt;br /&gt;
ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each directory here is a separate library. The library folder contains a Makefile, which links to other Makefiles.  The Makefiles download source for the library and compile the various dependencies of the library that kicked off the make command.  &lt;br /&gt;
&lt;br /&gt;
Let's start by simply compiling xproto and take a look at the different pieces involved in getting the library to compile properly.  If you crack open the Makefile for xproto:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano /srv/preware/cross-compile/packages/common/x/libxcb/Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the name of the project, the version number for xproto (this is used to download the package from the tar) and the SRC_BZ2 url.  The SRC_BZ2 url can be changed to point to the package that you're looking to compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME = libxcb&lt;br /&gt;
VERSION = 1.7&lt;br /&gt;
&lt;br /&gt;
DEPENDS = x/xcbproto         \&lt;br /&gt;
                  x/libpthread-stubs \&lt;br /&gt;
                  x/xau&lt;br /&gt;
&lt;br /&gt;
SRC_BZ2 = http://xcb.freedesktop.org/dist/${NAME}-${VERSION}.tar.bz2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For most instances, the above text is the only text you will need to modify (for most cases where you need to compile your own library folder in the packages directory).  The process is pretty straight forward from here. Keep in mind, any folder you list in the DEPENDS section will need to exist and have a Makefile containing similar logic as the makefile you created for the library that lists it in its Makefile depends section.&lt;br /&gt;
&lt;br /&gt;
If you want to test out compiling and staging (installing the library into your target architecture /usr/lib and include folder like we mention above), just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make stage package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Note:''' some packages might need additional work to compile (e.g. compiling libxcb requires that you create the full path for the documentation before it will install properly /usr/local/share/doc/libxcb/tutorial).&lt;br /&gt;
&lt;br /&gt;
Now when you want to configure your own application or library outside of the toolchain or preware directory (such as a library or application you downloaded or are using Eclipse to develop) simply cd into that source directory and enter the toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
./configure&lt;br /&gt;
make all&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cmake .&lt;br /&gt;
make&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Making and packaging builds the goods, packages them for you in a neat little ipkg and places the code where it needs to go for other apps and libraries to link to.  That's about all there is to it!&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18241</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18241"/>
		<updated>2011-09-03T17:57:13Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Libraries''' ==&lt;br /&gt;
Once you have your toolchain configured and you have had a chance to get your SB2 cross compiler working with one of the applications above, you might be looking to add libraries or compile libraries and &amp;quot;stage&amp;quot; them into your cross compiler /usr directory. The /usr directory in your toolchain is the directory that contains the lib files and include files necessary to compile libraries or applications against the toolchain. Since the TouchPad is targeting armv7, we have to compile libraries to target the armv7 architecture and stage them into the architecture's root /usr/lib and include directories.&lt;br /&gt;
&lt;br /&gt;
Don't worry, once you get the hang of it, it's pretty straight forward. You just have to trust that this is the fastest and easiest way to pull down code, compile dependencies, and get the ball rolling on your own library or application.&lt;br /&gt;
&lt;br /&gt;
You might also be interested in using additional libraries in your projects. Your best bet for getting the latest source is to look in the locations of the existing libraries used in other packages.  &lt;br /&gt;
&lt;br /&gt;
It's a good idea to first take a look at the directories for all of the common libraries that were downloaded when you setup your toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/cross-compile/packages/common/x&lt;br /&gt;
ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each directory here is a separate library. The library folder contains a Makefile, which links to other Makefiles.  The Makefiles download source for the library and compile the various dependencies of the library that kicked off the make command.  &lt;br /&gt;
&lt;br /&gt;
Let's start by simply compiling xproto and take a look at the different pieces involved in getting the library to compile properly.  If you crack open the Makefile for xproto:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano /srv/preware/cross-compile/packages/common/x/libxcb/Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the name of the project, the version number for xproto (this is used to download the package from the tar) and the SRC_BZ2 url.  The SRC_BZ2 url can be changed to point to the package that you're looking to compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME = libxcb&lt;br /&gt;
VERSION = 1.7&lt;br /&gt;
&lt;br /&gt;
DEPENDS = x/xcbproto         \&lt;br /&gt;
                  x/libpthread-stubs \&lt;br /&gt;
                  x/xau&lt;br /&gt;
&lt;br /&gt;
SRC_BZ2 = http://xcb.freedesktop.org/dist/${NAME}-${VERSION}.tar.bz2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For most instances, the above text is the only text you will need to modify (for most cases where you need to compile your own library folder in the packages directory).  The process is pretty straight forward from here. Keep in mind, any folder you list in the DEPENDS section will need to exist and have a Makefile containing similar logic as the makefile you created for the library that lists it in its Makefile depends section.&lt;br /&gt;
&lt;br /&gt;
If you want to test out compiling and staging (installing the library into your target architecture /usr/lib and include folder like we mention above), just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make stage package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Note:''' some packages might need additional work to compile (e.g. compiling libxcb requires that you create the full path for the documentation before it will install properly /usr/local/share/doc/libxcb/tutorial).&lt;br /&gt;
&lt;br /&gt;
Making and packaging builds the goods, packages them for you in a neat little ipkg and places the code where it needs to go for other apps and libraries to link to.  That's about all there is to it!&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18239</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18239"/>
		<updated>2011-09-03T17:55:36Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Libraries */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Libraries''' ==&lt;br /&gt;
Once you have your toolchain configured and you have had a chance to get your SB2 cross compiler working with one of the applications above, you might be looking to add libraries or compile libraries and &amp;quot;stage&amp;quot; them into your cross compiler /usr directory. The /usr directory in your toolchain is the directory that contains the lib files and include files necessary to compile libraries or applications against the toolchain. Since the TouchPad is targeting armv7, we have to compile libraries to target the armv7 architecture and stage them into the architecture's root /usr/lib and include directories.&lt;br /&gt;
&lt;br /&gt;
Don't worry, once you get the hang of it, it's pretty straight forward. You just have to trust that this is the fastest and easiest way to pull down code, compile dependencies, and get the ball rolling on your own library or application.&lt;br /&gt;
&lt;br /&gt;
You might also be interested in using additional libraries in your projects. Your best bet for getting the latest source is to look in the locations of the existing libraries used in other packages.  &lt;br /&gt;
&lt;br /&gt;
First, you it's a good idea to take a look at the directories for all of the common libraries that were downloaded when you setup your toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/cross-compile/packages/common/x&lt;br /&gt;
ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each directory here is a separate library. The library folder contains a Makefile, which links to other Makefiles.  The Makefiles download source for the library and compile the various dependencies of the library that kicked off the make command.  &lt;br /&gt;
&lt;br /&gt;
Let's start by simply compiling xproto and take a look at the different pieces involved in getting the library to compile properly.  If you crack open the Makefile for xproto:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano /srv/preware/cross-compile/packages/common/x/libxcb/Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should see the name of the project, the version number for xproto (this is used to download the package from the tar) and the SRC_BZ2 url.  The SRC_BZ2 url can be changed to point to the package that you're looking to compile.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME = libxcb&lt;br /&gt;
VERSION = 1.7&lt;br /&gt;
&lt;br /&gt;
DEPENDS = x/xcbproto         \&lt;br /&gt;
                  x/libpthread-stubs \&lt;br /&gt;
                  x/xau&lt;br /&gt;
&lt;br /&gt;
SRC_BZ2 = http://xcb.freedesktop.org/dist/${NAME}-${VERSION}.tar.bz2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For most instances, the above text is the only text you will need to modify (for most cases where you need to compile your own library folder in the packages directory).  The process is pretty straight forward from here. Keep in mind, any folder you list in the DEPENDS section will need to exist and have a Makefile containing similar logic as the makefile you created for the library that lists it in its Makefile depends section.&lt;br /&gt;
&lt;br /&gt;
If you want to test out compiling and staging (installing the library into your target architecture /usr/lib and include folder like we mention above), just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make stage package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''Note:''' some packages might need additional work to compile (e.g. compiling libxcb requires that you create the full path for the documentation before it will install properly /usr/local/share/doc/libxcb/tutorial).&lt;br /&gt;
&lt;br /&gt;
Making and packaging builds the goods, packages them for you in a neat little ipkg and places the code where it needs to go for other apps and libraries to link to.  That's about all there is to it!&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18221</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18221"/>
		<updated>2011-09-03T05:49:05Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Libraries''' ==&lt;br /&gt;
Once you have your toolchain configured and you have had a chance to get your SB2 cross compiler working with one of the applications above, you might be looking to add libraries or compile libraries and &amp;quot;stage&amp;quot; them into your cross compiler /usr directory. The /usr directory in your toolchain is the directory that contains the lib files and include files necessary to compile libraries or applications against the toolchain. Since the TouchPad is targeting armv7, we have to compile libraries to target the armv7 architecture and stage them into the architecture's root /usr/lib and include directories.&lt;br /&gt;
&lt;br /&gt;
You might also be interested in using additional libraries in your projects. Your best bet is to locate source for your code in some of the existing libraries used in other packages.  Let's start by simply compiling libxcb and take a look at the different pieces involved in getting the library to compile properly.&lt;br /&gt;
&lt;br /&gt;
First, you might want to take a look at the directories for all of the common libraries already downloaded when you setup your toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/cross-compile/packages/common/x&lt;br /&gt;
ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each directory here is a separate library. The library folder contains a Makefile, which links to other make files for both downloading source for the library and various dependencies of your project.  Don't worry, once you get the hang of it, it's pretty straight forward. You just have to trust that this is the fastest and easiest way to pull down code, compile dependencies, and get the ball rolling on your own library or application.&lt;br /&gt;
&lt;br /&gt;
If you crack open the Makefile for xproto you should see the name of the project, the version number for xproto (this is used to download the package from the tar) and the SRC_BZ2 url (you can change this URL to point to the package that you're looking to compile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano /srv/preware/cross-compile/packages/common/x/libxcb/Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME = libxcb&lt;br /&gt;
VERSION = 1.7&lt;br /&gt;
&lt;br /&gt;
DEPENDS = x/xcbproto         \&lt;br /&gt;
                  x/libpthread-stubs \&lt;br /&gt;
                  x/xau&lt;br /&gt;
&lt;br /&gt;
SRC_BZ2 = http://xcb.freedesktop.org/dist/${NAME}-${VERSION}.tar.bz2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For most instances, the above text is the only text you will need to modify (for most cases where you need to compile your own library folder in the packages directory).  The process is pretty straight forward from here. Just keep in mind, any folder you list in the DEPENDS section will need to exist and have a Makefile containing similar logic as the makefile you created for the library that lists it in its Makefile depends section.&lt;br /&gt;
&lt;br /&gt;
If you want to test out compiling and staging (installing it into your target architecture /usr/lib and include folder like we mention above), just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make stage package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Making and packaging builds the goods, packages them for you in a neat little ipkg and places the code where it needs to go for other apps and libraries to link to.  That's about all there is to it!&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18217</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18217"/>
		<updated>2011-09-03T05:47:58Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: Added info for libraries.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Libraries''' ==&lt;br /&gt;
Once you have your toolchain configured and you have had a chance to get your SB2 cross compiler working with one of the applications above, you might be looking to add libraries or compile libraries and &amp;quot;stage&amp;quot; them into your cross compiler /usr directory. The /usr directory in your toolchain is the directory that contains the lib files and include files necessary to compile libraries or applications against the toolchain. Since the TouchPad is targeting armv7, we have to compile libraries to target the armv7 architecture and stage them into the architecture's root /usr/lib and include directories.&lt;br /&gt;
&lt;br /&gt;
You might also be interested in using additional libraries in your projects. Your best bet is to locate source for your code in some of the existing libraries used in other packages.  Let's start by simply compiling libxcb and take a look at the different pieces involved in getting the library to compile properly.&lt;br /&gt;
&lt;br /&gt;
First, you might want to take a look at the directories for all of the common libraries already downloaded when you setup your toolchain:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/cross-compile/packages/common/x&lt;br /&gt;
ls&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Each directory here is a separate library. The library folder contains a Makefile, which links to other make files for both downloading source for the library and various dependencies of your project.  Don't worry, once you get the hang of it, it's pretty straight forward. You just have to trust that this is the fastest and easiest way to pull down code, compile dependencies, and get the ball rolling on your own library or application.&lt;br /&gt;
&lt;br /&gt;
If you crack open the Makefile for xproto you should see the name of the project, the version number for xproto (this is used to download the package from the tar) and the SRC_BZ2 url (you can change this URL to point to the package that you're looking to compile:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
nano /srv/preware/cross-compile/packages/common/x/libxcb/Makefile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
NAME = libxcb&lt;br /&gt;
VERSION = 1.7&lt;br /&gt;
&lt;br /&gt;
DEPENDS = x/xcbproto         \&lt;br /&gt;
                  x/libpthread-stubs \&lt;br /&gt;
                  x/xau&lt;br /&gt;
&lt;br /&gt;
SRC_BZ2 = http://xcb.freedesktop.org/dist/${NAME}-${VERSION}.tar.bz2&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For most instances, the above text is the only text you will need to modify (for most cases where you need to compile your own library folder in the packages directory).  The process is pretty straight forward from here. Just keep in mind, any folder you list in the DEPENDS section will need to exist and have a Makefile containing similar logic as the makefile you created for the library that lists it in its Makefile depends section.&lt;br /&gt;
&lt;br /&gt;
If you want to test out compiling and staging (installing it into your target architecture /usr/lib and include folder like we mention above), just type:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
make stage package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Making and packaging builds the goods, packages them for you in a neat little ipkg and places the code where it needs to go for other apps and libraries to link to.  That's about all there is to it!&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18157</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18157"/>
		<updated>2011-09-01T06:59:17Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Generate Keys from Mac OSX Method (tested with Lion) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
OpenSSH is available for installation in Preware.  Just Type &amp;quot;OpenSSH&amp;quot; in the Preware home screen to search for and install the package.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
There are two ways to generate the keys below. The PC one assumes you have a user account name and password to gain access with putty I assume it is not possible to complete the steps for that method without setting up a user account. I find the webOS method to be much easier to follow. And I imagine if you are new to linux and accessing linux on webOS then you will find the webOS method is the one you will want to follow. I also recommend the webOS method if you have trouble following the PC method or find it too wordy.&lt;br /&gt;
&lt;br /&gt;
== Generate Keys from Mac OSX Method (tested with Lion) ==&lt;br /&gt;
&lt;br /&gt;
Start a new terminal session in Mac OS and su to root.  Once in root on your mac:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bin/ssh-keygen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mv /var/root/.ssh/id_rsa.pub /var/root/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have your private and public keys, you need to copy them over to your device. Attach your TouchPad as a USB and copy the files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /var/root/.ssh/* /Volumes/HP\ TouchPad/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now disconnect the TouchPad and load up a terminal on your TouchPad. Once in a terminal, you are going to move the key files into the right locations and set permissions on the appropriate files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /media/internal/id_rsa /home/root/.ssh/&lt;br /&gt;
cp /media/internal/authorized_keys /home/root/.ssh/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is necessary to load the keys.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 ~/.ssh&lt;br /&gt;
chmod 600 ~/.ssh/id_rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's required that the upstart script is modified. As of 08/28/11, there were some issues with upstart not working and OpenSSH not loading.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /var/palm/event.d/mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comment out the existing start and stop commands and add the new stuff below it. As of writing this, it's still not clear why there were issues starting with the org.webosinternals.optware dependency, so feel free to update with better script or more details:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#start on stopped finish and started org.webosinternals.optware&lt;br /&gt;
#stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
# and started org.webosinternals.optware&lt;br /&gt;
&lt;br /&gt;
# Stop when the Software Update tool is about to install an update.&lt;br /&gt;
# upstart restarts the job when installation is complete.&lt;br /&gt;
stop on started start_update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Exit out of vi and save&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qw!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can ''test'' that sshd starts and view any key errors by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/sbin/sshd -D&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive an error, &amp;quot;Permissions 0777 for '/opt/etc/openssh/ssh_host_rsa_key' are too open.&amp;quot; you should change the permissions on this key file to 600:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and 700 on the parent directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 /opt/etc/openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive a message, opt/sbin/sshd -D Could not load host key: /opt/etc/openssh/ssh_host_ecdsa_key, you can create the key manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bin/ssh-keygen -t ecdsa -f /opt/etc/openssh/ssh_host_ecdsa_key -N ''&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_ecdsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you should be able to start sshd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
start mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test connecting remotely from your Mac (the -vvv option is for verbose debug messages, which you can remove if everything works):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
ssh &amp;lt;touchpad ip&amp;gt; -vvv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the password you used to create the key at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you have any other problems, be sure to take a look at the log files on your TouchPad:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep ssh /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the service is running:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ps aux | grep sshd&lt;br /&gt;
status mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try connecting to the TouchPad locally:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from Windows PC Method==&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys. For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ExpanDrive (SftpDrive) ===&lt;br /&gt;
&lt;br /&gt;
''Note: This requires access to the device's file system by any means.''&lt;br /&gt;
* Open ExpanDrive&lt;br /&gt;
* Click &amp;quot;New drive...&amp;quot;&lt;br /&gt;
* Type a name into the &amp;quot;Drive Name&amp;quot; box.&lt;br /&gt;
* Type in the IP address of the device in the &amp;quot;Server&amp;quot; box.&lt;br /&gt;
* Type &amp;quot;root&amp;quot; into the &amp;quot;Username&amp;quot; box.&lt;br /&gt;
* Choose &amp;quot;Use a public key to log in...&amp;quot; from the &amp;quot;Authentication&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create New Key Pair&amp;quot;&lt;br /&gt;
* Choose &amp;quot;RSA (ssh-rsa)&amp;quot; from the &amp;quot;Key type&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create Key Pairs&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Export current Key Pair&amp;quot;&lt;br /&gt;
* Click both &amp;quot;Export Private Key&amp;quot; and &amp;quot;Export Public Key&amp;quot; and save the files somewhere (remember where you saved them) and click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Open the .pub file you saved in the previous step using a plain text editor.&lt;br /&gt;
* Copy the contents of the entire file and paste it into &amp;quot;/var/home/root/.ssh/authorized_keys&amp;quot; (on the device) on the next line and save it.&lt;br /&gt;
* Go back to ExpanDrive and click &amp;quot;Ok&amp;quot; on the still open &amp;quot;Public Key Authentication Properties&amp;quot; dialog.&lt;br /&gt;
* Choose &amp;quot;Show the entire server&amp;quot; from the &amp;quot;Directory&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Connect&amp;quot; to connect and save the configuration.&lt;br /&gt;
* After the connection process is complete, a new Explorer window will open and you will be in the &amp;quot;%DriveLetter%:\var\home\root&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from webOS Method==&lt;br /&gt;
&lt;br /&gt;
Launch Preware and install [http://www.webos-internals.org/wiki/Application:Terminal Terminal] if you haven't previously installed it. If Terminal does not work, try XTerm instead. It will be used to create your secure SSH keys for use with OpenSSH directly on your webOS device. Once Terminal is installed launch it and follow these steps:&lt;br /&gt;
&lt;br /&gt;
To go to the root directory type:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
&lt;br /&gt;
Then type:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. After a short time (about a minute) accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the PC you want to access linux on webOS from. First copy the secret key to the area accessible from drive mode. To do this, type:&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
We are all done using Terminal so you can close it by tossing it off the top of the screen like you would for any other application. Next you need to connect your device to the PC with the USB cable and tap drive mode. Once drive mode is active open the drive letter for the device on your PC (ex. &amp;quot;PALM PRE (E:)&amp;quot;). Copy the &amp;quot;id_rsa&amp;quot; file to your PC somewhere you will remember it's location (ex. to the desktop). You can also copy the file with a word document extension &amp;quot;.doc&amp;quot; and email it to yourself. You will have to rename it back to &amp;quot;id_rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa.doc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the key with PuTTY===&lt;br /&gt;
&lt;br /&gt;
If you have the webOS SDK installed you will already have PuTTY (in \SDK\bin\ of the folder the SDK was installed in). If you don't have the webOS SDK installed you can install it to get PuTTY or you can download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]. You will also need PuTTYgen. If you will be using winSCP you already have it (in start menu&amp;gt;winSCP&amp;gt;key tools) or download it from the same site as PuTTY. If this is your first time using PuTTY to access linux on webOS or wish to verify the configuration is correct please follow these steps:&lt;br /&gt;
&lt;br /&gt;
*Open PuTTY.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100).&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Select the radio button for SSH&lt;br /&gt;
*Select the Data section under Connection on the left.&lt;br /&gt;
*Enter root for the auto-login username.&lt;br /&gt;
*Select the Auth section under SSH under Connection on the left.&lt;br /&gt;
*Leave PuTTY open here and follow these steps:&lt;br /&gt;
**Open PuTTYgen.&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to PuTTY where we left off.&lt;br /&gt;
*Click the Browse button for private key file.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Select Session on the left.&lt;br /&gt;
*Enter a name in the Saved Session box and click the save button.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Click open in PuTTY to connect.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see the following in the terminal window on your pc:&lt;br /&gt;
&lt;br /&gt;
 Using username &amp;quot;root&amp;quot;.&lt;br /&gt;
 Authenticating with public key &amp;quot;imported-openssh-key&amp;quot;&lt;br /&gt;
 Passphrase for key &amp;quot;imported-openssh-key&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
 root@palm-webos-device:/var/home/root#&lt;br /&gt;
&lt;br /&gt;
Congratulations you now have access to linux on your webOS device. You may now begin using the command prompt to work with anything you need or want to use the command prompt for. There is all sorts of stuff you can use it for so if you haven't already check out the rest of the webos-internals site for a number of things you can do. You may also want to setup winSCP for a explorer like windows interface to access and work with files etc as well.&lt;br /&gt;
&lt;br /&gt;
===Using the Filezilla SFTP Client===&lt;br /&gt;
&lt;br /&gt;
Make sure you have installed the OpenSSH SFTP server from Preware&lt;br /&gt;
&lt;br /&gt;
For SFTP using SSH2, FileZilla utilizes the excellent [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] tools. To allow the use of RSA / DSA key files with Filezilla, you'll need to download one more tool from PuTTY: Pageant.&lt;br /&gt;
&lt;br /&gt;
Make sure you have converted your key to PuTTY's PPK format listed above. &lt;br /&gt;
&lt;br /&gt;
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select &amp;quot;Add Key&amp;quot; and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.&lt;br /&gt;
&lt;br /&gt;
Now simply launch FileZilla and connect to your server using SFTP using SSH with a root and an empty password. Don't forget to close pageant when you're done.&lt;br /&gt;
&lt;br /&gt;
As you may or may not know, FileZilla can be easily carried around on portable media such as a USB stick and used from any PC. This also applies to the PuTTY tools, so if you stick Pageant and your PPK key file on to, for example, a USB stick, you can now access your server from any Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== Filezilla Alternative Method Using Unprotected Key====&lt;br /&gt;
&lt;br /&gt;
In the Edit - Settings menu of the FileZilla client, you can [Add key file...] under Connection - SFTP, and FileZilla can use the public key authentication in the site manager with the 'Interactive' Logontype. However, the .ppk file is converted to unprotected one if the original .ppk file is password-protected (FileZilla can do that for you when importing the file). As of 3.3.2.1, a password-protected key file is not supported yet.&lt;br /&gt;
&lt;br /&gt;
===Using the key with winSCP===&lt;br /&gt;
&lt;br /&gt;
*Open winSCP.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100) in the host name box.&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Enter root in the user name box.&lt;br /&gt;
*Leave winSCP open and follow these steps:&lt;br /&gt;
**Open PuTTYgen (startmenu&amp;gt;winSCP&amp;gt;key tools).&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to winSCP where we left off.&lt;br /&gt;
*Click the &amp;quot;...&amp;quot; button for the private key file box.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Click the save button and enter a name and click ok.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*You should now be seeing the stored sessions list with the session you just saved.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Select the session you saved and click the login button.&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see a window with a list of folders similar to explorer. Congratulations you now have access to linux on your webOS device. You may now begin working with files on the device. You can do stuff like copy, delete, etc file like in windows. You can also edit files. Certain actions will require read write mode (mount -o remount,rw / entered at the command prompt in PuTTY or terminal, mount -o remount,ro / to go back to read only mode).&lt;br /&gt;
&lt;br /&gt;
===Using the key with SSH in Terminal===&lt;br /&gt;
&lt;br /&gt;
Put your private key file in the standard location ~/.ssh/id_rsa on the machine you are using to connect to the Pre or you can inform ssh by using the -i switch as follow:&lt;br /&gt;
&lt;br /&gt;
user@host:~$ ssh -i /path/to/private/key remoteuser@remotehost&lt;br /&gt;
&lt;br /&gt;
===Enabling non-root Password logins via SSH using the command line===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the exec line and change&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;PasswordAuthentication no&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 &amp;quot;PasswordAuthentication yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The line should now look like this: &lt;br /&gt;
&lt;br /&gt;
 exec /opt/sbin/sshd -D -p 22 -o &amp;quot;PasswordAuthentication yes&amp;quot; -o &amp;quot;PermitRootLogin without-password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
Do not change anything else. Now if you've created a username for yourself and set a password, you'll be able to log in with a password. After every Palm WebOS upgrade, you'll need to recreate any accounts other than root with adduser &amp;lt;account&amp;gt;, which will then prompt you to set a password.&lt;br /&gt;
&lt;br /&gt;
Warning:&lt;br /&gt;
It is strongly suggested that you set up another ssh key for any additional users instead of using the password authentication method. Just follow the steps above.&lt;br /&gt;
&lt;br /&gt;
===Enabling ssh over EVDO===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the iptables lines and remove the &amp;quot;-i eth0&amp;quot; clause.  For example&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -i eth0 -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
becomes&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18057</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18057"/>
		<updated>2011-08-29T15:11:36Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18055</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=18055"/>
		<updated>2011-08-29T15:10:45Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: Added Samples&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Setup''' ==&lt;br /&gt;
Depending on what you're building you might need some of the prereq's from here:&lt;br /&gt;
http://www.webos-internals.org/wiki/WebOS_Internals_PDK&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time or if you already have the toolchain installed, please see below&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Please see the notes if you already have the correct toolchain installed and do not want to download it again.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== '''Kernels''' ==&lt;br /&gt;
&lt;br /&gt;
Package up UberKernel.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd /srv/preware/build/kernels/uber-kernel-touchpad&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Testing your kernel&lt;br /&gt;
you will find your kernel in &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
build/src-3.0.2-22/linux-2.6.35/arch/arm/boot&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
you can boot it using memboot. to do this do the following &amp;lt;br&amp;gt;&lt;br /&gt;
1) turn off the touchpad&amp;lt;br&amp;gt;&lt;br /&gt;
2) connect it to your machine&amp;lt;br&amp;gt;&lt;br /&gt;
3) press the Volume Up key and power on the device, you should see a giant USB logo on the device&amp;lt;br&amp;gt;&lt;br /&gt;
4) novacom boot mem:// &amp;lt; uImage&lt;br /&gt;
&lt;br /&gt;
== '''Notes''' ==&lt;br /&gt;
&lt;br /&gt;
If you already have the correct version of the toolchain installed for the device you are targeting you can symlink it to the proper location (e.g. the touchpad needs the Sourcery G++ Lite 2009q1-203 toolchain).&lt;br /&gt;
&lt;br /&gt;
If it is already installed you can symlink it into the build area:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd toolchain/cs09q1armel&lt;br /&gt;
mkdir build&lt;br /&gt;
cd build&lt;br /&gt;
ln -s &amp;lt;location of toolchain&amp;gt; arm-2009q1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Samples''' ==&lt;br /&gt;
&lt;br /&gt;
After you run through the WIDK and setup your toolchain, take a look at [[Application:Xecutah]] for details on building X Server and the process for building an application.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18035</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18035"/>
		<updated>2011-08-28T23:01:19Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Generate Keys from Mac OSX Method (tested with Lion) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
OpenSSH is available for installation in Preware.  Just Type &amp;quot;OpenSSH&amp;quot; in the Preware home screen to search for and install the package.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
There are two ways to generate the keys below. The PC one assumes you have a user account name and password to gain access with putty I assume it is not possible to complete the steps for that method without setting up a user account. I find the webOS method to be much easier to follow. And I imagine if you are new to linux and accessing linux on webOS then you will find the webOS method is the one you will want to follow. I also recommend the webOS method if you have trouble following the PC method or find it too wordy.&lt;br /&gt;
&lt;br /&gt;
== Generate Keys from Mac OSX Method (tested with Lion) ==&lt;br /&gt;
&lt;br /&gt;
Start a new terminal session in Mac OS and su to root.  Once in root on your mac:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bin/ssh-keygen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mv /var/root/.ssh/id_rsa.pub /var/root/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have your private and public keys, you need to copy them over to your device. Attach your TouchPad as a USB and copy the files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /var/root/.ssh/* /Volumes/HP\ TouchPad/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now disconnect the TouchPad and load up a terminal on your TouchPad. Once in a terminal, you are going to move the key files into the right locations and set permissions on the appropriate files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /media/internal/id_rsa /home/root/.ssh/&lt;br /&gt;
cp /media/internal/authorized_keys /home/root/.ssh/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is necessary to load the keys.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 ~/.ssh&lt;br /&gt;
chmod 600 ~/.ssh/id_rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's required that the upstart script is modified. As of 08/28/11, there were some issues with upstart not working and OpenSSH not loading.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /var/palm/event.d/mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comment out the existing start and stop commands and add the new stuff below it. As of writing this, it's still not clear why there were issues starting with the org.webosinternals.optware dependency, so feel free to update with better script or more details:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#start on stopped finish and started org.webosinternals.optware&lt;br /&gt;
#stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
# and started org.webosinternals.optware&lt;br /&gt;
&lt;br /&gt;
# Stop when the Software Update tool is about to install an update.&lt;br /&gt;
# upstart restarts the job when installation is complete.&lt;br /&gt;
stop on started start_update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Exit out of vi and save&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qw!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can ''test'' that sshd starts and view any key errors by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/sbin/sshd -D&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive an error, &amp;quot;Permissions 0777 for '/opt/etc/openssh/ssh_host_rsa_key' are too open.&amp;quot; you should change the permissions on this key file to 600:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and 700 on the parent directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 /opt/etc/openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive a message, opt/sbin/sshd -D Could not load host key: /opt/etc/openssh/ssh_host_ecdsa_key, you can create the key manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh-keygen -t ecdsa -f /opt/etc/openssh/ssh_host_ecdsa_key -N ''&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_ecdsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you should be able to start sshd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
start mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test connecting remotely from your Mac (the -vvv option is for verbose debug messages, which you can remove if everything works):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
ssh &amp;lt;touchpad ip&amp;gt; -vvv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the password you used to create the key at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you have any other problems, be sure to take a look at the log files on your TouchPad:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep ssh /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the service is running:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ps aux | grep sshd&lt;br /&gt;
status mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try connecting to the TouchPad locally:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from Windows PC Method==&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys. For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ExpanDrive (SftpDrive) ===&lt;br /&gt;
&lt;br /&gt;
''Note: This requires access to the device's file system by any means.''&lt;br /&gt;
* Open ExpanDrive&lt;br /&gt;
* Click &amp;quot;New drive...&amp;quot;&lt;br /&gt;
* Type a name into the &amp;quot;Drive Name&amp;quot; box.&lt;br /&gt;
* Type in the IP address of the device in the &amp;quot;Server&amp;quot; box.&lt;br /&gt;
* Type &amp;quot;root&amp;quot; into the &amp;quot;Username&amp;quot; box.&lt;br /&gt;
* Choose &amp;quot;Use a public key to log in...&amp;quot; from the &amp;quot;Authentication&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create New Key Pair&amp;quot;&lt;br /&gt;
* Choose &amp;quot;RSA (ssh-rsa)&amp;quot; from the &amp;quot;Key type&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create Key Pairs&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Export current Key Pair&amp;quot;&lt;br /&gt;
* Click both &amp;quot;Export Private Key&amp;quot; and &amp;quot;Export Public Key&amp;quot; and save the files somewhere (remember where you saved them) and click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Open the .pub file you saved in the previous step using a plain text editor.&lt;br /&gt;
* Copy the contents of the entire file and paste it into &amp;quot;/var/home/root/.ssh/authorized_keys&amp;quot; (on the device) on the next line and save it.&lt;br /&gt;
* Go back to ExpanDrive and click &amp;quot;Ok&amp;quot; on the still open &amp;quot;Public Key Authentication Properties&amp;quot; dialog.&lt;br /&gt;
* Choose &amp;quot;Show the entire server&amp;quot; from the &amp;quot;Directory&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Connect&amp;quot; to connect and save the configuration.&lt;br /&gt;
* After the connection process is complete, a new Explorer window will open and you will be in the &amp;quot;%DriveLetter%:\var\home\root&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from webOS Method==&lt;br /&gt;
&lt;br /&gt;
Launch Preware and install [http://www.webos-internals.org/wiki/Application:Terminal Terminal] if you haven't previously installed it. If Terminal does not work, try XTerm instead. It will be used to create your secure SSH keys for use with OpenSSH directly on your webOS device. Once Terminal is installed launch it and follow these steps:&lt;br /&gt;
&lt;br /&gt;
To go to the root directory type:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
&lt;br /&gt;
Then type:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. After a short time (about a minute) accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the PC you want to access linux on webOS from. First copy the secret key to the area accessible from drive mode. To do this, type:&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
We are all done using Terminal so you can close it by tossing it off the top of the screen like you would for any other application. Next you need to connect your device to the PC with the USB cable and tap drive mode. Once drive mode is active open the drive letter for the device on your PC (ex. &amp;quot;PALM PRE (E:)&amp;quot;). Copy the &amp;quot;id_rsa&amp;quot; file to your PC somewhere you will remember it's location (ex. to the desktop). You can also copy the file with a word document extension &amp;quot;.doc&amp;quot; and email it to yourself. You will have to rename it back to &amp;quot;id_rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa.doc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the key with PuTTY===&lt;br /&gt;
&lt;br /&gt;
If you have the webOS SDK installed you will already have PuTTY (in \SDK\bin\ of the folder the SDK was installed in). If you don't have the webOS SDK installed you can install it to get PuTTY or you can download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]. You will also need PuTTYgen. If you will be using winSCP you already have it (in start menu&amp;gt;winSCP&amp;gt;key tools) or download it from the same site as PuTTY. If this is your first time using PuTTY to access linux on webOS or wish to verify the configuration is correct please follow these steps:&lt;br /&gt;
&lt;br /&gt;
*Open PuTTY.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100).&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Select the radio button for SSH&lt;br /&gt;
*Select the Data section under Connection on the left.&lt;br /&gt;
*Enter root for the auto-login username.&lt;br /&gt;
*Select the Auth section under SSH under Connection on the left.&lt;br /&gt;
*Leave PuTTY open here and follow these steps:&lt;br /&gt;
**Open PuTTYgen.&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to PuTTY where we left off.&lt;br /&gt;
*Click the Browse button for private key file.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Select Session on the left.&lt;br /&gt;
*Enter a name in the Saved Session box and click the save button.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Click open in PuTTY to connect.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see the following in the terminal window on your pc:&lt;br /&gt;
&lt;br /&gt;
 Using username &amp;quot;root&amp;quot;.&lt;br /&gt;
 Authenticating with public key &amp;quot;imported-openssh-key&amp;quot;&lt;br /&gt;
 Passphrase for key &amp;quot;imported-openssh-key&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
 root@palm-webos-device:/var/home/root#&lt;br /&gt;
&lt;br /&gt;
Congratulations you now have access to linux on your webOS device. You may now begin using the command prompt to work with anything you need or want to use the command prompt for. There is all sorts of stuff you can use it for so if you haven't already check out the rest of the webos-internals site for a number of things you can do. You may also want to setup winSCP for a explorer like windows interface to access and work with files etc as well.&lt;br /&gt;
&lt;br /&gt;
===Using the Filezilla SFTP Client===&lt;br /&gt;
&lt;br /&gt;
Make sure you have installed the OpenSSH SFTP server from Preware&lt;br /&gt;
&lt;br /&gt;
For SFTP using SSH2, FileZilla utilizes the excellent [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] tools. To allow the use of RSA / DSA key files with Filezilla, you'll need to download one more tool from PuTTY: Pageant.&lt;br /&gt;
&lt;br /&gt;
Make sure you have converted your key to PuTTY's PPK format listed above. &lt;br /&gt;
&lt;br /&gt;
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select &amp;quot;Add Key&amp;quot; and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.&lt;br /&gt;
&lt;br /&gt;
Now simply launch FileZilla and connect to your server using SFTP using SSH with a root and an empty password. Don't forget to close pageant when you're done.&lt;br /&gt;
&lt;br /&gt;
As you may or may not know, FileZilla can be easily carried around on portable media such as a USB stick and used from any PC. This also applies to the PuTTY tools, so if you stick Pageant and your PPK key file on to, for example, a USB stick, you can now access your server from any Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== Filezilla Alternative Method Using Unprotected Key====&lt;br /&gt;
&lt;br /&gt;
In the Edit - Settings menu of the FileZilla client, you can [Add key file...] under Connection - SFTP, and FileZilla can use the public key authentication in the site manager with the 'Interactive' Logontype. However, the .ppk file is converted to unprotected one if the original .ppk file is password-protected (FileZilla can do that for you when importing the file). As of 3.3.2.1, a password-protected key file is not supported yet.&lt;br /&gt;
&lt;br /&gt;
===Using the key with winSCP===&lt;br /&gt;
&lt;br /&gt;
*Open winSCP.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100) in the host name box.&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Enter root in the user name box.&lt;br /&gt;
*Leave winSCP open and follow these steps:&lt;br /&gt;
**Open PuTTYgen (startmenu&amp;gt;winSCP&amp;gt;key tools).&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to winSCP where we left off.&lt;br /&gt;
*Click the &amp;quot;...&amp;quot; button for the private key file box.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Click the save button and enter a name and click ok.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*You should now be seeing the stored sessions list with the session you just saved.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Select the session you saved and click the login button.&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see a window with a list of folders similar to explorer. Congratulations you now have access to linux on your webOS device. You may now begin working with files on the device. You can do stuff like copy, delete, etc file like in windows. You can also edit files. Certain actions will require read write mode (mount -o remount,rw / entered at the command prompt in PuTTY or terminal, mount -o remount,ro / to go back to read only mode).&lt;br /&gt;
&lt;br /&gt;
===Using the key with SSH in Terminal===&lt;br /&gt;
&lt;br /&gt;
Put your private key file in the standard location ~/.ssh/id_rsa on the machine you are using to connect to the Pre or you can inform ssh by using the -i switch as follow:&lt;br /&gt;
&lt;br /&gt;
user@host:~$ ssh -i /path/to/private/key remoteuser@remotehost&lt;br /&gt;
&lt;br /&gt;
===Enabling non-root Password logins via SSH using the command line===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the exec line and change&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;PasswordAuthentication no&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 &amp;quot;PasswordAuthentication yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The line should now look like this: &lt;br /&gt;
&lt;br /&gt;
 exec /opt/sbin/sshd -D -p 22 -o &amp;quot;PasswordAuthentication yes&amp;quot; -o &amp;quot;PermitRootLogin without-password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
Do not change anything else. Now if you've created a username for yourself and set a password, you'll be able to log in with a password. After every Palm WebOS upgrade, you'll need to recreate any accounts other than root with adduser &amp;lt;account&amp;gt;, which will then prompt you to set a password.&lt;br /&gt;
&lt;br /&gt;
Warning:&lt;br /&gt;
It is strongly suggested that you set up another ssh key for any additional users instead of using the password authentication method. Just follow the steps above.&lt;br /&gt;
&lt;br /&gt;
===Enabling ssh over EVDO===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the iptables lines and remove the &amp;quot;-i eth0&amp;quot; clause.  For example&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -i eth0 -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
becomes&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18033</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18033"/>
		<updated>2011-08-28T22:59:47Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
OpenSSH is available for installation in Preware.  Just Type &amp;quot;OpenSSH&amp;quot; in the Preware home screen to search for and install the package.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
There are two ways to generate the keys below. The PC one assumes you have a user account name and password to gain access with putty I assume it is not possible to complete the steps for that method without setting up a user account. I find the webOS method to be much easier to follow. And I imagine if you are new to linux and accessing linux on webOS then you will find the webOS method is the one you will want to follow. I also recommend the webOS method if you have trouble following the PC method or find it too wordy.&lt;br /&gt;
&lt;br /&gt;
== Generate Keys from Mac OSX Method (tested with Lion) ==&lt;br /&gt;
&lt;br /&gt;
Start a new terminal session in Mac OS and su to root.  Once in root on your mac:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bin/ssh-keygen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mv /var/root/.ssh/id_rsa.pub /var/root/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have your private and public keys, you need to copy them over to your device. Attach your TouchPad as a USB and copy the files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /var/root/.ssh/* /Volumes/HP\ TouchPad/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now disconnect the TouchPad and load up a terminal on your TouchPad. Once in a terminal, you are going to move the key files into the right locations and set permissions on the appropriate files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /media/internal/id_rsa /home/root/.ssh/&lt;br /&gt;
cp /media/internal/authorized_keys /home/root/.ssh/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is necessary to load the keys.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 ~/.ssh&lt;br /&gt;
chmod 600 ~/.ssh/id_rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's required that the upstart script is modified. As of 08/28/11, there were some issues with upstart not working and OpenSSH not loading.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /var/palm/event.d/mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comment out the existing start and stop commands and add the new stuff below it. As of writing this, it's still not clear why there were issues starting with the org.webosinternals.optware dependency, so feel free to update with better script or more details:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#start on stopped finish and started org.webosinternals.optware&lt;br /&gt;
#stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
# and started org.webosinternals.optware&lt;br /&gt;
&lt;br /&gt;
# Stop when the Software Update tool is about to install an update.&lt;br /&gt;
# upstart restarts the job when installation is complete.&lt;br /&gt;
stop on started start_update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Exit out of vi and save&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qw!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can ''test'' that sshd starts and view any key errors by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/sbin/sshd -D&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive an error, &amp;quot;Permissions 0777 for '/opt/etc/openssh/ssh_host_rsa_key' are too open.&amp;quot; you should change the permissions on this key file to 600:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and 700 on the parent directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 /opt/etc/openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive a message, opt/sbin/sshd -D Could not load host key: /opt/etc/openssh/ssh_host_ecdsa_key, you can create the key manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh-keygen -t ecdsa -f /opt/etc/openssh/ssh_host_ecdsa_key -N ''&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_ecdsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you should be able to start sshd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
start mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test connecting remotely from your Mac (the -vvv option is for verbose debug messages, which you can remove if everything works):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
ssh &amp;lt;touchpad ip&amp;gt; -vvv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the password you used to create the key at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you have any other problems, be sure to take a look at the log files on your TouchPad:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep ssh /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the service is running:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ps aux | grep sshd&lt;br /&gt;
status mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try connecting to the TouchPad locally:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from Windows PC Method==&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys. For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ExpanDrive (SftpDrive) ===&lt;br /&gt;
&lt;br /&gt;
''Note: This requires access to the device's file system by any means.''&lt;br /&gt;
* Open ExpanDrive&lt;br /&gt;
* Click &amp;quot;New drive...&amp;quot;&lt;br /&gt;
* Type a name into the &amp;quot;Drive Name&amp;quot; box.&lt;br /&gt;
* Type in the IP address of the device in the &amp;quot;Server&amp;quot; box.&lt;br /&gt;
* Type &amp;quot;root&amp;quot; into the &amp;quot;Username&amp;quot; box.&lt;br /&gt;
* Choose &amp;quot;Use a public key to log in...&amp;quot; from the &amp;quot;Authentication&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create New Key Pair&amp;quot;&lt;br /&gt;
* Choose &amp;quot;RSA (ssh-rsa)&amp;quot; from the &amp;quot;Key type&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create Key Pairs&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Export current Key Pair&amp;quot;&lt;br /&gt;
* Click both &amp;quot;Export Private Key&amp;quot; and &amp;quot;Export Public Key&amp;quot; and save the files somewhere (remember where you saved them) and click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Open the .pub file you saved in the previous step using a plain text editor.&lt;br /&gt;
* Copy the contents of the entire file and paste it into &amp;quot;/var/home/root/.ssh/authorized_keys&amp;quot; (on the device) on the next line and save it.&lt;br /&gt;
* Go back to ExpanDrive and click &amp;quot;Ok&amp;quot; on the still open &amp;quot;Public Key Authentication Properties&amp;quot; dialog.&lt;br /&gt;
* Choose &amp;quot;Show the entire server&amp;quot; from the &amp;quot;Directory&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Connect&amp;quot; to connect and save the configuration.&lt;br /&gt;
* After the connection process is complete, a new Explorer window will open and you will be in the &amp;quot;%DriveLetter%:\var\home\root&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from webOS Method==&lt;br /&gt;
&lt;br /&gt;
Launch Preware and install [http://www.webos-internals.org/wiki/Application:Terminal Terminal] if you haven't previously installed it. If Terminal does not work, try XTerm instead. It will be used to create your secure SSH keys for use with OpenSSH directly on your webOS device. Once Terminal is installed launch it and follow these steps:&lt;br /&gt;
&lt;br /&gt;
To go to the root directory type:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
&lt;br /&gt;
Then type:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. After a short time (about a minute) accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the PC you want to access linux on webOS from. First copy the secret key to the area accessible from drive mode. To do this, type:&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
We are all done using Terminal so you can close it by tossing it off the top of the screen like you would for any other application. Next you need to connect your device to the PC with the USB cable and tap drive mode. Once drive mode is active open the drive letter for the device on your PC (ex. &amp;quot;PALM PRE (E:)&amp;quot;). Copy the &amp;quot;id_rsa&amp;quot; file to your PC somewhere you will remember it's location (ex. to the desktop). You can also copy the file with a word document extension &amp;quot;.doc&amp;quot; and email it to yourself. You will have to rename it back to &amp;quot;id_rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa.doc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the key with PuTTY===&lt;br /&gt;
&lt;br /&gt;
If you have the webOS SDK installed you will already have PuTTY (in \SDK\bin\ of the folder the SDK was installed in). If you don't have the webOS SDK installed you can install it to get PuTTY or you can download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]. You will also need PuTTYgen. If you will be using winSCP you already have it (in start menu&amp;gt;winSCP&amp;gt;key tools) or download it from the same site as PuTTY. If this is your first time using PuTTY to access linux on webOS or wish to verify the configuration is correct please follow these steps:&lt;br /&gt;
&lt;br /&gt;
*Open PuTTY.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100).&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Select the radio button for SSH&lt;br /&gt;
*Select the Data section under Connection on the left.&lt;br /&gt;
*Enter root for the auto-login username.&lt;br /&gt;
*Select the Auth section under SSH under Connection on the left.&lt;br /&gt;
*Leave PuTTY open here and follow these steps:&lt;br /&gt;
**Open PuTTYgen.&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to PuTTY where we left off.&lt;br /&gt;
*Click the Browse button for private key file.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Select Session on the left.&lt;br /&gt;
*Enter a name in the Saved Session box and click the save button.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Click open in PuTTY to connect.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see the following in the terminal window on your pc:&lt;br /&gt;
&lt;br /&gt;
 Using username &amp;quot;root&amp;quot;.&lt;br /&gt;
 Authenticating with public key &amp;quot;imported-openssh-key&amp;quot;&lt;br /&gt;
 Passphrase for key &amp;quot;imported-openssh-key&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
 root@palm-webos-device:/var/home/root#&lt;br /&gt;
&lt;br /&gt;
Congratulations you now have access to linux on your webOS device. You may now begin using the command prompt to work with anything you need or want to use the command prompt for. There is all sorts of stuff you can use it for so if you haven't already check out the rest of the webos-internals site for a number of things you can do. You may also want to setup winSCP for a explorer like windows interface to access and work with files etc as well.&lt;br /&gt;
&lt;br /&gt;
===Using the Filezilla SFTP Client===&lt;br /&gt;
&lt;br /&gt;
Make sure you have installed the OpenSSH SFTP server from Preware&lt;br /&gt;
&lt;br /&gt;
For SFTP using SSH2, FileZilla utilizes the excellent [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] tools. To allow the use of RSA / DSA key files with Filezilla, you'll need to download one more tool from PuTTY: Pageant.&lt;br /&gt;
&lt;br /&gt;
Make sure you have converted your key to PuTTY's PPK format listed above. &lt;br /&gt;
&lt;br /&gt;
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select &amp;quot;Add Key&amp;quot; and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.&lt;br /&gt;
&lt;br /&gt;
Now simply launch FileZilla and connect to your server using SFTP using SSH with a root and an empty password. Don't forget to close pageant when you're done.&lt;br /&gt;
&lt;br /&gt;
As you may or may not know, FileZilla can be easily carried around on portable media such as a USB stick and used from any PC. This also applies to the PuTTY tools, so if you stick Pageant and your PPK key file on to, for example, a USB stick, you can now access your server from any Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== Filezilla Alternative Method Using Unprotected Key====&lt;br /&gt;
&lt;br /&gt;
In the Edit - Settings menu of the FileZilla client, you can [Add key file...] under Connection - SFTP, and FileZilla can use the public key authentication in the site manager with the 'Interactive' Logontype. However, the .ppk file is converted to unprotected one if the original .ppk file is password-protected (FileZilla can do that for you when importing the file). As of 3.3.2.1, a password-protected key file is not supported yet.&lt;br /&gt;
&lt;br /&gt;
===Using the key with winSCP===&lt;br /&gt;
&lt;br /&gt;
*Open winSCP.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100) in the host name box.&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Enter root in the user name box.&lt;br /&gt;
*Leave winSCP open and follow these steps:&lt;br /&gt;
**Open PuTTYgen (startmenu&amp;gt;winSCP&amp;gt;key tools).&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to winSCP where we left off.&lt;br /&gt;
*Click the &amp;quot;...&amp;quot; button for the private key file box.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Click the save button and enter a name and click ok.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*You should now be seeing the stored sessions list with the session you just saved.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Select the session you saved and click the login button.&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see a window with a list of folders similar to explorer. Congratulations you now have access to linux on your webOS device. You may now begin working with files on the device. You can do stuff like copy, delete, etc file like in windows. You can also edit files. Certain actions will require read write mode (mount -o remount,rw / entered at the command prompt in PuTTY or terminal, mount -o remount,ro / to go back to read only mode).&lt;br /&gt;
&lt;br /&gt;
===Using the key with SSH in Terminal===&lt;br /&gt;
&lt;br /&gt;
Put your private key file in the standard location ~/.ssh/id_rsa on the machine you are using to connect to the Pre or you can inform ssh by using the -i switch as follow:&lt;br /&gt;
&lt;br /&gt;
user@host:~$ ssh -i /path/to/private/key remoteuser@remotehost&lt;br /&gt;
&lt;br /&gt;
===Enabling non-root Password logins via SSH using the command line===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the exec line and change&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;PasswordAuthentication no&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 &amp;quot;PasswordAuthentication yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The line should now look like this: &lt;br /&gt;
&lt;br /&gt;
 exec /opt/sbin/sshd -D -p 22 -o &amp;quot;PasswordAuthentication yes&amp;quot; -o &amp;quot;PermitRootLogin without-password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
Do not change anything else. Now if you've created a username for yourself and set a password, you'll be able to log in with a password. After every Palm WebOS upgrade, you'll need to recreate any accounts other than root with adduser &amp;lt;account&amp;gt;, which will then prompt you to set a password.&lt;br /&gt;
&lt;br /&gt;
Warning:&lt;br /&gt;
It is strongly suggested that you set up another ssh key for any additional users instead of using the password authentication method. Just follow the steps above.&lt;br /&gt;
&lt;br /&gt;
===Enabling ssh over EVDO===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the iptables lines and remove the &amp;quot;-i eth0&amp;quot; clause.  For example&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -i eth0 -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
becomes&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18031</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18031"/>
		<updated>2011-08-28T22:58:26Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
OpenSSH is available for installation in Preware.  Just Type &amp;quot;OpenSSH&amp;quot; in the Preware home screen to search for and install the package.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
There are two ways to generate the keys below. The PC one assumes you have a user account name and password to gain access with putty I assume it is not possible to complete the steps for that method without setting up a user account. I find the webOS method to be much easier to follow. And I imagine if you are new to linux and accessing linux on webOS then you will find the webOS method is the one you will want to follow. I also recommend the webOS method if you have trouble following the PC method or find it too wordy.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from Windows PC Method==&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys. For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
== Generate Keys from Mac OSX Method (tested with Lion) ==&lt;br /&gt;
&lt;br /&gt;
Start a new terminal session in Mac OS and su to root.  Once in root on your mac:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bin/ssh-keygen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mv /var/root/.ssh/id_rsa.pub /var/root/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have your private and public keys, you need to copy them over to your device. Attach your TouchPad as a USB and copy the files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /var/root/.ssh/* /Volumes/HP\ TouchPad/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now disconnect the TouchPad and load up a terminal on your TouchPad. Once in a terminal, you are going to move the key files into the right locations and set permissions on the appropriate files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /media/internal/id_rsa /home/root/.ssh/&lt;br /&gt;
cp /media/internal/authorized_keys /home/root/.ssh/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is necessary to load the keys.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 ~/.ssh&lt;br /&gt;
chmod 600 ~/.ssh/id_rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's required that the upstart script is modified. As of 08/28/11, there were some issues with upstart not working and OpenSSH not loading.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /var/palm/event.d/mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comment out the existing start and stop commands and add the new stuff below it. As of writing this, it's still not clear why there were issues starting with the org.webosinternals.optware dependency, so feel free to update with better script or more details:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#start on stopped finish and started org.webosinternals.optware&lt;br /&gt;
#stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
# and started org.webosinternals.optware&lt;br /&gt;
&lt;br /&gt;
# Stop when the Software Update tool is about to install an update.&lt;br /&gt;
# upstart restarts the job when installation is complete.&lt;br /&gt;
stop on started start_update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Exit out of vi and save&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qw!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can ''test'' that sshd starts and view any key errors by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/sbin/sshd -D&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive an error, &amp;quot;Permissions 0777 for '/opt/etc/openssh/ssh_host_rsa_key' are too open.&amp;quot; you should change the permissions on this key file to 600:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and 700 on the parent directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 /opt/etc/openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive a message, opt/sbin/sshd -D Could not load host key: /opt/etc/openssh/ssh_host_ecdsa_key, you can create the key manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh-keygen -t ecdsa -f /opt/etc/openssh/ssh_host_ecdsa_key -N ''&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_ecdsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you should be able to start sshd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
start mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test connecting remotely from your Mac (the -vvv option is for verbose debug messages, which you can remove if everything works):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
ssh &amp;lt;touchpad ip&amp;gt; -vvv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the password you used to create the key at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you have any other problems, be sure to take a look at the log files on your TouchPad:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep ssh /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the service is running:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ps aux | grep sshd&lt;br /&gt;
status mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try connecting to the TouchPad locally:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Setting up ExpanDrive (SftpDrive) ==&lt;br /&gt;
&lt;br /&gt;
''Note: This requires access to the device's file system by any means.''&lt;br /&gt;
* Open ExpanDrive&lt;br /&gt;
* Click &amp;quot;New drive...&amp;quot;&lt;br /&gt;
* Type a name into the &amp;quot;Drive Name&amp;quot; box.&lt;br /&gt;
* Type in the IP address of the device in the &amp;quot;Server&amp;quot; box.&lt;br /&gt;
* Type &amp;quot;root&amp;quot; into the &amp;quot;Username&amp;quot; box.&lt;br /&gt;
* Choose &amp;quot;Use a public key to log in...&amp;quot; from the &amp;quot;Authentication&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create New Key Pair&amp;quot;&lt;br /&gt;
* Choose &amp;quot;RSA (ssh-rsa)&amp;quot; from the &amp;quot;Key type&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create Key Pairs&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Export current Key Pair&amp;quot;&lt;br /&gt;
* Click both &amp;quot;Export Private Key&amp;quot; and &amp;quot;Export Public Key&amp;quot; and save the files somewhere (remember where you saved them) and click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Open the .pub file you saved in the previous step using a plain text editor.&lt;br /&gt;
* Copy the contents of the entire file and paste it into &amp;quot;/var/home/root/.ssh/authorized_keys&amp;quot; (on the device) on the next line and save it.&lt;br /&gt;
* Go back to ExpanDrive and click &amp;quot;Ok&amp;quot; on the still open &amp;quot;Public Key Authentication Properties&amp;quot; dialog.&lt;br /&gt;
* Choose &amp;quot;Show the entire server&amp;quot; from the &amp;quot;Directory&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Connect&amp;quot; to connect and save the configuration.&lt;br /&gt;
* After the connection process is complete, a new Explorer window will open and you will be in the &amp;quot;%DriveLetter%:\var\home\root&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from webOS Method==&lt;br /&gt;
&lt;br /&gt;
Launch Preware and install [http://www.webos-internals.org/wiki/Application:Terminal Terminal] if you haven't previously installed it. If Terminal does not work, try XTerm instead. It will be used to create your secure SSH keys for use with OpenSSH directly on your webOS device. Once Terminal is installed launch it and follow these steps:&lt;br /&gt;
&lt;br /&gt;
To go to the root directory type:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
&lt;br /&gt;
Then type:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. After a short time (about a minute) accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the PC you want to access linux on webOS from. First copy the secret key to the area accessible from drive mode. To do this, type:&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
We are all done using Terminal so you can close it by tossing it off the top of the screen like you would for any other application. Next you need to connect your device to the PC with the USB cable and tap drive mode. Once drive mode is active open the drive letter for the device on your PC (ex. &amp;quot;PALM PRE (E:)&amp;quot;). Copy the &amp;quot;id_rsa&amp;quot; file to your PC somewhere you will remember it's location (ex. to the desktop). You can also copy the file with a word document extension &amp;quot;.doc&amp;quot; and email it to yourself. You will have to rename it back to &amp;quot;id_rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa.doc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the key with PuTTY===&lt;br /&gt;
&lt;br /&gt;
If you have the webOS SDK installed you will already have PuTTY (in \SDK\bin\ of the folder the SDK was installed in). If you don't have the webOS SDK installed you can install it to get PuTTY or you can download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]. You will also need PuTTYgen. If you will be using winSCP you already have it (in start menu&amp;gt;winSCP&amp;gt;key tools) or download it from the same site as PuTTY. If this is your first time using PuTTY to access linux on webOS or wish to verify the configuration is correct please follow these steps:&lt;br /&gt;
&lt;br /&gt;
*Open PuTTY.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100).&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Select the radio button for SSH&lt;br /&gt;
*Select the Data section under Connection on the left.&lt;br /&gt;
*Enter root for the auto-login username.&lt;br /&gt;
*Select the Auth section under SSH under Connection on the left.&lt;br /&gt;
*Leave PuTTY open here and follow these steps:&lt;br /&gt;
**Open PuTTYgen.&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to PuTTY where we left off.&lt;br /&gt;
*Click the Browse button for private key file.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Select Session on the left.&lt;br /&gt;
*Enter a name in the Saved Session box and click the save button.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Click open in PuTTY to connect.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see the following in the terminal window on your pc:&lt;br /&gt;
&lt;br /&gt;
 Using username &amp;quot;root&amp;quot;.&lt;br /&gt;
 Authenticating with public key &amp;quot;imported-openssh-key&amp;quot;&lt;br /&gt;
 Passphrase for key &amp;quot;imported-openssh-key&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
 root@palm-webos-device:/var/home/root#&lt;br /&gt;
&lt;br /&gt;
Congratulations you now have access to linux on your webOS device. You may now begin using the command prompt to work with anything you need or want to use the command prompt for. There is all sorts of stuff you can use it for so if you haven't already check out the rest of the webos-internals site for a number of things you can do. You may also want to setup winSCP for a explorer like windows interface to access and work with files etc as well.&lt;br /&gt;
&lt;br /&gt;
===Using the Filezilla SFTP Client===&lt;br /&gt;
&lt;br /&gt;
Make sure you have installed the OpenSSH SFTP server from Preware&lt;br /&gt;
&lt;br /&gt;
For SFTP using SSH2, FileZilla utilizes the excellent [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] tools. To allow the use of RSA / DSA key files with Filezilla, you'll need to download one more tool from PuTTY: Pageant.&lt;br /&gt;
&lt;br /&gt;
Make sure you have converted your key to PuTTY's PPK format listed above. &lt;br /&gt;
&lt;br /&gt;
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select &amp;quot;Add Key&amp;quot; and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.&lt;br /&gt;
&lt;br /&gt;
Now simply launch FileZilla and connect to your server using SFTP using SSH with a root and an empty password. Don't forget to close pageant when you're done.&lt;br /&gt;
&lt;br /&gt;
As you may or may not know, FileZilla can be easily carried around on portable media such as a USB stick and used from any PC. This also applies to the PuTTY tools, so if you stick Pageant and your PPK key file on to, for example, a USB stick, you can now access your server from any Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== Filezilla Alternative Method Using Unprotected Key====&lt;br /&gt;
&lt;br /&gt;
In the Edit - Settings menu of the FileZilla client, you can [Add key file...] under Connection - SFTP, and FileZilla can use the public key authentication in the site manager with the 'Interactive' Logontype. However, the .ppk file is converted to unprotected one if the original .ppk file is password-protected (FileZilla can do that for you when importing the file). As of 3.3.2.1, a password-protected key file is not supported yet.&lt;br /&gt;
&lt;br /&gt;
===Using the key with winSCP===&lt;br /&gt;
&lt;br /&gt;
*Open winSCP.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100) in the host name box.&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Enter root in the user name box.&lt;br /&gt;
*Leave winSCP open and follow these steps:&lt;br /&gt;
**Open PuTTYgen (startmenu&amp;gt;winSCP&amp;gt;key tools).&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to winSCP where we left off.&lt;br /&gt;
*Click the &amp;quot;...&amp;quot; button for the private key file box.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Click the save button and enter a name and click ok.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*You should now be seeing the stored sessions list with the session you just saved.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Select the session you saved and click the login button.&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see a window with a list of folders similar to explorer. Congratulations you now have access to linux on your webOS device. You may now begin working with files on the device. You can do stuff like copy, delete, etc file like in windows. You can also edit files. Certain actions will require read write mode (mount -o remount,rw / entered at the command prompt in PuTTY or terminal, mount -o remount,ro / to go back to read only mode).&lt;br /&gt;
&lt;br /&gt;
===Using the key with SSH in Terminal===&lt;br /&gt;
&lt;br /&gt;
Put your private key file in the standard location ~/.ssh/id_rsa on the machine you are using to connect to the Pre or you can inform ssh by using the -i switch as follow:&lt;br /&gt;
&lt;br /&gt;
user@host:~$ ssh -i /path/to/private/key remoteuser@remotehost&lt;br /&gt;
&lt;br /&gt;
===Enabling non-root Password logins via SSH using the command line===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the exec line and change&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;PasswordAuthentication no&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 &amp;quot;PasswordAuthentication yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The line should now look like this: &lt;br /&gt;
&lt;br /&gt;
 exec /opt/sbin/sshd -D -p 22 -o &amp;quot;PasswordAuthentication yes&amp;quot; -o &amp;quot;PermitRootLogin without-password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
Do not change anything else. Now if you've created a username for yourself and set a password, you'll be able to log in with a password. After every Palm WebOS upgrade, you'll need to recreate any accounts other than root with adduser &amp;lt;account&amp;gt;, which will then prompt you to set a password.&lt;br /&gt;
&lt;br /&gt;
Warning:&lt;br /&gt;
It is strongly suggested that you set up another ssh key for any additional users instead of using the password authentication method. Just follow the steps above.&lt;br /&gt;
&lt;br /&gt;
===Enabling ssh over EVDO===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the iptables lines and remove the &amp;quot;-i eth0&amp;quot; clause.  For example&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -i eth0 -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
becomes&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18029</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18029"/>
		<updated>2011-08-28T22:57:02Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: added mac os instructions and some troubleshooting steps.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
OpenSSH is available for installation in Preware.  Just Type &amp;quot;OpenSSH&amp;quot; in the Preware home screen to search for and install the package.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
There are two ways to generate the keys below. The PC one assumes you have a user account name and password to gain access with putty I assume it is not possible to complete the steps for that method without setting up a user account. I find the webOS method to be much easier to follow. And I imagine if you are new to linux and accessing linux on webOS then you will find the webOS method is the one you will want to follow. I also recommend the webOS method if you have trouble following the PC method or find it too wordy.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from Windows PC Method==&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys. For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
== Generate Keys from Mac OSX Method (tested with Lion) ==&lt;br /&gt;
&lt;br /&gt;
Start a new terminal session in Mac OS and su to root.  Once in root on your mac:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/bin/ssh-keygen&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 mv /var/root/.ssh/id_rsa.pub /var/root/.ssh/authorized_keys&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now that you have your private and public keys, you need to copy them over to your device. Attach your TouchPad as a USB and copy the files:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /var/root/.ssh/* /Volumes/HP\ TouchPad/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now disconnect the TouchPad and load up a terminal on your TouchPad. Once in a terminal, you are going to move the key files into the right locations and set permissions on the appropriate files.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cp /media/internal/id_rsa /home/root/.ssh/&lt;br /&gt;
cp /media/internal/authorized_keys /home/root/.ssh/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is necessary to load the keys.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 ~/.ssh&lt;br /&gt;
chmod 600 ~/.ssh/id_rsa&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It's required that the upstart script is modified. As of 08/28/11, there were some issues with upstart not working and OpenSSH not loading.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
vi /var/palm/event.d/mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Comment out the existing start and stop commands and add the new stuff below it. As of writing this, it's still not clear why there were issues starting with the org.webosinternals.optware dependency, so feel free to update with better script or more details:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#start on stopped finish and started org.webosinternals.optware&lt;br /&gt;
#stop on runlevel [!2]&lt;br /&gt;
&lt;br /&gt;
start on stopped finish&lt;br /&gt;
# and started org.webosinternals.optware&lt;br /&gt;
&lt;br /&gt;
# Stop when the Software Update tool is about to install an update.&lt;br /&gt;
# upstart restarts the job when installation is complete.&lt;br /&gt;
stop on started start_update&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Exit out of vi and save&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
qw!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can ''test'' that sshd starts and view any key errors by typing:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/opt/sbin/sshd -D&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive an error, &amp;quot;Permissions 0777 for '/opt/etc/openssh/ssh_host_rsa_key' are too open.&amp;quot; you should change the permissions on this key file to 600:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_rsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and 700 on the parent directory&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
chmod 700 /opt/etc/openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you receive a message, opt/sbin/sshd -D Could not load host key: /opt/etc/openssh/ssh_host_ecdsa_key, you can create the key manually:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh-keygen -t ecdsa -f /opt/etc/openssh/ssh_host_ecdsa_key -N ''&lt;br /&gt;
chmod 600 /opt/etc/openssh/ssh_host_ecdsa_key&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this is done, you should be able to start sshd:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
start mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test connecting remotely from your Mac (the -vvv option is for verbose debug messages, which you can remove if everything works):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
su&lt;br /&gt;
ssh &amp;lt;touchpad ip&amp;gt; -vvv&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Use the password you used to create the key at the beginning.&lt;br /&gt;
&lt;br /&gt;
If you have any other problems, be sure to take a look at the log files on your TouchPad:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grep ssh /var/log/messages&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Check that the service is running:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ps aux | grep sshd&lt;br /&gt;
status mobi.optware.openssh&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Try connecting to the TouchPad locally:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh localhost&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up ExpanDrive (SftpDrive) ===&lt;br /&gt;
&lt;br /&gt;
''Note: This requires access to the device's file system by any means.''&lt;br /&gt;
* Open ExpanDrive&lt;br /&gt;
* Click &amp;quot;New drive...&amp;quot;&lt;br /&gt;
* Type a name into the &amp;quot;Drive Name&amp;quot; box.&lt;br /&gt;
* Type in the IP address of the device in the &amp;quot;Server&amp;quot; box.&lt;br /&gt;
* Type &amp;quot;root&amp;quot; into the &amp;quot;Username&amp;quot; box.&lt;br /&gt;
* Choose &amp;quot;Use a public key to log in...&amp;quot; from the &amp;quot;Authentication&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create New Key Pair&amp;quot;&lt;br /&gt;
* Choose &amp;quot;RSA (ssh-rsa)&amp;quot; from the &amp;quot;Key type&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create Key Pairs&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Export current Key Pair&amp;quot;&lt;br /&gt;
* Click both &amp;quot;Export Private Key&amp;quot; and &amp;quot;Export Public Key&amp;quot; and save the files somewhere (remember where you saved them) and click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Open the .pub file you saved in the previous step using a plain text editor.&lt;br /&gt;
* Copy the contents of the entire file and paste it into &amp;quot;/var/home/root/.ssh/authorized_keys&amp;quot; (on the device) on the next line and save it.&lt;br /&gt;
* Go back to ExpanDrive and click &amp;quot;Ok&amp;quot; on the still open &amp;quot;Public Key Authentication Properties&amp;quot; dialog.&lt;br /&gt;
* Choose &amp;quot;Show the entire server&amp;quot; from the &amp;quot;Directory&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Connect&amp;quot; to connect and save the configuration.&lt;br /&gt;
* After the connection process is complete, a new Explorer window will open and you will be in the &amp;quot;%DriveLetter%:\var\home\root&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from webOS Method==&lt;br /&gt;
&lt;br /&gt;
Launch Preware and install [http://www.webos-internals.org/wiki/Application:Terminal Terminal] if you haven't previously installed it. If Terminal does not work, try XTerm instead. It will be used to create your secure SSH keys for use with OpenSSH directly on your webOS device. Once Terminal is installed launch it and follow these steps:&lt;br /&gt;
&lt;br /&gt;
To go to the root directory type:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
&lt;br /&gt;
Then type:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. After a short time (about a minute) accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the PC you want to access linux on webOS from. First copy the secret key to the area accessible from drive mode. To do this, type:&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
We are all done using Terminal so you can close it by tossing it off the top of the screen like you would for any other application. Next you need to connect your device to the PC with the USB cable and tap drive mode. Once drive mode is active open the drive letter for the device on your PC (ex. &amp;quot;PALM PRE (E:)&amp;quot;). Copy the &amp;quot;id_rsa&amp;quot; file to your PC somewhere you will remember it's location (ex. to the desktop). You can also copy the file with a word document extension &amp;quot;.doc&amp;quot; and email it to yourself. You will have to rename it back to &amp;quot;id_rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa.doc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the key with PuTTY===&lt;br /&gt;
&lt;br /&gt;
If you have the webOS SDK installed you will already have PuTTY (in \SDK\bin\ of the folder the SDK was installed in). If you don't have the webOS SDK installed you can install it to get PuTTY or you can download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]. You will also need PuTTYgen. If you will be using winSCP you already have it (in start menu&amp;gt;winSCP&amp;gt;key tools) or download it from the same site as PuTTY. If this is your first time using PuTTY to access linux on webOS or wish to verify the configuration is correct please follow these steps:&lt;br /&gt;
&lt;br /&gt;
*Open PuTTY.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100).&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Select the radio button for SSH&lt;br /&gt;
*Select the Data section under Connection on the left.&lt;br /&gt;
*Enter root for the auto-login username.&lt;br /&gt;
*Select the Auth section under SSH under Connection on the left.&lt;br /&gt;
*Leave PuTTY open here and follow these steps:&lt;br /&gt;
**Open PuTTYgen.&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to PuTTY where we left off.&lt;br /&gt;
*Click the Browse button for private key file.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Select Session on the left.&lt;br /&gt;
*Enter a name in the Saved Session box and click the save button.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Click open in PuTTY to connect.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see the following in the terminal window on your pc:&lt;br /&gt;
&lt;br /&gt;
 Using username &amp;quot;root&amp;quot;.&lt;br /&gt;
 Authenticating with public key &amp;quot;imported-openssh-key&amp;quot;&lt;br /&gt;
 Passphrase for key &amp;quot;imported-openssh-key&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
 root@palm-webos-device:/var/home/root#&lt;br /&gt;
&lt;br /&gt;
Congratulations you now have access to linux on your webOS device. You may now begin using the command prompt to work with anything you need or want to use the command prompt for. There is all sorts of stuff you can use it for so if you haven't already check out the rest of the webos-internals site for a number of things you can do. You may also want to setup winSCP for a explorer like windows interface to access and work with files etc as well.&lt;br /&gt;
&lt;br /&gt;
===Using the Filezilla SFTP Client===&lt;br /&gt;
&lt;br /&gt;
Make sure you have installed the OpenSSH SFTP server from Preware&lt;br /&gt;
&lt;br /&gt;
For SFTP using SSH2, FileZilla utilizes the excellent [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] tools. To allow the use of RSA / DSA key files with Filezilla, you'll need to download one more tool from PuTTY: Pageant.&lt;br /&gt;
&lt;br /&gt;
Make sure you have converted your key to PuTTY's PPK format listed above. &lt;br /&gt;
&lt;br /&gt;
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select &amp;quot;Add Key&amp;quot; and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.&lt;br /&gt;
&lt;br /&gt;
Now simply launch FileZilla and connect to your server using SFTP using SSH with a root and an empty password. Don't forget to close pageant when you're done.&lt;br /&gt;
&lt;br /&gt;
As you may or may not know, FileZilla can be easily carried around on portable media such as a USB stick and used from any PC. This also applies to the PuTTY tools, so if you stick Pageant and your PPK key file on to, for example, a USB stick, you can now access your server from any Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== Filezilla Alternative Method Using Unprotected Key====&lt;br /&gt;
&lt;br /&gt;
In the Edit - Settings menu of the FileZilla client, you can [Add key file...] under Connection - SFTP, and FileZilla can use the public key authentication in the site manager with the 'Interactive' Logontype. However, the .ppk file is converted to unprotected one if the original .ppk file is password-protected (FileZilla can do that for you when importing the file). As of 3.3.2.1, a password-protected key file is not supported yet.&lt;br /&gt;
&lt;br /&gt;
===Using the key with winSCP===&lt;br /&gt;
&lt;br /&gt;
*Open winSCP.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100) in the host name box.&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Enter root in the user name box.&lt;br /&gt;
*Leave winSCP open and follow these steps:&lt;br /&gt;
**Open PuTTYgen (startmenu&amp;gt;winSCP&amp;gt;key tools).&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to winSCP where we left off.&lt;br /&gt;
*Click the &amp;quot;...&amp;quot; button for the private key file box.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Click the save button and enter a name and click ok.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*You should now be seeing the stored sessions list with the session you just saved.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Select the session you saved and click the login button.&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see a window with a list of folders similar to explorer. Congratulations you now have access to linux on your webOS device. You may now begin working with files on the device. You can do stuff like copy, delete, etc file like in windows. You can also edit files. Certain actions will require read write mode (mount -o remount,rw / entered at the command prompt in PuTTY or terminal, mount -o remount,ro / to go back to read only mode).&lt;br /&gt;
&lt;br /&gt;
===Using the key with SSH in Terminal===&lt;br /&gt;
&lt;br /&gt;
Put your private key file in the standard location ~/.ssh/id_rsa on the machine you are using to connect to the Pre or you can inform ssh by using the -i switch as follow:&lt;br /&gt;
&lt;br /&gt;
user@host:~$ ssh -i /path/to/private/key remoteuser@remotehost&lt;br /&gt;
&lt;br /&gt;
===Enabling non-root Password logins via SSH using the command line===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the exec line and change&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;PasswordAuthentication no&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 &amp;quot;PasswordAuthentication yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The line should now look like this: &lt;br /&gt;
&lt;br /&gt;
 exec /opt/sbin/sshd -D -p 22 -o &amp;quot;PasswordAuthentication yes&amp;quot; -o &amp;quot;PermitRootLogin without-password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
Do not change anything else. Now if you've created a username for yourself and set a password, you'll be able to log in with a password. After every Palm WebOS upgrade, you'll need to recreate any accounts other than root with adduser &amp;lt;account&amp;gt;, which will then prompt you to set a password.&lt;br /&gt;
&lt;br /&gt;
Warning:&lt;br /&gt;
It is strongly suggested that you set up another ssh key for any additional users instead of using the password authentication method. Just follow the steps above.&lt;br /&gt;
&lt;br /&gt;
===Enabling ssh over EVDO===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the iptables lines and remove the &amp;quot;-i eth0&amp;quot; clause.  For example&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -i eth0 -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
becomes&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18013</id>
		<title>Application:OpenSSH</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:OpenSSH&amp;diff=18013"/>
		<updated>2011-08-28T07:20:52Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Generate Keys from webOS Method */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
&lt;br /&gt;
OpenSSH is a FREE version of the SSH connectivity tools that technical users of the Internet rely on.&lt;br /&gt;
&lt;br /&gt;
OpenSSH is available for installation in Preware.  Just Type &amp;quot;OpenSSH&amp;quot; in the Preware home screen to search for and install the package.&lt;br /&gt;
&lt;br /&gt;
Please refer to the [http://www.openssh.com/ OpenSSH Home Page] and read the [http://www.openssh.com/manual.html OpenSSH Manual Pages] before using this package.&lt;br /&gt;
&lt;br /&gt;
There are two ways to generate the keys below. The PC one assumes you have a user account name and password to gain access with putty I assume it is not possible to complete the steps for that method without setting up a user account. I find the webOS method to be much easier to follow. And I imagine if you are new to linux and accessing linux on webOS then you will find the webOS method is the one you will want to follow. I also recommend the webOS method if you have trouble following the PC method or find it too wordy.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from Windows PC Method==&lt;br /&gt;
&lt;br /&gt;
If you are connecting to your webOS device from a Windows host computer, please read the [http://unixwiz.net/techtips/putty-openssh.html Secure Linux/UNIX access with PuTTY and OpenSSH Tech Tip] and follow those instructions for generating your SSH keys. For the section &amp;quot;Install public key on Linux system&amp;quot;, you will need to put the &amp;quot;Public Key for pasting into OpenSSH authorized_keys file&amp;quot; into a /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Optware installs openssh under /opt, so you should replace any references to /bin, /sbin, and /etc in the OpenSSH documentation with /opt/bin, /opt/sbin and /opt/etc respectively.&lt;br /&gt;
&lt;br /&gt;
=== Setting up ExpanDrive (SftpDrive) ===&lt;br /&gt;
&lt;br /&gt;
''Note: This requires access to the device's file system by any means.''&lt;br /&gt;
* Open ExpanDrive&lt;br /&gt;
* Click &amp;quot;New drive...&amp;quot;&lt;br /&gt;
* Type a name into the &amp;quot;Drive Name&amp;quot; box.&lt;br /&gt;
* Type in the IP address of the device in the &amp;quot;Server&amp;quot; box.&lt;br /&gt;
* Type &amp;quot;root&amp;quot; into the &amp;quot;Username&amp;quot; box.&lt;br /&gt;
* Choose &amp;quot;Use a public key to log in...&amp;quot; from the &amp;quot;Authentication&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create New Key Pair&amp;quot;&lt;br /&gt;
* Choose &amp;quot;RSA (ssh-rsa)&amp;quot; from the &amp;quot;Key type&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Create Key Pairs&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Click &amp;quot;Export current Key Pair&amp;quot;&lt;br /&gt;
* Click both &amp;quot;Export Private Key&amp;quot; and &amp;quot;Export Public Key&amp;quot; and save the files somewhere (remember where you saved them) and click &amp;quot;Ok&amp;quot;.&lt;br /&gt;
* Open the .pub file you saved in the previous step using a plain text editor.&lt;br /&gt;
* Copy the contents of the entire file and paste it into &amp;quot;/var/home/root/.ssh/authorized_keys&amp;quot; (on the device) on the next line and save it.&lt;br /&gt;
* Go back to ExpanDrive and click &amp;quot;Ok&amp;quot; on the still open &amp;quot;Public Key Authentication Properties&amp;quot; dialog.&lt;br /&gt;
* Choose &amp;quot;Show the entire server&amp;quot; from the &amp;quot;Directory&amp;quot; drop-down.&lt;br /&gt;
* Click &amp;quot;Connect&amp;quot; to connect and save the configuration.&lt;br /&gt;
* After the connection process is complete, a new Explorer window will open and you will be in the &amp;quot;%DriveLetter%:\var\home\root&amp;quot; directory.&lt;br /&gt;
&lt;br /&gt;
==Generate Keys from webOS Method==&lt;br /&gt;
&lt;br /&gt;
Launch Preware and install [http://www.webos-internals.org/wiki/Application:Terminal Terminal] if you haven't previously installed it. If Terminal does not work, try XTerm instead. It will be used to create your secure SSH keys for use with OpenSSH directly on your webOS device. Once Terminal is installed launch it and follow these steps:&lt;br /&gt;
&lt;br /&gt;
To go to the root directory type:&lt;br /&gt;
&lt;br /&gt;
 cd /&lt;br /&gt;
&lt;br /&gt;
Then type:&lt;br /&gt;
&lt;br /&gt;
 /opt/bin/ssh-keygen&lt;br /&gt;
&lt;br /&gt;
to create the private and public keys. After a short time (about a minute) accept the default filename by pressing Enter at the prompt. Enter a passphrase for your private key file. You will use this passphrase later, so remember it. After the key file is generated type:&lt;br /&gt;
&lt;br /&gt;
 mv /home/root/.ssh/id_rsa.pub /home/root/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
to move the public key to become the /home/root/.ssh/authorized_keys file.&lt;br /&gt;
&lt;br /&gt;
Now the secret key needs to be transferred to the PC you want to access linux on webOS from. First copy the secret key to the area accessible from drive mode. To do this, type:&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa&lt;br /&gt;
&lt;br /&gt;
We are all done using Terminal so you can close it by tossing it off the top of the screen like you would for any other application. Next you need to connect your device to the PC with the USB cable and tap drive mode. Once drive mode is active open the drive letter for the device on your PC (ex. &amp;quot;PALM PRE (E:)&amp;quot;). Copy the &amp;quot;id_rsa&amp;quot; file to your PC somewhere you will remember it's location (ex. to the desktop). You can also copy the file with a word document extension &amp;quot;.doc&amp;quot; and email it to yourself. You will have to rename it back to &amp;quot;id_rsa&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
 cp /home/root/.ssh/id_rsa /media/internal/id_rsa.doc&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Using the key with PuTTY===&lt;br /&gt;
&lt;br /&gt;
If you have the webOS SDK installed you will already have PuTTY (in \SDK\bin\ of the folder the SDK was installed in). If you don't have the webOS SDK installed you can install it to get PuTTY or you can download [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY]. You will also need PuTTYgen. If you will be using winSCP you already have it (in start menu&amp;gt;winSCP&amp;gt;key tools) or download it from the same site as PuTTY. If this is your first time using PuTTY to access linux on webOS or wish to verify the configuration is correct please follow these steps:&lt;br /&gt;
&lt;br /&gt;
*Open PuTTY.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100).&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Select the radio button for SSH&lt;br /&gt;
*Select the Data section under Connection on the left.&lt;br /&gt;
*Enter root for the auto-login username.&lt;br /&gt;
*Select the Auth section under SSH under Connection on the left.&lt;br /&gt;
*Leave PuTTY open here and follow these steps:&lt;br /&gt;
**Open PuTTYgen.&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to PuTTY where we left off.&lt;br /&gt;
*Click the Browse button for private key file.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Select Session on the left.&lt;br /&gt;
*Enter a name in the Saved Session box and click the save button.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Click open in PuTTY to connect.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see the following in the terminal window on your pc:&lt;br /&gt;
&lt;br /&gt;
 Using username &amp;quot;root&amp;quot;.&lt;br /&gt;
 Authenticating with public key &amp;quot;imported-openssh-key&amp;quot;&lt;br /&gt;
 Passphrase for key &amp;quot;imported-openssh-key&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
You should now see:&lt;br /&gt;
&lt;br /&gt;
 root@palm-webos-device:/var/home/root#&lt;br /&gt;
&lt;br /&gt;
Congratulations you now have access to linux on your webOS device. You may now begin using the command prompt to work with anything you need or want to use the command prompt for. There is all sorts of stuff you can use it for so if you haven't already check out the rest of the webos-internals site for a number of things you can do. You may also want to setup winSCP for a explorer like windows interface to access and work with files etc as well.&lt;br /&gt;
&lt;br /&gt;
===Using the Filezilla SFTP Client===&lt;br /&gt;
&lt;br /&gt;
Make sure you have installed the OpenSSH SFTP server from Preware&lt;br /&gt;
&lt;br /&gt;
For SFTP using SSH2, FileZilla utilizes the excellent [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY] tools. To allow the use of RSA / DSA key files with Filezilla, you'll need to download one more tool from PuTTY: Pageant.&lt;br /&gt;
&lt;br /&gt;
Make sure you have converted your key to PuTTY's PPK format listed above. &lt;br /&gt;
&lt;br /&gt;
Now run Pageant. In your system tray, you'll see the Pageant icon appear. Right-click the icon and select &amp;quot;Add Key&amp;quot; and select your private key (PPK) file. Follow the prompt to enter your pass phrase and you're done.&lt;br /&gt;
&lt;br /&gt;
Now simply launch FileZilla and connect to your server using SFTP using SSH with a root and an empty password. Don't forget to close pageant when you're done.&lt;br /&gt;
&lt;br /&gt;
As you may or may not know, FileZilla can be easily carried around on portable media such as a USB stick and used from any PC. This also applies to the PuTTY tools, so if you stick Pageant and your PPK key file on to, for example, a USB stick, you can now access your server from any Windows PC.&lt;br /&gt;
&lt;br /&gt;
==== Filezilla Alternative Method Using Unprotected Key====&lt;br /&gt;
&lt;br /&gt;
In the Edit - Settings menu of the FileZilla client, you can [Add key file...] under Connection - SFTP, and FileZilla can use the public key authentication in the site manager with the 'Interactive' Logontype. However, the .ppk file is converted to unprotected one if the original .ppk file is password-protected (FileZilla can do that for you when importing the file). As of 3.3.2.1, a password-protected key file is not supported yet.&lt;br /&gt;
&lt;br /&gt;
===Using the key with winSCP===&lt;br /&gt;
&lt;br /&gt;
*Open winSCP.&lt;br /&gt;
*Enter the IP address assigned to your webOS device (ex. 192.168.1.100) in the host name box.&lt;br /&gt;
*Enter 22 for the port number.&lt;br /&gt;
*Enter root in the user name box.&lt;br /&gt;
*Leave winSCP open and follow these steps:&lt;br /&gt;
**Open PuTTYgen (startmenu&amp;gt;winSCP&amp;gt;key tools).&lt;br /&gt;
**Select the conversions menu.&lt;br /&gt;
**Select import key.&lt;br /&gt;
**Choose the id_rsa file you copied to the PC from your device and click open.&lt;br /&gt;
**Enter the passphrase you entered during key generation and click ok.&lt;br /&gt;
***You will see all sorts of information in the window at this point.&lt;br /&gt;
**Click the save private key button.&lt;br /&gt;
**Enter a name for it (no need to type the ppk extension) and save it somewhere you will remember it's location.&lt;br /&gt;
**Close PuTTYgen and go back to winSCP where we left off.&lt;br /&gt;
*Click the &amp;quot;...&amp;quot; button for the private key file box.&lt;br /&gt;
*Select the ppk file you made with PuTTYgen and click open.&lt;br /&gt;
*Click the save button and enter a name and click ok.&lt;br /&gt;
**This will allow you to load the settings for future use.&lt;br /&gt;
*You should now be seeing the stored sessions list with the session you just saved.&lt;br /&gt;
*Make sure your device's wifi is on.&lt;br /&gt;
**You can install nodoze to keep wifi on if need be.&lt;br /&gt;
*Select the session you saved and click the login button.&lt;br /&gt;
*Enter the passphrase you created during key generation.&lt;br /&gt;
&lt;br /&gt;
If everything is configured correctly you should see a window with a list of folders similar to explorer. Congratulations you now have access to linux on your webOS device. You may now begin working with files on the device. You can do stuff like copy, delete, etc file like in windows. You can also edit files. Certain actions will require read write mode (mount -o remount,rw / entered at the command prompt in PuTTY or terminal, mount -o remount,ro / to go back to read only mode).&lt;br /&gt;
&lt;br /&gt;
===Using the key with SSH in Terminal===&lt;br /&gt;
&lt;br /&gt;
Put your private key file in the standard location ~/.ssh/id_rsa on the machine you are using to connect to the Pre or you can inform ssh by using the -i switch as follow:&lt;br /&gt;
&lt;br /&gt;
user@host:~$ ssh -i /path/to/private/key remoteuser@remotehost&lt;br /&gt;
&lt;br /&gt;
===Enabling non-root Password logins via SSH using the command line===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the exec line and change&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;PasswordAuthentication no&amp;quot;&lt;br /&gt;
to&lt;br /&gt;
 &amp;quot;PasswordAuthentication yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The line should now look like this: &lt;br /&gt;
&lt;br /&gt;
 exec /opt/sbin/sshd -D -p 22 -o &amp;quot;PasswordAuthentication yes&amp;quot; -o &amp;quot;PermitRootLogin without-password&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;br /&gt;
&lt;br /&gt;
Do not change anything else. Now if you've created a username for yourself and set a password, you'll be able to log in with a password. After every Palm WebOS upgrade, you'll need to recreate any accounts other than root with adduser &amp;lt;account&amp;gt;, which will then prompt you to set a password.&lt;br /&gt;
&lt;br /&gt;
Warning:&lt;br /&gt;
It is strongly suggested that you set up another ssh key for any additional users instead of using the password authentication method. Just follow the steps above.&lt;br /&gt;
&lt;br /&gt;
===Enabling ssh over EVDO===&lt;br /&gt;
&lt;br /&gt;
Access the command line on your Pre via Terminal, SSH, or Novaterm.&lt;br /&gt;
&lt;br /&gt;
Type the following at the root prompt to allow write access to your / disk:&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,rw /&lt;br /&gt;
&lt;br /&gt;
Edit the mobi.optware.openssh file in the /etc/event.d/ directory.  Find the iptables lines and remove the &amp;quot;-i eth0&amp;quot; clause.  For example&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -i eth0 -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -i eth0 -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
becomes&lt;br /&gt;
  /usr/sbin/iptables -D INPUT -p tcp --dport 222 -j ACCEPT || /bin/true&lt;br /&gt;
  /usr/sbin/iptables -I INPUT -p tcp --dport 222 -j ACCEPT&lt;br /&gt;
&lt;br /&gt;
Save and exit with ZZ or :wq, then restart the openssh service as follows:&lt;br /&gt;
&lt;br /&gt;
 stop mobi.optware.openssh&lt;br /&gt;
 start mobi.optware.openssh&lt;br /&gt;
&lt;br /&gt;
Once you are finished make sure you make your / disk read-only again (this is the default):&lt;br /&gt;
&lt;br /&gt;
 mount -o remount,ro /&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=17989</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=17989"/>
		<updated>2011-08-28T06:21:42Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Apps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Package up preware.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=17987</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=17987"/>
		<updated>2011-08-28T06:13:59Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.  If you have not run through the [[WebOS Internals PDK]] wiki page, you should start there.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Package up the toolchain.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=17985</id>
		<title>Building Apps and Kernels</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_Apps_and_Kernels&amp;diff=17985"/>
		<updated>2011-08-28T06:12:57Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: Initial creation.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;If you are looking for instructions for building apps and kernels for WebOS, you have come to the right place.&lt;br /&gt;
&lt;br /&gt;
== '''Apps''' ==&lt;br /&gt;
&lt;br /&gt;
If you have not run through the [[WebOS_Internals_PDK]] document, you should start there.&lt;br /&gt;
&lt;br /&gt;
Create the directory structure for the source:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo mkdir -p /srv/preware&lt;br /&gt;
cd /srv/preware&lt;br /&gt;
sudo chmod 777 .&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Pull down the app source with git.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git://git.webos-internals.org/preware/build.git&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After you have the source, you need to build the toolchain — this can take some time.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd build&lt;br /&gt;
make toolchain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Package up the toolchain.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cd apps/preware&lt;br /&gt;
make package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=17913</id>
		<title>Building DOOM with scratchbox2</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=17913"/>
		<updated>2011-08-26T03:47:26Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:SDL]]&lt;br /&gt;
&lt;br /&gt;
First, follow the tutorial [[WebOS Internals PDK]] to set up the cross compilation environment.&lt;br /&gt;
&lt;br /&gt;
Next, download the sdlDOOM source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/src/sdldoom-1.10.tar.gz&lt;br /&gt;
tar xzf sdldoom-1.10.tar.gz&lt;br /&gt;
cd sdldoom-1.10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now run scratchbox2 with the webos / pre mapping file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: You should use armv6 if your target device is a Pixi.&lt;br /&gt;
&lt;br /&gt;
You will get a different prompt indicating you are in a scratchbox shell, like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[SB2 mapping-armv7 armv7] $&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-sdl-prefix=/usr/local&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build should complete successfully with no problems.  Download a DOOM shareware WAD:&lt;br /&gt;
&lt;br /&gt;
NOTE: If you receive an error &amp;quot;configure: error: *** SDL version 1.0.1 not found!&amp;quot;, you will need to exit the sb2 command line by typing exit, then&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p /usr/local/include/&lt;br /&gt;
cd /srv/preware/cross-compile/packages/dev-sdl&lt;br /&gt;
make -C libsdl ARCH=armv7 stage&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be patient.  The compile can take 10 minutes.  You should be able to cd into the doom directory and continue above at &amp;quot;Now run scratchbox2 with the webos / pre mapping file:&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/data/doom1.wad.gz&lt;br /&gt;
gunzip doom1.wad.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the DOOM program binary and wad to root's home directory on the pre:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scp doom doom1.wad  root@pre:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SSH to the device (novaterm would also work to get there, or an on-device terminal)&lt;br /&gt;
NOTE: You can also use the usb mode on the TouchPad. If you do use USB, you can find the copied files in /media/internal/&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh root@pre&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the device, run DOOM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Yay, it should now run.  You may want to customize the code for better controls on the device.&lt;br /&gt;
&lt;br /&gt;
Now let's package it up for all your friends to install.  You should be back in your sdldoom-1.1.0 directory. For this, we'll use the Palm SDK, so make sure you have it installed.&lt;br /&gt;
&lt;br /&gt;
First off:  Unfortunately palm-package doesn't _quite_ make game packages properly.  First, we want type to be &amp;quot;game&amp;quot; and palm-package doesn't understand that (will reject it as an invalid type in the 1.3.5 SDK).  Secondly, the executables need to be set with executable permissions.  For all this, we need a script to fix up the ipk for you.&lt;br /&gt;
&lt;br /&gt;
palm-game-fix   (I put it in /usr/local/bin and chmod 755 /usr/local/bin/palm-game-fix)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
TMPDIR=&amp;quot;fix-game-ipk-tmp.$$&amp;quot;&lt;br /&gt;
if [ ! -f &amp;quot;$1&amp;quot; ]; then echo &amp;quot;$1&amp;quot; not found; exit 1; fi&lt;br /&gt;
mkdir &amp;quot;$TMPDIR&amp;quot;; cd &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
ar x &amp;quot;../$1&amp;quot;&lt;br /&gt;
tar xvzf data.tar.gz&lt;br /&gt;
cd usr/palm/applications/*&lt;br /&gt;
chmod 755 *&lt;br /&gt;
sed -i 's/&amp;quot;type&amp;quot;:.*&amp;quot;web&amp;quot;,/&amp;quot;type&amp;quot;:     &amp;quot;game&amp;quot;,/' appinfo.json&lt;br /&gt;
cd ../../../..&lt;br /&gt;
tar cvzf data.tar.gz usr&lt;br /&gt;
rm -rf usr; rm &amp;quot;../$1&amp;quot;&lt;br /&gt;
ar -r &amp;quot;../$1&amp;quot; *&lt;br /&gt;
cd ..;rm -rf &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have this, you should be ready to go.  Obviously this only needs to  be done once.&lt;br /&gt;
&lt;br /&gt;
First make an installation directory with just the files we want to package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir package&lt;br /&gt;
cp doom doom1.wad package&lt;br /&gt;
cd package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, create a start script that will be launched by the icon for your application. It can do things like changing the working directory (cd) into the right directory and start your program with the right command line arguments, if any.&lt;br /&gt;
&lt;br /&gt;
Create the file start-doom.sh with your favorite text editor like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
cd /media/cryptofs/apps/usr/palm/applications/com.example.doom&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file appinfo.json with your favorite text editor like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;title&amp;quot;:    &amp;quot;DOOM&amp;quot;,&lt;br /&gt;
	&amp;quot;type&amp;quot;:     &amp;quot;web&amp;quot;,&lt;br /&gt;
	&amp;quot;main&amp;quot;:     &amp;quot;start-doom.sh&amp;quot;,&lt;br /&gt;
	&amp;quot;id&amp;quot;:       &amp;quot;com.example.doom&amp;quot;,&lt;br /&gt;
	&amp;quot;vendor&amp;quot;:   &amp;quot;example.com&amp;quot;,&lt;br /&gt;
        &amp;quot;version&amp;quot;:  &amp;quot;0.1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;icon&amp;quot;:     &amp;quot;icon.png&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you change id to a reversed domain name like com.example (example.com)  but don't use example.com.  Get a domain name to use or ask a friend if you can use theirs.  This domain should be unique.&lt;br /&gt;
&lt;br /&gt;
Now we need to package it up and fix up the package to be game-compatible. Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-package .&lt;br /&gt;
palm-game-fix *ipk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can do a test install and launch.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-install com.example.doom_0.1.0_all.ipk&lt;br /&gt;
palm-launch com.example.doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully, DOOM should open in all its glory. &lt;br /&gt;
&lt;br /&gt;
Have fun making native apps.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=17911</id>
		<title>Building DOOM with scratchbox2</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=17911"/>
		<updated>2011-08-26T03:44:31Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:SDL]]&lt;br /&gt;
&lt;br /&gt;
First, follow the tutorial [[WebOS Internals PDK]] to set up the cross compilation environment.&lt;br /&gt;
&lt;br /&gt;
Next, download the sdlDOOM source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/src/sdldoom-1.10.tar.gz&lt;br /&gt;
tar xzf sdldoom-1.10.tar.gz&lt;br /&gt;
cd sdldoom-1.10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now run scratchbox2 with the webos / pre mapping file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: You should use armv6 if your target device is a Pixi.&lt;br /&gt;
&lt;br /&gt;
You will get a different prompt indicating you are in a scratchbox shell, like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[SB2 mapping-armv7 armv7] $&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-sdl-prefix=/usr/local&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build should complete successfully with no problems.  Download a DOOM shareware WAD:&lt;br /&gt;
&lt;br /&gt;
NOTE: If you receive an error &amp;quot;configure: error: *** SDL version 1.0.1 not found!&amp;quot;, you will need to exit the sb2 command line by typing exit, then&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p /usr/local/include/&lt;br /&gt;
cd /srv/preware/cross-compile/packages/dev-sdl&lt;br /&gt;
make -C libsdl ARCH=armv7 stage&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be patient.  The compile can take 10 minutes.  You should be able to cd into the doom directory and continue above at &amp;quot;Now run scratchbox2 with the webos / pre mapping file:&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/data/doom1.wad.gz&lt;br /&gt;
gunzip doom1.wad.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the DOOM program binary and wad to root's home directory on the pre:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scp doom doom1.wad  root@pre:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SSH to the device (novaterm would also work to get there, or an on-device terminal)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh root@pre&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the device, run DOOM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Yay, it should now run.  You may want to customize the code for better controls on the device.&lt;br /&gt;
&lt;br /&gt;
Now let's package it up for all your friends to install.  You should be back in your sdldoom-1.1.0 directory. For this, we'll use the Palm SDK, so make sure you have it installed.&lt;br /&gt;
&lt;br /&gt;
First off:  Unfortunately palm-package doesn't _quite_ make game packages properly.  First, we want type to be &amp;quot;game&amp;quot; and palm-package doesn't understand that (will reject it as an invalid type in the 1.3.5 SDK).  Secondly, the executables need to be set with executable permissions.  For all this, we need a script to fix up the ipk for you.&lt;br /&gt;
&lt;br /&gt;
palm-game-fix   (I put it in /usr/local/bin and chmod 755 /usr/local/bin/palm-game-fix)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
TMPDIR=&amp;quot;fix-game-ipk-tmp.$$&amp;quot;&lt;br /&gt;
if [ ! -f &amp;quot;$1&amp;quot; ]; then echo &amp;quot;$1&amp;quot; not found; exit 1; fi&lt;br /&gt;
mkdir &amp;quot;$TMPDIR&amp;quot;; cd &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
ar x &amp;quot;../$1&amp;quot;&lt;br /&gt;
tar xvzf data.tar.gz&lt;br /&gt;
cd usr/palm/applications/*&lt;br /&gt;
chmod 755 *&lt;br /&gt;
sed -i 's/&amp;quot;type&amp;quot;:.*&amp;quot;web&amp;quot;,/&amp;quot;type&amp;quot;:     &amp;quot;game&amp;quot;,/' appinfo.json&lt;br /&gt;
cd ../../../..&lt;br /&gt;
tar cvzf data.tar.gz usr&lt;br /&gt;
rm -rf usr; rm &amp;quot;../$1&amp;quot;&lt;br /&gt;
ar -r &amp;quot;../$1&amp;quot; *&lt;br /&gt;
cd ..;rm -rf &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have this, you should be ready to go.  Obviously this only needs to  be done once.&lt;br /&gt;
&lt;br /&gt;
First make an installation directory with just the files we want to package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir package&lt;br /&gt;
cp doom doom1.wad package&lt;br /&gt;
cd package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, create a start script that will be launched by the icon for your application. It can do things like changing the working directory (cd) into the right directory and start your program with the right command line arguments, if any.&lt;br /&gt;
&lt;br /&gt;
Create the file start-doom.sh with your favorite text editor like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
cd /media/cryptofs/apps/usr/palm/applications/com.example.doom&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file appinfo.json with your favorite text editor like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;title&amp;quot;:    &amp;quot;DOOM&amp;quot;,&lt;br /&gt;
	&amp;quot;type&amp;quot;:     &amp;quot;web&amp;quot;,&lt;br /&gt;
	&amp;quot;main&amp;quot;:     &amp;quot;start-doom.sh&amp;quot;,&lt;br /&gt;
	&amp;quot;id&amp;quot;:       &amp;quot;com.example.doom&amp;quot;,&lt;br /&gt;
	&amp;quot;vendor&amp;quot;:   &amp;quot;example.com&amp;quot;,&lt;br /&gt;
        &amp;quot;version&amp;quot;:  &amp;quot;0.1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;icon&amp;quot;:     &amp;quot;icon.png&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you change id to a reversed domain name like com.example (example.com)  but don't use example.com.  Get a domain name to use or ask a friend if you can use theirs.  This domain should be unique.&lt;br /&gt;
&lt;br /&gt;
Now we need to package it up and fix up the package to be game-compatible. Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-package .&lt;br /&gt;
palm-game-fix *ipk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can do a test install and launch.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-install com.example.doom_0.1.0_all.ipk&lt;br /&gt;
palm-launch com.example.doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully, DOOM should open in all its glory. &lt;br /&gt;
&lt;br /&gt;
Have fun making native apps.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=17909</id>
		<title>Building DOOM with scratchbox2</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Building_DOOM_with_scratchbox2&amp;diff=17909"/>
		<updated>2011-08-26T03:43:32Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: added error with sdl 1.0.1&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:SDL]]&lt;br /&gt;
&lt;br /&gt;
First, follow the tutorial [[WebOS Internals PDK]] to set up the cross compilation environment.&lt;br /&gt;
&lt;br /&gt;
Next, download the sdlDOOM source code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/src/sdldoom-1.10.tar.gz&lt;br /&gt;
tar xzf sdldoom-1.10.tar.gz&lt;br /&gt;
cd sdldoom-1.10&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now run scratchbox2 with the webos / pre mapping file:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
$ sb2 -M /srv/preware/cross-compile/staging/mapping-armv7&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: You should use armv6 if your target device is a Pixi.&lt;br /&gt;
&lt;br /&gt;
You will get a different prompt indicating you are in a scratchbox shell, like:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[SB2 mapping-armv7 armv7] $&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./configure --with-sdl-prefix=/usr/local&lt;br /&gt;
make &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Build should complete successfully with no problems.  Download a DOOM shareware WAD:&lt;br /&gt;
&lt;br /&gt;
NOTE: If you receive an error &amp;quot;configure: error: *** SDL version 1.0.1 not found!&amp;quot;, you will need to exit the sb2 command line by typing exit, then&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir -p /usr/local/include/&lt;br /&gt;
cd /srv/preware/cross-compile/packages/dev-sdl&lt;br /&gt;
make -C packages/libsdl ARCH=armv7 stage&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Be patient.  The compile can take 10 minutes.  You should be able to cd into the doom directory and continue above at &amp;quot;Now run scratchbox2 with the webos / pre mapping file:&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
wget http://www.libsdl.org/projects/doom/data/doom1.wad.gz&lt;br /&gt;
gunzip doom1.wad.gz&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Copy the DOOM program binary and wad to root's home directory on the pre:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scp doom doom1.wad  root@pre:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SSH to the device (novaterm would also work to get there, or an on-device terminal)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh root@pre&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
On the device, run DOOM:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Yay, it should now run.  You may want to customize the code for better controls on the device.&lt;br /&gt;
&lt;br /&gt;
Now let's package it up for all your friends to install.  You should be back in your sdldoom-1.1.0 directory. For this, we'll use the Palm SDK, so make sure you have it installed.&lt;br /&gt;
&lt;br /&gt;
First off:  Unfortunately palm-package doesn't _quite_ make game packages properly.  First, we want type to be &amp;quot;game&amp;quot; and palm-package doesn't understand that (will reject it as an invalid type in the 1.3.5 SDK).  Secondly, the executables need to be set with executable permissions.  For all this, we need a script to fix up the ipk for you.&lt;br /&gt;
&lt;br /&gt;
palm-game-fix   (I put it in /usr/local/bin and chmod 755 /usr/local/bin/palm-game-fix)&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
TMPDIR=&amp;quot;fix-game-ipk-tmp.$$&amp;quot;&lt;br /&gt;
if [ ! -f &amp;quot;$1&amp;quot; ]; then echo &amp;quot;$1&amp;quot; not found; exit 1; fi&lt;br /&gt;
mkdir &amp;quot;$TMPDIR&amp;quot;; cd &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
ar x &amp;quot;../$1&amp;quot;&lt;br /&gt;
tar xvzf data.tar.gz&lt;br /&gt;
cd usr/palm/applications/*&lt;br /&gt;
chmod 755 *&lt;br /&gt;
sed -i 's/&amp;quot;type&amp;quot;:.*&amp;quot;web&amp;quot;,/&amp;quot;type&amp;quot;:     &amp;quot;game&amp;quot;,/' appinfo.json&lt;br /&gt;
cd ../../../..&lt;br /&gt;
tar cvzf data.tar.gz usr&lt;br /&gt;
rm -rf usr; rm &amp;quot;../$1&amp;quot;&lt;br /&gt;
ar -r &amp;quot;../$1&amp;quot; *&lt;br /&gt;
cd ..;rm -rf &amp;quot;$TMPDIR&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once you have this, you should be ready to go.  Obviously this only needs to  be done once.&lt;br /&gt;
&lt;br /&gt;
First make an installation directory with just the files we want to package.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir package&lt;br /&gt;
cp doom doom1.wad package&lt;br /&gt;
cd package&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, create a start script that will be launched by the icon for your application. It can do things like changing the working directory (cd) into the right directory and start your program with the right command line arguments, if any.&lt;br /&gt;
&lt;br /&gt;
Create the file start-doom.sh with your favorite text editor like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
cd /media/cryptofs/apps/usr/palm/applications/com.example.doom&lt;br /&gt;
./doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create the file appinfo.json with your favorite text editor like so:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;title&amp;quot;:    &amp;quot;DOOM&amp;quot;,&lt;br /&gt;
	&amp;quot;type&amp;quot;:     &amp;quot;web&amp;quot;,&lt;br /&gt;
	&amp;quot;main&amp;quot;:     &amp;quot;start-doom.sh&amp;quot;,&lt;br /&gt;
	&amp;quot;id&amp;quot;:       &amp;quot;com.example.doom&amp;quot;,&lt;br /&gt;
	&amp;quot;vendor&amp;quot;:   &amp;quot;example.com&amp;quot;,&lt;br /&gt;
        &amp;quot;version&amp;quot;:  &amp;quot;0.1.0&amp;quot;,&lt;br /&gt;
        &amp;quot;icon&amp;quot;:     &amp;quot;icon.png&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Make sure you change id to a reversed domain name like com.example (example.com)  but don't use example.com.  Get a domain name to use or ask a friend if you can use theirs.  This domain should be unique.&lt;br /&gt;
&lt;br /&gt;
Now we need to package it up and fix up the package to be game-compatible. Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-package .&lt;br /&gt;
palm-game-fix *ipk&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now you can do a test install and launch.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
palm-install com.example.doom_0.1.0_all.ipk&lt;br /&gt;
palm-launch com.example.doom&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hopefully, DOOM should open in all its glory. &lt;br /&gt;
&lt;br /&gt;
Have fun making native apps.&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:MetaDoctor&amp;diff=17827</id>
		<title>Application:MetaDoctor</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:MetaDoctor&amp;diff=17827"/>
		<updated>2011-08-24T06:39:41Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Step 2: Running the webOS Doctor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Application]]&lt;br /&gt;
This page is currently available in four languages:&lt;br /&gt;
:[[Image:Australia.png]] [[Image:USA.png]] [[Application:MetaDoctor]]&lt;br /&gt;
:[[Image:France.png]] [[Application:MetaDoctor-FR]]&lt;br /&gt;
:[[Image:Germany.png]] [[Application:MetaDoctor-DE]]&lt;br /&gt;
:[[Image:Mexico.png]] [[Image:Spain.png]] [[Application:MetaDoctor-ES]]&lt;br /&gt;
&lt;br /&gt;
= What is the Meta Doctor? =&lt;br /&gt;
&lt;br /&gt;
The Webos Internals Meta Doctor is a Makefile which can modify a copy of the Palm webOS Doctor to bypass the &amp;quot;First Use&amp;quot; application and allow the phone to run without having been activated on a cell network. It accomplishes this by reaching into Palm's distributed Doctor JAR file and making changes to it. It can prevent the first use app from running, as well as applying other tweaks to the OS.&lt;br /&gt;
&lt;br /&gt;
'''Documentation for the features that the MetaDoctor offers is at the top of the Makefile (you need to clone the repository and then look in the Makefile file to see that).'''&lt;br /&gt;
&lt;br /&gt;
= Step 1: Setting up Meta-Doctor=&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
'''NOTE THAT USING CYGWIN ON WINDOWS IS NO LONGER SUPPORTED AND WILL MAKE YOUR PHONE FAIL TO BOOT'''&lt;br /&gt;
&lt;br /&gt;
Windows users can use the meta doctor without harming your current installation of windows using simple Ubuntu installer called WUBI. Also no need for moding any partitions or installing any boot loaders. It will just appear as program in your installed software list and when you do not want it anymore simply uninstall it while in windows through Control Panel. It is easy and there is no virtual machine headaches of trying to configure USB, Network and File sharing with host computer... To access it you just reboot and choose Ubuntu from dual boot screen.&lt;br /&gt;
&lt;br /&gt;
# Download [http://www.ubuntu.com/getubuntu/download Ubuntu 11.04], look for the Ubuntu Desktop Edition, '''not the Windows Installer'''&lt;br /&gt;
# Burn that file to a cd or mount to virtual drive&lt;br /&gt;
# Run cd in windows (the wubi.exe file inside the disk, it also comes up in auto run) - '''Don't boot your machine with the CD (called as using the LiveCD, as this option won't give you enough space for the MetaDoctor process to complete.'''&lt;br /&gt;
# Click on '''Install Inside windows'''.&lt;br /&gt;
#: This will install Ubuntu while running Windows without the need of making a partition I would recomand making the install image the full recommended 30 gigs if you have the hard drive space and think you are interested in actually using the Ubuntu OS, otherwise the minimum recommended by Wubi should be just fine. &lt;br /&gt;
# Restart your computer and you can dual boot to Windows or Ubuntu &lt;br /&gt;
&lt;br /&gt;
The nice thing about this is that it will allow you to uninstall Ubuntu right from Windows as if it was never there and remove the dual boot, not to mention the fact you do not need to partition your drive.&lt;br /&gt;
&lt;br /&gt;
If you are still wondering what Wubi is the fallowing link should explain it to you better.&lt;br /&gt;
[https://wiki.ubuntu.com/WubiGuide Wubi Guide]&lt;br /&gt;
&lt;br /&gt;
Once you have installed WUBI, you should follow the instructions in the Linux section below.&lt;br /&gt;
&lt;br /&gt;
== Linux == &lt;br /&gt;
&lt;br /&gt;
# Open terminal from the ( Applications &amp;gt; Accessories ) menu.&lt;br /&gt;
# Update your package lists and install git and Java runtime (the Canonical Partner Repository is needed to install the Sun Java JRE because it was moved out of the Multiverse in Ubuntu 10.04).  Type: &amp;lt;pre&amp;gt;sudo add-apt-repository &amp;quot;deb http://archive.canonical.com/ lucid partner&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install git&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install sun-java6-jre&amp;lt;/pre&amp;gt; (To accept the Java License Page, press tab until 'OK' is highlighted, then press enter) If the java install fails, look for support on the Java website [http://www.java.com/en/download/linux_manual.jsp here].  If you receive an error about git, repeat the command using git-core instead.&lt;br /&gt;
# Download and install the Palm Novacom software: [https://cdn.downloads.palm.com/sdkdownloads/2.1.0.519/sdkBinaries/palm-novacom_1.0.64_i386.deb 32-bit] or [https://cdn.downloads.palm.com/sdkdownloads/2.1.0.519/sdkBinaries/palm-novacom_1.0.64_amd64.deb 64-bit].  If you have trouble installing, you can find more information [https://developer.palm.com/content/resources/develop/sdk_pdk_download.html#c28522 here].&lt;br /&gt;
# Download the meta-doctor scripts using git.  Type: &amp;lt;pre&amp;gt;git clone git://git.webos-internals.org/tools/meta-doctor.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Navigate to the meta-doctor directory. &amp;lt;pre&amp;gt;cd meta-doctor&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create a downloads directory.  Type: &amp;lt;pre&amp;gt;mkdir downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mac OS X 10.6 ==&lt;br /&gt;
&lt;br /&gt;
#Install MacPorts first, which will allow us to easily install the necessary packages for MetaDoctor. [http://www.macports.org/install.php]. Please note that MacPorts requires Apple's Xcode Developer Tools (version 3.2.1 or later for Snow Leopard, 3.1.4 or later for Leopard, or 2.5 for Tiger), found at the [http://connect.apple.com/ Apple Developer Connection site] or on your Mac OS X installation CDs/DVD.&lt;br /&gt;
#Install md5sum: &amp;lt;pre&amp;gt;sudo port install md5sha1sum&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install gnutar: &amp;lt;pre&amp;gt;sudo port install gnutar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install git: &amp;lt;pre&amp;gt;sudo port install git-core&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install wget: &amp;lt;pre&amp;gt;sudo port install wget&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now type: &amp;lt;pre&amp;gt;git clone git://git.webos-internals.org/tools/meta-doctor.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install patch: &amp;lt;pre&amp;gt;sudo port install gpatch&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you do not have Java installed, do so. To install Java, click on the &amp;quot;Apple&amp;quot; icon and select &amp;quot;Software Update.&amp;quot; This will automatically update you to the latest version of Java if necessary, as Apple supplies their own version of Java. Further instructions can be found [http://support.apple.com/kb/HT1338?viewlocale=en_US here].&lt;br /&gt;
#Download and install the Palm Novacom software from http://developer.palm.com. The Mac OS X SDK is located [http://cdn.downloads.palm.com/sdkdownloads/1.4.5.465/sdkBinaries/Palm_webOS_SDK.1.4.5.465.dmg here].&lt;br /&gt;
#Open a terminal and navigate to the meta-doctor directory where the meta-doctor was copied to in step 6 above.&amp;lt;pre&amp;gt;cd meta-doctor&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Ensure that there is a downloads directory.  If there is not one, create one using &amp;lt;pre&amp;gt;mkdir downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Step 2: Running the webOS Doctor=&lt;br /&gt;
&lt;br /&gt;
Note that if you are following a procedure on another wiki page which only requires the installation of the MetaDoctor and then tells you to return to that other page, then this is the place at which you should return.&lt;br /&gt;
&lt;br /&gt;
'''If you intend to enable WIFI Profiles, you must copy a file off of the phone before doctoring. See the section below on enabling wifi profiles.'''&lt;br /&gt;
&lt;br /&gt;
# Navigate to the meta-doctor directory in the terminal&lt;br /&gt;
# Download the latest webosdoctor file using the download paths found at [http://www.webos-internals.org/wiki/Webos_Doctor_Versions Webos Doctor Versions] .The wr version is the French,German,Irish,Spanish and UK GSM version.  An example (e.g. current Web OS as of 11/23/11) download command would be: &amp;lt;pre&amp;gt;cd downloads&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;wget http://palm.cdnetworks.net/rom/touchpad/p302r0d08012011/wifip302rod/webosdoctorp302hstnhwifi.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you would like Meta-Doctor to apply patches to webOS in order to add or change functionality from the factory install, open the Makefile with your favorite text editor and uncomment (remove the leading # characters from) the options you would like to use. &lt;br /&gt;
# Before doing the next step, make sure you change back into the meta-doctor directory first. All the following commands must be run from the meta-doctor directory.&lt;br /&gt;
# Type one of the following: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=sprint all&amp;lt;/pre&amp;gt; &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixi CARRIER=sprint all&amp;lt;/pre&amp;gt; &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=bellmo all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=telcel all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=verizonwireless all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=verizonwireless all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=att all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=att all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=touchpad CARRIER=wifi all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: depending on the carrier in question.&lt;br /&gt;
'''Note ''': use make DEVICE=palm_smartphone_type CARRIER=wr  all  for O2 Germany, UK and Ireland / Movistar Spain / SFR France&lt;br /&gt;
&lt;br /&gt;
This should begin a process within the terminal that should take 10 minutes max.&lt;br /&gt;
'''Note ''':if you receive an error message, 'Please download the correct version of the webOS Doctor .jar file and then move it to downloads', you need to append the version number to the end of the file (e.g. sudo mv webosdoctorp302hstnhwifi.jar webosdoctorp302hstnhwifi-3.0.2.jar)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Error conditions ===&lt;br /&gt;
&lt;br /&gt;
If an error message appears with unknown in a file name, check the file rename in step 8 above.&lt;br /&gt;
&lt;br /&gt;
=== If the build fails ===&lt;br /&gt;
&lt;br /&gt;
If the make command fails, you can use &amp;lt;pre&amp;gt;make clobber&amp;lt;/pre&amp;gt; to clean up the build directory. After this you can re-run the command.&lt;br /&gt;
&lt;br /&gt;
The updated doctor version has the same name as the original, but is in a new folder: ''meta-doctor/build/&amp;lt;name_and_version&amp;gt;/webosdoctorp302hstnhwifi.jar''.&lt;br /&gt;
&lt;br /&gt;
If you are running in Ubuntu or Cygwin, you can just run the new jar file now.  &lt;br /&gt;
&lt;br /&gt;
If you are running Ubuntu using VM, you will need to copy the new jar out of the VM into your live desktop to run the jar in your native OS. &lt;br /&gt;
&lt;br /&gt;
CD to the folder where your new jar file is, and type something like: &lt;br /&gt;
&lt;br /&gt;
java -jar webosdoctorp302hstnhwifi.jar&lt;br /&gt;
&lt;br /&gt;
If you were using a VM or some other virtual method, you will need to copy the jar file out to your main operating system before running it.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Windows host:''&lt;br /&gt;
&lt;br /&gt;
[http://ubuntuexperiment.wordpress.com/2008/11/12/sharing-folders-between-host-and-guest-os-in-virtualbox/ VirtualBox folder Sharing]&lt;br /&gt;
&lt;br /&gt;
[http://www.howtogeek.com/howto/ubuntu/how-to-share-folders-with-your-ubuntu-virtual-machine-guest/ VMWare folder Sharing]&lt;br /&gt;
&lt;br /&gt;
''Mac OSX host:''&lt;br /&gt;
&lt;br /&gt;
[http://davidherron.com/blog/topics/628-virtualbox-running-ubuntu-accessing-host-file-system-mac-os-x VirtualBox folder Sharing]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: ''NOTE: this only applies to WUBI Users''  &lt;br /&gt;
You should be able to run the JAR as if you had Linux installed natively because in a sense you do (as long as Java is installed and you run the Jar using Java) but if you rather run it in windows  &lt;br /&gt;
&lt;br /&gt;
Using terminal the following command in a Wubi installation of Ubuntu will copy the JAR file to the host Windows OS :&amp;lt;pre&amp;gt;cp /meta-doctor/build/&amp;lt;name_and_version&amp;gt;/webosdoctorp302hstnhwifi.jar /host/webosdoctorp302hstnhwifi.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will place the Jar either in your Windows C:\ drive or whatever drive you installed Wubi to.&lt;br /&gt;
&lt;br /&gt;
== Once the Doctor is running ==&lt;br /&gt;
&lt;br /&gt;
# Select your language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to your PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
When the process finishes, the Pre will reboot and your new modified image will have been installed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
After the doctor completes, you will need to run the &amp;quot;First Run&amp;quot; application. To do this, you will need an active internet connection. Either WiFi or Cellular. If you do not have WiFi and cannot connect to the Palm Profile servers, you might have a problem with your programming. This Meta Doctor (or webOS Doctor in general) could possibly erase the modem's programming. To resolve you will need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This has only been confirmed to resolve Sprint CDMA issues, YMMV.&lt;br /&gt;
&lt;br /&gt;
'''Note 2:''' You should try to update your profile first. Open the phone app, open the App Menu and select ''Preferences'' then select ''Update Network Settings''. If you get an error, then procede with these instructions.&lt;br /&gt;
*'''1.''' Open the Phone App.&lt;br /&gt;
*'''2.''' Enter ''##MSL#'' (MSL= 6 digit lock code. Get this from Sprint.)&lt;br /&gt;
*'''3.''' Verify your MDN and MSID are incorrect. If they are incorrect, continue. If they are correct, this is not your problem and you should not continue.&lt;br /&gt;
*'''4.''' Select ''Edit''.&lt;br /&gt;
*'''5.''' Select the first box (MDN) and enter your 10-digit cellular number.&lt;br /&gt;
*'''6.''' Select the second box (MSID) and enter your 10-digit MSID (Get this from Sprint).&lt;br /&gt;
*'''7.''' Select ''Save''.&lt;br /&gt;
*'''8.''' Backswipe out of the the view.&lt;br /&gt;
*'''9.''' You should now be able to open complete '''Note 2''' above without any errors.&lt;br /&gt;
&lt;br /&gt;
You should now be able to run the ''First Use'' application without any problems.&lt;br /&gt;
&lt;br /&gt;
=If the Doctor will not run=&lt;br /&gt;
Go [http://www.webos-internals.org/wiki/How_To_Recover here] if you have further problems connecting your Pre to the running Meta'ed Doctor.&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous=&lt;br /&gt;
Clarification for Linux beginners on where to place the prefsDB.sl file, per instructions in the makefile.&lt;br /&gt;
Steps:&lt;br /&gt;
1. Open makefile using a text editor (like WordPad) and use the instructions there to retrieve your prefsDB.sl file from your device. Save it somewhere convenient on your host machine (aka, computer).&lt;br /&gt;
2. Navigate to the meta-doctor directory and create the config directory: mkdir -p config&lt;br /&gt;
3. Rename your prefsDB.sl file to com.palm.wifi.prefsDB.sl&lt;br /&gt;
4. Put com.palm.wifi.prefsDB.sl in the config directory.&lt;br /&gt;
5. Continue following instructions in the makefile.&lt;br /&gt;
&lt;br /&gt;
==How to enable WIFI profiles==&lt;br /&gt;
To enable wifi profiles it is necessary to copy your wifi profile file off of your phone and place this in a directory, as well as enable the wifi profile option in the makefile. &lt;br /&gt;
&lt;br /&gt;
# Move to the meta-doctor directory (cd meta-doctor)&lt;br /&gt;
# Create a &amp;quot;config&amp;quot; folder in the meta-doctor directory (mkdir config)&lt;br /&gt;
# Copy the prefsDB.sl file off of your phone from the var/preferences/com.palm.wifi/ and into the &amp;quot;config&amp;quot; directory that you just created.&lt;br /&gt;
# Rename this file &amp;quot;com.palm.wifi.prefsDB.sl&amp;quot; without the quotes&lt;br /&gt;
# Open the makefile (which is in the meta-doctor directory) and remove the &amp;quot;#&amp;quot; from the line &amp;quot;# INSTALL_WIFI_PROFILES = 1&amp;quot;. Save the makefile.&lt;br /&gt;
# Build the custom doctor by running the script, or otherwise building it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On launch of the new doctor your wifi profile should automatically connect, but '''only if''' you had previously connected to the WIFI network you are trying to use.&lt;br /&gt;
&lt;br /&gt;
See these links for more information: [http://forums.precentral.net/webos-internals/276460-how-install-webos-2-1-0-pre-pre-using-meta-doctor-27.html#post2882495 Post 1], [http://discussion.treocentral.com/webos-internals/276460-how-install-webos-2-1-0-pre-pre-using-meta-doctor-43.html#post2884415 Post 2].&lt;br /&gt;
&lt;br /&gt;
==How to get the optional ext3fs partition mounted at device boot==&lt;br /&gt;
&lt;br /&gt;
'''(NOTE: This is a necessary step to get UbuntuChroot working on the touchpad and must be done before UbuntuChroot is installed)'''&lt;br /&gt;
&lt;br /&gt;
Note that you have to use the Meta-Doctor as shown earlier in this page to doctor your device to create the ext3fs partition before attempting the following steps.&lt;br /&gt;
&lt;br /&gt;
All of this is done on device either via novaterm or an SSH login.&lt;br /&gt;
If your device does NOT have a folder at /media/ext3fs then you will need to create it first.  Use the following two commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -o remount,rw /&lt;br /&gt;
mkdir -p /media/ext3fs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it is important that you use /media/ext3fs as the location, otherwise some homebrew applications (such as Optware and the Ubuntu 11.04 Chroot) will not be able to find it and use it properly.&lt;br /&gt;
&lt;br /&gt;
After you have created the mountpoint, we are going to edit the fstab file to set it up to mount at bootup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -o remount,rw /      *****Not necessary if you performed the previous steps, but doesn't hurt if you do it twice&lt;br /&gt;
echo &amp;quot;/dev/mapper/store-ext3fs /media/ext3fs ext3   noatime,data=writeback   0   0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now to get it mounted you have several options, the best one is the first command as it will use the data in /etc/fstab.  If that works, then you have done this correctly and your ext3fs will mount at bootup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want it mounted at bootup, but you do need it mounted, you can use this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount /dev/mapper/store-ext3fs /media/ext3fs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How to change a provider's DB-entry so 3G data can be used on the Pre==&lt;br /&gt;
&lt;br /&gt;
[http://forums.precentral.net/gsm-pre/211728-modifying-webos-carrier-network-settings.html#post2002079 This post] and [http://forums.precentral.net/palm-pre/209222-few-questions-about-german-palm-pre-6.html this thread] describe various ways to adjust the provider's data base in the Pre, so the 3G datacom works on non-supported networks. webOS 1.3.1 allows setting of the providers data directly from the activation screen for providers that are present in the DB. Some report that they are not able to do that and that they cannot get 3G datacom working on 1.3.1&lt;br /&gt;
&lt;br /&gt;
== Problems with Novacom ==&lt;br /&gt;
If you are Running a new Distro, like Archlinux, you could run into problem with novacom while trying to connect your pre. Running novacomd on the command line could provide further information. This may be a problem with libusb. Get a older version like described in [http://developer.palm.com/distribution/viewtopic.php?f=11&amp;amp;t=4233&amp;amp;start=0 this thread].&lt;br /&gt;
&lt;br /&gt;
== How to Install webOS 2.x on &amp;quot;unoffical&amp;quot; Devices==&lt;br /&gt;
With the release of the O2-DE webOS Doctor, efforts have been made to apply the techniques of MetaDoctor and create a custom doctor to apply 2.1.0 to devices that it was not been officially released for.  For those not faint of heart, a step-by-step can be found at the following:  [[WebOS 2 Upgrade]]&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:MetaDoctor&amp;diff=17825</id>
		<title>Application:MetaDoctor</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:MetaDoctor&amp;diff=17825"/>
		<updated>2011-08-24T06:29:26Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Step 2: Running the webOS Doctor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Application]]&lt;br /&gt;
This page is currently available in four languages:&lt;br /&gt;
:[[Image:Australia.png]] [[Image:USA.png]] [[Application:MetaDoctor]]&lt;br /&gt;
:[[Image:France.png]] [[Application:MetaDoctor-FR]]&lt;br /&gt;
:[[Image:Germany.png]] [[Application:MetaDoctor-DE]]&lt;br /&gt;
:[[Image:Mexico.png]] [[Image:Spain.png]] [[Application:MetaDoctor-ES]]&lt;br /&gt;
&lt;br /&gt;
= What is the Meta Doctor? =&lt;br /&gt;
&lt;br /&gt;
The Webos Internals Meta Doctor is a Makefile which can modify a copy of the Palm webOS Doctor to bypass the &amp;quot;First Use&amp;quot; application and allow the phone to run without having been activated on a cell network. It accomplishes this by reaching into Palm's distributed Doctor JAR file and making changes to it. It can prevent the first use app from running, as well as applying other tweaks to the OS.&lt;br /&gt;
&lt;br /&gt;
'''Documentation for the features that the MetaDoctor offers is at the top of the Makefile (you need to clone the repository and then look in the Makefile file to see that).'''&lt;br /&gt;
&lt;br /&gt;
= Step 1: Setting up Meta-Doctor=&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
'''NOTE THAT USING CYGWIN ON WINDOWS IS NO LONGER SUPPORTED AND WILL MAKE YOUR PHONE FAIL TO BOOT'''&lt;br /&gt;
&lt;br /&gt;
Windows users can use the meta doctor without harming your current installation of windows using simple Ubuntu installer called WUBI. Also no need for moding any partitions or installing any boot loaders. It will just appear as program in your installed software list and when you do not want it anymore simply uninstall it while in windows through Control Panel. It is easy and there is no virtual machine headaches of trying to configure USB, Network and File sharing with host computer... To access it you just reboot and choose Ubuntu from dual boot screen.&lt;br /&gt;
&lt;br /&gt;
# Download [http://www.ubuntu.com/getubuntu/download Ubuntu 11.04], look for the Ubuntu Desktop Edition, '''not the Windows Installer'''&lt;br /&gt;
# Burn that file to a cd or mount to virtual drive&lt;br /&gt;
# Run cd in windows (the wubi.exe file inside the disk, it also comes up in auto run) - '''Don't boot your machine with the CD (called as using the LiveCD, as this option won't give you enough space for the MetaDoctor process to complete.'''&lt;br /&gt;
# Click on '''Install Inside windows'''.&lt;br /&gt;
#: This will install Ubuntu while running Windows without the need of making a partition I would recomand making the install image the full recommended 30 gigs if you have the hard drive space and think you are interested in actually using the Ubuntu OS, otherwise the minimum recommended by Wubi should be just fine. &lt;br /&gt;
# Restart your computer and you can dual boot to Windows or Ubuntu &lt;br /&gt;
&lt;br /&gt;
The nice thing about this is that it will allow you to uninstall Ubuntu right from Windows as if it was never there and remove the dual boot, not to mention the fact you do not need to partition your drive.&lt;br /&gt;
&lt;br /&gt;
If you are still wondering what Wubi is the fallowing link should explain it to you better.&lt;br /&gt;
[https://wiki.ubuntu.com/WubiGuide Wubi Guide]&lt;br /&gt;
&lt;br /&gt;
Once you have installed WUBI, you should follow the instructions in the Linux section below.&lt;br /&gt;
&lt;br /&gt;
== Linux == &lt;br /&gt;
&lt;br /&gt;
# Open terminal from the ( Applications &amp;gt; Accessories ) menu.&lt;br /&gt;
# Update your package lists and install git and Java runtime (the Canonical Partner Repository is needed to install the Sun Java JRE because it was moved out of the Multiverse in Ubuntu 10.04).  Type: &amp;lt;pre&amp;gt;sudo add-apt-repository &amp;quot;deb http://archive.canonical.com/ lucid partner&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install git&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install sun-java6-jre&amp;lt;/pre&amp;gt; (To accept the Java License Page, press tab until 'OK' is highlighted, then press enter) If the java install fails, look for support on the Java website [http://www.java.com/en/download/linux_manual.jsp here].  If you receive an error about git, repeat the command using git-core instead.&lt;br /&gt;
# Download and install the Palm Novacom software: [https://cdn.downloads.palm.com/sdkdownloads/2.1.0.519/sdkBinaries/palm-novacom_1.0.64_i386.deb 32-bit] or [https://cdn.downloads.palm.com/sdkdownloads/2.1.0.519/sdkBinaries/palm-novacom_1.0.64_amd64.deb 64-bit].  If you have trouble installing, you can find more information [https://developer.palm.com/content/resources/develop/sdk_pdk_download.html#c28522 here].&lt;br /&gt;
# Download the meta-doctor scripts using git.  Type: &amp;lt;pre&amp;gt;git clone git://git.webos-internals.org/tools/meta-doctor.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Navigate to the meta-doctor directory. &amp;lt;pre&amp;gt;cd meta-doctor&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create a downloads directory.  Type: &amp;lt;pre&amp;gt;mkdir downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mac OS X 10.6 ==&lt;br /&gt;
&lt;br /&gt;
#Install MacPorts first, which will allow us to easily install the necessary packages for MetaDoctor. [http://www.macports.org/install.php]. Please note that MacPorts requires Apple's Xcode Developer Tools (version 3.2.1 or later for Snow Leopard, 3.1.4 or later for Leopard, or 2.5 for Tiger), found at the [http://connect.apple.com/ Apple Developer Connection site] or on your Mac OS X installation CDs/DVD.&lt;br /&gt;
#Install md5sum: &amp;lt;pre&amp;gt;sudo port install md5sha1sum&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install gnutar: &amp;lt;pre&amp;gt;sudo port install gnutar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install git: &amp;lt;pre&amp;gt;sudo port install git-core&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install wget: &amp;lt;pre&amp;gt;sudo port install wget&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now type: &amp;lt;pre&amp;gt;git clone git://git.webos-internals.org/tools/meta-doctor.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install patch: &amp;lt;pre&amp;gt;sudo port install gpatch&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you do not have Java installed, do so. To install Java, click on the &amp;quot;Apple&amp;quot; icon and select &amp;quot;Software Update.&amp;quot; This will automatically update you to the latest version of Java if necessary, as Apple supplies their own version of Java. Further instructions can be found [http://support.apple.com/kb/HT1338?viewlocale=en_US here].&lt;br /&gt;
#Download and install the Palm Novacom software from http://developer.palm.com. The Mac OS X SDK is located [http://cdn.downloads.palm.com/sdkdownloads/1.4.5.465/sdkBinaries/Palm_webOS_SDK.1.4.5.465.dmg here].&lt;br /&gt;
#Open a terminal and navigate to the meta-doctor directory where the meta-doctor was copied to in step 6 above.&amp;lt;pre&amp;gt;cd meta-doctor&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Ensure that there is a downloads directory.  If there is not one, create one using &amp;lt;pre&amp;gt;mkdir downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Step 2: Running the webOS Doctor=&lt;br /&gt;
&lt;br /&gt;
Note that if you are following a procedure on another wiki page which only requires the installation of the MetaDoctor and then tells you to return to that other page, then this is the place at which you should return.&lt;br /&gt;
&lt;br /&gt;
'''If you intend to enable WIFI Profiles, you must copy a file off of the phone before doctoring. See the section below on enabling wifi profiles.'''&lt;br /&gt;
&lt;br /&gt;
# Navigate to the meta-doctor directory in the terminal&lt;br /&gt;
# Download the latest webosdoctor file using the download paths found at [http://www.webos-internals.org/wiki/Webos_Doctor_Versions Webos Doctor Versions] .The wr version is the French,German,Irish,Spanish and UK GSM version.  An example (e.g. current Web OS as of 11/23/11) download command would be: &amp;lt;pre&amp;gt;cd downloads&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;wget http://palm.cdnetworks.net/rom/touchpad/p302r0d08012011/wifip302rod/webosdoctorp302hstnhwifi.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you would like Meta-Doctor to apply patches to webOS in order to add or change functionality from the factory install, open the Makefile with your favorite text editor and uncomment (remove the leading # characters from) the options you would like to use. &lt;br /&gt;
# Before doing the next step, make sure you change back into the meta-doctor directory first. All the following commands must be run from the meta-doctor directory.&lt;br /&gt;
# Type one of the following: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=sprint all&amp;lt;/pre&amp;gt; &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixi CARRIER=sprint all&amp;lt;/pre&amp;gt; &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=bellmo all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=telcel all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=verizonwireless all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=verizonwireless all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=att all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=att all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=touchpad CARRIER=wifi all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: depending on the carrier in question.&lt;br /&gt;
'''Note ''': use make DEVICE=palm_smartphone_type CARRIER=wr  all  for O2 Germany, UK and Ireland / Movistar Spain / SFR France&lt;br /&gt;
&lt;br /&gt;
This should begin a process within the terminal that should take 10 minutes max.&lt;br /&gt;
&lt;br /&gt;
=== Error conditions ===&lt;br /&gt;
&lt;br /&gt;
If an error message appears with unknown in a file name, check the file rename in step 8 above.&lt;br /&gt;
&lt;br /&gt;
=== If the build fails ===&lt;br /&gt;
&lt;br /&gt;
If the make command fails, you can use &amp;lt;pre&amp;gt;make clobber&amp;lt;/pre&amp;gt; to clean up the build directory. After this you can re-run the command.&lt;br /&gt;
&lt;br /&gt;
The updated doctor version has the same name as the original, but is in a new folder: ''meta-doctor/build/&amp;lt;name_and_version&amp;gt;/webosdoctorp302hstnhwifi.jar''.&lt;br /&gt;
&lt;br /&gt;
If you are running in Ubuntu or Cygwin, you can just run the new jar file now.  &lt;br /&gt;
&lt;br /&gt;
If you are running Ubuntu using VM, you will need to copy the new jar out of the VM into your live desktop to run the jar in your native OS. &lt;br /&gt;
&lt;br /&gt;
CD to the folder where your new jar file is, and type something like: &lt;br /&gt;
&lt;br /&gt;
java -jar webosdoctorp302hstnhwifi.jar&lt;br /&gt;
&lt;br /&gt;
If you were using a VM or some other virtual method, you will need to copy the jar file out to your main operating system before running it.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Windows host:''&lt;br /&gt;
&lt;br /&gt;
[http://ubuntuexperiment.wordpress.com/2008/11/12/sharing-folders-between-host-and-guest-os-in-virtualbox/ VirtualBox folder Sharing]&lt;br /&gt;
&lt;br /&gt;
[http://www.howtogeek.com/howto/ubuntu/how-to-share-folders-with-your-ubuntu-virtual-machine-guest/ VMWare folder Sharing]&lt;br /&gt;
&lt;br /&gt;
''Mac OSX host:''&lt;br /&gt;
&lt;br /&gt;
[http://davidherron.com/blog/topics/628-virtualbox-running-ubuntu-accessing-host-file-system-mac-os-x VirtualBox folder Sharing]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: ''NOTE: this only applies to WUBI Users''  &lt;br /&gt;
You should be able to run the JAR as if you had Linux installed natively because in a sense you do (as long as Java is installed and you run the Jar using Java) but if you rather run it in windows  &lt;br /&gt;
&lt;br /&gt;
Using terminal the following command in a Wubi installation of Ubuntu will copy the JAR file to the host Windows OS :&amp;lt;pre&amp;gt;cp /meta-doctor/build/&amp;lt;name_and_version&amp;gt;/webosdoctorp302hstnhwifi.jar /host/webosdoctorp302hstnhwifi.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will place the Jar either in your Windows C:\ drive or whatever drive you installed Wubi to.&lt;br /&gt;
&lt;br /&gt;
== Once the Doctor is running ==&lt;br /&gt;
&lt;br /&gt;
# Select your language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to your PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
When the process finishes, the Pre will reboot and your new modified image will have been installed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
After the doctor completes, you will need to run the &amp;quot;First Run&amp;quot; application. To do this, you will need an active internet connection. Either WiFi or Cellular. If you do not have WiFi and cannot connect to the Palm Profile servers, you might have a problem with your programming. This Meta Doctor (or webOS Doctor in general) could possibly erase the modem's programming. To resolve you will need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This has only been confirmed to resolve Sprint CDMA issues, YMMV.&lt;br /&gt;
&lt;br /&gt;
'''Note 2:''' You should try to update your profile first. Open the phone app, open the App Menu and select ''Preferences'' then select ''Update Network Settings''. If you get an error, then procede with these instructions.&lt;br /&gt;
*'''1.''' Open the Phone App.&lt;br /&gt;
*'''2.''' Enter ''##MSL#'' (MSL= 6 digit lock code. Get this from Sprint.)&lt;br /&gt;
*'''3.''' Verify your MDN and MSID are incorrect. If they are incorrect, continue. If they are correct, this is not your problem and you should not continue.&lt;br /&gt;
*'''4.''' Select ''Edit''.&lt;br /&gt;
*'''5.''' Select the first box (MDN) and enter your 10-digit cellular number.&lt;br /&gt;
*'''6.''' Select the second box (MSID) and enter your 10-digit MSID (Get this from Sprint).&lt;br /&gt;
*'''7.''' Select ''Save''.&lt;br /&gt;
*'''8.''' Backswipe out of the the view.&lt;br /&gt;
*'''9.''' You should now be able to open complete '''Note 2''' above without any errors.&lt;br /&gt;
&lt;br /&gt;
You should now be able to run the ''First Use'' application without any problems.&lt;br /&gt;
&lt;br /&gt;
=If the Doctor will not run=&lt;br /&gt;
Go [http://www.webos-internals.org/wiki/How_To_Recover here] if you have further problems connecting your Pre to the running Meta'ed Doctor.&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous=&lt;br /&gt;
Clarification for Linux beginners on where to place the prefsDB.sl file, per instructions in the makefile.&lt;br /&gt;
Steps:&lt;br /&gt;
1. Open makefile using a text editor (like WordPad) and use the instructions there to retrieve your prefsDB.sl file from your device. Save it somewhere convenient on your host machine (aka, computer).&lt;br /&gt;
2. Navigate to the meta-doctor directory and create the config directory: mkdir -p config&lt;br /&gt;
3. Rename your prefsDB.sl file to com.palm.wifi.prefsDB.sl&lt;br /&gt;
4. Put com.palm.wifi.prefsDB.sl in the config directory.&lt;br /&gt;
5. Continue following instructions in the makefile.&lt;br /&gt;
&lt;br /&gt;
==How to enable WIFI profiles==&lt;br /&gt;
To enable wifi profiles it is necessary to copy your wifi profile file off of your phone and place this in a directory, as well as enable the wifi profile option in the makefile. &lt;br /&gt;
&lt;br /&gt;
# Move to the meta-doctor directory (cd meta-doctor)&lt;br /&gt;
# Create a &amp;quot;config&amp;quot; folder in the meta-doctor directory (mkdir config)&lt;br /&gt;
# Copy the prefsDB.sl file off of your phone from the var/preferences/com.palm.wifi/ and into the &amp;quot;config&amp;quot; directory that you just created.&lt;br /&gt;
# Rename this file &amp;quot;com.palm.wifi.prefsDB.sl&amp;quot; without the quotes&lt;br /&gt;
# Open the makefile (which is in the meta-doctor directory) and remove the &amp;quot;#&amp;quot; from the line &amp;quot;# INSTALL_WIFI_PROFILES = 1&amp;quot;. Save the makefile.&lt;br /&gt;
# Build the custom doctor by running the script, or otherwise building it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On launch of the new doctor your wifi profile should automatically connect, but '''only if''' you had previously connected to the WIFI network you are trying to use.&lt;br /&gt;
&lt;br /&gt;
See these links for more information: [http://forums.precentral.net/webos-internals/276460-how-install-webos-2-1-0-pre-pre-using-meta-doctor-27.html#post2882495 Post 1], [http://discussion.treocentral.com/webos-internals/276460-how-install-webos-2-1-0-pre-pre-using-meta-doctor-43.html#post2884415 Post 2].&lt;br /&gt;
&lt;br /&gt;
==How to get the optional ext3fs partition mounted at device boot==&lt;br /&gt;
&lt;br /&gt;
'''(NOTE: This is a necessary step to get UbuntuChroot working on the touchpad and must be done before UbuntuChroot is installed)'''&lt;br /&gt;
&lt;br /&gt;
Note that you have to use the Meta-Doctor as shown earlier in this page to doctor your device to create the ext3fs partition before attempting the following steps.&lt;br /&gt;
&lt;br /&gt;
All of this is done on device either via novaterm or an SSH login.&lt;br /&gt;
If your device does NOT have a folder at /media/ext3fs then you will need to create it first.  Use the following two commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -o remount,rw /&lt;br /&gt;
mkdir -p /media/ext3fs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it is important that you use /media/ext3fs as the location, otherwise some homebrew applications (such as Optware and the Ubuntu 11.04 Chroot) will not be able to find it and use it properly.&lt;br /&gt;
&lt;br /&gt;
After you have created the mountpoint, we are going to edit the fstab file to set it up to mount at bootup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -o remount,rw /      *****Not necessary if you performed the previous steps, but doesn't hurt if you do it twice&lt;br /&gt;
echo &amp;quot;/dev/mapper/store-ext3fs /media/ext3fs ext3   noatime,data=writeback   0   0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now to get it mounted you have several options, the best one is the first command as it will use the data in /etc/fstab.  If that works, then you have done this correctly and your ext3fs will mount at bootup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want it mounted at bootup, but you do need it mounted, you can use this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount /dev/mapper/store-ext3fs /media/ext3fs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How to change a provider's DB-entry so 3G data can be used on the Pre==&lt;br /&gt;
&lt;br /&gt;
[http://forums.precentral.net/gsm-pre/211728-modifying-webos-carrier-network-settings.html#post2002079 This post] and [http://forums.precentral.net/palm-pre/209222-few-questions-about-german-palm-pre-6.html this thread] describe various ways to adjust the provider's data base in the Pre, so the 3G datacom works on non-supported networks. webOS 1.3.1 allows setting of the providers data directly from the activation screen for providers that are present in the DB. Some report that they are not able to do that and that they cannot get 3G datacom working on 1.3.1&lt;br /&gt;
&lt;br /&gt;
== Problems with Novacom ==&lt;br /&gt;
If you are Running a new Distro, like Archlinux, you could run into problem with novacom while trying to connect your pre. Running novacomd on the command line could provide further information. This may be a problem with libusb. Get a older version like described in [http://developer.palm.com/distribution/viewtopic.php?f=11&amp;amp;t=4233&amp;amp;start=0 this thread].&lt;br /&gt;
&lt;br /&gt;
== How to Install webOS 2.x on &amp;quot;unoffical&amp;quot; Devices==&lt;br /&gt;
With the release of the O2-DE webOS Doctor, efforts have been made to apply the techniques of MetaDoctor and create a custom doctor to apply 2.1.0 to devices that it was not been officially released for.  For those not faint of heart, a step-by-step can be found at the following:  [[WebOS 2 Upgrade]]&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
	<entry>
		<id>http://wiki.webos-internals.org/index.php?title=Application:MetaDoctor&amp;diff=17823</id>
		<title>Application:MetaDoctor</title>
		<link rel="alternate" type="text/html" href="http://wiki.webos-internals.org/index.php?title=Application:MetaDoctor&amp;diff=17823"/>
		<updated>2011-08-24T06:25:17Z</updated>

		<summary type="html">&lt;p&gt;Cyclic: /* Step 2: Running the webOS Doctor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Category:Application]]&lt;br /&gt;
This page is currently available in four languages:&lt;br /&gt;
:[[Image:Australia.png]] [[Image:USA.png]] [[Application:MetaDoctor]]&lt;br /&gt;
:[[Image:France.png]] [[Application:MetaDoctor-FR]]&lt;br /&gt;
:[[Image:Germany.png]] [[Application:MetaDoctor-DE]]&lt;br /&gt;
:[[Image:Mexico.png]] [[Image:Spain.png]] [[Application:MetaDoctor-ES]]&lt;br /&gt;
&lt;br /&gt;
= What is the Meta Doctor? =&lt;br /&gt;
&lt;br /&gt;
The Webos Internals Meta Doctor is a Makefile which can modify a copy of the Palm webOS Doctor to bypass the &amp;quot;First Use&amp;quot; application and allow the phone to run without having been activated on a cell network. It accomplishes this by reaching into Palm's distributed Doctor JAR file and making changes to it. It can prevent the first use app from running, as well as applying other tweaks to the OS.&lt;br /&gt;
&lt;br /&gt;
'''Documentation for the features that the MetaDoctor offers is at the top of the Makefile (you need to clone the repository and then look in the Makefile file to see that).'''&lt;br /&gt;
&lt;br /&gt;
= Step 1: Setting up Meta-Doctor=&lt;br /&gt;
&lt;br /&gt;
== Windows ==&lt;br /&gt;
&lt;br /&gt;
'''NOTE THAT USING CYGWIN ON WINDOWS IS NO LONGER SUPPORTED AND WILL MAKE YOUR PHONE FAIL TO BOOT'''&lt;br /&gt;
&lt;br /&gt;
Windows users can use the meta doctor without harming your current installation of windows using simple Ubuntu installer called WUBI. Also no need for moding any partitions or installing any boot loaders. It will just appear as program in your installed software list and when you do not want it anymore simply uninstall it while in windows through Control Panel. It is easy and there is no virtual machine headaches of trying to configure USB, Network and File sharing with host computer... To access it you just reboot and choose Ubuntu from dual boot screen.&lt;br /&gt;
&lt;br /&gt;
# Download [http://www.ubuntu.com/getubuntu/download Ubuntu 11.04], look for the Ubuntu Desktop Edition, '''not the Windows Installer'''&lt;br /&gt;
# Burn that file to a cd or mount to virtual drive&lt;br /&gt;
# Run cd in windows (the wubi.exe file inside the disk, it also comes up in auto run) - '''Don't boot your machine with the CD (called as using the LiveCD, as this option won't give you enough space for the MetaDoctor process to complete.'''&lt;br /&gt;
# Click on '''Install Inside windows'''.&lt;br /&gt;
#: This will install Ubuntu while running Windows without the need of making a partition I would recomand making the install image the full recommended 30 gigs if you have the hard drive space and think you are interested in actually using the Ubuntu OS, otherwise the minimum recommended by Wubi should be just fine. &lt;br /&gt;
# Restart your computer and you can dual boot to Windows or Ubuntu &lt;br /&gt;
&lt;br /&gt;
The nice thing about this is that it will allow you to uninstall Ubuntu right from Windows as if it was never there and remove the dual boot, not to mention the fact you do not need to partition your drive.&lt;br /&gt;
&lt;br /&gt;
If you are still wondering what Wubi is the fallowing link should explain it to you better.&lt;br /&gt;
[https://wiki.ubuntu.com/WubiGuide Wubi Guide]&lt;br /&gt;
&lt;br /&gt;
Once you have installed WUBI, you should follow the instructions in the Linux section below.&lt;br /&gt;
&lt;br /&gt;
== Linux == &lt;br /&gt;
&lt;br /&gt;
# Open terminal from the ( Applications &amp;gt; Accessories ) menu.&lt;br /&gt;
# Update your package lists and install git and Java runtime (the Canonical Partner Repository is needed to install the Sun Java JRE because it was moved out of the Multiverse in Ubuntu 10.04).  Type: &amp;lt;pre&amp;gt;sudo add-apt-repository &amp;quot;deb http://archive.canonical.com/ lucid partner&amp;quot;&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get update&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install git&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;sudo apt-get install sun-java6-jre&amp;lt;/pre&amp;gt; (To accept the Java License Page, press tab until 'OK' is highlighted, then press enter) If the java install fails, look for support on the Java website [http://www.java.com/en/download/linux_manual.jsp here].  If you receive an error about git, repeat the command using git-core instead.&lt;br /&gt;
# Download and install the Palm Novacom software: [https://cdn.downloads.palm.com/sdkdownloads/2.1.0.519/sdkBinaries/palm-novacom_1.0.64_i386.deb 32-bit] or [https://cdn.downloads.palm.com/sdkdownloads/2.1.0.519/sdkBinaries/palm-novacom_1.0.64_amd64.deb 64-bit].  If you have trouble installing, you can find more information [https://developer.palm.com/content/resources/develop/sdk_pdk_download.html#c28522 here].&lt;br /&gt;
# Download the meta-doctor scripts using git.  Type: &amp;lt;pre&amp;gt;git clone git://git.webos-internals.org/tools/meta-doctor.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Navigate to the meta-doctor directory. &amp;lt;pre&amp;gt;cd meta-doctor&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Create a downloads directory.  Type: &amp;lt;pre&amp;gt;mkdir downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Mac OS X 10.6 ==&lt;br /&gt;
&lt;br /&gt;
#Install MacPorts first, which will allow us to easily install the necessary packages for MetaDoctor. [http://www.macports.org/install.php]. Please note that MacPorts requires Apple's Xcode Developer Tools (version 3.2.1 or later for Snow Leopard, 3.1.4 or later for Leopard, or 2.5 for Tiger), found at the [http://connect.apple.com/ Apple Developer Connection site] or on your Mac OS X installation CDs/DVD.&lt;br /&gt;
#Install md5sum: &amp;lt;pre&amp;gt;sudo port install md5sha1sum&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install gnutar: &amp;lt;pre&amp;gt;sudo port install gnutar&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install git: &amp;lt;pre&amp;gt;sudo port install git-core&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install wget: &amp;lt;pre&amp;gt;sudo port install wget&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Now type: &amp;lt;pre&amp;gt;git clone git://git.webos-internals.org/tools/meta-doctor.git&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Install patch: &amp;lt;pre&amp;gt;sudo port install gpatch&amp;lt;/pre&amp;gt;&lt;br /&gt;
#If you do not have Java installed, do so. To install Java, click on the &amp;quot;Apple&amp;quot; icon and select &amp;quot;Software Update.&amp;quot; This will automatically update you to the latest version of Java if necessary, as Apple supplies their own version of Java. Further instructions can be found [http://support.apple.com/kb/HT1338?viewlocale=en_US here].&lt;br /&gt;
#Download and install the Palm Novacom software from http://developer.palm.com. The Mac OS X SDK is located [http://cdn.downloads.palm.com/sdkdownloads/1.4.5.465/sdkBinaries/Palm_webOS_SDK.1.4.5.465.dmg here].&lt;br /&gt;
#Open a terminal and navigate to the meta-doctor directory where the meta-doctor was copied to in step 6 above.&amp;lt;pre&amp;gt;cd meta-doctor&amp;lt;/pre&amp;gt;&lt;br /&gt;
#Ensure that there is a downloads directory.  If there is not one, create one using &amp;lt;pre&amp;gt;mkdir downloads&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Step 2: Running the webOS Doctor=&lt;br /&gt;
&lt;br /&gt;
Note that if you are following a procedure on another wiki page which only requires the installation of the MetaDoctor and then tells you to return to that other page, then this is the place at which you should return.&lt;br /&gt;
&lt;br /&gt;
'''If you intend to enable WIFI Profiles, you must copy a file off of the phone before doctoring. See the section below on enabling wifi profiles.'''&lt;br /&gt;
&lt;br /&gt;
# Navigate to the meta-doctor directory in the terminal&lt;br /&gt;
# Download the latest webosdoctor file using the download paths found at [http://www.webos-internals.org/wiki/Webos_Doctor_Versions Webos Doctor Versions] .The wr version is the French,German,Irish,Spanish and UK GSM version.  An example (e.g. current Web OS as of 11/23/11) download command would be: &amp;lt;pre&amp;gt;cd downloads&amp;lt;/pre&amp;gt;&amp;lt;pre&amp;gt;wget http://palm.cdnetworks.net/rom/touchpad/p302r0d08012011/wifip302rod/webosdoctorp302hstnhwifi.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Rename the file that you download to include the version number for future reference (examples: webosdoctorp100ewwsprint-1.3.5.1.jar, webosdoctorp100eww-wr-1.1.3.jar, or webosdoctorp100ewwbellmo-1.2.1.jar).   An example (i.e. will not work, you need to work out the filename based on the URL you used to download it) command to do that would be:&amp;lt;pre&amp;gt;mv webosdoctorp100ewwbellmo.jar webosdoctorp100ewwbellmo-1.3.5.1.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
# If you would like Meta-Doctor to apply patches to webOS in order to add or change functionality from the factory install, open the Makefile with your favorite text editor and uncomment (remove the leading # characters from) the options you would like to use. &lt;br /&gt;
# Before doing the next step, make sure you change back into the meta-doctor directory first. All the following commands must be run from the meta-doctor directory.&lt;br /&gt;
# Type one of the following: &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=wr all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=sprint all&amp;lt;/pre&amp;gt; &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixi CARRIER=sprint all&amp;lt;/pre&amp;gt; &lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=bellmo all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pre CARRIER=telcel all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=verizonwireless all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=verizonwireless all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=preplus CARRIER=att all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=pixiplus CARRIER=att all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: &amp;lt;pre&amp;gt;make DEVICE=touchpad CARRIER=wifi all&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: depending on the carrier in question.&lt;br /&gt;
'''Note ''': use make DEVICE=palm_smartphone_type CARRIER=wr  all  for O2 Germany, UK and Ireland / Movistar Spain / SFR France&lt;br /&gt;
&lt;br /&gt;
This should begin a process within the terminal that should take 10 minutes max.&lt;br /&gt;
&lt;br /&gt;
=== Error conditions ===&lt;br /&gt;
&lt;br /&gt;
If an error message appears with unknown in a file name, check the file rename in step 8 above.&lt;br /&gt;
&lt;br /&gt;
=== If the build fails ===&lt;br /&gt;
&lt;br /&gt;
If the make command fails, you can use &amp;lt;pre&amp;gt;make clobber&amp;lt;/pre&amp;gt; to clean up the build directory. After this you can re-run the command.&lt;br /&gt;
&lt;br /&gt;
The updated doctor version has the same name as the original, but is in a new folder: ''meta-doctor/build/pre-p100eww-sprint-1.3.5.1/webosdoctorp100ewwsprint-1.3.5.1.jar''.&lt;br /&gt;
&lt;br /&gt;
If you are running in Ubuntu or Cygwin, you can just run the new jar file now.  &lt;br /&gt;
&lt;br /&gt;
If you are running Ubuntu using VM, you will need to copy the new jar out of the VM into your live desktop to run the jar in your native OS. &lt;br /&gt;
&lt;br /&gt;
CD to the folder where your new jar file is, and type something like: &lt;br /&gt;
&lt;br /&gt;
java -jar webosdoctorp100ewwsprint-1.3.5.1.jar&lt;br /&gt;
&lt;br /&gt;
If you were using a VM or some other virtual method, you will need to copy the jar file out to your main operating system before running it.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
''Windows host:''&lt;br /&gt;
&lt;br /&gt;
[http://ubuntuexperiment.wordpress.com/2008/11/12/sharing-folders-between-host-and-guest-os-in-virtualbox/ VirtualBox folder Sharing]&lt;br /&gt;
&lt;br /&gt;
[http://www.howtogeek.com/howto/ubuntu/how-to-share-folders-with-your-ubuntu-virtual-machine-guest/ VMWare folder Sharing]&lt;br /&gt;
&lt;br /&gt;
''Mac OSX host:''&lt;br /&gt;
&lt;br /&gt;
[http://davidherron.com/blog/topics/628-virtualbox-running-ubuntu-accessing-host-file-system-mac-os-x VirtualBox folder Sharing]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
: ''NOTE: this only applies to WUBI Users''  &lt;br /&gt;
You should be able to run the JAR as if you had Linux installed natively because in a sense you do (as long as Java is installed and you run the Jar using Java) but if you rather run it in windows  &lt;br /&gt;
&lt;br /&gt;
Using terminal the following command in a Wubi installation of Ubuntu will copy the JAR file to the host Windows OS :&amp;lt;pre&amp;gt;cp /meta-doctor/build/pre-p100eww-sprint-1.2.1/webosdoctorp100ewwsprint-1.2.1.jar /host/webosdoctorp100ewwsprint-1.2.1.jar&amp;lt;/pre&amp;gt;&lt;br /&gt;
This will place the Jar either in your Windows C:\ drive or whatever drive you installed Wubi to.&lt;br /&gt;
&lt;br /&gt;
== Once the Doctor is running ==&lt;br /&gt;
&lt;br /&gt;
# Select your language&lt;br /&gt;
# Accept the license agreement&lt;br /&gt;
# Connect your Pre to your PC via USB and select &amp;quot;Next&amp;quot; when it becomes available&lt;br /&gt;
&lt;br /&gt;
After completion the device will reboot and present you with the activation set-up.&lt;br /&gt;
&lt;br /&gt;
If your PC does not recognize your Pre and you cannot go past step 3 above, try the following steps:&lt;br /&gt;
&lt;br /&gt;
# With the USB cable connected, completely power off the Pre (hold down the power button until the option to power off appears)&lt;br /&gt;
# Hold down the Up button on the volume rocker&lt;br /&gt;
# While holding the Up button, power on the Pre&lt;br /&gt;
# &amp;quot;Next&amp;quot; should now be enabled - proceed with the recovery&lt;br /&gt;
{{tux|Tux_with_Pre.png|float:right;}}&lt;br /&gt;
The above steps will put the Pre into bootloader recovery mode and should allow the PC to recognize your device and proceed with the restore. In this mode the screen will display a giant USB logo instead of the usual Palm startup logo.&lt;br /&gt;
&lt;br /&gt;
When the process finishes, the Pre will reboot and your new modified image will have been installed.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
After the doctor completes, you will need to run the &amp;quot;First Run&amp;quot; application. To do this, you will need an active internet connection. Either WiFi or Cellular. If you do not have WiFi and cannot connect to the Palm Profile servers, you might have a problem with your programming. This Meta Doctor (or webOS Doctor in general) could possibly erase the modem's programming. To resolve you will need to perform the following steps:&lt;br /&gt;
&lt;br /&gt;
'''Note:''' This has only been confirmed to resolve Sprint CDMA issues, YMMV.&lt;br /&gt;
&lt;br /&gt;
'''Note 2:''' You should try to update your profile first. Open the phone app, open the App Menu and select ''Preferences'' then select ''Update Network Settings''. If you get an error, then procede with these instructions.&lt;br /&gt;
*'''1.''' Open the Phone App.&lt;br /&gt;
*'''2.''' Enter ''##MSL#'' (MSL= 6 digit lock code. Get this from Sprint.)&lt;br /&gt;
*'''3.''' Verify your MDN and MSID are incorrect. If they are incorrect, continue. If they are correct, this is not your problem and you should not continue.&lt;br /&gt;
*'''4.''' Select ''Edit''.&lt;br /&gt;
*'''5.''' Select the first box (MDN) and enter your 10-digit cellular number.&lt;br /&gt;
*'''6.''' Select the second box (MSID) and enter your 10-digit MSID (Get this from Sprint).&lt;br /&gt;
*'''7.''' Select ''Save''.&lt;br /&gt;
*'''8.''' Backswipe out of the the view.&lt;br /&gt;
*'''9.''' You should now be able to open complete '''Note 2''' above without any errors.&lt;br /&gt;
&lt;br /&gt;
You should now be able to run the ''First Use'' application without any problems.&lt;br /&gt;
&lt;br /&gt;
=If the Doctor will not run=&lt;br /&gt;
Go [http://www.webos-internals.org/wiki/How_To_Recover here] if you have further problems connecting your Pre to the running Meta'ed Doctor.&lt;br /&gt;
&lt;br /&gt;
=Miscellaneous=&lt;br /&gt;
Clarification for Linux beginners on where to place the prefsDB.sl file, per instructions in the makefile.&lt;br /&gt;
Steps:&lt;br /&gt;
1. Open makefile using a text editor (like WordPad) and use the instructions there to retrieve your prefsDB.sl file from your device. Save it somewhere convenient on your host machine (aka, computer).&lt;br /&gt;
2. Navigate to the meta-doctor directory and create the config directory: mkdir -p config&lt;br /&gt;
3. Rename your prefsDB.sl file to com.palm.wifi.prefsDB.sl&lt;br /&gt;
4. Put com.palm.wifi.prefsDB.sl in the config directory.&lt;br /&gt;
5. Continue following instructions in the makefile.&lt;br /&gt;
&lt;br /&gt;
==How to enable WIFI profiles==&lt;br /&gt;
To enable wifi profiles it is necessary to copy your wifi profile file off of your phone and place this in a directory, as well as enable the wifi profile option in the makefile. &lt;br /&gt;
&lt;br /&gt;
# Move to the meta-doctor directory (cd meta-doctor)&lt;br /&gt;
# Create a &amp;quot;config&amp;quot; folder in the meta-doctor directory (mkdir config)&lt;br /&gt;
# Copy the prefsDB.sl file off of your phone from the var/preferences/com.palm.wifi/ and into the &amp;quot;config&amp;quot; directory that you just created.&lt;br /&gt;
# Rename this file &amp;quot;com.palm.wifi.prefsDB.sl&amp;quot; without the quotes&lt;br /&gt;
# Open the makefile (which is in the meta-doctor directory) and remove the &amp;quot;#&amp;quot; from the line &amp;quot;# INSTALL_WIFI_PROFILES = 1&amp;quot;. Save the makefile.&lt;br /&gt;
# Build the custom doctor by running the script, or otherwise building it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On launch of the new doctor your wifi profile should automatically connect, but '''only if''' you had previously connected to the WIFI network you are trying to use.&lt;br /&gt;
&lt;br /&gt;
See these links for more information: [http://forums.precentral.net/webos-internals/276460-how-install-webos-2-1-0-pre-pre-using-meta-doctor-27.html#post2882495 Post 1], [http://discussion.treocentral.com/webos-internals/276460-how-install-webos-2-1-0-pre-pre-using-meta-doctor-43.html#post2884415 Post 2].&lt;br /&gt;
&lt;br /&gt;
==How to get the optional ext3fs partition mounted at device boot==&lt;br /&gt;
&lt;br /&gt;
'''(NOTE: This is a necessary step to get UbuntuChroot working on the touchpad and must be done before UbuntuChroot is installed)'''&lt;br /&gt;
&lt;br /&gt;
Note that you have to use the Meta-Doctor as shown earlier in this page to doctor your device to create the ext3fs partition before attempting the following steps.&lt;br /&gt;
&lt;br /&gt;
All of this is done on device either via novaterm or an SSH login.&lt;br /&gt;
If your device does NOT have a folder at /media/ext3fs then you will need to create it first.  Use the following two commands:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -o remount,rw /&lt;br /&gt;
mkdir -p /media/ext3fs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
it is important that you use /media/ext3fs as the location, otherwise some homebrew applications (such as Optware and the Ubuntu 11.04 Chroot) will not be able to find it and use it properly.&lt;br /&gt;
&lt;br /&gt;
After you have created the mountpoint, we are going to edit the fstab file to set it up to mount at bootup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -o remount,rw /      *****Not necessary if you performed the previous steps, but doesn't hurt if you do it twice&lt;br /&gt;
echo &amp;quot;/dev/mapper/store-ext3fs /media/ext3fs ext3   noatime,data=writeback   0   0&amp;quot; &amp;gt;&amp;gt; /etc/fstab&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now to get it mounted you have several options, the best one is the first command as it will use the data in /etc/fstab.  If that works, then you have done this correctly and your ext3fs will mount at bootup.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount -a&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not want it mounted at bootup, but you do need it mounted, you can use this command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;mount /dev/mapper/store-ext3fs /media/ext3fs&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==How to change a provider's DB-entry so 3G data can be used on the Pre==&lt;br /&gt;
&lt;br /&gt;
[http://forums.precentral.net/gsm-pre/211728-modifying-webos-carrier-network-settings.html#post2002079 This post] and [http://forums.precentral.net/palm-pre/209222-few-questions-about-german-palm-pre-6.html this thread] describe various ways to adjust the provider's data base in the Pre, so the 3G datacom works on non-supported networks. webOS 1.3.1 allows setting of the providers data directly from the activation screen for providers that are present in the DB. Some report that they are not able to do that and that they cannot get 3G datacom working on 1.3.1&lt;br /&gt;
&lt;br /&gt;
== Problems with Novacom ==&lt;br /&gt;
If you are Running a new Distro, like Archlinux, you could run into problem with novacom while trying to connect your pre. Running novacomd on the command line could provide further information. This may be a problem with libusb. Get a older version like described in [http://developer.palm.com/distribution/viewtopic.php?f=11&amp;amp;t=4233&amp;amp;start=0 this thread].&lt;br /&gt;
&lt;br /&gt;
== How to Install webOS 2.x on &amp;quot;unoffical&amp;quot; Devices==&lt;br /&gt;
With the release of the O2-DE webOS Doctor, efforts have been made to apply the techniques of MetaDoctor and create a custom doctor to apply 2.1.0 to devices that it was not been officially released for.  For those not faint of heart, a step-by-step can be found at the following:  [[WebOS 2 Upgrade]]&lt;/div&gt;</summary>
		<author><name>Cyclic</name></author>
	</entry>
</feed>