Search Results: "joachim"

6 January 2010

Christine Spang: configuring Gnome screensaver for unicode-screensaver

I love unicode. You should too. For the unicode-lover out there, Joachim Breitner recently created an xscreensaver hack called unicode and uploaded it to debian. [1] I didn't like the default colourscheme of black text on a white background, so I hacked it to support colour configurability. The patches are in the Debian package as of version 0.2-1. If you're using xscreensaver, you can configure it using the xscreensaver configuration dialog for a subset of the available colours. If you want different colours, you can edit ~/.xscreensaver by hand. Gnome screensaver, however, does not have a configuration UI, opting instead to present a simpler interface and also allow administrators to lock down the screensaver configuration if desired. You can still configure the screensaver on unlocked systems without a GUI. Here's how to do it. [2] At a terminal:
mkdir -p .local/share/applications/screensavers
cp /usr/share/applications/screensavers/unicode.desktop .local/share/applications/screensavers
editor .local/share/applications/screensavers
There's an Exec line in the file that should look like this:
Exec=/usr/lib/xscreensaver/unicode -root
Change it to look like this:
Exec=/usr/lib/xscreensaver/unicode -root -background <bgcolor> -foreground <fontcolor>
Swap the two colours with any X11 colour of your choice. Make sure to quote any multiple-word colour names. I like black as a background, with white or firebrick or another non-jarring bright colour as the font colour. If you want, you can also change the "Name" field in the file, but it's not necessary for things to work. Now, open up gnome-screensaver-preferences and select the new screensaver. U+2673: RECYCLING SYMBOL FOR TYPE-1 PLASTICS Lastly, leave your laptop strategically with the screensaver on to geek out all your friends with your unicode prowess. [1] Thanks Joachim! [2] There is actually another way to do it, if you prefer to interact graphically. For the other method, get /usr/share/applications/screensavers/unicode.desktop, edit it to your taste, and then drag-and-drop it onto gnome-screensaver-preferences, which will automatically put it in the right place in .local. You may need to restart gnome-screensaver preferences in order to see the new screensaver in the selection box. The feedback isn't very good.

25 December 2009

Joachim Breitner: Building arbtt for Windows

A friend of mine is interested in trying out the Automatic Rule Based Time-Tracker arbtt which I programmed. Unfortunately, he is using Windows and up to now, arbtt only worked on Linux. But as I wanted to check out Haskell s cross-platform abilities for a while, this was a good opportunity to do so. I don t have Windows installed myself (and did not plan to do so), so I did all this under WINE, the Windows compatibility layer, which works very well: It takes only a few minutes to install the Haskell Platform for Windows and then I was able to run wine ghc --make and cabal install. I played around with some simple programs and was surprised by these timings:
$ rm *.o *.hi; ghc --make fourfours.hs ; time ./fourfours > /dev/null
[1 of 1] Compiling Main             ( fourfours.hs, fourfours.o )
Linking fourfours ...
real	0m1.909s
user	0m1.692s
sys	0m0.208s
$ rm *.o *.hi; wine ghc --make fourfours.hs ; time wine ./fourfours.exe > /dev/null
[1 of 1] Compiling Main             ( fourfours.hs, fourfours.o )
Linking fourfours.exe ...
real	0m1.631s
user	0m1.376s
sys	0m0.092s
So it is faster to run a compiled Haskell program on top of a compatibility layer than directly on Linux! The world is in order again, though, if optimization is enabled:
$ rm *.o *.hi; ghc -O --make fourfours.hs ; time ./fourfours > /dev/null
[1 of 1] Compiling Main             ( fourfours.hs, fourfours.o )
Linking fourfours ...
real	0m0.981s
user	0m0.876s
sys	0m0.108s
$ rm *.o *.hi; wine ghc -O --make fourfours.hs ; time wine ./fourfours.exe > /dev/null
[1 of 1] Compiling Main             ( fourfours.hs, fourfours.o )
Linking fourfours.exe ...
real	0m1.270s
user	0m1.036s
sys	0m0.072s
Funny. Anyways, I wanted to port arbtt. The only platform-dependent part is the capture module that gathers the list of open Windows. The Win32 package that comes with the Haskell Platform did not cover all the functions needed to do so, but creating additional function bindings is really easy with Haskell, as can be seen in the Graphics.Win32.Window.Extra module. I also replaced the locking code that prevents two instances of arbtt-capture to run at the same time by equivalent code using Windows mutexes (module System.Win32.Mutex). With these small changes and some CPP conditionals to make the code compile for either platform, the porting was done! Even accessing the files in ~/.arbtt works correctly on Windows, where it will look in the Application Data folder, without changing the code, thanks to System.Directory.getAppUserDataDirectory. But Windows users won t like compiling software on their own. They won t even like installing software by copying various files to certain directories. Therefore, I also had to create a Windows Installer. I picked Inno Setup, because it s Free Software and seems to be simpler than NSIS. The installer puts the compiled .exe files, the example categorize.cfg and the HTML documentation in the right spot, adds icons to the Start Menu ( Edit categorize.cfg , which fires up wordpad, a link to the documentation and the uninstaller), puts arbtt-capture in the Autorun folder, puts the path to arbtt-stats in the PATH variable and starts arbtt-capture at the end (the last three points being optional). Of course it undoes all this when removing the program again. I integrated the call to the Inno Setup installer into the usual ./Setup build process of Haskell packages. Some more details of how to create the Windows installer are mentioned in the README file. Now all this does not magically add a graphical user interface to arbtt, so users will still have to work with arbtt-stats on the command line even on Windows. If this is not a problem for you then you can fetch the latest installer from the arbtt homepage. And if you happen to become a serious user of arbtt on Windows and want to help maintaining the Windows port, I ll gladly share some responsibilities. I m very satisfied with the process and the result and I m happy to know that I can offer some of my programs also to Windows users in the future.It is also a big plus for Haskell with Python, shipping a program for Windows users is likely more difficult. The next step will be providing gtk-based graphical Haskell applications for Windows, including a nice installer that ideally includes all dependencies (gtk etc.).

9 December 2009

Joachim Breitner: Packaged unicode-screensaver properly

Three years ago, while I was in Ghana, I wrote a small screensaver that displays a randomly picked unicode character full-screen. I like it because there is a huge bunch of very weird characters and signs in the unicode standard. It also prints the unicode codepoint and character name.
Now I finally got around to properly package it: Created a small homepage, a source tarball with (hopefully) proper autotool files, all managed in a git repository (also on gitorious), complete with manpage, README and other additional files. I m also going to upload the package to Debian, so you can just do apt-get install unicode-screensaver as soon as it gets accepted.It can probably not enter the official xscreensaver distribution as it adds dependencies on the fontconfig and freetype libraries.

3 December 2009

Joachim Breitner: Second Post!

Yesterday, the German magazine freeX published its December issue. It includes an three-page article about vbox-sync, written by me, that is even mentioned on the cover page. After my article on the Cross-Site-Authentication attack that was published in the German Linux-Magazin and the international Linux Magazine in 2005, this is my second publication.Vbox-sync is a tool to distribute VirtualBox images via apt-get that Phil Kern and I wrote as part of our work for itomig.de, a German Free Software consulting company, and the LiMux project. I also held a talk about it at the Debian Conference in Extremadura, Spain, in 2009.

28 November 2009

Stefano Zacchiroli: Enforcing type-safe linking using package dependencies

Eclectic paper: dh-ocaml In my day job as a researcher, I mostly publish papers along the lines of my main research interests (theorem proving, web technologies, formal methods applied to software engineering, ...). Some time though, I just come up to some eclectic idea, not strictly related to my job, that I feel like cooking up as a paper to be reviewed by some scientific venue. It happened some weeks ago with dh-ocaml, the package implementing the new dependency scheme for OCaml-related packages in Debian. It took us (as in Debian OCaml maintainers) several years to get it right and satisfactory for maintainers, users, release team, etc. The problem which dh-ocaml addresses is that, differently than C and other system-level languages, OCaml breaks ABI compatibility very often, due to the need of ensuring type safety across different libraries at link time. Other similar strongly typed languages, such as Haskell, behave similarly. This is at odds with the implicit assumption of forward-compatibility (unless otherwise "stated", e.g. with soname changes) that is relied upon by versioned dependencies in distributions like Debian. This discussion, the analysis of possible solutions, and the description of the solution we have actually implemented in dh-ocaml (called ABI approximation) turned out to be interesting for the French functional programming academic community: the paper on dh-ocaml has been accepted at forthcoming JFLA 2010. It is no rocket science :-) , but people maintaining programs and libraries written in languages with concerns similar to OCaml's (e.g. Haskell, hello nomeata) might want to have a look.

27 November 2009

Joachim Breitner: screen-message now in an online version

Folllowing an idea by Kai Hendry, I re-implemented my Linux application screen-message, which does nothing but display a piece of text that you enter as large as possible, in HTML. So whenever you are in need of screen-message, but don t have it installed at the moment, put your browser into fullscreen mode, go to
http://sm.nomeata.de/
and type away.I only tested it with the web browser galeon, so I expect it to work with Firefox and related browsers. If it does not work with Internet Explorer, I can t help it but patches are welcome. The file is stored in the screen-message Darcs repository at http://darcs.nomeata.de/screen-message.upstream.PS: If anyone wants to donate a shorter domain for this, you are welcome. But I guess all good domains with sm in them are taken...

23 November 2009

Joachim Breitner: arbtt now in Debian

The Automatic Rule Based Time Tracker that I have created some weeks ago is now available in Debian unstable, so if if you were reluctant to use it because you did not want to figure out how to compile the Haskell code, you can just do apt-get install arbtt.Although it s such a young project, it already has a fork: Andreas Kl ckner was very impatient with a feature request (sensible merging of logs from different hosts), so we went ahead and re-implemented arbtt in python, named whatup. Although I prefer contributions to arbtt, it shows that the principle of arbtt is useful. And I won t be shy to copy nice ideas from him, as well :-)

20 November 2009

Joachim Breitner: Parody Song: College teacher

Although it does not reflect my experiences at the university, I wrote a song text about teachers that do not care about their students, to the melody of Private Dancer of Tina Turner. My list of parody songs now contains 22 entries!

15 November 2009

Joachim Breitner: Darcs Hacking Sprint: Mission Complete

The darcs hacking sprint is slowly nearing its end. As planned, I have worked on integrating DarcsWatch and bugs.darcs.net, and I am satisfied so far. From now on, if someone submits a Darcs patch to patches@darcs.net, the patch will also be tracked by DarcsWatch. DarcsWatch will display a link to the entry on bugs.darcs.net, and also add a comment to the bugtracker with a link to the patch on DarcsWatch. And eventually, if the patch is included in the darcs.net repository, DarcsWatch will change the state of the ticket to accepted, removing one step of work for the Darcs maintainers. Currently, it checks the state of the repository three times per hour, so expect a delay after you applied the patch to the repository before the state is updated.

14 November 2009

Joachim Breitner: Arrived at the Darcs hacking sprint

Today, my alarm clock was set to 4:30, as I was going to Vienna, to attend the Darcs hacking sprint. I ll be working on DarcsWatch, making it a bit more modular and hopefully integegrate it better into bug tracking systems (especially roundup, as that s used by the Darcs team). On Monday, I ll be a tourist until I leave in the evening. If any Debianers or Haskellers want to meet for keysigning or sightseeing, just drop me a mail!

12 November 2009

Joachim Breitner: Maxi-Max-Algorithm

8 November 2009

Joachim Breitner: Parody song Another year at university

The list of parody songs on my web site just got a bit longer: I changed the text of Phil Collins Another day in paradise to Another year at university , about a girl failing a math test. It s not really funny, but the original wasn t either.

6 November 2009

Joachim Breitner: Releasing zpub as Free Software

Earlier this year, my brother and I developed a documentation management server for a small software developing company. They were sick of creating their documentation by sending around Word documents, having to manually merge them, losing changes and not getting a clean, consistent layout.So we created zpub for them: It is based on DocBook and Subversion, and adds a fairly nice web interface to it. Now their work flow is
  1. The editor checks out the DocBook source document via Subversion. With a client like TortoiseSVN, this is possible even for the less tech-savvy editor.
  2. He works on the document using the editor of his choice. We recommended an editor with a proper DocBook mode such as the XMLMind XML Editor or Serna Free, which was recently published as Free Software, to our customer.
  3. When satisfied, he commits his changes via Subversion, adding a comment describing his modifications.
  4. On the server, zpub renders the document in the various output formats (.html, .pdf, .chm), and makes the result available via the web interface. The commit messages are put there, and all previous revisions of the document can still be accessed.
  5. Optionally, an e-mail about the change is sent out to a per-document configurable list of recipients.
  6. Optionally, the documents are rendered with a DRAFT -Watermark on the pages, to avoid leaking wrong revisions to the outside. Only users with extended rights are allowed to release a document, thus causing a version without that watermark to be rendered.
For more details on the feature and usage of zpub, check out the documentation that you can find on the demo instance.We are actually quite satisfied by zpub, and it would be a petty if that was just it. Of course, there are quite a view programs out that that can provide these features plus many more, much more than a company the size of our customer would want to have (or even to worry about). So there is a niche between sending Word documents by mail and buying a very expensive, complicated product where zpub fits in.Being a fan of Free Software myself, and since zpub is based on Free Software, we decided that we want to release zpub itself under a Free License. We chose the EUPL, which is a GPL compatible license created by the European Commission, since our customer comes from a municipal environment. The code is hosted on gitorious now, so if you have a need for zpub, just give it a try.Also, if you run a Free Software project, manage your documentation in DocBook (or want to start to do so) and think that zpub might be a neat idea to allow more documentation writers to contribute, talk to me. I might well offer free hosting in that case. If you are a commercial user, I m still offering hosting (and support or feature development), just not for free any more. Note that the zpub user interface and documentation is currently only available in German.

3 November 2009

Joachim Breitner: Mimesweeper

Just the pun on the Windows game, no other deeper insights to be found here.

28 October 2009

Russell Coker: New Play Machine

Update:
Thanks to Sven Joachim and Andrew Pollock for informing me about /etc/init.d/mountoverflowtmp which exists to mount a tmpfs named overflow if /tmp is full at boot time. It appears that the system was not compromised. But regular reinstalls are always a good thing. On the 24th of August this year I noticed the following on my SE Linux Play Machine [1]:
root@play:/root# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda 1032088 938648 41012 96% /
tmpfs 51296 0 51296 0% /lib/init/rw
udev 10240 24 10216 1% /dev
tmpfs 51296 4 51292 1% /dev/shm
/dev/hdb 516040 17128 472700 4% /root
/dev/hdc 1024 8 1016 1% /tmp
overflow 1024 8 1016 1% /tmp The kernel message log had the following:
[210511.546152] su[769]: segfault at 0 ip b7e324e3 sp bfa4b064
error 4 in libc-2.7.so[b7dbb000+158000]
[210561.527839] su[778]: segfault at 0 ip b7eb14e3 sp bfec84d4 error 4 in
libc-2.7.so[b7e3a000+158000]
[210585.270372] su[784]: segfault at 0 ip b7e044e3 sp bff1b534 error 4 in
libc-2.7.so[b7d8d000+158000]
[210595.855278] su[789]: segfault at 0 ip b7e014e3 sp bfd18324 error 4 in
libc-2.7.so[b7d8a000+158000]
[210639.496847] su[796]: segfault at 0 ip b7e874e3 sp bf99e7b4 error 4 in
libc-2.7.so[b7e10000+158000] Naturally this doesn t look good, the filesystem known as overflow indicates a real problem. It appears that the machine was compromised. So I ve made archival copies of all the data and reinstalled it. As the weather here is becoming warmer I ve used new hardware for my new Play Machine. The old system was a 1.8GHz Celeron with 1280M of RAM and two IDE disks in a RAID-1 array. The new system is a P3-800 with 256M of RAM and a single IDE disk. It s a Compaq Evo which runs from a laptop PSU and is particularly energy efficient and quiet. The down-side is that there is no space for a second disk and only one RAM socket so I m limited to 256M that s just enough to run a Xen server with a single DomU. I put the new play machine online on Friday the 23rd of October after almost two months of down-time.

25 October 2009

Joachim Breitner: About the Freedoms of Web Services

For software, the question whether some software can be considered free is relatively easy to decide: Check the license of the code against the list of free licenses of your trust (the OSI list, the FSF list or the judgement applied by debian-legal) and that s (mostly) it. When it comes to web services in the broader sense, including hosters, communication providers, social networks etc., this are not so clear. In this blog entry, I ll try to list the various requirements that a service should fulfill and which I usually consider before deciding to use a service.The RequirementsA) Availability of source codeComing from the Free Software movement, this is the first requirement that comes to mind. If a web service claims to be free, then I want to be able to inspect how it is working, suggest and implement improvements and set up my own instance. For example, Canonical s software housing setup Launchpad was itself not Free Software until very recently. Having access to the source code is also the reason why I prefer gitorious over github for git hosting.B) Access to my dataDepending on the kind of service, it might hold data from me or about me that are important, such as my emails on a webmail service. If I won t have a way to easily retrieve my data to back it up or to move to a competitor, I ll think twice before trusting my data to this service.C) Free data formatsIf there is accessible data, it should be in a format that I can easily get and use with a choice of (Free) software. Not sure if such a service exists, but an online office suite only supporting its own proprietary file format (possibly with its own proprietary offline office suit) would be no option for me.D) An APIFor an extensively used service, I will want to have the possibility to optimize my user experience by automation. This requires that I can use the service not only in person, but also from tools I write. A very good example for this is Twitter: Besides registration, there is no need to use their web site at all and still use all the features, using the tools I find most fit for a task.E) Choice of providersCompetition is good. If a service is only provided by a single company, and I become dependent on the service, I become dependent on the company. A few years ago, SourceForge was mostly the only provider of gratis, comprehensive software project hosting. By now, there are a few alternatives, such as alioth, savannah or google code, which is appreciated. Note that when it comes to the proprietary instant messaging services (ICQ, yahoo messenger, MSN messenger), there is no choice of providers: To talk to my buddies on a certain network, I am bound to that provider. The same applies to social networks (Facebook, StudiVZ, XING), and is one of the reasons why I shun these yet. F) Federation between providersIf there is a choice of providers, and the service in question provides some kind of communication, it is very desirable if I can interact with users of the service on other providers. A very good example for this is e-mail: People @gmx.net can send mails to people @aol.com, and I can have @joachim-breitner.de and still communicate with everyone. This was not always the matter of course: Before Internet e-mail was common, people on AOL could not get in touch with people at CompuServe. These days, the problem persists with instant messaging (Jabber a.k.a. XMPP being the notable exception) and social networks. Also sites like gitorious or github could support federation if they would allow to create branches of repositories that are hosted elsewhere, allowing their users to use the familiar interface with all repositories they work with.Analysis of a few servicesSo far the theory. Let s see how various services fare.e-mailBeing from the old times of the Internet, when everything was better, it does not surprise that this passes all requirements: There is a large amount of Free e-mail servers and clients to choose from, my data is easily moved via well-known protocols such as POP or IMAP and save in standardized format. There is an abundance of service providers, and they all talk to each other. One could argue that the openness of email causes problems like spam, but I d say that this might be a design issue, but not inherent to the above criteria.Pretty much the same analysis applies to Jabber/XMPP.ICQI joined when I was young and unwise. Now I am stuck to AOL to keep in touch with a relevent part of my online correspondence. To use it on the operating system of my choice, other people had to reverse engineer the protocol and any time, AOL could change how its servers work and I ll be locked out. I can not get in touch with people on other networks, my buddy roster is not easily backed up and restored, and no, we can not see the source of the ICQ servers. I d wish I could switch over to Jabber completely, but there are always a few important people who do not use that yet.Github/GitoriousAlthough gitorious is slightly older, github managed to become more famous. These web sites allow developers to publish their source code and other contributors to easily branch, work on their changes, and propose them for merging in the main code. They are based on git, so I can get my data. There is a choice of providers. I am not sure how well I can access their functionality (merge requests etc.) programmatically. As said before, they do not interact well, and only gitorious has published its code.Facebook/StudiVZVery disappointing. I have heard that Facebook offers you a rich API, but otherwise, they fail every category. This is one of the reasons why I am not to be found on these networks yet.Twitter/identi.caTwitter, similar to Facebook, excels in the category API , but fails in the others. A better alternative is identi.ca: The software behind it is free, I can download contact data etc. It even supports federation via OpenMicroBlogging, although that did not break through yet it, it seems.OpenIDAnother very good example for what I want is OpenID, a service that allows websites to accept a user s credentials from another site. This saves the user from having to create accounts everywhere. There are free implementations, multiple providers, I can easily switch between them. A great feature of OpenID that goes a bit beyond federation is delegation: On the start page of my homepage http://www.joachim-breitner.de/, I saved who my OpenID provider is. Now I can use http://www.joachim-breitner.de/ as my OpenID, and even if I change my provider, this stays valid! This is a feature that not even XMPP easily provides.ConclusionWhether a web service is really free is a complicated question and has a graded answer. One has to balance the benefits of using a web service against the freedoms it is missing. I hope that in the long run, services fulfilling most or all of these requirements will prevail, so that I ll be networking socially and blogging microly with a good conscience.

11 October 2009

Joachim Breitner: arbtt: Now with Documentation

Yesterday I did what Free Software authors supposedly don t do. I wrote documentation. In fact, I had a relatively detailed README already, but I thought this would be a good opportunity to create a more elaborate documentation, using the ubiquitous DocBook. You can read the HTML documentation for arbtt online, where it s automatically updated when I push to the darcs repository. You can see, I use the same CSS file that most Haskell-related DocBook documentation seems to use.One motivation to use DocBook was that I can extract manpages from it, which should be present if I package arbtt for Debian. I was about to complain that references from the manpages to other part of the documentation can not work sensibly, but using the profiling feature of docbook-xsl, I can replace them by a textual reference to the user s manual if the file is processed for manpage output. Have a look at my changes for that if you want to know how it works.For some reason, the <refentry>-tags that make up the manpages are split to separate files when generating chunked HTML output, but they do not appear in the table of contents. You have to find a spot in the text where they are linked, as they are now in the section Program references , to find them. This is unfortunate, I expect that a few readers might miss this important part of the documentation. Am I doing something wrong?For the configuration file, I put an EBNF-style grammar description in the documentation. There is a special DocBook module for that, but I m not satisfied with it. On the right hand side of production rules, it has only special support for nonterminals, but no tags to semantically mark up choice, repetition etc. I followed the lead found at the YAML specification and put <quote>-Tags around literal parts of the grammar, but this is not valid according to the DocBook DTD. Speaking of the DTD: I guess since the EBNF-stuff is just a module, the tag <productionset> is not a valid content of <figure>. So, if I choose to use the EBNF module in a sensible way, I will not have a valid DocBook file.All in all, I am satisified with the result. Especially that nobody can say any more I like your program, but I can t contribute, because I don t know Haskell . Just improve the docs! :-)

4 October 2009

Joachim Breitner: arbtt goes Binary

Three weeks ago, I announced the automatic rule-based time tracker here, and it seems that there are actually users out there :-). Since then, it has recorded more than 240 hours of my computer s uptime in about 15000 samples. Until now, this data was stored in a simple text file, one line per entry, and relying on Haskell s Show/Read instances to do the serialization. Although not quite unexpected, this turned out to be a severe bottleneck: Already, it takes more than 25 seconds to parse the log file on my computer.Following an advice given to me on the #haskell IRC channel, I switched to a binary representation of the data, using the very nice Data.Binary module. The capture program will automatically detect if the log file is in the old format, move it away and convert the entries to binary data. And voil , the statistics program evalutes my data in about two seconds! This should be fast enough for quite a while, I hope.In my binary instances, which you can find in Data.hs, I prepended a version tag to each entry. This hopefully allows me to add more fields to the log file later, while still being able to parse the old data directly and without conversion. To still be able to manually inspect the recorded data, the program arbtt-dump was added to the package. The new version is uploaded to hackage as 0.3.0.One thing still worries me: With the old format, I could easily throw away unparseable lines in the log file (e.g. from a partial write) and still read the rest of it. With the new code, there is no such robustness: If the file breaks somewhere, it will be unreadable in its whole, or at least to the broken point. I m not sure what to do about that problem, but given the very low number of bytes written each time, I hope that it will just not happen.

14 September 2009

Joachim Breitner: Freaking out with LaTeX

If you want to play a trick on a colleague who is writing a LaTeX document: Open the file, copy the entire contents of the file and paste it at the very end. LaTeX will happily process the file and render the first part. But your colleague will likely try to edit the end of the file and soon feel haunted because his changes to the file have no effect no matter how often he deletes the resulting PDF file or any intermediate file, how often he renames the original file or moves it somewhere else...(Just happened to me, but not due to a mean colleague, but due to some accidential vim commands.)

13 September 2009

Joachim Breitner: The Automatic Rule-Based Time Tracker

A while ago, I thought: I seem to be less productive than I used to be. Why might that be? Do I spend more and more time with e-Mails? Or is it something else? I couldn t tell, so I needed a time tracking tool. There are a few of those for Linux that allow you, while working, specify what you are doing and then generate statistics about it. This approach has a few disadvantages:So I created arbtt, the Automatic Rule-Based Time Tracker. It comes with a background program that is started with your desktop session and will, each minute, record what windows are open, which one is active, what their titles and corresponding programs are. It also checks how long the user has been idle. No interaction required, no distraction possible. This information is stored in a log file. A separate tool allows the user to investigate this data. It is called rule-based because the mapping from the raw data to sensible tags that give information about the time sample is specified by a simple, but hopefully sufficiently powerful language.A simple example for a rule that indicates the currently used program would be:
tag Program:$current.program,
The prefix Program: is a category. Arbtt will ensure that for each time sample and category, at most one tag is specified. A more complex rule is
current window $title =~ m!(?:~ home/jojo)/projekte/(?:programming/(?:haskell/)?)?([^/)]*)!
==> tag Project:$1,
which makes use of the fact that both GVim and gnome-terminal display the full path to the currently edited file resp. to the working directory in the window title. This rule will track all my projects separately, and even automatically pick up new projects when they appear! You can see more rules in the example file.The statistics program then allows you to query the tags with some options:
Usage: arbtt-stats [OPTIONS...]
-h, -? --help show this help
-V --version show the version number
-x TAG --exclude=TAG ignore samples containing this tag
-o TAG --only=TAG only consider samples containing this tag
--also-inactive include samples with the tag "inactive"
-m PERC --min-percentage=PERC do not show tags with a percentage lower than PERC% (default: 1)
-i --information show general statistics about the data
-t --total-time show total time for each tag
-c CATEGORY --category=CATEGORY show statistics about category CATEGORY
For example, if I want to know what folders I have open while using evolution, I can run arbtt-stats -o Program:evolution -c Evo-Folder -m 3 to see this:
Statistics for category Evo-Folder
==================================
Time Percentage
=========================++======================
Evo-Folder:Eingang 22h20m00s 17.0%
Evo-Folder:Bekannte 16h40m00s 12.7%
Evo-Folder:d-haskell 9h40m00s 7.4%
Evo-Folder:Itomig 8h20m00s 6.4%
Evo-Folder:Verschickt 7h40m00s 5.8%
Evo-Folder:pkg-fso-maint 7h00m00s 5.3%
Evo-Folder:Bugs 6h00m00s 4.6%
Evo-Folder:planet debian 4h00m00s 3.0%
(60 entries omitted) 4h49m00s 36.7%
(unmatched time) 8m00s 1.0%
One big advantage of this approach is that you do not need to know in advance what queries you are interested in. Since the rules are applied when you are evaluating your data, and not when recording it, you can add more tags and forgotten special cases later.At this point, a big warning is due: This program will record a lot of very sensitive information about you. Be aware of this before you start using arbtt, and make sure you protect your data. You can get rid of all logs by deleting ~/.arbtt/capture.log.I have published arbtt on hackage. If you have cabal-install installed, you can install it with cabal install arbtt. See the README file for more information about setting it up. Depending on the feedback I get I will also consider packaging it for Debian.If you want to contribute, you are very welcome. The code is available at the darcs repository http://darcs.nomeata.de/arbtt/ (DarcsWeb). See the README for some ideas what to implement and feel free to come up with new ideas.

Next.

Previous.