<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<?xml-stylesheet type="text/css" href="http://blog.cihar.com/styles/feed.css"?>
<title type="html">Life</title>
<link rel="alternate" type="text/html" href="http://blog.cihar.com" />
<link rel="self" type="application/atom+xml" href="http://blog.cihar.com/archives/life/index-atom.xml" />
<updated>2008-06-17T18:00:35+02:00</updated>
<author>
<name>Michal Čihař</name>
<uri>http://blog.cihar.com</uri>
</author>
<id>http://blog.cihar.com/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.4 RC1">NanoBlogger</generator>
<entry>
<title type="html">Code of the day</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2008/06/17/code_of_the_day/" />
<id>http://blog.cihar.com/archives/2008/06/17/code_of_the_day/</id>
<published>2008-06-17T16:50:58+02:00</published>
<updated>2008-06-17T16:50:58+02:00</updated>
<category term="Life" />
<category term="Coding" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Why the hell do I have to hit various obscure pieces of code today? Current winner is part of system-config-printer:</p>
<pre>
<code>def monitor_session (*args):
    pass

try:
    bus = dbus.SessionBus()
    bus.add_signal_receiver (monitor_session)
except:
    print &gt;&gt; sys.stderr, "%s: failed to connect to session D-Bus" % \
          PROGRAM_NAME
    sys.exit (1)
</code>
</pre>
<p>If you don't know D-Bus or Python: It listens to all signals on session bus and does nothing with them. All this code causes is eating up memory and CPU cycles when there is some higher load on session bus.</p>
<p>PS: Maybe I miss some nice idea behind this code, please enlighten me.</p>
</div>
</content>
</entry>
<entry>
<title type="html">Jabber server side message archiving</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2008/03/03/jabber_server_side_message_archiving/" />
<id>http://blog.cihar.com/archives/2008/03/03/jabber_server_side_message_archiving/</id>
<published>2008-03-03T21:00:55+02:00</published>
<updated>2008-03-03T21:00:55+02:00</updated>
<category term="Life" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>One of reasons to setup my own Jabber server was to be able to store history on server while having data under my control. I use Jabber clients from several locations and having history on the server seems to be logical step.</p>
<p>Unfortunately implementations of 
<a href="http://www.xmpp.org/extensions/xep-0136.html">XEP-0136</a>are a bit lacking. During install I enabled 
<a href="http://www.ejabberd.im/mod_archive">mod_archive</a>, but it was not using up to date specification and there is no client which works with it, so there was no way to view data in it. Recently I found out that rewrite of this module exists - 
<a href="http://www.ndl.kiev.ua/typo/articles/2007/11/14/mod_archive_odbc-release">mod_archive_odbc</a>. It is implementing current version of XEP-0136 and is using SQL database for storage (so at least writing SQL query to grab data is not that complicated as with Mnesia database used by original version).</p>
<p>Migrating of current history went quite good using 
<a href="http://www.ndl.kiev.ua/typo/articles/2007/11/14/libwsw-wswutil-release">wswutils</a>, at least I did not notice any problems so far. The only problem is no support from clients. The only reliable way which works for now is 
<a href="http://bepointbe.be/jabwebhist/">Jabber archive web reader</a>, but I'd really like to see integration in 
<a href="http://gajim.org/">Gajim</a>, any volunteers? :-)</p>
</div>
</content>
</entry>
<entry>
<title type="html">When non ASCII names will finally work?</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2008/02/07/when_non_ascii_names_will_finally_work/" />
<id>http://blog.cihar.com/archives/2008/02/07/when_non_ascii_names_will_finally_work/</id>
<published>2008-02-07T14:35:23+02:00</published>
<updated>2008-02-07T14:35:23+02:00</updated>
<category term="Life" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>By using my name in various web services I usually spot bad implementation of displaying name field in their website. I can see that over years the amount of servers which cripple my name to something like ÄŒihaÅ™ is getting lower, but there are still lots of them. When I find way how to report it, I usually do so and I always enjoy fields like "How to repeat". This time the guilty one is the 
<a href="http://bugs.mysql.com/34372">MySQL bugtracker</a>.</p>
<p>PS: Fortunately all Debian pages seem to catch up this year and my name is no longer crippled in NEW queue or Lintian pages :-).</p>
</div>
</content>
</entry>
<entry>
<title type="html">Toshiba ACPI keys, HAL and friends</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2008/01/18/toshiba_acpi_keys_hal_and_friends/" />
<id>http://blog.cihar.com/archives/2008/01/18/toshiba_acpi_keys_hal_and_friends/</id>
<published>2008-01-18T13:44:07+02:00</published>
<updated>2008-01-18T13:44:07+02:00</updated>
<category term="Life" />
<category term="Coding" />
<category term="Debian" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Long time ago I used 
<a href="http://fnfx.sourceforge.net/">FnFX</a>to handle events from ACPI keys on my Toshiba notebook. However when 
<a href="http://blog.cihar.com/archives/2007/10/03/reinstalling_notebook/">reinstalling notebook</a>because of disk crash, I thought there must be a cleaner way to handle these and I found patch for acpid which added handling of these special events.</p>
<p>However I really didn't like patching acpid on every update and there didn't seem to be chance to merge it upstream, so I started to look for better solution. After another amount of googling, I found that HAL already has some support for Toshiba hotkeys. Unfortunately it is now 
<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=400605">disabled in Debian</a>because most key did not emit anything using HAL.</p>
<p>Okay, let's fix the HAL, maybe it will get later enabled. Converting FnFX keymap to C code was quite easy and I made a 
<a href="http://cihar.com/patches/hal/toshiba_more_keys.patch">patch for HAL</a>to add support for all keys. Hopefully it get merged soon and I can then file bug on Debian package to reenable Toshiba support in HAL.</p>
<p>Meanwhile I'd like to find some generic way of configuring what happens on these events. For now I hacked 
<a href="http://viewsvn.cihar.com/viewvc.cgi/scripts/trunk/bin/dbus-key-monitor">simple Python script</a>which listens to DBUS events and invokes appropriate commands for keys, but I hope that some such tool already exists and I just missed it. If you know something, please let me know at 
<a href="mailto:michal@cihar.com">michal@cihar.com</a>.</p>
</div>
</content>
</entry>
<entry>
<title type="html">Good bye Enca</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2008/01/15/good_bye_enca/" />
<id>http://blog.cihar.com/archives/2008/01/15/good_bye_enca/</id>
<published>2008-01-15T10:48:10+02:00</published>
<updated>2008-01-15T10:48:10+02:00</updated>
<category term="Life" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Some days ago I was notified by 
<a href="http://dehs.alioth.debian.org/">DEHS</a>that 
<a href="http://packages.debian.org/sid/enca">Enca</a>homepage is unreachable. Okay, this happens sometimes. But as the error lasted longer and longer, I decided to ask author about it.</p>
<p>Unfortunately the reply was that this nice software is not maintained anymore and computer which hosted it's homepage is gone. As it would be bad to loose this software completely, I offered place to host downloads for it. No, I'm not going to develop it, I already have enough projects for which I don't have enough time. So my server has just become a 
<a href="http://dl.cihar.com/MIRROR/enca/">download place for Enca</a>.</p>
</div>
</content>
</entry>
<entry>
<title type="html">Time to move from Nanoblogger?</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2007/12/13/time_to_move_from_nanoblogger/" />
<id>http://blog.cihar.com/archives/2007/12/13/time_to_move_from_nanoblogger/</id>
<published>2007-12-13T12:06:32+02:00</published>
<updated>2007-12-13T12:06:32+02:00</updated>
<category term="Life" />
<category term="Coding" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>After more than year and half of blogging with 
<a href="http://nanoblogger.sourceforge.net/">Nanoblogger</a>, I'm still more and more thinking about trying something else. With almost 500 entries I currently have, generating blog takes more and more time. Otherwise there is not anything I'd miss, but something with comments might be also better.</p>
<p>I didn't yet find time to investigate currently available blog engines, but from what I remember in past, it was hard to choose something. What is thing which many engines fail to fulfill is ability to use text editor instead of writing text in browser. The other thing I'd like to see is to have more than category (or tag) per post. Maybe 
<a href="http://ikiwiki.info/">ikiwiki</a>would be good candidate for this...</p>
<p>However what to do with old content? Should it be migrated to new system? I doubt it will be able to keep old URLs what is something I'd like...</p>
</div>
</content>
</entry>
<entry>
<title type="html">I hate this system</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2007/11/24/i_hate_this_system/" />
<id>http://blog.cihar.com/archives/2007/11/24/i_hate_this_system/</id>
<published>2007-11-24T11:53:44+02:00</published>
<updated>2007-11-24T11:53:44+02:00</updated>
<category term="Life" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>My girlfriend has to use Windows, because university she studies does not give her another option. Now she got some crap on which she should do some statistics. This crap is being called SAS. I have not yet seen how does it look like, but I already enjoyed funny hours with it's installer. As I'm currently on the other side of world, I have to do all remotely...</p>
<p>The basic problem is simple: I do not have much space on C: drive and it does not provide option to install on another drive. First she tried to install it herself, the setup fucked up so much, that it deleted NTLDR and friends from root folder, so Windows didn't boot up again. Fortunately there is also Debian on that machine, so she booted to it, I installed ntfs-3g and restored needed files from Windows XP installation CD (the recovery console did not work, don't ask me why). So great, after about one hour we have back working Windows!</p>
<p>Now I still did not have idea what is the problem. However the failure appeared when the crap was trying to install some special JRE it has included. When I started the installer for this JRE manually, it showed that there is not enough space. Why the hell did not the original installer show this? Well I did some cleanup on the disk and I got 1GB of free space. Hope that it will be enough.</p>
<p>No. Somewhere near 58% installation is fucked up again with error -2147483648. Wow nice number! Looking at disk space, it's down to few kilobytes. So again the same problem! Okay, let's clean it up more and hopefully installer will resume. But I should not hope for anything good from this installer. The only option it now gives me is to reboot.</p>
<p>Reboot, start again installer and let's see what will break this time. Now it found out that some Microsofts runtime is missing. Why it was not missing last time? Okay, let's install it and (of course) we need another reboot. System started up, installer launched and it seems to go on quite well, only the last few percents are taking incredibly long, but the crap seems to finally installed and it even runs!</p>
<p>Few questions: Why they do not check for required space in installer? Why do they force me to disable anti virus during installation? Why does not remote desktop from Windows work? Why is there such mess in Windows, especially in Windows folder? Why are temporary files located all over the disk?</p>
<p>As last but not least thing I would like to thanks everybody who made ntfs-3g and VNC work, I would never fix this without these tools.</p>
</div>
</content>
</entry>
<entry>
<title type="html">Reinstalling notebook</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2007/10/03/reinstalling_notebook/" />
<id>http://blog.cihar.com/archives/2007/10/03/reinstalling_notebook/</id>
<published>2007-10-03T11:50:38+02:00</published>
<updated>2007-10-03T11:50:38+02:00</updated>
<category term="Life" />
<category term="Debian" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Man never realizes how much customised distribution he has until he has to reinstall it. Last week hard disk in my notebook died, so I had to reinstall system and reconfigure everything. I fortunately have backups of almost everything (at least I didn't notice that anything would be missing), but I anyway spend two evenings in installing, configuring and restoring from backups and I'm still not done with it, but the system is at least usable for normal work.</p>
<p>However there are also some positive things on this: I get more space and faster disk. I finally set up encrypted file system on my notebook. I dropped several old crap that lived (or better was buried) somewhere in my system and which I already forgot why it was there. And I also got rid of very bad partitioning scheme, which was there from times I used together Debian and Windows and wanted to have another partition to test SUSE installation while I worked there. Now there is only Debian to rule them all ;-).</p>
</div>
</content>
</entry>
<entry>
<title type="html">Fighting with tons of mails</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2007/05/25/fighting_with_tons_of_mails/" />
<id>http://blog.cihar.com/archives/2007/05/25/fighting_with_tons_of_mails/</id>
<published>2007-05-25T13:57:50+02:00</published>
<updated>2007-05-25T13:57:50+02:00</updated>
<category term="Life" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>Recently spam checking stopped to be enough to prevent my mailbox to grow to incredible sizes, so I had to look for some possibility to block viruses and other malware. The obvious choice went to open source anti-virus 
<a href="http://www.clamav.net/">Clamav</a>.</p>
<p>Setting up was pretty easy, especially when there are tons of howtos on the net (e.g. 
<a href="http://koivi.com/exim4-config/">Installing and configuring Exim 4 on Debian</a>). All I had to do was to install Clamav and configure Exim to talk to it and reject unwanted stuff.</p>
<p>And what are results? Quite impressive - 154860 caught viruses in last 24 hours.I wonder that lots of them were also caught by SpamAssassin, because I definitely didn't receive that much malware in a day.</p>
</div>
</content>
</entry>
<entry>
<title type="html">My phone finally can make silent photos</title>
<author>
<name>Michal Čihař</name>
</author>
<link rel="alternate" type="text/html" href="http://blog.cihar.com/archives/2007/05/05/my_phone_finally_can_make_silent_photos/" />
<id>http://blog.cihar.com/archives/2007/05/05/my_phone_finally_can_make_silent_photos/</id>
<published>2007-05-05T14:24:25+02:00</published>
<updated>2007-05-05T14:24:25+02:00</updated>
<category term="Life" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<p>This was feature which I always hate - phone made strange sound when taking photo. Fortunately I'm not alone who hates this and there are several howtos on net which should guide you to do this.</p>
<p>The only way which worked for me at the end was replacing sounds in phone filesystem, so that it plays silent sounds. For Sony-Ericsson K750i with CID 49 BROWN you need specially hacked FAR from 
<a href="http://www.se-tuning.cz/viewtopic.php?t=1822">SE-tuning.cz</a>and just replace files in filesystem (
<code>/tpa/preset/system/sound</code>). Now phone magically makes no sounds when taking photos :-).</p>
</div>
</content>
</entry>
</feed>
