Older blog entries for joey (starting at number 344)

life, day 12145

If you're sitting on the futon getting someone's spiffy podcasting audio mixer working with linux and you find yourself using 2 laptops and speaking into 2 mics at once, and wearing headphones adorned with a sock, and someone mentions the IT Crowd, the best thing to do is probably to ham it up.

(I'd rather be Roy, but who am I kidding.. PS, The sock was not my idea!)


Also, I've taken some updated pictures of the yurt since it's been up for over a year.


More

Syndicated 2009-07-12 23:52:15 from see shy jo

debian desktop via vnc on the palm pre

On my Palm Pre, I'm running a PalmOS emulator, with a VNC client in it, connecting to a VNC server on the same phone, in order to get to an xterm. About the most roundabout way to get a prompt on a phone one can imagine, and also very wasteful of screen space because of that PalmOS emulator. I hope better methods become available.

  1. Install Classic. (This will only work for a week w/o being bought, BTW.)
  2. Login as root to Debian chroot on the Pre.
  3. Download PalmVNC: cd /media/internal/ClassicApps; wget http://palmvnc2.free.fr/stable/PalmVNC.prc
  4. apt-get install tightvncserver
  5. su to your non-root account on the Pre.
  6. Create a VNC password file containing an empty password by running: mkdir -p ~/.vnc; echo | vncpasswd -f > ~/.vnc/passwd
  7. Run tightvncserver -interface 127.0.0.1 -geometry 320x320 It only listens to localhost, so the empty password is ok (ish). The geometry is all that is visible on the Pre without scrolling.
  8. Start Classic (or restart it).
  9. In Classic, select PalmVNC and tell it to connect to localhost, and change the display from 0 to 1. It will prompt for a password, just hit Ok for a blank one.
  10. Optionally, make VNC auto-start on boot, add to rc.local something like this: su joey -c 'tightvncserver -interface 127.0.0.1 -geometry 320x320'

TODO:

  • Need way to send arrow keys!
  • xmonad configuration

Previously: Palm Pre, ?sh to Debian chroot on Palm Pre

Syndicated 2009-07-11 01:52:47 from see shy jo

ssh to debian chroot on palm pre

Following setting up a Debian chroot on the Pre, I wanted to be able to ssh into the chroot. This sets that up, including starting Debian's ssh on boot.

Actually, I went a step further and hooked Debian's rc3.d init scripts into the Pre's webOS boot process, so all services installed in Debian will start on boot. So as a bonus, cron, at, etc will also work.

Since the Pre's EVDO IP address changes all the time, dynamic DNS is needed if you want to ssh in over EVDO. I used ez-ipupdate to handle that. (If you didn't want to ssh via EVDO, you could omit that part, and add "-i eth0" to both the firewall rules below.)

  1. Use novacom and the cable to get a root shell, and chroot /media/debian
  2. Install ssh: apt-get install openssh-server openssh-client
  3. Hook Debian init scripts into webOS startup:
    cat > /media/pre-root/etc/event.d/debian_start <
  4. Edit /etc/rc.local and add these commands to it:
    # Add firewall rule to allow SSH access on port 22,
    # both wifi and EVDO.
    iptables -D INPUT -p tcp --dport 22 -j ACCEPT || true
    iptables -I INPUT -p tcp --dport 22 -j ACCEPT
  5. Install ez-ipupdate: apt-get ez-ipupdate
  6. Follow the prompts to configure ez-ipupdate to use dyndns or your preferred dyanmic DNS service. When it asks if ppp is used, say yes.
  7. Edit /etc/ez-ipupdate/default.conf and make sure the interface is set to 'ppp0' (See bug #536512 for why you need to do this currently.)
  8. Hook ez-ipupdate into webOS's ip-up script, so it is run whenever the address changes:
    HOOK=/media/pre-root/etc/ppp/ip-up.d/09ez-ipupdate-debian
    echo '#!/bin/sh' > $HOOK
    echo 'chroot /media/debian /etc/ppp/ip-up.d/ez-ipupdate >/dev/null 2>&1 || true' >> $HOOK
    chmod a+x $HOOK
  9. Reboot the Pre. Now is a good time to learn that Orange+Sym+R on the keypad is equivilant to ctrl-alt-del. :-) The ssh daemon should be started automatically.

TODO:

  • Enable avahi for mdns for wifi.
  • Cleanly stop Debian services on shutdown. Problem with doing this is that I can't just run '/etc/init.d/rc 0', because that will kill every process in webOS too, and hang the phone. It'd need a very custom runlevel to be set up in Debian.

Syndicated 2009-07-10 17:57:39 from see shy jo

palm pre

Pre

I got a Palm Pre because I want a Linux smartphone that is not locked down (like the G1), on which I can play with Debian and even my own kernel. But I also want one that seems likely to be widely viable going forward, and there I have my doubts about OpenMoko, sadly.

(Or, I got a Palm Pre because I dreamt last night that I got one, and decided my subconcious must have made a decision after dithering for years. And because Madduck rules.)

Debian chroot on Palm Pre

This is a quick installation of a Debian chroot on the Palm Pre phone. Similar methods are explained at the Pre Dev Wiki. But they have you download a prebuilt Debian image and modify the Palm webOS system to install ssh; I preferred to use debootstrap and keep webOS changes to a minimum.

Also, since the Pre uses LVM, its media partition can be resized on the fly. That allows for a larger Debian filesystem, and I think is a nicer method than the loopback filesystem approach documented elsewhere, but do read the warnings about Palm, LVM, and upgrades here.

On the Pre:

  1. Enable dev mode by opening the Pre's Launcher and typing the following into it: upupdowndownleftrightleftrightbastart
  2. Plug the Pre into your laptop, tell it to charge via USB, while doing the following on the laptop.

On a Linux laptop:

  1. Run debootstrap to build an armel chroot: sudo debootstrap --foreign --arch=armel sid /tmp/debian
  2. Download novacom, cd to it, and build it: sudo apt-get install libusb-dev; make
  3. Transfer the armel chroot from the laptop to the Pre: (cd /tmp; sudo tar czv debian) | sudo ./novacom put file:///tmp/debian.tar.gz
  4. Run sudo ./novacom to get root shell on the Pre.
  5. In that shell, use LVM to resize the existing /media/internal volume down to 1 GB, and create a new 6 GB one for Debian:
    cp -a /media/internal /opt
    umount /media/internal
    lvresize -L 1G /dev/mapper/store-media
    mkdosfs -F 32 /dev/mapper/store-media
    mount /media/internal
    mv /opt/internal/* /opt/internal/.* /media/internal
    rmdir /opt/internal
    lvcreate -l 100%FREE -n debian store
    mkfs.ext3 /dev/store/debian
    mkdir /media/debian
    echo "/dev/mapper/store-debian /media/debian auto noatime 0 0" >> /etc/fstab
    mount /media/debian
  6. Then in the Pre's root shell, you can unpack Debian, set up some bind mounts to allow accessing the Pre's filesystems from inside Debian, and chroot in to finish debootstrap:
    cd /media
    tar zxvf /tmp/debian.tar.gz
    mkdir /media/debian/media/pre-root /media/debian/media/internal
    echo "/ /media/debian/media/pre-root bind defaults,bind 0 0" >> /etc/fstab
    echo "/tmp /media/debian/tmp bind defaults,bind 0 0" >> /etc/fstab
    echo "/proc /media/debian/proc bind defaults,bind 0 0" >> /etc/fstab
    echo "/dev /media/debian/dev bind defaults,bind 0 0" >> /etc/fstab
    echo "/dev/pts /media/debian/dev/pts bind defaults,bind 0 0" >> /etc/fstab
    echo "/sys /media/debian/sys bind defaults,bind 0 0" >> /etc/fstab
    echo "/media/internal /media/debian/media/internal bind defaults,bind 0 0" >> /etc/fstab
    mount -a
    chroot debian
    /debootstrap/debootstrap --second-stage
    ln -sf /proc/mounts /etc/mtab
    apt-get clean
  7. Now customise the Debian chroot as usual.

How this could be made easier:

  • Make a debian package of novacom.
  • Installation script? debcoexist? d-i?

TODO:

  • Install openssh in Debian and configure it to start at boot.
  • Set up VNC, install VNC app in webOS to allow accessing a Debian desktop.

Syndicated 2009-07-10 01:58:32 from see shy jo

Socialstructing

This and this are very interesting. It gives me a framework for thinking about:

  • How I lived, rent-free, for years on land I didn't own.
  • Why I don't think about asking for money when I fix someone's computer or help them get something working or host something for them on the web.
  • Why I've not bought land to put my yurt on, and keep being unsure it's a good idea.
  • How contributing to free software isn't just throwing my time away for no return.
  • Why I get to travel to interesting places so frequently and inexpensively.
  • Why I'm housesitting this week.
  • How I get fresh eggs, plant sets for the garden, summer produce.
  • Why I have email in my mailbox offering to buy me a train ticket in Spain.

Syndicated 2009-07-07 20:13:11 from see shy jo

DebConf9

I'm going to DebConf, and will be giving what I think is the first talk I've ever done about debhelper there. Incidentially, debhelper in experimental has some nice new features.

I have no idea how I'm getting from the Madrid airport to Cáceres, and would rather spend time working on my talk than trying to book tickets internationally, so I hope buying train tickets at the station is not a foolish plan..

Syndicated 2009-07-02 19:46:46 from see shy jo

vacation

Another week camping at Ocracoke!

Rather than try to describe the shape of the whole thing, here is the last day.


I spend the first hour of daylight in the tent, enjoying the rain and reading Spider Robinson's User Friendly -- a light little puff pastry of a book. The first thing I see when I get out is a rainbow, out over the dunes.

The weather quickly turns pleasant, and we spend most of it on the beach. I'm starting to get tanned after a week here, and don't have to avoid the sun as much today. The waves are gentle.

I catch up on the first hundred pages of Le Guin's Powers, which according to the Google visitor's pass sticker on the back cover, I had started to read last December and didn't finish, since it was too good. It's my second book this trip about slavery, though not so wrenching as Octavia Butler's Kindred.

After lunch, the wind picks up, and I send the kite out on 500 feet of line, attached to a wooden tent stake that's driven in the sand. A airplane passes by, just out to sea, and lower than the kite, followed by a helicopter.

Later I walk downwind along the beach for a good long time, trailing the kite, and trying to walk with my eyes closed. I've been playing at this around the campground, for up to 30 steps, but on the deserted beach I only have to worry about stepping barefoot on a sharp shell or other flotsum. I work up to 100 paces blind, then 200, and finally, on my way back, manage 400 paces, or about 1/5th of a mile. The kite keeps pulling me inland, and I have to use the sound of the surf to guide me back to the wet sand. It becomes peaceful and meditative, and I'm disappointed when I get back to the busy beach.

It starts to look like rain, so I wind in the kite. Just as I get out of the shower the storm starts. It rains and thunders all through supper, with us wedged in the barely dry center of the screen tent. There's a loud crash from the highway, followed by sirens. The ground begins to swim with water. Well after we all wish it were over, it stops, and the sun is suprisingly still up.

There's another rainbow, this one a full arch. And then the light taken on a wonderful quality and the post-rain campground seems an entirely other place than the sun-drenched desert of the past week. Unknown birds slowly soar down the dunes catching insects and calling, and I spend an hour or two watching clouds, spotting the fingernail new moon, enjoying another beautiful sunset, and finishing the book. On the way to bed I see one last flash of lightning.


Ocracode for this trip:

OBX1.1 P2/7/3 L6 SA24bsb---c---/A4db++c+++ U3(Sango+Kai) T1f0b0 R1T Bn+b-m+++ F++u- SC-s+++g1 H++f0i4 V++++s++m0 E+++r+++

Syndicated 2009-06-25 15:42:11 from see shy jo

on localization and progress

In this post I will say some things about localization that I've never felt it was politic to say before. (It still isn't, but what the hey.) But I first want to mention that one of the reasons Christian Perrier is awesome is because he manages to steer projects in ways that avoid (most of) the problems below, and because he has managed to scale rather impressively far. But not far enough that these things haven't gotten under my skin.

So, I hate localization. Hate, hate, hate. I wish it would die. I wish everyone spoke the same language. I hate that we have to be politically correct about it, to the point that even if everyone does speak English (hello, Denmark?), we still have to worry about localization into their native language. I especially hate that, after we waste time and resources doing that, everyone uses the software in English anyway (hello, most of Europe).

I hate that the typical best effort localization of software is typically so incomplete that it's not actually usable by people who really do need the translation. Either because "best effort" == 80% translated, which is sometimes worse than 0%, or because the documentation doesn't get translated too. And that even with what we consider a complete translation, there are still all sorts of English bits that nobody would ever consider translating. Such as the names of commands, of command-line switches, of markup keywords and configuration files.

I hate that translating software and documentation always involves bolting an enormous, nasty build system onto its side, and that the bulk of translations always greatly outweighs the size of the code. I hate that these systems constantly produce deltas that I have to avoid cluttering my commits with. I hate the expectation that every programmer somehow become an expert in internationalization, rather than letting them devote their time to something they're good at.

But none of that is what really bothers me about localization. What really, really bothers me is that I often see the need to localize code inhibiting that code becoming better. Just two examples:

  • Oh no, we worry, if we fix this a message, we will have to do 100 times more work to update the translations. Surely, then, anyone who wants to fix a bad message is an anglocentric who should be ignored.
  • Rather than allow the computer to dynamically generate correct and expressive English on the fly, to actually talk to us, we have to reduce everything to gettextable static strings. The poster child for this disease is that it becomes easier to tack on "(s)" or reword entirely, than to deal with the cumulative complexity of plural forms in every language.

(PS, I also hate that we have to keep "l10n" and "i18n" straight, and that the words are so unwieldly in this f7g modern English that we represent them based on their length.)

Syndicated 2009-06-02 18:16:54 from see shy jo

on wave

While I've only skimmed the available protocol draft and whitepapers, I do have a couple thoughts about wave.

Firstly, I can imagine something like this supplanting not just email and instant messaging, but also web forums, blog comments, mailing lists, wikis, bug tracking systems, twitter, and probably various other forms of communication. (But not, apparently, version control systems.) While one might have an attachment to a few of those things, I think most of us would be glad to see most of them collectively die (especially twitter and web forums of course) and be replaced by a data-driven standard, with multiple clients, rather than their general ad-hoc, server-side generated nastiness. (The Project Xanadu guys would be probably be proud.)

Secondly, while Google are making all the right noises about open protocols, multiple providers, etc, and probably only plan to lock in about five nines percent of users to wave.google.com before competing implementations arrive, wave is not a fully distributed system. Spec says:

The operational transform used for concurrency control in wave is [currently] based on mutation of a shared object owned by a central master.

The wave server where the wave is created (IE that has the first operation) is considered the authoritative source of operations for that wave.

If the master server goes away, it sounds like a wave will become frozen and uneditable. There seems to be no way to change the master server after a wave is created, without ending up with an entirely different wave.

The concurrency control protocol will be distributed at some point in the future

How many centralized systems have been successfully converted into distributed systems?

In a similar vein, after reading this whitepaper, I'm left unsure about whether it will be possible to respond to (edit) a wave while offline. Maybe, as clients can cache changes, but how well will conflict resolution work? It seems it would have to be done in the client, and there are some disturbing references here to clients throwing their local state away if they get out of sync with the server.

Syndicated 2009-05-29 02:19:15 from see shy jo

website backup RFC

So, I'm considering a backup system that has as its goal to let you backup all your data from third party websites, easily.

The idea I have for its UI is you enter in the urls for all the sites you use, or feed it a bookmark file. By examining the URLs, it determines if it knows how to export data from each site, and prompts for any necessary login info. The result would be a list of sites, and their backup status. I think it's important that you be able to enter websites that the system doesn't know how to handle yet; backup of such sites will show as failed, which is accurate. It seems to almost be appropriate to have a web interface, although command-line setup and cron should also be supported.

For the actual data collection, there would be a plugin system. Some plugins could handle fairly generic things, like any site with an RSS feed. Other plugins would have site-specific logic, or would run third-party programs that already exist for specific sites. There are some subtle issues: Just because a plugin manages to suck an RSS feed or FOAF file off a site does not mean all the relevant info for that site is being backed up. More than one plugin might be able to back up parts of a site using different methods. Some methods will be much too expensive to run often.

As far as storing the backup, dumping it to a directory as files in whatever formats are provided might seem cheap, but then you can check it into git, or let your regular backup system (which you have, right?) handle it.


Thoughts, comments, prior art, cute program idea names (my idea is "?unsilo"), or am I wasting my time thinking about this?

Syndicated 2009-05-23 21:27:55 from see shy jo

335 older entries...

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!