admin

Maemo Wiki

2006-01-01 13:08 UTC  by  Unknown author
0
0
StefanDanielSchwarz
Categories: Nokia 770
admin
How Do I Become Root - without using a text editor (backing up gainroot before modification):
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
Categories: Nokia 770
admin

Default Root Password

2006-01-01 13:50 UTC  by  Unknown author
0
0
root's password:
rootme

Lock root account:
passwd -l root

Unlock user account:
passwd user
Categories: Nokia 770
admin

Here's how to easily and quickly set up SSH

2006-01-01 14:19 UTC  by  Unknown author
0
0
1. Download and install the following packages from Index of /n770 in this order:
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
Categories: Nokia 770
admin
Doom installs ad-hoc wireless network musgo for multiplayer feature which is only deleted upon removal of the game!
Categories: Nokia 770
collin

IpHome 0.2

2006-01-03 01:56 UTC  by  collin
0
0
Happy New Year, here is IpHome 0.2! Actually this was just a test tool but so many people downloaded it and I got some emails with feature request - so I decided to put in more features. Now you can cycle through all interfaces which are up and have a IP address assigned. Just tap the plugin display panel to switch to the next interface.

Download it from my 770 section.
admin

OpenSSH SSH client and server

2006-01-08 13:51 UTC  by  Unknown author
0
0
There can be only one SSH server listening to the default port, so if you've set up Dropbear SSH to be autostarted as root before, you'll have to disable its autostart and shut it down. If Dropbear is running as user and bound to a port other than 22, both could be run simulateously, but that might be too taxing for the Nokia 770's limited resources. It's better to run only one SSH server, so before installing OpenSSH server, it's best to remove Dropbear:

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
Categories: Nokia 770
timeless

Bad Advice in Pretty Clothing

2006-01-09 07:41 UTC  by  timeless
0
0
Bad Advice in Pretty Clothing Bad Advice in Pretty Clothing A colleague sent around this url: <Optimizing JavaScript for Execution Speed>, suggesting that it was a good example could lead people to using the suggestions and thinking that they're all good.

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:

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);

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.
   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.
admin

Improvements to the applications menu

2006-01-13 11:25 UTC  by  Unknown author
0
0

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.

Categories: General
admin

First Post…

2006-01-14 07:47 UTC  by  Unknown author
0
0

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.

Categories: Uncategorized
collin

xkbd-bthid

2006-01-15 02:40 UTC  by  collin
0
0
...is my latest Bluetooth tool. It's a soft-HID device as I call it. This is a Bluetooth HID Keyboard software implementation. It turns your Linux box, PDA or tablet into a Bluetooth HID Keyboard. This is the same thing some of the newer cellphones have, now we have it for Linux!

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!
timeless
Making life Hard for Paniced People - Sony Ericsson S710a, Apple iSync 1.5 Making life Hard for Paniced People - Sony Ericsson S710a, Apple iSync 1.5 It shouldn't be hard to take a phone you've been using w/ a mac for months and ask them to sync all the address and calendar info from the phone to the mac.

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>

collin

xkbd-bthid screenshot

2006-01-16 22:00 UTC  by  collin
0
0
click to get full size

here is a much nicer screenshot of xkbdbthid I took it using mst. Which is a nice networked screenshot tool. Also it tells you to only bind to 127.0.0.1 (localhost) you can access it from any computer on the network.
admin

Web - loading

2006-01-17 08:17 UTC  by  Unknown author
0
0

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.

Categories: Uncategorized
admin

wxPython running on Maemo

2006-01-20 18:25 UTC  by  Unknown author
0
0

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

wxPython running on Maemo

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.

Categories: General
admin

How you can’t get root

2006-01-22 23:29 UTC  by  Unknown author
0
0

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.

Categories: Uncategorized
collin

NMAP and Bluetooth Keyboard

2006-01-23 03:13 UTC  by  collin
0
0
so I just uploaded a packaged version for the 770 of NMAP. Its a really cool thing to have on the 770. Especially since I now (Dec. 2005) own a cool Bluetooth keyboard (Stowaway Think Outside) which I got as a birthday present from my girl friend. It, together with an xterm console, really makes your 770 more usable. I started installing all the necessary shell utilities and now its just a cooler device. Also the keyboard applet is far from perfect right now. I have problems getting enter/return working sometimes. Also the power save mode kicks in too often.
admin
I found out how you can upgrade the Nokia 770 Internet Tablet's internal memory by extending the root filesystem to a memory card. My step-by-step guide with detailed instructions has been posted on the Maemo Wiki. Following the steps, one can expand the unit's memory, make it persist even through flashing, and protect the internal flash memory's durability all at the same time. All power users are welcome to check it out and see if it helps them to get even more out of our favorite Linux device. Here's the link: http://maemo.org/maemowiki/ExtendedRootFilesystem
Categories: Nokia 770
admin
I just updated the Extended Root Filesystem HOWTO with information on how to create and use a swap file together with an Extended Root Filesystem.

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
Categories: Nokia 770
admin

USB host mode success

2006-01-29 23:21 UTC  by  Unknown author
0
0

Modified USB hub

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…

Categories: Uncategorized
admin

Oh can you shut that thing off?

2006-01-30 20:26 UTC  by  Unknown author
0
0

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
Categories: Nokia770
admin

referrer

2006-01-30 21:15 UTC  by  Unknown author
0
0

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
Categories: Nokia770

Back