

cp -p /usr/sbin/gainroot /usr/sbin/gainroot~ && sed -i '1,/PATH=/!s/^/#/;/sh$/s/#//' /usr/sbin/gainroot
How Do I Become Root - without using a text editor (by enabling sudo for all user commands):
cp -p /etc/sudoers /etc/sudoers~ && echo user ALL = NOPASSWD: ALL >> /etc/sudoers
http://maemo.org/maemowiki/HowDoiBecomeRoot

rootme
Lock root account:
passwd -l root
Unlock user account:
passwd user

1. dropbear-key
2. dropbear-server
3. dropbear-client
2. Gain root access to your device by following the instructions at HowDoiBecomeRoot - Maemo Wiki:
sudo gainroot
3. Lock root account to disable root login through SSH (sudo gainroot continues to work, of course):
passwd -l root
4. Set a (SECURE!) password for your user account so you can login through SSH (by default, the user account has no password and is locked):
passwd user
5. Start the SSH daemon manually:
/var/lib/install/etc/init.d/dropbear-server start
6. Automatically start SSH at device startup (optional - only do this after making sure it works properly):
ln -s /var/lib/install/etc/init.d/dropbear-server /etc/rc2.d/S20dropbear-server
http://maemo.org/maemowiki/InstallSsh

Download it from my 770 section.

Remove Dropbear ssh server
1. Switch to Root:
sudo gainroot
2. Stop Dropbear server:
/var/lib/install/etc/init.d/dropbear-server stop
3. Remove autostart link:
rm /etc/rc2.d/S20dropbear-server
Install OpenSSH SSH client and server
1. Download the package openssh and install it.
2. Switch to Root:
sudo gainroot
3. For security reasons, lock root account (
passwd -l root) and set password (
passwd user), or use public key authentication.
4. Set up OpenSSH:
/var/lib/install/sbin/setup-ssh.sh
5. Start OpenSSH server:
/etc/init.d/sshd start
http://maemo.org/maemowiki/InstallSsh
What's wrong with that?
Well, for starters, not all of the examples or reasons are correct. it might be a good article in spirit but some of the advice will mess people up badly.Minimize Object and Property Lookups
Object-oriented techniques encourage encapsulation by tacking sub-nodes and methods onto objects. However, object-property lookups are slow, especially if there is an evaluation. So instead of this:those two examples are not the same, as anyone who has accidentally torn a method from an object and tried calling it would tell you.for(var i = 0; i < 1000; i++) a.b.c.d(i); Do this:
var e = a.b.c.d; for(var i = 0; i < 1000; i++) e(i);
var f = a.b.c; for(var i = 0; i < 1000; i++) f.d(i);would be a generally correct optimization.
Access NodeLists Directly
instead of this: nl = document.getElementsByTagName("P"); for (var i = 0; i < nl.length; i++) { p = nl[i]; Do this: for (var i = 0; (p = document.getElementsByTagName("P")[i]); i++)But it's wrong at least mostly in its reasoning. The getElementsByTagName most definitely has to create the nodelist object. As it happens the nodelist object is mostly expensive if it's around to listen for dynamic changes. The right thing to do is probably:
nl = Array.concat(document.getElementsByTagName("P")); for (var i = 0; i < nl.length; i++) { p = nl[i]; ...
Use Object Literals
he's right.This saves space and unnecessary DOM references.but it's not DOM references, just object references.
What should tell you not to suggest a page?
If the page uses markup like this:By<strong> <a href="mailto:http://www.websiteoptimization.com/contact">Andy King</a></strong><br> Contributing Writer<br>A footnote about the markup you see above, I write my blog entries in a text editor in a text format, and use a script to generate html from them,
The link that appears in the document is
By <Andy King>It should be:
By <Andy King>And it's a bit hard for me to tell my script not to treat that url as somethingelse. I could i suppose teach it how to mishandle links in a manner similar to the way that the site I'm quoting did, but I'm not sure why I'd want to. mailto:http: isn't proper, ever. it's mailto:user@host. If you want to say that contact may be made by following an http link, then say so.

I have added some improvements to my applications menu, to include some tasks I made often.
Do the next steps as root in your Nokia 770 (hint, execute sudo gainroot).
I have added some files to /var/lib/install/etc/others-menu/extra_applications. The file btkbd.desktop contains
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=Turn on/off BT keyboard
Exec=/root/btkbd_user
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
Next sshd.desktop, it contains
[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
Name=SSH server
Exec=/root/sshd_user
X-HildonDesk-ShowInToolbar=true
X-Osso-Type=application/x-executable
I added the following lines to /etc/sudoers to allow that users could execute the scripts from the menu
user ALL = NOPASSWD: /root/kbdd/btkbd
user ALL = NOPASSWD: /root/sshd
Then, I wrote the /root/sshd script
#!/bin/sh
/var/lib/install/etc/init.d/dropbear-server start
And finally I wrote the user scripts. The /root/sshd_user script contains only sudo /root/sshd. The /root/btkbd_user contains only sudo /root/kbdd/btkbd. The file /root/sshd contanis:
#!/bin/sh
/var/lib/install/etc/init.d/dropbear-server start
After these steps you will have some new options in your applications menu. For example, take a look at my applications menu 1 2. I have added the applications marked with a red cross.
Maybe you want to know how to add the swap options, set up your bluetooth keyboard, or install the SSH server and set up an ad-hoc network between your computer and the Nokia 770.

I have a Nokia 770. Finally. After waiting a month or so for nokiausa.com to ship a backordered one, I cancelled that and bought one at CompUSA. I’d rather pay more than reward Nokia’s broken order fulfillment system…
I’ve been looking for a Linux PDA for some time, as a replacement for a Sharp Zaurus SL-5500 that is no longer with us… I wasn’t happy enough with the Zaurus to buy another one, and I waited for some time for another decently supported Linux PDA to come along, with a decent display and the features I felt the Zaurus sorely needed, namely built-in 802.11 and bluetooth, USB host. The 770 was the first thing to come along that really delivered on these (except for the USB host part) and I was interested to hear that it was based on Debian. After seeing the price, it was an easy decision. Sharp had wanted $600 or so for their SL-6000 with similar features (though I miss the hidden thumbboard) and comparing capabilities wiith similarly.priced Palm systems, it seems like a great price.
This is the very first release, so expect it to be buggy. For example it doesn't support MacOSX by now (because I don't have a Mac) since MacOSX requires a other sub protocol (blablabla).
Check the xkbdbthid site and my Nokia770 page for downloads and instructions.
This is actually just my first HID tool, some more stuff is coming up but I just don't have any time now so I first release this cool thing for you.
Feedback is more then welcome as always!
How hard can it be?
Well, first, iSync 1.5 doesn't recognize the phone, so when you go to Add Device, it will search, cause the phone to wake up, and then nothing useful happens.What can you do?
Well, after a number of google searches, you might run across a link to <a dead ip address>
What does work?
With a bit of effort, it turns out that you can map that path to <salling's site> and if you remove the /salling/ part of the path, you get a <that works>

One of the more curious things that I’ve seen from the 770 is “Web - loading” when you start the browser. If I had been tasked with creating a portable browser, I suspect that I would have found a way to pre-load the browser. It makes me wonder, is this a sign that Nokia has bigger plans than just browsing, or is it a lack of confidence in the device as an internet tablet?
I’m hoping for the bigger plans option, Maemo and Scratchbox are right in all the ways that the Zaurus dev environment was wrong, especially for cross-compiling applications. If Nokia sticks with the 770 for as long as they did the N-Gage, I suspect it will have a bright future indeed.

I just managed to run succesfully wxPython on Maemo, the development environment for Nokia 770.
I downloaded the sources, and followed these instructions, with two minor exceptions:
I used these configure options for wxWidgets:
../configure --without-opengl --disable-debug --enable-sound --with-gtk --enable-unicode
and these options for setup.py for wxPython:
python2.3 setup.py build_ext --inplace UNICODE=1 BUILD_GLCANVAS=0 BUILD_STC=0 BUILD_GIZMOS=0 BUILD_ANIMATE=0
This is the look and feel of wxPython running on Maemo
The look and feel is still a bit ugly, because I did not make any change to the original code. I will try to hildonize wxWidgets. I hope it won’t be too dificult.

One of the first things I checked out on the 770 was how serious Nokia’s attitude was towards making it a secure system. I was pleased to find that there is decent privilege separation for the 770 and there was at least an attempt at shipping a secure system (albeit one nerfed for development purposes…) After a brief look around the system I found nothing embarrassingly obvious. Contrast this to Sharp’s Zaurus which had an empty root password, and even setting one was nearly useless, as I discovered /etc/shadow was world readable (why even use a shadow file then?) and there were world-writable configuration files that were executed in scripts run as root.
I would rather prefer an easier way to get root than the flasher method, I mostly never used the Zaurus’s dock, preferring to transfer data using scp, even doing upgrades using a compact flash card. The Zaurus had a number of applications that required root access, and installing them wasn’t a major hassle. I think the 770 could benefit from a happy medium between the Zaurus’s total openness and the locked down configuration the 770 ships with.


Since it's a file on the new partition, it won't be unmounted when the device is connected to a computer by USB. And as a regular file, it can be resized easily. It's a compromise between creating a swapfile and using a new partition for swap - which combines the advantages of both (and much more).
What's best about my way of (de)activating swap is that this works independently of the actual swap file or partition. The startup, reboot and shutdown scripts will work the same no matter if there's swap available or not. To add or remove a swap file or partition, simply modify /etc/fstab (after manually deactivating swap with swapoff -a), without having to touch the scripts again. Even if you decide against swap, it's enough to delete or comment out the line(s) in /etc/fstab, the scripts will keep working. I'd actually like Nokia to include something like that in their own system scripts with a future version of the 770's OS.
For more information about swap, refer to the Maemo Wiki: http://maemo.org/maemowiki/HowTo_CreateSwap

Joy, I finally have USB host mode working, now I can start on one app I’d like for the 770 (to be announced…) I soldered +5 inside a powered Iogear GUH274 micro hub, and then used an adapter from a USB connector kit I bought at a bargain store strictly for its humor value. In addition to the connector I used, the kit included adapters from USB to RJ11 and RJ45, that let you turn the included USB male to male cable (an abominination in and of itself) to a phone cable or ethernet extension cable. I can just imagine someone relatively unskilled at computers trying to make their own USB to ethernet adapter with the kit… Fortunately. it worked quite well for connecting up the hub. At some point, I may replace the short lead from the USB hub with half of a USB cable with the proper connector…

So I annoyed myself about this a few days ago when I found myself listening to some music on the 770, had my PSP at home and my iAudio is still being repaired. Having german music blasting out of the headphones when you trying to order a coffe is probably not the best thing, so what to do when you do not have a remote? Try to remove the cover and quickly press stop without unplugging the headphones and treating everyone to a bit of your taste in music. *sigh* Hardly efficient :) Thankfully someone raised a similar question on #maemo earlier today which prompted me to throw together a rather silly script. Unplugging the headphones will set the volume 0 :) (I made it remember the current values aswell, but just to show the person on IRC.) Stupid hack I agree, but I found it quite useful and will promptly put in among the init scripts.
HP="/sys/devices/platform/gpio-switch/headphone/connection_switch" MAIN=0 HEAD=80 while true; do NEW=$(cat $HP) if [ "$OLD" != "$NEW" ]; then if [ "$NEW" = "connected" ]; then gconftool -s /apps/osso/sound/master_volume -t int $HEAD else gconftool -s /apps/osso/sound/master_volume -t int $MAIN fi fi if [ "$NEW" = "connected" ]; then HEAD=$(gconftool -g /apps/osso/sound/master_volume) else MAIN=$(gconftool -g /apps/osso/sound/master_volume) fi OLD=$NEW sleep 1 done

Finally managing the blog from the 770, since opera does not send referrer as default or is it configurable I thought I was out of luck. But oh yay, it was just a simple matter of editing ~/.opera/opera.ini to include Enable Referrer=0
\o/, just run this in your xterm with all browser windows closed:
sed -i /^Enable/s/Referrer=0/Referrer=1/ ~/.opera/opera.ini