Active Topics

 


Reply
Thread Tools
Posts: 10 | Thanked: 0 times | Joined on Nov 2007 @ Washington State, USA
#1
Hello N800 people.

In case you don't know who I am, I invented IMAP 20 years ago, wrote University of Washington imapd, and am a member of the Pine/Alpine development team at UW. Alpine is UW's successor to Pine, with an Apache license. You can find out more about it on http://www.washington.edu/alpine and of course about Pine on http://www.washington.edu/pine

I purchased my N800 with the specific purpose of porting Alpine to it, and thus making an industrial-strength mail program (can handle tens of thousands of messages) on a PDA for the first time. I really hate the various mail programs that exist today, all of which assume that your INBOX has a few dozen messages at most.

Another thing is that many people here are gaa-gaa over iPhone, including for mail; and I think that Alpine on the N800 would definitely get some favorable attention. My boss would definitely use it if it existed (he got his own N800 a few days before I did).

This post goes out mostly to those of you who might care about having Alpine on the N800. If you don't care, please disregard...

Porting Alpine to the N800 is a personal effort on my part. I paid for it out of my own pocket, and the UW isn't supporting the effort in any way (other than a "let us know if you ever get anything"). I already have a UMPC (Sony UX280P) as a handheld gizmo... So I've already put in a fair investment into this effort.

I've been looking through the N800 resources and find it all quite overwhelming. I see that I could easily spend many many days learning everything that I'd need to know... but sadly what I don't have in great abundance is a lot of free time!

I was wondering if someone whose gone through the efforts of porting a text-based UNIX application (preferably one that uses a configure script, as Alpine does) and go through with me what I need to set up as a build environment, what issues I'm likely to face, etc. Anything that would help short-cut this effort and enable it to be finished faster.

The target for my effort is to get Alpine running in an xterm on the N800 and have it look just like when I ssh from the N800 to a Linux server and run Alpine there. Something fancier will have to be the work of my successsor.

Would I have to install gcc, etc. on the N800, or is there some sort of cross-compiler? Will it run on RHE5 and/or Mac OS X?

Last but not least, once something is running, would someone like to become the N800 Alpine maintainer?

Thanks. You can send email directly to me at mrc@cac.washington.edu if you like.
 
Posts: 42 | Thanked: 7 times | Joined on Oct 2007 @ India
#2
Compiling programs directly on N800 is not yet possible. There's Maemo Scratchbox which is a completely standalone build and test environment for developing/porting applications for Nokia Internet tablets(N800).

How to install Maemo Scratchbox on Debian based GNU/Linux:
http://www.linuxmachine.net/2007/07/...n800-part-one/

Building 'Hello World' type application in Maemo Scratchbox:
http://maemo.org/development/documen...rial_bora.html
(look for the section 'Quick start')

Try posting the same message to Maemo Users mailing list, I am sure someone will lend you a helping hand(as would here on itT):
https://lists.maemo.org/mailman//listinfo/maemo-users
https://lists.maemo.org/mailman//lis...emo-developers

Regards.
__________________
"You can think I'm wrong, but that's no reason to quit thinking." -- Dr. Gregory House(House MD)
 
Posts: 10 | Thanked: 0 times | Joined on Nov 2007 @ Washington State, USA
#3
Thank you very much for this information.

I have been contacted by a person who has already ported Alpine to the N800. He has a couple of patches for the N800 that I am going to try to get installed in the official UW Alpine sources

I have to say that the N800 crowd seems to be a great bunch of people to work with. Thanks to you all.
 
Posts: 191 | Thanked: 29 times | Joined on Sep 2007 @ Ottawa
#4
Originally Posted by mrcrispin View Post
Thank you very much for this information.

I have been contacted by a person who has already ported Alpine to the N800. He has a couple of patches for the N800 that I am going to try to get installed in the official UW Alpine sources
I use IMAP every day. And I would like to thank you for that great invention.

Can you point us to the N800 Alpine port? I use pine on my desktop machine, and having a good solid text based IMAP client on the n800 would be quite nice.

I have done some porting of text based apps (such as expect and bvi) to the N800 using the scratchbox-based cross compiler. It works pretty well.

Just a heads up with text based apps, I found that terminfo files were missing on the n800. I found the way around that was to install 'screen' which has many terminfo files included. If your repositories are set right, it should be as easy as typing (as root):
apt-get install screen

Hope that helps!

Craig...
__________________
N800, Think Outside Kbd, 8GB SDHC Card (OCZ, ext2), and 8GB SD Card (Patriot formatted as VFAT)
Zaurus SL-6000, IR Keyboard, 1GB SD Card
 
Posts: 3,841 | Thanked: 1,079 times | Joined on Nov 2006
#5
Alpine is already running on Debian. I had a quick go at building it in the scratchbox enviroment.
For the debian packaging part there are few problems - nothing much to change. Mostly it's to turn off installation of documentation (on the Nokia you skip everything going into /usr/share/{man,doc}).
For the application itself I had to do two small changes to configure.ac:
Code:
diff --git a/configure.ac b/configure.ac
index aa3917d..07ed18e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -547,7 +547,7 @@ if test "x$with_ssl" = "xno" ; then
 else
   dnl preload c-client default locations/options
   case $host in
-    *-linux-gnu)
+    *-linux-gnu*)
       if test -f /etc/fedora-release ; then  
         alpine_SSLTYPE="nopwd"
         alpine_SSLDIR="/usr/share/ssl"
@@ -1134,7 +1134,7 @@ dnl Tests and assignments below are mostly to coax the appropriate
 dnl build from c-client.  Most of this will go away when c-client
 dnl adopts configure
 case "$host" in
-  *-linux-gnu)
+  *-linux-gnu*)
     alpine_path_delim="/"
     alpine_mode_readonly="(0600)"
     if test -f /etc/fedora-release ; then
and then re-run 'autoconf'. After that just fakeroot debian/rules binary as usual.

What stops it from building right out of the box for now is the requirement for <security/pam_appl.h> in imap/c-client/osdep.c. I haven't found a libpam package for the N800 (yet). Your correspondent that had a build already has presumably solved this issue, one way or another.
__________________
N800/OS2007|N900/Maemo5
-- Metalayer-crawler delenda est.
-- Current state: Fed up with everything MeeGo.
 
Khertan's Avatar
Posts: 1,012 | Thanked: 817 times | Joined on Jul 2007 @ France
#6
If you don't have the time to install scratchbox there are some wmware image of ubuntu with a complete dev environment for Maemo : http://maemovmware.garage.maemo.org/

And thanks for imap ...
 
Posts: 289 | Thanked: 83 times | Joined on Jul 2006
#7
Originally Posted by TA-t3 View Post
Alpine is already running on Debian. I had a quick go at building it in the scratchbox enviroment.

What stops it from building right out of the box for now is the requirement for <security/pam_appl.h> in imap/c-client/osdep.c. I haven't found a libpam package for the N800 (yet). Your correspondent that had a build already has presumably solved this issue, one way or another.

Yes, that is the sticky part. There's a narrow path thru the Alpine compile configure scripts and if you don't hit it right it starts looking and complaining about the lack of PAM. Try this, or rather extrapolate from this to the Debian configure scripts,

Code:
./configure --with-ssl-include-dir=/usr/include/openssl
--with-ssl-lib-dir=/usr/lib --with-ssl-certs-dir=/usr/share/certs
--with-c-client-target=slx
the above configure parameters will cleanly build the current alpha distribution of Alpine for Bora. I don't have a Chinook Scratchbox yet, so we need to work out how to successfully compile it under Chinook in advance of the release of the N810. :-)

-- Denis

Last edited by delaroca; 2007-11-05 at 00:52.
 
Posts: 10 | Thanked: 0 times | Joined on Nov 2007 @ Washington State, USA
#8
Regarding the PAM issue, I agree with the suggestion to build using slx or lnx as the c-client target. lnx may be a better choice than slx; the only differences between lnx and slx are that slx has shadow password support (which isn't on the N800) and slx believes that getpeername()'s third argument is a socklen_t* instead of an int*. Unless N800 suddenly goes 64-bit, it won't matter!

Alternatively, you could just supply dummy PAM modules if you don't want to override the configure script. It only matters for the POP3 and IMAP servers; and I doubt that most people (sane ones, anyway!) would want to run a POP3 or IMAP server on their N800! If you are a crazy person who wants to run a POP3 or IMAP server, then either fully implement PAM or just use the lnx build. Passwords are in /etc/passwd on the N800, so lnx should be good enough.

I hope that this helps.
 
Posts: 289 | Thanked: 83 times | Joined on Jul 2006
#9
Once a binary of Alpine is ready, then the following issues need handling, to get you going initially.

Upon first launching Alpine, it will be necessary to visit the configuration menus. Under IT OS the default user account is user. This can't be changed. Both Pine and Alpine will try to use this as the default user account for login into the mail server. You either fill in the desired userid prompt at login time or you hardcode it in the definition of your email server, ie.,

Inbox Path = {mail.foo.bar/norsh/user=userid}INBOX

or some such appropiate to your imap email server. Again, because the default userid is user, Alpine generates outgoing email with FROM: headers using this userid. To overcome this, use the Customized Headers option to set your From: header as appropiate, ie.,

Customized Headers = From: Joe Citizen <userid@foo.bar>

Also make sure to set the Alternate Addresses option with this address. It affects the Index Display of folders containing outgoing mail messages.

A more advanced way to achieve this is by means of Roles. "You may play different roles depending on who you are replying to. For example, if you are replying to a message addressed to help-desk you may be acting as a Help Desk Worker. That role may require that you use a different return address and/or a different signature."

To set up the outgoing mail connection use the SMTP Server configuration option. The example below configures a secure SMTP server. The novalidate-cert option (hack) is to get around cert validation problems.

SMTP Server (for sending) = smtp.foo.bar/ssl/novalidate-cert/user=userid

To configure Nokia's Osso-Browser as the default browser for Alpine to use, define:

URL-Viewers = /home/user/bin/call-browser

and create the following shell script to launch the browser. IInstall it on your execution path.

Code:
#!/bin/sh
dbus-send --session --print-reply /com/nokia/osso_browser \
--dest=com.nokia.osso_browser com.nokia.osso_browser.open_new_window \
string:$1
For Alpine to be able to successfully execv() this script, the environment variable SHELL must be set to the current shell -- do so conveniently in your .profile file. Note that if a URL is explicitly written within the email message then it suffices to Tap and Hold on the URL to open Osso-Xterm's menu and from there click on Open URL.

An Image Viewer can also be configured. But not Nokia's Image-Viewer as it can't be launched with a parameter. Other image viewers such as Mirage can be used.

Image Viewer = /usr/bin/mirage

But its use is limited as Alpine and the image viewer end up fighting for the temporary file created in /var/tmp. And most often than not this makes Alpine crash.

Alpine can be driven very nicely by point and click by setting the Enable Mouse in Xterm option. However, doing so has the side effect of disabling cut and paste within the Xterm window. Disabling the option restores text copy but then one must rely entirely on the virtual keyboard and Osso-Xterm's terminal controls.

To alleviate the situation, some trivial patches to implement a mouse-support toggle in were developed. Mark Crispin, who started this thread, has them and will hopefully evaluate and re-implement them on a more appropiate fashion.

Perhaps as Mark first sugested in his initial email, a GUI implementation of Alpine, along the lines of what has been done with PC/Alpine on Windows, could be more appropiate and elegant. Yes, but that needs some investment. For the time being, I think the bigger payoff is in trying to solve the minor problems still involved in running Alpine well within an Xterm window.

The issue of cut / paste is one of those problems. It can be dealt with trivially but enabling a mouse-support control key in Alpine. On Destop systems, the sequence Shift-RightClick is what is used to enable cut / paste within an Xterm -- if I remember right. On the IT, only left-buttom mouse events are defined (unless you are full-blown Hildonized app and can take advantage of various mouse "stylus" gestures)... double clicking, is trapped presently by Alpine for it's own use as mark / unmark when in a text window. Maybe the solution would be to create a GTK wrapper for Alpine so that input events could be captured and thus enable better mouse control options for Alpine...

Another issue has to do with the Virtual Keyboard. Soon as you click within Alpine's window the virtual keyboard pops up and takes away well over 1/3 of the screen. With mouse-support enabled, one only needs the virtual keyboard when composing messages. Like with the application VNCviewer what we need is to be able to invoke the virtual keyboard only when needed via the keypad's center key. This should be easy to implement in Osso-Xterm. Either this, or again perhaps code a GTK wrapper to run Alpine. Contributions in this area welcome.

With an external keyboard, things do work out pretty nicely... with the soon to appear Nokia Internet Tablet n810, it ough to work very nice indeed with its new built-in keyboard. With external keyboards, we still have to work out the issues of suitable keyboard maps, in particular foreign character support -- it's doable via xmodmaps. And Alpine, with full internationalizationsupport built around new internal Unicode support, shines in this regard.

A minor annoyance, and I think it is not exclusive to the N800, is the fact that it takes a very long time to launch Alpine's Configuration Panel... I think, it has been observed on some other platforms as well. I don't think it is normal... but this we should be able to debug by enabling tracing in Alpine.

In the same category, are the annoying crashes when Alpine is just launching, say prompting for your password and the underlying window is switched to full-screen. It's not exclusive to the N800, it has been observed also on other platforms... and again, we do need to generate some debugging traces.

Alpine can function too as very useful NetNews reader. The only precaution is that when trying to subscribe to NetNews groups avoid downloading the entire groups list. With a typical groups list of about 100K groups, Alpine becomes unresponsive when trying to format and display the list -- likely runs out of memory. Instead, try specifying partial group names, ie., "comp.mail", "comp.sys.mac", etc., and Alpine will speedily fetch that group list hierarchy from the NetNew Server. From this partial list one can easily subscribe to the desired groups.

Anyway, let's take it from here. Alpine is officially still in alpha but many of us use it daily. So let's have Marc Crispin signal if it is ok to turn it loose on the N800 community. :-)

-- Denis
 

The Following User Says Thank You to delaroca For This Useful Post:
Posts: 289 | Thanked: 83 times | Joined on Jul 2006
#10
Originally Posted by mrcrispin View Post
Regarding the PAM issue, I agree with the suggestion to build using slx or lnx as the c-client target. lnx may be a better choice than slx; the only differences between lnx and slx are that slx has shadow password support (which isn't on the N800) and slx believes that getpeername()'s third argument is a socklen_t* instead of an int*. Unless N800 suddenly goes 64-bit, it won't matter!

I hope that this helps.
As I wrote you earlier, --with-c-client-target=lnx does not presently work! We make it thru configure ok, but then when doing make,

Code:
. . .
config.status: creating pith/cmplhlp2.sh
config.status: creating pico/osdep/Makefile
config.status: creating pico/Makefile
config.status: creating alpine/osdep/Makefile
config.status: creating alpine/Makefile
config.status: creating web/src/pubcookie/Makefile
config.status: creating web/src/alpined.d/Makefile
config.status: creating Makefile
config.status: creating include/config.h
config.status: include/config.h is unchanged
config.status: executing depfiles commands
config.status: executing default-1 commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
if test ! -L c-client ; then ln -s imap/c-client c-client ; fi
touch imap/ip6
cd imap && /scratchbox/tools/bin/make lnx   EXTRASPECIALS="SSLDIR=/usr SSLCERTS=/usr/share/certs SSLINCLUDE=/usr/include/openssl SSLLIB=/usr/lib "
make[1]: Entering directory `/home/delaroca/alpine-0.9999/imap'
make[2]: Entering directory `/home/delaroca/alpine-0.9999/imap'
You are building for traditional Linux. Most modern Linux
systems require that you build using make slx.
Do you want to continue this build? Type y or n please
:

I answered "yes" and a little bit later this appears,

Code:
. . .
sh -c 'rm -rf rebuild || true'
Building bundled tools...
cd mtest;make
make[3]: Entering directory `/home/delaroca/alpine-0.9999/imap/mtest'
`cat ../c-client/CCTYPE` -I../c-client `cat ../c-client/CFLAGS`   -c -o mtest.o mtest.c
`cat ../c-client/CCTYPE` -I../c-client `cat ../c-client/CFLAGS` -o mtest mtest.o ../c-client/c-client.a `cat ../c-client/LDFLAGS`
../c-client/c-client.a(osdep.o): In function `ssl_onceonlyinit':/home/delaroca/alpine-0.9999/imap/c-client/osdep.c:240: warning: the use of `tmpnam' is dangerous, better use `mkstemp'
mtest.o: In function `prompt':/home/delaroca/alpine-0.9999/imap/mtest/mtest.c:598: warning: the `gets' function is dangerous and should not be used.
../c-client/c-client.a(osdep.o): In function `checkpw':osdep.c:(.text+0x9130): undefined reference to `crypt'
collect2: ld returned 1 exit status
make[3]: *** [mtest] Error 1
make[3]: Leaving directory `/home/delaroca/alpine-0.9999/imap/mtest'
make[2]: *** [bundled] Error 2
make[2]: Leaving directory `/home/delaroca/alpine-0.9999/imap'
make[1]: *** [lnx] Error 2
make[1]: Leaving directory `/home/delaroca/alpine-0.9999/imap'
make: *** [c-client] Error 2
-- Denis
 
Reply


 
Forum Jump


All times are GMT. The time now is 01:14.