Editing PyMaemo/Quick start guide

Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision Your text
Line 17: Line 17:
Application packaging and final deployment will be discussed separately at a later date.
Application packaging and final deployment will be discussed separately at a later date.
-
 
-
Finally, there is a [http://www.youtube.com/watch?v=onAkb_7U5pk screencast] demonstrating the instructions from this guide, which should help clarifying some of the steps in a real setup session.
 
== Requirements ==
== Requirements ==
Line 31: Line 29:
Host requirements:
Host requirements:
-
* An SSH client. For Linux, OpenSSH (through the "ssh" command) is enough. For Windows, [http://en.sourceforge.jp/projects/ttssh2/releases/ Tera Term] can be used. For Mac you can use "ssh" command in the Terminal.
+
* A SSH client. For Linux, OpenSSH (through the "ssh" command) is enough. For Windows, [http://en.sourceforge.jp/projects/ttssh2/releases/ Tera Term] can be used.
-
* An SCP/SFTP client. For Linux, OpenSSH (through the "scp" command) is enough. The KDE/GNOME environments also have built-in support for these protocols. For Windows, you can try [http://winscp.net/eng/index.php WinSCP] or [http://filezilla-project.org/ FileZilla].
+
* A SCP/SFTP client. For Linux, OpenSSH (through the "scp" command) is enough. The KDE/GNOME environments also have built-in support for these protocols. For Windows, you can try [http://winscp.net/eng/index.php WinSCP] or [http://filezilla-project.org/ FileZilla].
For the purposes of this tutorial, you will '''not''' need Scratchbox installed. Scratchbox would only be necessary if you are unable to test your applications on the actual tablet.
For the purposes of this tutorial, you will '''not''' need Scratchbox installed. Scratchbox would only be necessary if you are unable to test your applications on the actual tablet.
Line 40: Line 38:
You will need to install two applications on the tablet:
You will need to install two applications on the tablet:
-
* [http://maemo.org/packages/view/openssh-server/ OpenSSH Server]
+
* OpenSSH Server
-
* [http://maemo.org/packages/view/rootsh/ rootsh]
+
* rootsh
-
 
+
-
rootsh appears to have been replaced by either running <code>sudo gainroot</code> directly, or by running <code>root</code>.
+
OpenSSH is needed to run commands remotely on your N900. This will make testing on the device a lot easier.
OpenSSH is needed to run commands remotely on your N900. This will make testing on the device a lot easier.
-
[[Root access]] is needed to allow to run commands as root on the X Terminal (using <code>sudo gainroot</code>).
+
rootsh allow to run commands as root on the X Terminal (using "sudo gainroot"). See http://wiki.maemo.org/Root_access for other options to enable root access.
To install these applications, follow these steps:
To install these applications, follow these steps:
-
# [[Extras#Using Extras|Enable the extras repository]].
+
# Enable extras repository. See http://wiki.maemo.org/Extras#Using_Extras for how to do it.
# Install the packages listed above.
# Install the packages listed above.
# The installation will ask for a new root password for SSH access. Choose a good one.
# The installation will ask for a new root password for SSH access. Choose a good one.
Line 58: Line 54:
== Enabling USB networking ==
== Enabling USB networking ==
-
USB networking allows to easily and quickly transfer files to the device and connect to it using SSH.
+
USB networking allows to easily and quickly transfer files to the device and connect to it using SSH. To enable it, follow these steps (you need to repeat them every time you reboot the device):
-
 
+
-
Note that this is not the only way to transfer files to the device. If you are already setup with your N900 and your desktop on the same LAN over Wifi, you can save yourself the trouble and skip this USB networking configuration section.
+
-
 
+
-
To enable USB networking, follow these steps (you need to repeat them every time you reboot the device):
+
# If the USB cable is plugged and in "Mass storage mode", unplug the cable and plug it again, now selecting "PC Suite Mode".
# If the USB cable is plugged and in "Mass storage mode", unplug the cable and plug it again, now selecting "PC Suite Mode".
# On N900, open "X Terminal" and run:
# On N900, open "X Terminal" and run:
  rootsh ifup usb0
  rootsh ifup usb0
-
# Now you need to configure the host. This is dependent on which OS (or Linux distro) you use, but there are [[USB networking#Host USB Network Configuration|detailed instructions for various OSes and Linux distros]].
+
# Now you need to configure the host. This is dependent on which OS (or Linux distro) you use, see http://wiki.maemo.org/USB_networking#Host_USB_Network_Configuration for detailed instructions for various OSes and Linux distros.
From now on you can connect to the N900 using any SSH client and the following information:
From now on you can connect to the N900 using any SSH client and the following information:
Line 85: Line 77:
Note that the requirement to enable the "extras-devel" repository might be removed later.
Note that the requirement to enable the "extras-devel" repository might be removed later.
-
To enable extras-devel add a new catalogue to the Application Manager, as instructed in [[Extras-devel]] (did you see the big warning on that page?)
+
To enable extras-devel add a new catalogue to the Application Manager, as instructed in http://wiki.maemo.org/Extras-devel (did you see the big warning on that page?)
After extras-devel is enabled, you will see on Application Manager a package called "maemo-python-device-env". Installing it will also install the basic environment necessary to run most Python applications on Maemo.
After extras-devel is enabled, you will see on Application Manager a package called "maemo-python-device-env". Installing it will also install the basic environment necessary to run most Python applications on Maemo.
Line 95: Line 87:
Here we list some options, both for Linux and Windows:
Here we list some options, both for Linux and Windows:
-
* [http://projects.gnome.org/gedit/ gedit]: the GNOME Editor has syntax highlight support for Python
+
* [http://projects.gnome.org/gedit/ gedit]: the GNOME Editor has syntax highlight support for Python (Linux only)
* [http://www.vim.org/ VIM] and [http://www.gnu.org/software/emacs/ Emacs]: the most popular editors, with many advanced features and versions for both Linux and Windows
* [http://www.vim.org/ VIM] and [http://www.gnu.org/software/emacs/ Emacs]: the most popular editors, with many advanced features and versions for both Linux and Windows
* [http://wiki.netbeans.org/Python NetBeans + Python plugin]: NetBeans is a multi-platform IDE, which with help of a plugin, supports development for Python
* [http://wiki.netbeans.org/Python NetBeans + Python plugin]: NetBeans is a multi-platform IDE, which with help of a plugin, supports development for Python
-
* [http://maemo.org/downloads/product/Maemo5/pygtkeditor/ PyGTKEditor]: a syntax highlighting Python editor which runs natively on Maemo devices
 
Note that none of these editors will support code completion for PyMaemo modules out of box.
Note that none of these editors will support code completion for PyMaemo modules out of box.
Line 142: Line 133:
Note that PluThon has built-in support for transferring and running code on the device. On the other hand, the Maemo SDK has no such support (unless you use some IDE like [http://esbox.garage.maemo.org/ ESbox]), so you need to follow steps similar to the ones described on this guide to copy and run your code on the tablet, if you choose to use the Maemo SDK.
Note that PluThon has built-in support for transferring and running code on the device. On the other hand, the Maemo SDK has no such support (unless you use some IDE like [http://esbox.garage.maemo.org/ ESbox]), so you need to follow steps similar to the ones described on this guide to copy and run your code on the tablet, if you choose to use the Maemo SDK.
-
 
-
== Advanced tips ==
 
-
 
-
If you want to activate USB networking automatically upon connecting the device to the computer, just create a file called /etc/event.d/usbnet on the device with the following contents:
 
-
 
-
start on G_NOKIA_READY
 
-
 
-
console output
 
-
exec ifconfig usb0 192.168.2.15 netmask 255.255.255.0 up
 
-
 
-
This way you just have to select "PC Suite mode" when plugging the device in.
 
[[Category:N900]]
[[Category:N900]]
[[Category:Python]]
[[Category:Python]]

Learn more about Contributing to the wiki.


Please note that all contributions to maemo.org wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see maemo.org wiki:Copyrights for details). Do not submit copyrighted work without permission!


Cancel | Editing help (opens in new window)