Stoppt die Vorratsdatenspeicherung! Jetzt klicken &handeln! Willst du auch an der Aktion teilnehmen? Hier findest du alle relevanten Infos und Materialien:
Jump to menu and information about this site.

Thursday·23·April·2009

Screen and Emacsclient: Automatically switching to the Emacs window //at 18:41 //by abe

from the desktop-comfort-in-text-mode dept.

For a very long time, I use mutt with emacsclient as configured editor and a single GNU Emacs instance started from either .screenrc or .Xsession, depending on the system. And I’m very used to switching the virtual desktop or the screen window after starting a mail in mutt.

Since Debian 5.0 Lenny and Emacs 22, Emacs automatically grabs the focus and switches to the right virtual desktop. So after telling mutt recipient and subject of a new e-mail, it invokes emacsclient and immediately the focus has moved to the running Emacs instance. Because I was used to switch one virtual desktop to the right at that point, I often found my self two desktops to the right until I got used to it. :-)

I usually hate applications which grab the focus without being asked. But in this case I basically asked for it. And there’s no delay like with starting up an application which has to read in some database first – think of Liferea or Rhythmbox which take many seconds to minutes to start up, even on my 2.2 GHz dual core ThinkPad.

In the meanwhile I got so used to that automatic desktop switch that I forget to switch the screen window in the second scenario where I use this combination: My screen doesn’t automatically switch to the Emacs window (window 1) after I told mutt recepient and subject in window 2.

Knowing that screen is quite scriptable, I found out that only a very small change is needed to my mutt configuration to get that desktop feature to my everyday screen session. I simply replaced the editor setting in my .muttrc with the following line:

set editor="screen -X select 1;emacsclient"

Now mutt tells screen to switch to window 1 (where Emacs is running) and then tells Emacs to open the appropriate file to edit my new mail.

Update Friday, 2009-04-24, 18:22

Even though Zack surely is right with his comment about the multi-terminal feature of the upcoming GNU Emacs 23, I still have Etch (and therefore GNU Emacs 21) on the server where I have my screen session.

So the next step was to switch back to the mutt window (window 2) after I’m finished with editing the mail. Since mutt gives the the file to edit as argument to the contents of $editor, simply adding ;screen -X select 2 at the end of $editor doesn’t suffice.

So I wrote a small shell script (named ~/.mutt/editor.sh) as wrapper which calls all the commands and passes the parameters to the right command:

#!/bin/sh

screen -X select 1
emacsclient -a ~/.mutt/alteditor.sh "$@"
screen -X select 2

Of course, $editor is now set to that script:

set editor="/home/abe/.mutt/editor.sh"

Emacsclient of GNU Emacs 21 already supports the -a option to call another editor in case of not being able to connect to a running Emacs instance. Since I don’t want to switch to another screen window in that case, I wrote a second shell script (named ~/.mutt/alteditor.sh) which switches back to the mutt window and then calls GNU Zile, my preferred low-end emacs clone:

#!/bin/sh

screen -X select 2
zile "$@"
screen -X select 1

I love it!

Filed under: Blogging is futile » English » Computer » Shell » Screen%20and%20Emacsclient:%20Automatically%20switching%20to%20the%20Emacs%20window
Tagged as: , , , , , , , , , , , , , ,
1 comment // show without comments // write a comment //

Wednesday·15·April·2009

Useless Statistics, the 2nd //at 18:05 //by abe

from the surprises dept.

Myon recently posted a nice statistic about popular single letter package name prefixes. Just out of curiosity I started wondering about popular single letter package name suffixes:

On a machine with Debian oldstable, stable, testing, unstable and experimental in its sources.list, I ran the following command:

$ apt-cache search -n . | \
    awk '{print $1}' | \
    sed -e 's/.$//' | \
    sort | \
    uniq -c | \
    sort -n

And to my surprise there is a non-obvious winner:

$ apt-cache search -n '^gp.$'
gpa - GNU Privacy Assistant
gpc - The GNU Pascal compiler
gpe - The G Palmtop Environment (GPE) metapackage
gpm - General Purpose Mouse interface
gpp - a general-purpose preprocessor with customizable syntax
gpr - GUI for lpr: print files and configure printer-specific options
gps - Graphical Process Statistics using GTK+
gpt - G-Portugol is a portuguese structured programming language
gpw - Trigraph Password Generator

But since I searched through the binary packages many other hits are more obvious, like the seven packages hbf-cns40-1 to hbf-cns40-7:

      [...]
      4 ar
      4 aspell-f
      4 automake1.
      4 cpp-4.
      4 e
      4 g++-4.
      4 gappletviewer-4.
      4 gcc-4.
      4 gcj-4.
      4 gcompris-sound-e
      4 gfortran-4.
      4 gij-4.
      4 go
      4 gobjc-4.
      4 gobjc++-4.
      4 h
      4 iceweasel-l10n-e
      4 iceweasel-l10n-k
      4 kde-i18n-f
      4 kde-i18n-h
      4 kde-l10n-e
      4 kde-l10n-s
      4 kile-i18n-e
      4 koffice-i18n-e
      4 koffice-i18n-s
      4 koffice-l10n-e
      4 koffice-l10n-f
      4 libqbanking
      4 myspell-f
      4 myspell-h
      4 openoffice.org-help-e
      4 openoffice.org-l10n-b
      4 openoffice.org-l10n-h
      4 openoffice.org-l10n-k
      4 sd
      4 tcl8.
      4 tk8.
      5 aspell-e
      5 aspell-h
      5 iceweasel-l10n-s
      5 kde-i18n-b
      5 kde-i18n-e
      5 kde-i18n-t
      5 kde-l10n-k
      5 openoffice.org-l10n-e
      5 openoffice.org-l10n-t
      5 pa
      5 tc
      6 gc
      6 kde-i18n-s
      6 libdb4.
      6 m
      6 openoffice.org-l10n-n
      6 openoffice.org-l10n-s
      6 s
      7 hbf-cns40-
      9 gp

But there are also some other interesting observations to make:

  • OpenOffice.org seems to have by far the biggest number of localisations, with KDE being 2nd.
  • There are 6 version of the Berkeley DB in Debian: libdb4.2 to libdb4.7 (including oldstable as mentioned above)

I leave it as an exercise to the reader to find the full names of the other package names starting with s, m, gc, pa or tc and having just one additional character. ;-)

Filed under: Blogging is futile » English » Computer » Debian » Useless%20Statistics%2C%20the%202nd
Tagged as: , , , , , , , , , , ,
0 comments // show without comments // write a comment //

Sunday·08·March·2009

How to make identi.ca talk //at 04:50 //by abe

from the microblogging-to-speech dept.

The listeners of yesterday’s episode of Venty’s Hackerfunk radio show on Radio LoRa already know and heard it: We made identi.ca talk. And we did it with help of other microbloggers. (The podcast version of this Hackerfunk episode will be online in a few days, too. Will link it here and either Venty or me will post it on identi.ca, too, as soon as it’s published.)

A few weeks ago we thought about how we could “show” microblogging on the radio. With identi.ca’s Jabber (XMPP) interface we have real time access, and so the idea was born to pipe all incoming ‘dents into a speech synthesis system.

Then we tried to figure out which tools would be appropriate. Quite fast, people on identi.ca as well as on the LUGS IRC (e.g. bones0) pointed us to festival and espeak. We found no support for German in festival, so we went for espeak – although festival would have had the advantage of the existence of a festival plugin for the popular multiprotocol messenger Pidgin.

Next step was more difficult than expected: How to make a “tail -f” of XMPP incoming messages? Something like rsstail, just for XMPP. Although using the IM to IRC gateway Bitlbee (as I use it myself) and using “tail -f” (or better “inotail -f”) on the IRC client’s log file (ii comes to my mind for such purposes) would have been an option, nobody had the idea at that time.

And since @deepspawn conjured xmpptail in less than two hours we happily took it. xmpptail (tar.gz) is written in Python and uses Twisted Words (Debian package python-twisted-words) as XMPP libraries.

I had to patch xmpptail slightly for unbuffered I/O, Unicode support and for removing things we don’t want to hear on the radio as follows, but it worked more or less out of the box.

--- xmmptail.py 2009-02-25 20:47:48.000000000 +0100
+++ xmpptail.py 2009-03-07 18:48:57.000000000 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python -u
 # -*- coding: utf-8 -*-
 # author: Carlos A. Perilla 
 # This file is part of Jance bot.
@@ -65,7 +65,8 @@
          body = unicode(e.__str__())
          break
 
-    print("%s: %s" % (from_id,body))
+#    print("%s: %s" % (from_id,body))
+    print("%s" % (body.encode('utf-8')))
 
 
 def authfailedEvent(xmlstream):
@@ -80,9 +81,9 @@
   dprint('Got something: %s -> %s' % (el.name, str(el.attributes)))
 
 if __name__ == '__main__':
-    print "Starting"
+    #print "Starting"
     execfile('tailconf')
-    print USER_HANDLE
+    #print USER_HANDLE
     me = USER_HANDLE + "/xmpptail"
     myJid = jid.JID(me)
     server = USER_HANDLE[USER_HANDLE.find('@')+1:]

So after configuring xmpptail to use the hackerfunk Jabber account, we successfully ran the following script during the radio show:

./xmpptail.py | while read LINE; do
        if [ "$LINE" = "empty" ]; then
                continue;
        fi;
        echo $LINE
        echo $LINE | tee -a xmpp-espeak.log | espeak --stdin -v de;
done

At the end of the show, @rebugger found this howto which describes very detailed how to get festival working together with the non-free (“non-free” as in DFSG) MBROLA project which offers also the appropriate files for German. But because of how much work this would be to get it running, I currently prefer to stay with espeak for German speech synthesis .

Next step would be to use mnoGosearch’s mguesser to detect the language of a dent and run espeak (or whatever text-to-speech system is appropriate for the guessed language) with the appropiate options for that language, because otherwise many ‘dents sound really funny. ;-)

Update, 15:02: Venty gave the whole system the name “Identibla”.

Filed under: Blogging is futile » English » Computer » How%20to%20make%20identi.ca%20talk
Tagged as: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
0 comments // show without comments // write a comment //

Saturday·07·March·2009

Musikalisches-Podcast-Stöckchen //at 16:15 //by abe

Aus der Hackerfunk-und-die-Stöckchen Abteilung

Ist schon heftig, da bekommt ein Stöckchen von einem Podcast, obwohl man gar kein Podcasts hört – nur halt ab und an in einer Radiosendung auftaucht, die’s auch als Podcast gibt.

Und vorallem, wie verlinkt man solche Stöckchen? Ich klau mal die ausformulierten Regeln mal hier, das war in der Kette (AscariTomInMucPodshotsVentys HackerfunkBones0 seinem Chabis Podcast → hierher) grade greifbar.

Also hier die Regeln: “Suche das sechste Lied im sechsten Ordner heraus. Alternativ darf es auch das sechste Lied der sechsten CD im Regal oder das sechste Lied der Playlist sein.”

Da Ordner bei mir je nach Lust und Laune eine unterschiedliche Sortierung haben können, ist der sechste Ordner witzlos. Da gespielte Songs bei Rythmbox aus der Playlist rausfliegen, hat sich der sechste Song seit ich angefangen habe, diesen Text zu schreiben, mehrmals geändert. Also zum CD-Regal. Da sind grade viele CDs zweckswegen Sicherheitskopien grade nicht drin. In der ersten Spalte ist das sechste Fach leer und wenn mal die Fächer von rechts nach links und dann erst die nächste Reihe zählt, dann kommt — nee, das will man nicht, das sind Jugendsünden. ;-) Also nehmen wir in der ersten Spalte einfach die sechste CD und dort den sechsten Track:

Royal Philharmonic Orchestra London — Yesterday

Also der Beatles-Klassiker “Yesterday” als Instrumental.

Wer den Song hören will, der sollte heute um 19 Uhr auf Radio LoRa den Hackerfunk einschalten. Venty wird den Track dort spielen. Aus dem Hackerfunk-Podcast wird der Song aufgrund der Halsabschneiderei der Musikindustrie leider rausgeschnippelt werden.

Achja, in der heutigen Folge des Hackerfunks wird es um Microblogging gehen. Und ich bin, wenn auch noch durch Erkältung etwas der Stimme beraubt, ebenfalls mit von der Partie.

Und wer ist als nächstes dran? Venty meinte vorhin auf #lugs so praktisch, daß Priska ja Stöckchenspezialistin sei, also geben wir das Stöckchen mal dorthin weiter. :-)

Now playing: Herbert Grönemeyer — Bleibt alles anders

Filed under: Blogging is futile » Deutsch » Musik » Musikalisches-Podcast-St%F6ckchen
Tagged as: , , , , , , , , , ,
0 comments // show without comments // write a comment //

Monday·02·February·2009

Daily Snapshot .debs of Conkeror //at 01:58 //by abe

from the development-tracking-using-APT dept.

Keeping track with packaging software which is under heavy development can be time-consuming. I noticed this while packaging Conkeror, because there was quite a demand for up-to-date packages, especially from upstream themself.

So recently on the IRC channel #conkeror the idea of automatically built Debian packages came up. After a few hours of experimenting and a few days of steadily optimizing, I can proudly present daily built snapshot packages of Conkeror for currently Lenny and Sid, ready to be included in your sources.list:

deb     http://noone.org/conkeror-nightly-debs lenny main
deb-src http://noone.org/conkeror-nightly-debs lenny main

deb     http://noone.org/conkeror-nightly-debs sid main
deb-src http://noone.org/conkeror-nightly-debs sid main

The binary package conkeror-spawn-process-helper is currently only built for the i386 architecture, but other architectures may follow.

The packages probably work also on any other Debian based distribution (e.g. Ubuntu) which includes XULRunner version 1.9.

Surely they are not of the usual Debian quality, but they should do it for staying up-to-date with the Conkeror development just by using your favourite APT frontend.

The script which generates those packages is also available in the Conkeror git repository at repo.or.cz.

The APTable archive is generated with reprepro. Packages and the repository are signed with the passphrase-less GnuPG key 373B76B4 which is used only for the Conkeror nightly builds. (If anyone knows a better solution for automatic builds than a passphrase-less key, please tell me. :-)

P.S.: I really like the new keybindings “<<”, “>>” and “G”. :-)

Filed under: Blogging is futile » English » Computer » Web » Browsers » Daily%20Snapshot%20.debs%20of%20Conkeror
Tagged as: , , , , , , , , , , , , , , , , , , , , , , ,
2 comments // show without comments // write a comment //

Friday·23·January·2009

MBC09: The Day Before //at 08:39 //by abe

from the DB-sucks dept.

Helped my parents moving the first half of the week. Left there at Thurdays around 9am. Drove 45min to Zurich. Removed everything bicycle related from my daypack. Left the TomTom at home. (Google Maps on the E51 has to sufficed and sufficed so far.) Crammed cloths for three days in.

Was at Zurich Main Station around 11:40am. My plan was to take the direct ICE train from Zurich to Hamburg Dammtor. Bought a Rivella for the journey.

First suprise at the platform: No ICE train. Instead a Swiss InterCity. The staff told us due to a defect in the ICE train, we have to go to Basel SBB with this train, then switch trains there. No carriage numbers and reservations valid here. Hrmpf. For luck, there where not that many people in the train. No power sockets though.

Next surprise at Basel SBB: No ICE train here either. We’re advised to switch to a German InterCity and then switch again a few kilometers later at Basel Badischer Bahnhof (aka “Basel, German Station”).

There then finally waited an ICE labelled as the initially expected ICE 72 from Zurich to Hamburg Altona. Even the reservations were displayed, departure was though 20min later than the original ICE 72.

The voice from the speakers told us that this is a replacement train which came empty from Zurich. WTF? The next time the voice explained the situation, it was a replacement train coming from Interlaken… Ok, DB is not as insane as I believed for about half an hour. ;-)

Worked though the git tutorial and the git glossary on the train since in future I’ll use git in some of the OSS project I’m working together with — Conkeror beyond others. Also had a conversation with some doctor from University Hospital Zurich who has chasing as hobby. (WTF?)

The train arrived about 45 minutes late at Dammtor, so I first checked in in my hotel (“Hotel am Dammtor”, very close to the MBC09 venue) and then walked to Hamburger Botschaft where the twitter reading was already running, hoping to meet someone I know and having dinner afterwards. Guided by Google Maps on my Nokia E51 it took longer than expected to walk there. And it was windy and raining.

The twitter reading venue was quite full, but I still found a place where I saw most of the screen. At least the reminder of reading was quite funny: #famouslasttweets. They closed with a tweet similar to “And then there’s also identi.ca”. :-)

I was told it wasn’t that funny at the beginning. Didn’t find anyone I really knew, just sticked to a group talking about being hungry. When we met @igorette on our way to some restaurant and he recognised me, I found out that @muhh was also in the group I’m heading though Hamburg.

We had a nice dinner at Schmitt Foxyfood, I had GrillGold (Pommes Frites) with WuchtBrumme (Currywurst) and Fritz Cola.

After dinner, @moeffju drove me and some other guy to our hotels.

So the first evening was already very interesting despite the usual lateness of Deutsche Bahn.

Filed under: Blogging is futile » English » Computer » Events » MBC09:%20The%20Day%20Before
Tagged as: , , , , , , , , , , , , , , , , , ,
0 comments // show without comments // write a comment //

Wednesday·21·January·2009

Tablet Amora runs on the OpenMoko FreeRunner (updated) //at 19:36 //by abe

from the PoC-packaging-for-PoC-software dept.

Amora (“A MObile Remote Assistant”) is a client/server suite which allows you to remote control an X desktop using a bluetooth enabled mobile phone. Initially there was only a Symbian client (running e.g. on nearly all Nokia E and N series phones), but J2ME clients are under developement, too.

Then there is Tablet Amora (aka Tamora), an Amora “proof of concept” client for the Maemo platform which runs on internet tablets like e.g. the linux based Nokia N770, N800, and N810. Since Maemo isn’t that far away from what runs on the OpenMoko, getting Tamora working on the OpenMoko, too, suggested itself.

Maemo seems to use the deb package format, too, just slightly extended (e.g. by package icons), so it wasn’t even that hard work to adapt the existing Maemo packaging to build, install and run on Debian, too.

So that’s how Tamora looks on the OpenMoko:

The packaging is still far away from Debian standards (throws tons of lintian warnings and the source package generation is b0rked), so yet there are no prebuilt debs available, but you can checkout amora-client from the Subversion repository and build the package from there:

 $ svn checkout http://amora.googlecode.com/svn/trunk/amora-client/maemo/ amora-client
 $ cd amora-client
 $ debuild -uc -us
 $ cd ..
 # dpkg -i amora-client_0.1-2maemo+openmoko_all.deb

For running and installing tamora you need packages from the pkg-fso APT repository on alioth. And to build it, you need the libedje-bin which is available from the pkg-fso repository for at least the armel architecture, or else from Debian experimental. You can add these repositories to your sources.list as follows:

 # PKG FSO repository
 deb     http://pkg-fso.alioth.debian.org/debian unstable main
 deb-src http://pkg-fso.alioth.debian.org/debian unstable main

 # Debian Experimental
 deb     http://ftp.ch.debian.org/debian experimental main
 deb-src http://ftp.ch.debian.org/debian experimental main

Since Tamora is yet only a “proof of concept” client, currently only the following remote functions are available:

  • pressing arrow key right/left
  • pressing F5 (fullscreen for the OpenOffice.org Presenter)

This should though at least suffice for a presentation with the OpenOffice.org Presenter.

To use Tamora to remote control your Debian laptop, you need a bluetooth dongle (or builtin bluetooth support) and amora-server installed as with the Symbian S60 (3rd Edition) Amora client, too.

Update, 23:51

libedje-bin seem not available in the pkg-fso repository for every architecture. You’ll also find it in Debian experimental. Updated the sources.list section above appropriately. Thanks to Sebastian Montini for pointing out this problem.

Filed under: Blogging is futile » English » Computer » Debian » Tablet%20Amora%20runs%20on%20the%20OpenMoko%20FreeRunner
Tagged as: , , , , , , , , , , , , , , , , , , , , , ,
0 comments // show without comments // write a comment //

Tag Cloud

2CV, Automobiles, Berlin, bijou, Blogging, Blosxom, Blosxom Plugin, Browser, BSD, CDU, Chemnitz, Citroën, CLT, Conkeror, CX, Debian, Doofe Parteien, eBay, EeePC, Emacs, Epiphany, Etch, ETH Zürich, Events, Firefox, Fläsch, FreeBSD, Galeon, Gecko, GNOME, Google, GPL, Hacks, Hardware, hardware, Heise, identi.ca, IRC, Jabber, JavaShit, Kazehakase, Lenny, Linux, LinuxTag, LUGS, Lynx, maol, Meme, Microsoft, Mozilla, Music, mutt, München, Nokia, Open Source, Opera, Pentium I, Perl, Planet Debian, Planet Symlink, Quiz, Rant, ratpoison, Religion, RIP, Sarcasm, Sarge, Schweiz, screen, Shell, Sid, Spam, Stöckchen, SuSE, Symlink, Symlink-Artikel, Tagging, Talk, taz, Text Mode, ThinkPad, Ubuntu, USA, USB, VCFe, Ventilator, Vintage, Wahlen, Wikipedia, Windows, WML, Woody, WTF, X, Zürich

Calendar

 2009 →
Months
JulAug Sep Oct Nov Dec
 July →
Mo Tu We Th Fr Sa Su
    4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Tattletale Statistics

Blog postings by posting time
Blog posting times this month



Search


Advanced Search


Categories


Recent Postings

13 most recent of 192 postings total shown.


Recent Comments


AideRSS Top 10


Hackergotchi of Axel Beckert

About...

This is the blog or weblog of Axel Stefan Beckert (aka abe or XTaran) who thought, he would never start blogging... (He also once thought, that there is no reason to switch to this new ugly Netscape thing because Mosaïc works fine. That was about 1996.) Well, times change...

He was born 1975 at Villingen-Schwenningen, made his Abitur at Schwäbisch Hall, studied Computer Science with minor Biology at University of Saarland at Saarbrücken (Germany) and now lives in Zürich (Switzerland), working at the IT Support Group (ISG) of the Departement of Physics at ETH Zurich.

Links to internal pages are orange, links to related pages are blue, links to external resources are green and links to Wikipedia articles, Internet Movie Database (IMDb) entries or similar resources are bordeaux. Times are CET respective CEST (which means GMT +0100 respective +0200).


RSS Feeds


Identity Archipelago


Picture Gallery


Button Futility

Valid XHTML Valid CSS
Valid RSS Any Browser
PageRanker.org PageRanker.org
Free Google Page Rank Checker (that either doesn't work at the moment or you don't see images in general, if you see this. ;-) GeoURL
This content is licensed under a Creative Commons License (SA 3.0 DE). Some rights reserved. Hacker Emblem
Get Mozilla Firefox! Powered by Linux!
Typed with GNU Emacs Listed at Tux Mobil
XFN Friendly Button Maker
Weblog counter Blogstats

Blogroll

Blog or not?


People I know personally


Other blogs I like or read


Independent News


Interesting Planets


Web comics I like and read

Stalled Web comics I liked


Blogging Software

Blosxom Plugins I use

Bedside Reading

Just read

  • Bastian Sick: Der Dativ ist dem Genitiv sein Tod (Teile 1-3)
  • Neil Gaiman and Terry Pratchett: Good Omens (borrowed from Ermel)

Currently Reading

  • Douglas R. Hofstadter: Gödel, Escher, Bach
  • Neil Gaiman: Keine Panik (borrowed from Ermel)

Yet to read

  • Neil Stephenson: Cryptonomicon (borrowed from Ermel)

Always a good snack

  • Wolfgang Stoffels: Lokomotivbau und Dampftechnik (borrowed from Ermel)
  • Beverly Cole: Trains — The Early Years (getty images)

Postponed

Technorati


Lijit