NOTES: Geeking out an OLPC

David Wagner 2008/12/17 13:25 I'm anxiously awaiting a used One Laptop per Child (OLPC) machine and intend to geek it out for productivity. Besides installing Debian Linux to match the distros on other systems around, this thing will need a nice collection of lightweight applications, most of them to run in monochrome mode.

One interesting twist is that I want to be able to use most of these offline, but synchronize them with online repositories when a connection is available. Email for messages and DokuWiki for most text-based data are reasonable choices for the online repositories to help keep things straight.

As usual, where possible I'll stick with Debian packages.

Notes Log

2008-12-19 The OLPC arrived a few days ago. The first thing to do was update it from build 656 to build 767. After that, I found the stock Sugar interface and applications work well enough for many of the things I want to do. Further, the two default consoles look like they may be useful with the Fedora core distribution already initialized.

At first, console 1 used a larger font, but after a reboot or two, both text consoles use a very small font. It may be worth looking into how to configure the two consoles to use different screen fonts. Also, both consoles are white on black, and with the tiny font, this combination is barely readable with the backlight off.

I think I'll hack one of the consoles (probably #2) to black on white.

su -
yum install screen elinks nethack

2008-12-20 Although I installed the following, intending to reformat the SD card to ext2, I am still ambivalent about doing so.

yum install mtools
nano /etc/mtools.conf
#Add these two lines:
#OLPC first SD/MMC card partitions
FIXME "/dev/mmcXXXp1"

2008-12-24 I have a stuck key problem with alt, which is very annoying. Oddly, rebooting seems to help unstick it.

2009-01-09 I finally broke down and installed perl since it is a requirement for yum install vim for a complete vim installation. That's 22M disk space to install the package. This is pretty much necessary to install a native IDE using vim, and this is needed since it's problematic to install compatible GTK development libraries on another machine around here.

2008-01-11 Installing Opera as an activity

It looks like Opera is now compiling static QT versions with gcc4, so installing the latest stable build was fairly straightforward.

su
rpm -vi ftp://ftp.opera.com/pub/opera/linux/963/final/en/i386/static/opera-9.63.gcc4-static-qt3.i386.rpm
exit
opera   # It works!
#mkdir /home/olpc/Activities  # Already exists.
cd /home/olpc/Activities
wget http://people.opera.com/howcome/2007/olpc/opera-activity.tar.gz
tar xvzf opera-activity.tar.gz
rm opera-activity.tar.gz

Now edit the activity python script so it exits properly.

nano /home/olpc/Activities/OperaActivity.py/
  • Add return true (properly indented) after the os.system… line.
  • I also changed aforementioned line to point to a directory I created on an SD card, so the last two lines look like this.
...
        os.system('opera -notrayicon -pd /media/SDCARD/.opera/ &')
        return true

Now the browser cache is on the card.

Tried to install the Terminus font, but it's not in the repository, though Fedora lists it.

yum install terminus-font

So, let's see what's out there.

yum list available '*font*'

Aha!

yum install terminus-font-console.noarch terminus-font-x11.noarch

Now edit nano ~/.sugar/default/terminalrc and change Monospace to Terminus Bold and change the size, if you like.

...
font = Terminus Bold 7
...

Console Screen

LandscapePortrait
Font 1200×900 900×1200
6×8 200×112 150×150
6×12 200×75 150×100
8×8 150×112 112×150
7×8 171×112 128×150
7×9 171×100 128×133
8×10 150×90 112×120
8×12 150×75 112×100
8×14 150×64 112×85
8×16 150×56 112×75
9×10 133×90 100×120
9×12 133×75 100×100
10×12 120×75 90×100
10×20 120×45 90×60
11×12 109×75 81×100
11×16 109×56 81×75
12×24 100×29 75×50
14×28 85×32 64×42
15×36 80×25 60×33
16×32 75×28 56×37

Screen size in characters

The LCD screen is rated at 200 dpi (square pitch at 152x114mm), and is 1200×900 grayscale. Because of the way this unusual dual-mode screen handles colors, the maximum maximum color resolution is about 984×738, but this has no effect on console applications (and little effect on any text application) since colors are resolved at the much grainier character cell resolution. A whole lot of 80×25 standard consoles can fit using small fonts; 7×9 looks like the most fun, with eight full consoles visible. However, 9×12 or 10×12 look more useful, and 8×14 is a common size.

The popular Terminus font is available in 6×12, 8×14, 8×16, 10×20, 12×24, 14×28 and 16×32; all but 6×12 include a bold face and EGA/VGA-bold is available in 8×14 and 8×16.

yum install terminus-font  # Both bitmap and X11 fonts are in the repository

apt-get install console-terminus
apt-get install xfonts-terminus  #May or may not be needed

It might be interesting to go for ultimate console application geekiness.

Screen: Console Manager

The screen console window manager can split a terminal screen into two console windows tiled vertically, and after upgrading to a more recent version, horizontally, too.

  • Horizontal tiling has recently been added, though it seems http://savannah.gnu.org/screen.git has the best version.
    • Here is a brief discussion of how to install the better patched version.
    • The gnu project page should be the source for the better patched version.
    • It looks like compiling the 256 color version includes vertical split (~4.00.03+).
    • yum install screen does it on the OLPC (4.0.3).
    • It looks like Debian testing (lenny) has the version with vertical tiling (v4.03+). It was merged with CVS source on 02 Jun 2008, according to the Debian changelog. (The following installed it in an old iBook.)
      • Added Testing repostiory: deb http://http.us.debian.org/debian testing main
      • Needed to increase apt cache: $ sudo apt-get update -o APT::Cache-Limit=25165824. (I changed it in Synaptic)
      • Though dependencies seemed a bit excessive, I apt-get installed it: $ sudo apt-get install screen/testing -o APT::Cache-Limit=25165824.
  • It may be better to change screen to use the backtick character instead of Ctrl-a. See this tips page for details. (Put escape ^`` in .screenrc.) Peronally, I think Ctrl-` might be better.

Bash: Shell

This is the default OLPC console shell.

Vim: Editor

Vim and Nano are already installed on the OLPC.

  • Turn on spelling check while typing.

: Taking Notes

: Message Aggregator

I plan to use a single application to aggregate messages from a variety of sources, download them for viewing offline, then use Vim with misspelling highlighting for writing replies.

cone: Basic mail and News Reader

su -
yum install ssmtp alpine  # aspell aspell-en are already installed
#ln -s /usr/local/ssmtp/sbin/ssmtp /usr/sbin/sendmail

It seems that getmail is not needed when using alpine?

Well, it looks like fifteen megabytes ofperl is necessary for sendmail.

  • Email
    • Both alpine (21MB) and mutt (16MB) requires perl libs to install.
    • CONE for email and news also requires perl (18MB).
  • alpine may have better news support than mutt.
  • RSS Feeds (including weather forecasts and moon phases)
  • Newsgroups

This is going to be more difficult than I'd hoped. One way to do this is to process news and mail into RSS feeds, then read them with a feedreader.

  • Console Feedreader: Snownews or Raggle
  • Email to RSS: Snowlist' (“requires an SQL database and a number of Perl modules[…]and is intended to be installed on a server”)
  • Newsgroups to RSS: SLRNPull + SLRN + FIXME

Alternately, these can be fed into email.

  • Console Mail Reader: Alpine has better newsgroup NNTP support than Mutt.
  • RSS to Email: Feed2Imap or rss2mail (Perl), rss2email (Python) or Newspipe (Python) send items as emails, so you spend a lot of time playing with procmail.
  • Newsgroups to Email: Not needed with Alpine.

todo.txt: Organizer

This might be better combined with the aggregator.

  • Calendar
    • wyrd: Wyrd acts as an ncurses-based frontend for remind, a scheduler application featuring sophisticated date calculation, moon phases, sunrise/sunset, Hebrew calendar, alarms, multilingual messages, and proper handling of holidays.
    • calcurse: CalCurse is a calendar and todo list for the console which allows you to keep track of your appointments and everyday tasks. CalCurse has a nice textmode interface with configurable color schemes, configurable layout and Vi-like keybindings.
    • pal: pal is a cal-like calendar with day highlight and support for events.
    • ccal: CCAL is a drop in replacement for the standard unix calendar program. It includes support for color and daily, weekly, and yearly reminders/appointments.
  • Shopping List

Note try dates, a calendar optimised for embedded devices, for X-windows.

bashpodder: Podcast Downloader

I decided to continue listening to podcasts through the iPod, rather than play them on the OLPC.

: IRC Chat

10 IRC Clients for Linux

  • Maybe should just go with ircii for basic chat…
  • yum install naim #only 256kB
  • yum install weechat #5M: requires ruby and lua libs, but has spelling support
  • irssi also requires about 15MB of perl libraries.
  • The xo IRC client is OK under X, but doesn't seem to support identd.
  • It may even be worthwhile to try sic or cobble something together with ii.

Elinks: Web Browser

  • yum install elinks
    • Only 1 MB install on stock OLPC
  • w3m
    • Requires perl installation (15MB)
  • lynx
  • netrik

Nethack: Game

Have this running, if possible, in a full-screen console with a big, weird font. Under X-windows, try to set the background to a running game.

  • yum install nethack

Though there is a medieval console font included with debian (I think), it does not seem to be available for an x-terminal.

  • List of fonts in Debian, click on each for a sample.
    • For use in a big transparent x terminal, try flatline or wargames.

xorg: X-windows

This is what the OLPC comes with, but I'll add an alternative to the Matchbook window manager and Sugar.

Here is an http://martin.ankerl.com/2007/09/01/comprehensive-linux-terminal-performance-comparison/interesting discussion of terminal emulators to use under x-windows. The winner for unicode high performance and low memory use is urxvt (see the comments).

apt-get install rxvt-unicode

OpenBook: Window Manager

There are too many window managers for me to spend the time trying them all. I like OpenBook, and will give it a shot first. Hopefully, I can configure it to open a cheat sheet with each console application.


Personal Tools