<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.7.6(BH)" -->
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>Planet Maemo: category &quot;feed:2ab7df3bd50c3ff3965ec8d25aee2167&quot;</title>
        <description>Blog entries from Maemo community</description>
        <link>http://maemo.org/news/planet-maemo/</link>
        <lastBuildDate>Sun, 05 Apr 2026 01:38:55 +0000</lastBuildDate>
        <generator>FeedCreator 1.7.6(BH)</generator>
        <language>en</language>
        <managingEditor>planet@maemo.org</managingEditor>
        <item>
            <title>N9 Hackathon in Vienna</title>
            <link>http://mg.pov.lt/blog/n9-hackathon</link>
            <description><![CDATA[

<p>Last weekend I attended the <a
href="https://metalab.at/wiki/N9_Hackathon">N9 Hackathon</a> in Vienna.
Nokia kindly sponsored all food and accommodation costs and, at the very end,
surprised me with an entirely unexpected gift of a N9 phone.</p>

<p>Vienna: great transportation system, delicious food (either that, or I was
always extremely hungry when I ate), huge portions, restaurants open until
midnight.  Shame I didn't have time to see the city itself.</p>

<p>The <a href="http://swipe.nokia.com/">N9</a> is a gorgeous phone; much more
so in real life than in pictures.</p>

<p>After some hassle upgrading the <a href="http://qt.nokia.com/downloads/">Qt
SDK</a> (the provided upgrade tool managed to somehow remove the Qt Creator
IDE while purporting to upgrade it; I had to reinstall the entire SDK) and
flashing <a href="http://mg.pov.lt/blog/n950">my N950</a> with Beta 2 firmware
(Qt SDK 1.1.3 produces apps incompatible with the old Beta 1 firmware of the
N950) I started prototyping a time tracking application in <a
href="http://doc.trolltech.com/4.7-snapshot/qml-intro.html">QML</a>,
while learning QML and the <a
href="https://www.developer.nokia.com/swipe/ux/pages/building_blocks.html">N9
design guidelines</a> at the same time.</p>

<p>Converting the pretty pictures into QML was harder than I expected, but at
the end of the second day I had <a
href="http://github.com/mgedmin/qml-time-tracker">something</a> that looked
like a native N9 application.</p>

<div style="text-align: center; float: none; margin-left: 1em">
<a href="http://mg.pov.lt/qml-timetracker-prototype.png"
   title="click for full size image"
><img src="http://mg.pov.lt/qml-timetracker-prototype.png"
       alt="screenshot of the prototype" width="306" height="306" /></a>
</div>

<p>Most useful reference pages were:</p>
<ul>
  <li>The <a href="http://doc.trolltech.com/4.7-snapshot/qdeclarativeintroduction.html">QML
    syntax introduction</a> (which felt incomplete, but was almost adequate in the end).</li>
  <li>The <a href="http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-componentlist.html?tab=1">list of Harmattan-specific QML components</a>.</li>
  <li>The <a href="http://harmattan-dev.nokia.com/docs/library/html/qt4/qdeclarativeelements.html?tab=1">list of standard QML components</a>.</li>
  <li>The <a
    href="https://www.developer.nokia.com/swipe/ux/pages/building_blocks.html">UI
    building blocks pages</a> mentioned above (pretty pictures! pretty colours! I <em>like</em> shiny things!).</li>
  <li><a href="http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-interfaceguide.html">Harmattan
    Qt Components User Interface Guidelines</a>: pixel and font sizes of the
    standard UI elements.  (Ignore the "import UIConstants.js" red herrings;
    it's an internal thing <em>apparently</em>, and you can't use it
    directly from your 3rd-party apps.  Unless you find and copy UIConstants.js
    into your project, after figuring out if the licence allows it, which
    seemed too much of a hassle for me to even start.  So I hardcoded all
    the numbers directly, like a bad programmer who doesn't know about
    constants.)</li>
  <li>The <a
      href="http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-simpletutorial.html?tab=1">TutorialApplication</a>
      sample, finding the sources of which was unexpectedly <em>difficult</em>
      -- a straight git clone of the <a
      href="http://qt.gitorious.org/qt-components/qt-components">qt-components
      repository</a> gives you something too recent to run with the older
      qt-components version on the N9.  I ended up using apt-get source
      qt-components in Scratchbox to download the <a
      href="http://harmattan-dev.nokia.com/pool/harmattan-beta/free/q/qt-components/qt-components_1.0~git20110525-1+0m6.tar.gz">source
      tarball</a> of version 1.0~git20110525-1+0m6.  Look in
      qt-components/examples/meego/.</li>
</ul>

<p>Finally, workflow.  QML is parsed at run time (application startup time,
unless you delay the loading), which means no recompilation ought to be
required to make changes, which means short development feedback cycles ought
to be possible.  So I was not happy about having to wait several seconds after
hitting Run in Qt Creator, while it built a .deb, copied it to the device over
wifi or USB networking, installed and ran it there.  Deploying to the Qt
Simulator is quicker, but not as much as I think it ought to be.  Plus, the
Qt Simulator apparently cannot simulate the landscape mode of the N9,
<em>and</em> it lies about the default font size of QML Text elements (if you
do not specify a pixelSize, text elements will look all right in the simulator,
but ridiculously tiny on the N9).</p>

<p>In the end I cobbled up a <a
href="https://github.com/mgedmin/qml-time-tracker/blob/master/quicktest">shell
script</a> that rsyncs my updated QML files to the device and runs a short
<a href="https://github.com/mgedmin/qml-time-tracker/blob/master/quicktest.py">Python
script</a> (over ssh) to launch them.  You need rsync and PySide installed on
the device for this, obviously, as well as having
SSH set up for passwordless logins.  As a bonus, I can now do QML development
during lunch, directly on the device, with <a
href="http://mg.pov.lt/770/dists/harmattan/user/binary-armel/vim_7.3.260-1_armel.deb">vim</a>,
enjoying proper <a
href="http://gitorious.org/qt-qml-demo-playground/qt-qml-demo-playground/blobs/raw/master/qml.vim">syntax
highlighting</a>.
:)</p>

<p>Oh, and my code is <a href="http://github.com/mgedmin/qml-time-tracker/">up
on Github</a>.</p>
<span class="net_nemein_favourites">6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=3ab72864f4c811e0a4ba43eba7d27b097b09&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/3ab72864f4c811e0a4ba43eba7d27b097b09/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=3ab72864f4c811e0a4ba43eba7d27b097b09&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/3ab72864f4c811e0a4ba43eba7d27b097b09/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 12 Oct 2011 11:49:23 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-3ab72864f4c811e0a4ba43eba7d27b097b09</guid>
        </item>
        <item>
            <title>N9 Hackathon in Vienna</title>
            <link>https://mg.pov.lt/blog/n9-hackathon.html</link>
            <description><![CDATA[

<p>Last weekend I attended the <a
href="https://metalab.at/wiki/N9_Hackathon">N9 Hackathon</a> in Vienna.
Nokia kindly sponsored all food and accommodation costs and, at the very end,
surprised me with an entirely unexpected gift of a N9 phone.</p>

<p>Vienna: great transportation system, delicious food (either that, or I was
always extremely hungry when I ate), huge portions, restaurants open until
midnight.  Shame I didn't have time to see the city itself.</p>

<p>The <a href="http://swipe.nokia.com/">N9</a> is a gorgeous phone; much more
so in real life than in pictures.</p>

<p>After some hassle upgrading the <a href="http://qt.nokia.com/downloads/">Qt
SDK</a> (the provided upgrade tool managed to somehow remove the Qt Creator
IDE while purporting to upgrade it; I had to reinstall the entire SDK) and
flashing <a href="https://mg.pov.lt/blog/n950">my N950</a> with Beta 2 firmware
(Qt SDK 1.1.3 produces apps incompatible with the old Beta 1 firmware of the
N950) I started prototyping a time tracking application in <a
href="http://doc.trolltech.com/4.7-snapshot/qml-intro.html">QML</a>,
while learning QML and the <a
href="https://www.developer.nokia.com/swipe/ux/pages/building_blocks.html">N9
design guidelines</a> at the same time.</p>

<p>Converting the pretty pictures into QML was harder than I expected, but at
the end of the second day I had <a
href="http://github.com/mgedmin/qml-time-tracker">something</a> that looked
like a native N9 application.</p>

<div style="text-align: center; float: none; margin-left: 1em">
<a href="https://mg.pov.lt/qml-timetracker-prototype.png"
   title="click for full size image"
><img src="https://mg.pov.lt/qml-timetracker-prototype-cropped.png"
       alt="screenshot of the prototype" width="161" height="306" /></a>
</div>

<p>Most useful reference pages were:</p>
<ul>
  <li>The <a href="http://doc.trolltech.com/4.7-snapshot/qdeclarativeintroduction.html">QML
    syntax introduction</a> (which felt incomplete, but was almost adequate in the end).</li>
  <li>The <a href="http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-componentlist.html?tab=1">list of Harmattan-specific QML components</a>.</li>
  <li>The <a href="http://harmattan-dev.nokia.com/docs/library/html/qt4/qdeclarativeelements.html?tab=1">list of standard QML components</a>.</li>
  <li>The <a
    href="https://www.developer.nokia.com/swipe/ux/pages/building_blocks.html">UI
    building blocks pages</a> mentioned above (pretty pictures! pretty colours! I <em>like</em> shiny things!).</li>
  <li><a href="http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-interfaceguide.html">Harmattan
    Qt Components User Interface Guidelines</a>: pixel and font sizes of the
    standard UI elements.  (Ignore the "import UIConstants.js" red herrings;
    it's an internal thing <em>apparently</em>, and you can't use it
    directly from your 3rd-party apps.  Unless you find and copy UIConstants.js
    into your project, after figuring out if the licence allows it, which
    seemed too much of a hassle for me to even start.  So I hardcoded all
    the numbers directly, like a bad programmer who doesn't know about
    constants.)</li>
  <li>The <a
      href="http://harmattan-dev.nokia.com/docs/library/html/qt-components/qt-components-meego-simpletutorial.html?tab=1">TutorialApplication</a>
      sample, finding the sources of which was unexpectedly <em>difficult</em>
      -- a straight git clone of the <a
      href="http://qt.gitorious.org/qt-components/qt-components">qt-components
      repository</a> gives you something too recent to run with the older
      qt-components version on the N9.  I ended up using apt-get source
      qt-components in Scratchbox to download the <a
      href="http://harmattan-dev.nokia.com/pool/harmattan-beta/free/q/qt-components/qt-components_1.0~git20110525-1+0m6.tar.gz">source
      tarball</a> of version 1.0~git20110525-1+0m6.  Look in
      qt-components/examples/meego/.</li>
</ul>

<p>Finally, workflow.  QML is parsed at run time (application startup time,
unless you delay the loading), which means no recompilation ought to be
required to make changes, which means short development feedback cycles ought
to be possible.  So I was not happy about having to wait several seconds after
hitting Run in Qt Creator, while it built a .deb, copied it to the device over
wifi or USB networking, installed and ran it there.  Deploying to the Qt
Simulator is quicker, but not as much as I think it ought to be.  Plus, the
Qt Simulator apparently cannot simulate the landscape mode of the N9,
<em>and</em> it lies about the default font size of QML Text elements (if you
do not specify a pixelSize, text elements will look all right in the simulator,
but ridiculously tiny on the N9).</p>

<p>In the end I cobbled up a <a
href="https://github.com/mgedmin/qml-time-tracker/blob/master/quicktest">shell
script</a> that rsyncs my updated QML files to the device and runs a short
<a href="https://github.com/mgedmin/qml-time-tracker/blob/master/quicktest.py">Python
script</a> (over ssh) to launch them.  You need rsync and PySide installed on
the device for this, obviously, as well as having
SSH set up for passwordless logins.  As a bonus, I can now do QML development
during lunch, directly on the device, with <a
href="https://mg.pov.lt/770/dists/harmattan/user/binary-armel/vim_7.3.260-1_armel.deb">vim</a>,
enjoying proper <a
href="http://gitorious.org/qt-qml-demo-playground/qt-qml-demo-playground/blobs/raw/master/qml.vim">syntax
highlighting</a>.
:)</p>

<p>Oh, and my code is <a href="http://github.com/mgedmin/qml-time-tracker/">up
on Github</a>.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ea9c559bf48ce69c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ea9c559bf48ce69c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ea9c559bf48ce69c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ea9c559bf48ce69c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 12 Oct 2011 11:25:13 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ea9c559bf48ce69c5511eaac0fff74778ae39ce39c</guid>
        </item>
        <item>
            <title>Porting FBReader to Meego 1.2 Harmattan</title>
            <link>http://mg.pov.lt/blog/harmattan-fbreader</link>
            <description><![CDATA[

<p><a href="http://wiki.meego.com/User:Fiferboy">Andrew Olmsted</a> built
the first <a href="http://www.fbreader.org">FBReader</a> packages for Harmattan, after <a
href="http://mg.pov.lt/fiferboy-fbreader-harmattan.patch">tweaking the build
system</a> a bit.  The desktop version of FBReader already used Qt 4, and
ran almost unmodified, but with some bugs (<a
href="http://pastie.org/2238548">segfault</a> on task switch) and ugly
UI.</p>

<p>I started with the Ubuntu packages for FBReader, since they used a more
sane build system for .debs (compared to upstream's <a
href="https://github.com/geometer/FBReader/blob/master/build_packages.sh">funky
shell script</a>).  Some tweaks were needed to make it build in Scratchbox:
since GTK+ and Hildon libraries aren't available on Harmattan, I had to disable
the building of -gtk and -maemo versions of libzlui.  I also got to learn
a new tool &mdash; <a href="http://wiki.debian.org/UsingQuilt">quilt</a>.</p>

<p>Fixing the <a href="http://pastie.org/2281152">segfault</a> took a couple of days of <a
href="http://pastie.org/2281247">debugging</a>, studying the <a
href="https://github.com/geometer/FBReader/blob/master/zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp#L97">source</a>
<a href="https://github.com/geometer/FBReader/blob/master/zlibrary/ui/src/qt4/view/ZLQtPaintContext.cpp#L47">code</a>
of both FBReader and Qt itself, and asking for help on IRC.  Turns out
FBReader was holding an active QPainter instance for too long, and its backing
pixmap got destroyed (or, rather, converted from an OpenGL texture to a plain
X11 pixmap) during a task switch, causing the crash.  I'm probably describing
this wrong BTW, but, in any case, adding QPainter::begin() and QPainter::end()
calls in the paintEvent handler fixed the segfault.</p>

<p>Next, a small tweak in the .desktop file to make FBReader a single-instance
application: change <tt>Exec=FBReader</tt> to <tt>Exec=single-instance
  /usr/bin/FBReader</tt> (I'm paraphrasing slightly).</p>

<p>Then, a more ambitious goal: making FBReader intercept volume keys and
use them for scrolling.  Google gave me a <a
href="http://www.developer.nokia.com/Community/Discussion/showthread.php?226283-Grab-Volume-Keys-on-Harmattan">pointer</a>
to <a href="http://apidocs.meego.com/1.2/qmsystem/classMeeGo_1_1QmKeys.html">QmKeys</a>, which was the
wrong API to use here, but gave me a lead to qmkeyd2, which appears to be an
<a href="https://www.meego.gitorious.org/meego-middleware/qmsystem/blobs/5edeec3815de0a2cb81e305e504f072460efe30d/keyd/qmkeyd.cpp">open
source</a> daemon, which gave me a lead to sysuid, another <a
href="https://meego.gitorious.org/meegotouch/meegotouch-systemui/blobs/master/src/extensions/volume/volumebarlogic.cpp">open
source</a> daemon, which in turn gave me a lead to <a
href="http://harmattan-dev.nokia.com/unstable/beta/api_refs/showdoc.php?pkn=libresourceqt&wb=daily-docs&url=Li94bWwvZGFpbHktZG9jcy9saWJyZXNvdXJjZXF0">libresourceqt</a>,
and that was the right API at last.</p>

<p>Volume keys generate regular key events for XF86AudioRaiseVolume and
XF86AudioLowerVolume, but they're also intercepted by qmkeyd2, which tells
all subscribers (and sysuid is one) about them.  Which subscriber gets to
react is determined by the resource policy framework.  So what I needed to do
in FBReader was acquire the ScaleButtonResource when FBReader starts up or gets
focus, and release it when FBReader quits or goes into background.  That
also required some IRC help until I discovered <a
href="http://doc.qt.nokia.com/latest/qobject.html#installEventFilter">installEventFilter()</a>
and the <a
href="http://doc.qt.nokia.com/latest/qevent.html#Type-enum">ApplicationActivate/ApplicationDeactivate</a>
events. And <a
href="http://doc.qt.nokia.com/latest/qcoreapplication.html#instance">QApplication::instance()</a>.</p>

<p>The various tools available in the developer firmware were invaluable:
openssh, gdb, valgrind, strace, xev, xprop, lsof, netstat.  Also, I would not
have achieved my second goal without being able to look at the sources of Meego
system components (qmkeyd, sysuid).  Yay open source!</p>

<p>Here are <a
href="http://mg.pov.lt/fbreader-0.12.10dfsg-1ubuntu2mg9-harmattan.patch">my
changes to the source code</a>.  You can find my modified <a href="http://mg.pov.lt/770/dists/harmattan/experimental/source/fbreader_0.12.10dfsg-1ubuntu2mg9.diff.gz">Debian packaging
files</a>, as well as <strong>prebuilt binary packages</strong> (with full
debug info, for gdb goodness), in my <a
href="http://mg.pov.lt/770/">experimental harmattan apt repository</a>.
The UI is still ugly and non-native, but it doesn't matter much in fullscreen
mode <tt>:)</tt> .</p>

<p>Note to self: when next building fbreader, make sure the 2 megabyte
<tt>tags</tt> file doesn't end up in the <tt>.diff.gz</tt>.  And speaking of crud
in source packages, the <a
href="http://mg.pov.lt/770/dists/harmattan/user/binary-armel/vim_7.3.260-1_armel.deb">vim
package</a> I built for Harmattan the other day contains the entire 50 meg
<tt>.hg</tt> in the <tt>.orig.tar.gz</tt>.  I need to figure out how to
tell dh_make to omit it.</p>

<span class="net_nemein_favourites">4 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=261191a0b97d11e081d589b27cac4ee84ee8&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/261191a0b97d11e081d589b27cac4ee84ee8/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>1 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=261191a0b97d11e081d589b27cac4ee84ee8&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/261191a0b97d11e081d589b27cac4ee84ee8/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Fri, 29 Jul 2011 00:53:18 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-261191a0b97d11e081d589b27cac4ee84ee8</guid>
        </item>
        <item>
            <title>Porting FBReader to Meego 1.2 Harmattan</title>
            <link>https://mg.pov.lt/blog/harmattan-fbreader.html</link>
            <description><![CDATA[

<p><a href="http://wiki.meego.com/User:Fiferboy">Andrew Olmsted</a> built
the first <a href="http://www.fbreader.org">FBReader</a> packages for Harmattan, after <a
href="https://mg.pov.lt/fiferboy-fbreader-harmattan.patch">tweaking the build
system</a> a bit.  The desktop version of FBReader already used Qt 4, and
ran almost unmodified, but with some bugs (<a
href="http://pastie.org/2238548">segfault</a> on task switch) and ugly
UI.</p>

<p>I started with the Ubuntu packages for FBReader, since they used a more
sane build system for .debs (compared to upstream's <a
href="https://github.com/geometer/FBReader/blob/master/build_packages.sh">funky
shell script</a>).  Some tweaks were needed to make it build in Scratchbox:
since GTK+ and Hildon libraries aren't available on Harmattan, I had to disable
the building of -gtk and -maemo versions of libzlui.  I also got to learn
a new tool &mdash; <a href="http://wiki.debian.org/UsingQuilt">quilt</a>.</p>

<p>Fixing the <a href="http://pastie.org/2281152">segfault</a> took a couple of days of <a
href="http://pastie.org/2281247">debugging</a>, studying the <a
href="https://github.com/geometer/FBReader/blob/master/zlibrary/ui/src/qt4/view/ZLQtViewWidget.cpp#L97">source</a>
<a href="https://github.com/geometer/FBReader/blob/master/zlibrary/ui/src/qt4/view/ZLQtPaintContext.cpp#L47">code</a>
of both FBReader and Qt itself, and asking for help on IRC.  Turns out
FBReader was holding an active QPainter instance for too long, and its backing
pixmap got destroyed (or, rather, converted from an OpenGL texture to a plain
X11 pixmap) during a task switch, causing the crash.  I'm probably describing
this wrong BTW, but, in any case, adding QPainter::begin() and QPainter::end()
calls in the paintEvent handler fixed the segfault.</p>

<p>Next, a small tweak in the .desktop file to make FBReader a single-instance
application: change <tt>Exec=FBReader</tt> to <tt>Exec=single-instance
  /usr/bin/FBReader</tt> (I'm paraphrasing slightly).</p>

<p>Then, a more ambitious goal: making FBReader intercept volume keys and
use them for scrolling.  Google gave me a <a
href="http://www.developer.nokia.com/Community/Discussion/showthread.php?226283-Grab-Volume-Keys-on-Harmattan">pointer</a>
to <a href="http://apidocs.meego.com/1.2/qmsystem/classMeeGo_1_1QmKeys.html">QmKeys</a>, which was the
wrong API to use here, but gave me a lead to qmkeyd2, which appears to be an
<a href="https://www.meego.gitorious.org/meego-middleware/qmsystem/blobs/5edeec3815de0a2cb81e305e504f072460efe30d/keyd/qmkeyd.cpp">open
source</a> daemon, which gave me a lead to sysuid, another <a
href="https://meego.gitorious.org/meegotouch/meegotouch-systemui/blobs/master/src/extensions/volume/volumebarlogic.cpp">open
source</a> daemon, which in turn gave me a lead to <a
href="http://harmattan-dev.nokia.com/unstable/beta/api_refs/showdoc.php?pkn=libresourceqt&wb=daily-docs&url=Li94bWwvZGFpbHktZG9jcy9saWJyZXNvdXJjZXF0">libresourceqt</a>,
and that was the right API at last.</p>

<p>Volume keys generate regular key events for XF86AudioRaiseVolume and
XF86AudioLowerVolume, but they're also intercepted by qmkeyd2, which tells
all subscribers (and sysuid is one) about them.  Which subscriber gets to
react is determined by the resource policy framework.  So what I needed to do
in FBReader was acquire the ScaleButtonResource when FBReader starts up or gets
focus, and release it when FBReader quits or goes into background.  That
also required some IRC help until I discovered <a
href="http://doc.qt.nokia.com/latest/qobject.html#installEventFilter">installEventFilter()</a>
and the <a
href="http://doc.qt.nokia.com/latest/qevent.html#Type-enum">ApplicationActivate/ApplicationDeactivate</a>
events. And <a
href="http://doc.qt.nokia.com/latest/qcoreapplication.html#instance">QApplication::instance()</a>.</p>

<p>The various tools available in the developer firmware were invaluable:
openssh, gdb, valgrind, strace, xev, xprop, lsof, netstat.  Also, I would not
have achieved my second goal without being able to look at the sources of Meego
system components (qmkeyd, sysuid).  Yay open source!</p>

<p>Here are <a
href="https://mg.pov.lt/fbreader-0.12.10dfsg-1ubuntu2mg9-harmattan.patch">my
changes to the source code</a>.  You can find my modified <a href="https://mg.pov.lt/770/dists/harmattan/experimental/source/fbreader_0.12.10dfsg-1ubuntu2mg9.diff.gz">Debian packaging
files</a>, as well as <strong>prebuilt binary packages</strong> (with full
debug info, for gdb goodness), in my <a
href="https://mg.pov.lt/770/">experimental harmattan apt repository</a>.
The UI is still ugly and non-native, but it doesn't matter much in fullscreen
mode <tt>:)</tt> .</p>

<p>Note to self: when next building fbreader, make sure the 2 megabyte
<tt>tags</tt> file doesn't end up in the <tt>.diff.gz</tt>.  And speaking of crud
in source packages, the <a
href="https://mg.pov.lt/770/dists/harmattan/user/binary-armel/vim_7.3.260-1_armel.deb">vim
package</a> I built for Harmattan the other day contains the entire 50 meg
<tt>.hg</tt> in the <tt>.orig.tar.gz</tt>.  I need to figure out how to
tell dh_make to omit it.</p>

<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ea9c5599225f169c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ea9c5599225f169c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ea9c5599225f169c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ea9c5599225f169c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Fri, 29 Jul 2011 00:16:38 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ea9c5599225f169c5511eaac0fff74778ae39ce39c</guid>
        </item>
        <item>
            <title>Nokia N950</title>
            <link>http://mg.pov.lt/blog/n950</link>
            <description><![CDATA[

<p>Last Thursday I received a package containing something called the <a
href="http://wiki.maemo.org/N950">Nokia N950</a> development kit.  Sweet sweet
hardware, shame it's not going to be sold to end users.  The software is
visibly an unfinished pre-release version, but shows great potential.  There
are almost no 3rd-party apps, which is why Nokia is loaning these N950s to
random developers.</p>

<p>I intend to port <a href="http://mg.pov.lt/gtimelog/">GTimeLog</a> to it.
Although my more immediate need is to have <a
href="http://www.fbreader.org/">FBReader</a>, so that I can stop carrying both
this one and my N900 with me everywhere.  Also, <a
href="http://www.vim.org/">vim</a> would be nice.</p>

<p>I've already <a href="http://pastie.org/2218247">hacked up</a> Lithuanian
support to the virtual and hardware keyboards, thanks to the very nice design
of <a href="http://wiki.meego.com/Maliit">Maliit</a>.  As a comparison, I've
had my N900 for a year and a half, and I still can't type Lithuanian on it.
XKB is not fun.</p>
<span class="net_nemein_favourites">5 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=4110bb24b20d11e08f9075b0648471467146&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/4110bb24b20d11e08f9075b0648471467146/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>1 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=4110bb24b20d11e08f9075b0648471467146&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/4110bb24b20d11e08f9075b0648471467146/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Tue, 19 Jul 2011 13:44:41 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-4110bb24b20d11e08f9075b0648471467146</guid>
        </item>
        <item>
            <title>Nokia N950</title>
            <link>https://mg.pov.lt/blog/n950.html</link>
            <description><![CDATA[

<p>Last Thursday I received a package containing something called the <a
href="http://wiki.maemo.org/N950">Nokia N950</a> development kit.  Sweet sweet
hardware, shame it's not going to be sold to end users.  The software is
visibly an unfinished pre-release version, but shows great potential.  There
are almost no 3rd-party apps, which is why Nokia is loaning these N950s to
random developers.</p>

<p>I intend to port <a href="https://mg.pov.lt/gtimelog/">GTimeLog</a> to it.
Although my more immediate need is to have <a
href="http://www.fbreader.org/">FBReader</a>, so that I can stop carrying both
this one and my N900 with me everywhere.  Also, <a
href="http://www.vim.org/">vim</a> would be nice.</p>

<p>I've already <a href="http://pastie.org/2218247">hacked up</a> Lithuanian
support to the virtual and hardware keyboards, thanks to the very nice design
of <a href="http://wiki.meego.com/Maliit">Maliit</a>.  As a comparison, I've
had my N900 for a year and a half, and I still can't type Lithuanian on it.
XKB is not fun.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ea9c55963f2bb29c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ea9c55963f2bb29c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ea9c55963f2bb29c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ea9c55963f2bb29c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Tue, 19 Jul 2011 12:44:52 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ea9c55963f2bb29c5511eaac0fff74778ae39ce39c</guid>
        </item>
        <item>
            <title>N900 connection sharing the hard way</title>
            <link>http://mg.pov.lt/blog/n900-connection-sharing</link>
            <description><![CDATA[

<p>My N900 has a SIM card with a flat-rate 3G data plan.  My laptop hasn't.
What do I do when I want to use the Internet on my laptop somewhere that
doesn't have WiFi?  Well, there are many options:</p>

<p><strong>Option 1: N900 as a USB modem</strong></p>

<p>Use the provided USB cable to connect the N900 to the laptop.  Choose "PC
Suite" mode on the N900 when you get the USB connection menu.  The laptop
now sees your N900 as a bog-standard USB 3G modem.  Use Network Manager to
connect to the internet.</p>

<blockquote>
  <p>Pros: no extra setup required.  The N900 and the laptop can both access
  the Internet at the same time.</p>

  <p>Cons: you have to use a USB cable (I hate cables).  You cannot ssh into your
  N900 (and ssh is my primary file transfer protocol between the laptop and the
  M900).</p>
</blockquote>

<p><strong>Option 2: N900 as a Bluetooth DUN modem</strong></p>

<p>Install <a
  href="http://maemo.org/downloads/product/Maemo5/bluetooth-dun/">Bluetooth DUN
  support</a> from Maemo Extras.  Then use it like you would any other phone
that has Bluetooth DUN.</p>

<blockquote>
  <p>Pros: no cables.</p>

  <p>Cons: Bluetooth is the worst technology <em>ever</em>.  I never had it
  work reliably.  Plus, Network Manager in Ubuntu 10.04 doesn't support
  Bluetooth DUN (it supports only Bluetooth PAN, as far as I know).</p>
</blockquote>

<p><strong>Option 3: N900 as a WiFi access point with Joikuspot</strong></p>

<p>I haven't tried this.</p>

<blockquote>
  <p>Pros: simple (hopefully), no cables required.</p>

  <p>Cons: Joikuspot is non-free.  I'm not an absolute zealot, but I will
  avoid closed-source stuff when open-source alternatives are available.</p>
</blockquote>

<p><strong>Option 4: N900 as a WiFi access point with <a href="http://mobilehotspot.garage.maemo.org/">Mobilehotspot</a></strong></p>

<p>I haven't tried this either.</p>

<blockquote>
  <p>Pros: it's an open-source app available from Maemo Extras.  No cables
  required.</p>

  <p>Cons: requires a non-standard kernel (or so I've heard).  Way outside my
  comfort level.</p>
</blockquote>

<p><strong>Option 5: N900 as a WiFi access point with shell scripts</strong></p>

<p>Here's the shell script I run on my N900: <a
href="http://mg.pov.lt/share-wifi">share-wifi</a>.  It sets up an ad-hoc WiFi
network, and starts a DHCP and DNS server (dnsmasq).  Sadly, it cannot set up
connection sharing (NAT), so I rely on OpenSSH as a SOCKS5 proxy.  The whole
setup is like this:</p>

<ol>
  <li>You want the latest firmware (PR 1.2) to avoid <a
      href="https://bugs.maemo.org/show_bug.cgi?id=5712">this bug</a>.</li>
  <li>You need to have <a
      href="http://maemo.org/downloads/product/Maemo5/openssh/">OpenSSH</a> installed on
      the N900.  Also, setting up key-based authentication makes it more
      convenient.</li>
  <li>The script assumes that you've set up sudo on the N900 so that you
      can run any command as root.</li>
  <li>You need to have <a
      href="http://maemo.org/packages/view/wireless-tools/">wireless-tools</a>
      installed.  It's in the main SSU repository so you should be able to sudo
      apt-get install it (if it's not preinstalled; I don't remember).</li>
  <li>On the N900 run <tt>share-wifi</tt> in a terminal (optionally passing a
      WiFi channel number from 1 to 11, in case you need to avoid interference with
      nearby networks).</li>
  <li>On the laptop connect to the new n900 WLAN and run
      <tt>ssh -D 1080 user@n900</tt>.  You will get a shell session; the SOCKS proxy
      will be active while it is open.</li>
  <li>Reconfigure your laptop to use a SOCKS5 proxy on localhost:1080.
      For GNOME systems I've a couple of shell scripts: <a
      href="http://mg.pov.lt/proxy-on">proxy-on</a> and <a
      href="http://mg.pov.lt/proxy-off">proxy-off</a>.  For applications
      that do not use the GNOME proxy settings (such as Subversion access
      over SSH), use <a href="http://mg.pov.lt/blog/escaping-hotel-firewall.html#tsocks">tsocks</a>.</li>
  <li>When done, hit Ctrl-C on the N900 to terminate the sharing script.</li>
</ol>

<blockquote>
  <p>Pros: no non-free software or custom kernel required.  No cables.</p>

  <p>Cons: complicated to set up.  No WLAN power savings available for ad-hoc
     networks, so battery life is extremely poor (~2 hours).  But, hey, <i>no
     cables!</i></p>
</blockquote>
<span class="net_nemein_favourites">7 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=9139c730945911df892599fe2ca8b834b834&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/9139c730945911df892599fe2ca8b834b834/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=9139c730945911df892599fe2ca8b834b834&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/9139c730945911df892599fe2ca8b834b834/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Tue, 20 Jul 2010 23:50:25 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-9139c730945911df892599fe2ca8b834b834</guid>
        </item>
        <item>
            <title>N900 connection sharing the hard way</title>
            <link>https://mg.pov.lt/blog/n900-connection-sharing.html</link>
            <description><![CDATA[

<p>My N900 has a SIM card with a flat-rate 3G data plan.  My laptop hasn't.
What do I do when I want to use the Internet on my laptop somewhere that
doesn't have WiFi?  Well, there are many options:</p>

<p><strong>Option 1: N900 as a USB modem</strong></p>

<p>Use the provided USB cable to connect the N900 to the laptop.  Choose "PC
Suite" mode on the N900 when you get the USB connection menu.  The laptop
now sees your N900 as a bog-standard USB 3G modem.  Use Network Manager to
connect to the internet.</p>

<blockquote>
  <p>Pros: no extra setup required.  The N900 and the laptop can both access
  the Internet at the same time.</p>

  <p>Cons: you have to use a USB cable (I hate cables).  You cannot ssh into your
  N900 (and ssh is my primary file transfer protocol between the laptop and the
  M900).</p>
</blockquote>

<p><strong>Option 2: N900 as a Bluetooth DUN modem</strong></p>

<p>Install <a
  href="http://maemo.org/downloads/product/Maemo5/bluetooth-dun/">Bluetooth DUN
  support</a> from Maemo Extras.  Then use it like you would any other phone
that has Bluetooth DUN.</p>

<blockquote>
  <p>Pros: no cables.</p>

  <p>Cons: Bluetooth is the worst technology <em>ever</em>.  I never had it
  work reliably.  Plus, Network Manager in Ubuntu 10.04 doesn't support
  Bluetooth DUN (it supports only Bluetooth PAN, as far as I know).</p>
</blockquote>

<p><strong>Option 3: N900 as a WiFi access point with Joikuspot</strong></p>

<p>I haven't tried this.</p>

<blockquote>
  <p>Pros: simple (hopefully), no cables required.</p>

  <p>Cons: Joikuspot is non-free.  I'm not an absolute zealot, but I will
  avoid closed-source stuff when open-source alternatives are available.</p>
</blockquote>

<p><strong>Option 4: N900 as a WiFi access point with <a href="http://mobilehotspot.garage.maemo.org/">Mobilehotspot</a></strong></p>

<p>I haven't tried this either.</p>

<blockquote>
  <p>Pros: it's an open-source app available from Maemo Extras.  No cables
  required.</p>

  <p>Cons: requires a non-standard kernel (or so I've heard).  Way outside my
  comfort level.</p>
</blockquote>

<p><strong>Option 5: N900 as a WiFi access point with shell scripts</strong></p>

<p>Here's the shell script I run on my N900: <a
href="https://mg.pov.lt/share-wifi">share-wifi</a>.  It sets up an ad-hoc WiFi
network, and starts a DHCP and DNS server (dnsmasq).  Sadly, it cannot set up
connection sharing (NAT), so I rely on OpenSSH as a SOCKS5 proxy.  The whole
setup is like this:</p>

<ol>
  <li>You want the latest firmware (PR 1.2) to avoid <a
      href="https://bugs.maemo.org/show_bug.cgi?id=5712">this bug</a>.</li>
  <li>You need to have <a
      href="http://maemo.org/downloads/product/Maemo5/openssh/">OpenSSH</a> installed on
      the N900.  Also, setting up key-based authentication makes it more
      convenient.</li>
  <li>The script assumes that you've set up sudo on the N900 so that you
      can run any command as root.</li>
  <li>You need to have <a
      href="http://maemo.org/packages/view/wireless-tools/">wireless-tools</a>
      installed.  It's in the main SSU repository so you should be able to sudo
      apt-get install it (if it's not preinstalled; I don't remember).</li>
  <li>On the N900 run <tt>share-wifi</tt> in a terminal (optionally passing a
      WiFi channel number from 1 to 11, in case you need to avoid interference with
      nearby networks).</li>
  <li>On the laptop connect to the new n900 WLAN and run
      <tt>ssh -D 1080 user@n900</tt>.  You will get a shell session; the SOCKS proxy
      will be active while it is open.</li>
  <li>Reconfigure your laptop to use a SOCKS5 proxy on localhost:1080.
      For GNOME systems I've a couple of shell scripts: <a
      href="https://mg.pov.lt/proxy-on">proxy-on</a> and <a
      href="https://mg.pov.lt/proxy-off">proxy-off</a>.  For applications
      that do not use the GNOME proxy settings (such as Subversion access
      over SSH), use <a href="https://mg.pov.lt/blog/escaping-hotel-firewall.html#tsocks">tsocks</a>.</li>
  <li>When done, hit Ctrl-C on the N900 to terminate the sharing script.</li>
</ol>

<blockquote>
  <p>Pros: no non-free software or custom kernel required.  No cables.</p>

  <p>Cons: complicated to set up.  No WLAN power savings available for ad-hoc
     networks, so battery life is extremely poor (~2 hours).  But, hey, <i>no
     cables!</i></p>
</blockquote>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ea9c5593676efe9c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ea9c5593676efe9c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ea9c5593676efe9c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ea9c5593676efe9c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Tue, 20 Jul 2010 22:41:13 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ea9c5593676efe9c5511eaac0fff74778ae39ce39c</guid>
        </item>
        <item>
            <title>Oopsie</title>
            <link>http://mg.pov.lt/blog/maemo-flood</link>
            <description><![CDATA[

<p>Sorry for flooding Planet Maemo -- it was a side effect of changing this
feed's URL to only include posts tagged "maemo".  I'm not sure if the fault
is PyBlosxom's or the aggregator's</p>

<p>As a penance, here's a Terminal trick for you:</p>

<pre>
LABELS='[Tab,Esc,Enter,PgUp,PgDn,F2,VKB]'
KEYS='[Tab,Escape,KP_Enter,Page_Up,Page_Down,F2,Return]'
gconftool -s /apps/osso/xterm/key_labels --type list --list-type string "$LABELS"
gconftool -s /apps/osso/xterm/keys --type list --list-type string "$KEYS"
</pre>

<p>This changes the toolbar to have three extra keys (Enter, F2, and a key that
acts like Enter when the hardware keyboard is open, and opens the virtual
keyboard if the hardware keyboard is closed).</p>

<p><strong>Update:</strong> added screenshot:</p>

<p style="text-align: center">
<a href="http://mg.pov.lt/n900-xterm-toolbar.png">
<img style="border: 1px solid #ccc; padding: 6px"
     src="http://mg.pov.lt/n900-xterm-toolbar.png"
     alt="N900 Terminal with new toolbar buttons" width="400" height="240" />
</a>
<br/>
Nokia N900 Terminal app with new toolbar buttons
</p>
<span class="net_nemein_favourites">15 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2523338026ed11dfb26227410c34bda4bda4&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2523338026ed11dfb26227410c34bda4bda4/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2523338026ed11dfb26227410c34bda4bda4&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2523338026ed11dfb26227410c34bda4bda4/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 17:49:41 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2523338026ed11dfb26227410c34bda4bda4</guid>
        </item>
        <item>
            <title>Oopsie</title>
            <link>https://mg.pov.lt/blog/maemo-flood.html</link>
            <description><![CDATA[

<p>Sorry for flooding Planet Maemo -- it was a side effect of changing this
feed's URL to only include posts tagged "maemo".  I'm not sure if the fault
is PyBlosxom's or the aggregator's</p>

<p>As a penance, here's a Terminal trick for you:</p>

<pre>
LABELS='[Tab,Esc,Enter,PgUp,PgDn,F2,VKB]'
KEYS='[Tab,Escape,KP_Enter,Page_Up,Page_Down,F2,Return]'
gconftool -s /apps/osso/xterm/key_labels --type list --list-type string "$LABELS"
gconftool -s /apps/osso/xterm/keys --type list --list-type string "$KEYS"
</pre>

<p>This changes the toolbar to have three extra keys (Enter, F2, and a key that
acts like Enter when the hardware keyboard is open, and opens the virtual
keyboard if the hardware keyboard is closed).</p>

<p><strong>Update:</strong> added screenshot:</p>

<p style="text-align: center">
<a href="https://mg.pov.lt/n900-xterm-toolbar.png">
<img style="border: 1px solid #ccc; padding: 6px"
     src="https://mg.pov.lt/n900-xterm-toolbar.png"
     alt="N900 Terminal with new toolbar buttons" width="400" height="240" />
</a>
<br/>
Nokia N900 Terminal app with new toolbar buttons
</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ea9c559077f2d69c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ea9c559077f2d69c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ea9c559077f2d69c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ea9c559077f2d69c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 17:45:34 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ea9c559077f2d69c5511eaac0fff74778ae39ce39c</guid>
        </item>
        <item>
            <title>Happiness is...</title>
            <link>http://mg.pov.lt/blog/n810</link>
            <description><![CDATA[

<p>... not having a headache.</p>

<p>In other news, my <a href="http://en.wikipedia.org/wiki/Nokia_N810">Nokia
N810 Internet Tablet</a> finally arrived.  It looks better in real life than in
pictures.</p>

<p>Strange quirk: the 2 gigs of extra internal flash memory (formatted as
FAT32) are mostly unused (according to df) while at the same time being
three quarters full (according to du):</p>

<pre>
<span class="prompt">/media/mmc2 $</span> <span class="typing">df -h .</span>
Filesystem                Size      Used Available Use% Mounted on
/dev/mmcblk0p1            1.9G      8.0k      1.9G   0% /media/mmc2
<span class="prompt">/media/mmc2 $</span> <span class="typing">du -sh .</span>
1.5G    .
</pre>

<p>Ouch. Time to run fsck.vfat on it.  Or perhaps just reformat, to avoid the
other famous bug (<a href="https://bugs.maemo.org/show_bug.cgi?id=2802">attempt
to access beyond end of device</a>), which, let me check, yes, I also see:</p>

<pre>
[584959.868000] usb-storage: device scan complete
[584959.868000] scsi 3:0:0:0: Direct-Access     Nokia    N810              031 PQ: 0 ANSI: 2
[584959.868000] scsi 3:0:0:1: Direct-Access     Nokia    N810              031 PQ: 0 ANSI: 2
[584959.872000] sd 3:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[584959.872000] sd 3:0:0:0: [sdb] Write Protect is off
[584959.872000] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[584959.872000] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[584959.872000] sd 3:0:0:0: [sdb] 3932160 512-byte hardware sectors (2013 MB)
[584959.876000] sd 3:0:0:0: [sdb] Write Protect is off
[584959.876000] sd 3:0:0:0: [sdb] Mode Sense: 0f 00 00 00
[584959.876000] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[584959.876000]  sdb: sdb1
[584959.880000]  sdb: <span class="important">p1 exceeds device capacity</span>
[584959.884000] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[584959.884000] sd 3:0:0:0: Attached scsi generic sg2 type 0
[584959.884000] sd 3:0:0:1: [sdc] Attached SCSI removable disk
[584959.884000] sd 3:0:0:1: Attached scsi generic sg3 type 0
[584960.240000] attempt to access beyond end of device
[584960.240000] sdb: rw=0, want=4013848, limit=3932160
[584960.240000] Buffer I/O error on device sdb1, logical block 501728
</pre>

<p>It would be interesting to know how this came to be.  Do some N810s have
more internal memory than others?  Or was the filesystem image made too big
for all of them by accident?</p>
<span class="net_nemein_favourites">4 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2fed1eae26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2fed1eae26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2fed1eae26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2fed1eae26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:45 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2fed1eae26b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>Discovery of the day</title>
            <link>http://mg.pov.lt/blog/python-zipfile</link>
            <description><![CDATA[

<p>If you have python but not unzip (consider, e.g. a <a
href="http://en.wikipedia.org/wiki/Nokia_N800">Nokia Internet Tablet</a>), you
can extract zip files with</p>

<blockquote><pre>
python -m zipfile -e <em>filename</em>.zip .
</pre></blockquote>
<span class="net_nemein_favourites">6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2f5bc08a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2f5bc08a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>1 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2f5bc08a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2f5bc08a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:44 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2f5bc08a26b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>Nokia can has web server pls?</title>
            <link>http://mg.pov.lt/blog/nokia-complaint</link>
            <description><![CDATA[

<p>The inability of Nokia to provide reliable web servers for
repository.maemo.org and tablets-dev.nokia.com is annoying.  I am unable to
build packages for N810 because the apt repository that contains build
dependencies is down, and apparently has been down for a couple of days
already.</p>
<span class="net_nemein_favourites">2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2eca765226b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2eca765226b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2eca765226b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2eca765226b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:43 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2eca765226b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>TOC marks for FBReader</title>
            <link>http://mg.pov.lt/blog/fbreader-toc-marks</link>
            <description><![CDATA[

<p><a href="http://gutenpalm.sourceforge.net/">Weasel Reader</a> had a feature:
it would display marks for all the bookmarks in the indicator line.  Handy when
you're reading a collection of short stories and want to know how much you'll
have to read until the next one.</p>

<p>Today I hacked up this feature for <a
href="http://mg.pov.lt/fbreader/">FBReader</a>.  Get the .deb <a
href="http://mg.pov.lt/770/fbreader-mg.install">in the usual place</a>.</p>

<p style="text-align: center; font-size: small">
  <a href="http://mg.pov.lt/fbreader-toc-marks.png"><img
       src="http://mg.pov.lt/fbreader-toc-marks-small.png"
       width="400" height="240"
       alt="FBReader with Table of Contents marks in the position indicator"
       style="padding: 1ex; border: 1px solid #eee" /></a> <br />
FBReader with Table of Contents marks in the position indicator.  The book
is <a href="http://www.webscription.net/pc-300-1-an-oblique-approach.aspx">An
Oblique Approach</a> by David Drake and Eric Flint, from the <a
href="http://www.baen.com/library/">Baen Free Library</a>.
</p>

<p>While I was doing that, <a href="http://bazaar-vcs.org/">bzr</a> decided to
shake my confidence in it and started throwing assertion errors right and
left (no link, the mailing list archive lags horribly).</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2e08063a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2e08063a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2e08063a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2e08063a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:42 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2e08063a26b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>I've got a Nokia N800!</title>
            <link>http://mg.pov.lt/blog/n800</link>
            <description><![CDATA[

<p>Nokia kindly gave me a developer discount code for the <a
href="http://europe.nokia.com/phones/n800">N800 internet tablet</a>, a few
weeks ago.  That was a very pleasant surprise.  Actually buying the thing was
complicated, to put it politely.  I finally laid my hands on the
device his Monday.  Yum, yum!</p>

<p>Changes I like best: extra RAM, speed, storage space.  The built-in stand.
Position of the headphone and charget sockets.  Screen (shinier, not as grainy,
although I think it reflects a bit more ambient light than the 770 used to).
The ability to reorder status bar icons.  New Opera toolbar.  Backup
application that works without killing all other applications and entering
offline mode.  New themes.  Battery time estimates.<p>

<p>Changes I'm not sure I like: new stylus (too short).  Lack of hard case
(without it I'm forced to lock the keys when I stuff it into my pocket, but the
tiny power button is hard to press).  The new shape (it's harder to hold it in
my right hand while pressing the down button, which is how I like to read books
sometimes).  The tearing effects when panning in Opera.</p>

<p>The new Media Player merits a category on its own.  It indexes all the media
files (songs and videos) in ~/MyDocs and in all memory cards automatically.
That's very nice when it works.  It's frustrating when it doesn't.  There's no
way to force reindexing after you shuffle files around manually, and no
indication when the automatic reindexing is finished.  You just have to wait
and hope that it will catch up.  Also, sometimes the user interaction is very
strange: <a href="https://maemo.org/bugzilla/show_bug.cgi?id=1056">bug 1056</a>,
<a href="https://maemo.org/bugzilla/show_bug.cgi?id=1063">bug 1063</a>.</p>

<p>Overall, I like it better than the 770.</p>

<p>
<img src="http://mg.pov.lt/n800-balaton-vkb.png" width="800" height="480"
     alt="screenshot of the pretty virtual keyboard (Balaton theme)"
     title="screenshot of the pretty virtual keyboard (Balaton theme)" />
</p>
<span class="net_nemein_favourites">2 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2d703c1a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2d703c1a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>5 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2d703c1a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2d703c1a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:41 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2d703c1a26b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>Sleepless nights</title>
            <link>http://mg.pov.lt/blog/sleepless-nights</link>
            <description><![CDATA[

<p>My sleep schedule is totally out of whack.  I cannot sleep before 3 AM
(sometimes I stay awake until 7 AM), then I cannot get up before noon.</p>

<p>As a result I have more free time for hacking.  Today I tried to play around
with Metacity's compositor, with some <a
href="http://marnanel.livejournal.com/950866.html?thread=4719954#t4719954">mixed
success</a>.  I also built a <a href="http://mg.pov.lt/fbreader/">patched
FBReader</a> with a numeric page indicator tweaked to the size and position of
my liking (<a
href="http://mg.pov.lt/fbreader/fbreader-mg-montage.png">screenshot</a>).  <a
href="http://bazaar-vcs.org/">Bzr</a> rocks for maintaining branches!</p>

<p><a href="http://mg.pov.lt/eazysvn">eazysvn</a> also got a facelift today.
It is now installable with easy_install.</p>

<p><small>&lt;rant&gt;<br/>I do not like easy_install.  It wants to install stuff into
/usr/lib/python2.4/site-packages.  That location is reserved for Debian
packages.  A sensible default would be /usr/local/lib/python2.4/site-packages
or, preferably, somewhere in my home directory, with the caveat that I'll have to
set up PYTHONPATH myself.  You can force easy_install to do more or less what
you want, but that involves reading tons of documentation, invoking <a
href="http://svn.colorstudy.com/home/ianb/workingenv/workingenv.py">arcane
multi-thousand line scripts</a>, or sacrificing small animals.  Not my
definition of "easy".<br/>&lt;/rant&gt;</small></p>

<p>Last night I submitted a <a
href="https://lists.ubuntu.com/archives/bazaar/2007q1/021246.html">patch to add
a tiny help topic to bzr</a>.  Before that, nights were dedicated to
<a href="http://mg.pov.lt/blog/zope-testing.html">zope.testing</a> and
<a href="http://mg.pov.lt/blog/random-hackery.html">pyspacwar</a>.</p>

<p>In the mean time, actual paying work suffers.  Karmic retribution for those
three 11-and-a-half hour days I spent at work during the first week of January?
No, just lack of willpower to force myself to go to sleep (or wake up) early
instead of, for example, blogging.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2cd7915426b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2cd7915426b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>5 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2cd7915426b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2cd7915426b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:40 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2cd7915426b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>Random hackery</title>
            <link>http://mg.pov.lt/blog/random-hackery</link>
            <description><![CDATA[

<p>We finished a rather major restructuring of the internals of a system last
week at work.  I finally got to experimentally test Martin Fowler's <a
href="http://refactoring.com/">refactoring</a> techniques (small steps) on a
big change.  It was fun and I tended to stay late at work because I wanted to
finish what I was working on.  I missed that feeling.  Oh, and Subversion is
good, but merging is a big inconvenience.</p>

<p>During nights I worked on <a
href="http://mg.pov.lt/pyspacewar">PySpaceWar</a>: added sound effects, support
for background music (but didn't look for freely redistributable soundtracks
yet), some visual effects, some more configuration options.  And once again
playing the game became more interesting than coding it.  I can beat the
computer with 100 kills to its 50-60.  I should release a new version soon.</p>

<p>Today I discovered the cause of a long-standing problem of random reboots
of my Nokia 770.  Turns out FBReader leaks file descriptors, and once the
system runs out, some important process crashes and the device reboots.  A
patch and a fixed .deb are on <a href="http://mg.pov.lt/fbreader">my FBReader
page</a> (of course I also sent the patch upstream).</p>

<p>Meanwhile Nokia released the <a
href="http://europe.nokia.com/link?cid=PLAIN_TEXT_81177">N800</a>.  *drool*.
Twice as much RAM, twice as much "disk" space (flash memory, actually), faster
CPU, two full-size SD slots, interesting software updates.  I want one, but
since Nokia only sells them in a few countries, I'll probably have to wait
until somebody I know can bring one to me.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2c38927026b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2c38927026b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2c38927026b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2c38927026b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:39 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2c38927026b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>Nokia 770 + USB power injector</title>
            <link>http://mg.pov.lt/blog/n770-usb-power</link>
            <description><![CDATA[

<p>A coworker made me a <a
href="http://thoughtfix.blogspot.com/2006/01/usb-power-injector-2.html">USB
power injector</a> for my Nokia 770 (I'm useless with a soldering iron).
Here it is in all its glory, next to the tiny USB keyboard I plan to use it
with:</p>

<p style="text-align: center">
  <a href="http://mg.pov.lt/n770-usb-power.jpg"><img
       src="http://mg.pov.lt/n770-usb-power-small.jpg" width="443"
       height="197" alt="Nokia 770, tiny USB keyboard, USB power injector"
       style="padding: 1ex; border: 1px solid #eee" /></a></p>

<p>Five days later I discover that it doesn't work any more.  Actually, it
works, but the battery is dead.  I left the battery connected to the voltage
regulator, and that was enough to drain it.</p>

<p>Wikipedia says that carbon-zinc <a
 href="http://en.wikipedia.org/wiki/PP3_battery">9V batteries</a> have a
typical capacity of 400 mAh.  ThoughtFix <a
href="http://thoughtfix.blogspot.com/2006/01/usb-power-injector-2.html">measured</a>
the circuit power readings at 4.62 mA with both USB ports disconnected.
That's enough to drain a 400 mAh battery in 86 hours or 3.6 days.  And here
I thought it would last for months...</p>

<p>Time to buy a new battery.  And this time I'll keep it disconnected when I'm
not using it.</p>
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=2b5bc66a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/2b5bc66a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>6 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=2b5bc66a26b911dfa80457a3be71d350d350&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/2b5bc66a26b911dfa80457a3be71d350d350/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Wed, 03 Mar 2010 11:37:38 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-2b5bc66a26b911dfa80457a3be71d350d350</guid>
        </item>
        <item>
            <title>Maemo Summit 2009</title>
            <link>http://mg.pov.lt/blog/maemo-summit-2009</link>
            <description><![CDATA[

<p>The second <a
  href="http://wiki.maemo.org/Maemo_Summit_2009">Maemo Summit</a> is over.</p>

<p>Nokia surprised everyone on the first day by handing out 300 pre-release <a
  href="http://maemo.nokia.com/n900/">N900</a>s to the participants.  I'm so
happy now that after a long period of wavering I finally decided to come to the
summit!  The device is much better than I expected/feared (and I haven't even
put a SIM card in yet).  We're supposed to provide feedback and will have to
send the devices back to Nokia in 6 months.
(Nokia insisted on loan contracts <span
  style="text-decoration: line-through">signed in blood</span>, kidding, but
there are contracts.)</p>

<p>The tiny pixels are beautiful.  It's what, 266 pixels per inch?  Even older
225 dpi devices spoiled me: both the first generation iPhone and the first
generation Kindle displays seemed very coarse and pixellated.</p>

<p>The user interface is very smooth.  Having a composition manager improves
apparent responsiveness: even if the app is swapped out and not ready to
redraw, switching between windows appears to be instant since the picture is
cached.  And there's no flicker while the apps are redrawing.  (Flickering
during redraw is one of the main reasons I did not buy a S60 phone and stayed
with good old S40.)  Speaking of swapping, it's barely noticeable.  You can run
more apps than fit in RAM without having to suffer.  The flash memory is
noticeably faster than in a N810.  And there's more of it (32 gigs: 28 gig
partition for user data, the rest for the system: swap, applications, config
files, etc.)</p>

<p>The design and usability of the user interface have improved a lot since the
N810.  The UI is pretty.  Many of the apps are now convenient to use.
Pervasive kinetic scrolling is sweet (except when you have really long lists or
web pages, then it takes <em>forever</em> to reach the end).</p>

<p>Finally there are PIM-y things people missed in older Maemo releases:
calendaring, contacts that can record all kinds of information (such as phone
numbers).</p>

<p>All right, enough gushing.  There were some irritating things too.  For
example, Bluetooth support is buggy/incomplete in the pre-release firmware, so
it's hard to transfer files.  Calendar/contacts sync with S40 phones does not
work either.  GPS is utterly useless when you're offline (no maps, or at least
I haven't found a way to pre-download and cache them; also very long fix times
without network assistance).  Since I have no desire to pay extortionist
roaming charges of my provider (2.5 EUR per megabyte), and haven't had a chance
to go look for a prepaid SIM card, I usually have either WiFi or GPS coverage,
but not both.</p>

<p>As you can guess, playing the device diverted a part of my attention from
the presentations somewhat.  I tried to compensate for that by reporting
on the talks on IRC (using xchat on the device).  I think the strategy
backfired; IRC is rather disruptive and the channel is quite busy lately.</p>

<!-- bonus reading material that doesn't fit with the rest of the post:

On the second day I mostly followed talks about the Maemo 5 UI
(design principles, widgets etc.) and mostly ignored talks about the upcoming
Maemo 6 UI (multitouch, OpenGL acceleration plus animations at widget rather
than window level, flowable layouts supporting both portrait and landscape,
built on top of Qt instead of Gtk+/Clutter, inventing new UI paradigms instead
of copying what came before).  I think my interest in Maemo 6/UI will spike
when I get my hands on a Maemo 6 device, which definitely won't happen any time
soon.

-->
<span class="net_nemein_favourites">16 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=a7f07702b6b611deb8974954f0c79c569c56&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/a7f07702b6b611deb8974954f0c79c569c56/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=a7f07702b6b611deb8974954f0c79c569c56&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/a7f07702b6b611deb8974954f0c79c569c56/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Sun, 11 Oct 2009 22:37:23 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-a7f07702b6b611deb8974954f0c79c569c56</guid>
        </item>
        <item>
            <title>Maemo Summit 2009</title>
            <link>https://mg.pov.lt/blog/maemo-summit-2009.html</link>
            <description><![CDATA[

<p>The second <a
  href="http://wiki.maemo.org/Maemo_Summit_2009">Maemo Summit</a> is over.</p>

<p>Nokia surprised everyone on the first day by handing out 300 pre-release <a
  href="http://maemo.nokia.com/n900/">N900</a>s to the participants.  I'm so
happy now that after a long period of wavering I finally decided to come to the
summit!  The device is much better than I expected/feared (and I haven't even
put a SIM card in yet).  We're supposed to provide feedback and will have to
send the devices back to Nokia in 6 months.
(Nokia insisted on loan contracts <span
  style="text-decoration: line-through">signed in blood</span>, kidding, but
there are contracts.)</p>

<p>The tiny pixels are beautiful.  It's what, 266 pixels per inch?  Even older
225 dpi devices spoiled me: both the first generation iPhone and the first
generation Kindle displays seemed very coarse and pixellated.</p>

<p>The user interface is very smooth.  Having a composition manager improves
apparent responsiveness: even if the app is swapped out and not ready to
redraw, switching between windows appears to be instant since the picture is
cached.  And there's no flicker while the apps are redrawing.  (Flickering
during redraw is one of the main reasons I did not buy a S60 phone and stayed
with good old S40.)  Speaking of swapping, it's barely noticeable.  You can run
more apps than fit in RAM without having to suffer.  The flash memory is
noticeably faster than in a N810.  And there's more of it (32 gigs: 28 gig
partition for user data, the rest for the system: swap, applications, config
files, etc.)</p>

<p>The design and usability of the user interface have improved a lot since the
N810.  The UI is pretty.  Many of the apps are now convenient to use.
Pervasive kinetic scrolling is sweet (except when you have really long lists or
web pages, then it takes <em>forever</em> to reach the end).</p>

<p>Finally there are PIM-y things people missed in older Maemo releases:
calendaring, contacts that can record all kinds of information (such as phone
numbers).</p>

<p>All right, enough gushing.  There were some irritating things too.  For
example, Bluetooth support is buggy/incomplete in the pre-release firmware, so
it's hard to transfer files.  Calendar/contacts sync with S40 phones does not
work either.  GPS is utterly useless when you're offline (no maps, or at least
I haven't found a way to pre-download and cache them; also very long fix times
without network assistance).  Since I have no desire to pay extortionist
roaming charges of my provider (2.5 EUR per megabyte), and haven't had a chance
to go look for a prepaid SIM card, I usually have either WiFi or GPS coverage,
but not both.</p>

<p>As you can guess, playing the device diverted a part of my attention from
the presentations somewhat.  I tried to compensate for that by reporting
on the talks on IRC (using xchat on the device).  I think the strategy
backfired; IRC is rather disruptive and the channel is quite busy lately.</p>

<!-- bonus reading material that doesn't fit with the rest of the post:

On the second day I mostly followed talks about the Maemo 5 UI
(design principles, widgets etc.) and mostly ignored talks about the upcoming
Maemo 6 UI (multitouch, OpenGL acceleration plus animations at widget rather
than window level, flowable layouts supporting both portrait and landscape,
built on top of Qt instead of Gtk+/Clutter, inventing new UI paradigms instead
of copying what came before).  I think my interest in Maemo 6/UI will spike
when I get my hands on a Maemo 6 device, which definitely won't happen any time
soon.

-->
<span class="net_nemein_favourites">0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=fav&net_nemein_favourites_execute_for=1ea9c558d7e60ba9c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/fav/midgard_article/1ea9c558d7e60ba9c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-favorite.png" style="border: none;" alt="Add to favourites" title="Add to favourites" /></a>0 <a href="http://maemo.org/news/?net_nemein_favourites_execute=bury&net_nemein_favourites_execute_for=1ea9c558d7e60ba9c5511eaac0fff74778ae39ce39c&net_nemein_favourites_url=https://maemo.org/news/favorites//json/bury/midgard_article/1ea9c558d7e60ba9c5511eaac0fff74778ae39ce39c/" class="net_nemein_favourites_create"><img src="http://static.maemo.org:81/net.nemein.favourites/not-buried.png" style="border: none;" alt="Bury" title="Bury" /></a></span>]]></description>
            <author>Marius Gedminas &lt;marius@gedmin.as&gt;</author>
            <category>feed:2ab7df3bd50c3ff3965ec8d25aee2167</category>
            <pubDate>Sun, 11 Oct 2009 22:22:28 +0000</pubDate>
            <guid>http://maemo.org/midcom-permalink-1ea9c558d7e60ba9c5511eaac0fff74778ae39ce39c</guid>
        </item>
    </channel>
</rss>
