piatok, 31. decembra 2010


I got myself a new PC. It's based on Intel Atom D510 (1.66 GHz, 1M Cache, 2 cores), 1GB RAM, VGA is integrated but I use it as a headless machine. The processor has only passive cooler, so it's completely silent. The board is placed in a Travla C137 case, which has external PSU. I had a spare WD 160G 2.5" USB HDD laying around, so I used it.
I installed Debian Lenny (amd64) on the HDD. It was a bit of PITA, because I used my USB key as an installation medium. After a bit of googling I learned I need to use the 4th primary partition in order to boot from a USB device. There's also a small catch, the configuration of GRUB need to be changed after installation, because the HDD is sdb during install, but sda after the OS is installed (and USB key removed).
Here's the list of web pages that helped me during the install:

The PC is now up and running, I just configured munin on it, here are some resources:

streda, 15. septembra 2010

Converting AVCHD Videos

I have a Panasonic DMC-TZ7 camera, capable of 720p video. For some time I was struggling with the MTS format that is used. Mplayer seemed to play it faster than the original. However, when uploading to youtube.com, the video plays fine. It also plays fine in xbmc.
I searched around a bit and found this syntax:
fmpeg -i $1 -vcodec libxvid -b 18000k -acodec libmp3lame -ac 2 -ab 192k -s 1280x720 $1.avi

The video played fine in mplayer, but after upload to youtube, the sound was off. Same with added
-async 48000
parameters to ffmpeg.
Then I have read this blog post explaining how to convert the MTS format to mpeg4.
First I tried the
-acodec copy -vcodec copy
thing, but the wideo can't be rewound in mplayer. Finally the syntax
ffmpeg -i $1 -sameq -f mp4 $1.mp4
worked best for me.

pondelok, 7. júna 2010


I switched from centerim to finch recently. The UI is very intuitive so the switch was very smooth. Since there were a few features missing, I implemented two plugins.

The first one is xssidle, to report idle time from xscreensaver (actually I did a similar feature for centerim previously).

The second one is called betterhistory (could not came up with better name). It's an improvement of existing gnthistory plugin, it can display configurable number of previous conversations, it can also limit the history to messages from current day.

The plugins are located at github.

utorok, 11. mája 2010

Ubuntu 10.04 upgrade

I have upgraded all 3 my PCs from Ubuntu 9.10 to 10.04. The upgrade process went fine on all of them. I had problem with my htpc, though.. After the upgrade it could not connect to my wireless network. I have found out that both NetworkManager and wicd were installed after the upgrade and probably they had a problem with each other. I am using wicd on 2 my PCs but had this problem only on one of them.
There are people claiming they can boot in something like 10 seconds, but that's not my case, even though my laptops are not so old (Dell D630, Dell XPS M1530).
Ubuntu 10.04 features the new splash thing called Plymouth, which should "run very early in the boot process". This is not what I observe, in fact most of the boot time the screen is blank, the splash screen displays late and only for a very short time.

štvrtok, 11. marca 2010

Keys mapping

Not all the keys on my TV card remote work with XBMC. I needed to map some of them to achieve certain behavior, e.g. I needed to use the backspace key which was not mapped to the remote.

The solution is very simple. First run the "xev" program. This program prints out the content of X events, such as key presses. Then press a key on the remote and make sure you see this in the "xev"-s output, such as:

KeyPress event, serial 31, synthetic NO, window 0x400001,
root 0x157, subw 0x0, time 69418336, (567,307), root:(620,340),
state 0x0, keycode 182 (keysym 0x1008ff56, XF86Close), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False

This is the output for the "Back" key on my remote. There's another event for KeyRelease, which does not interest us at this point. The important information is the "keycode", which is 182 in my case.

Next we need to map the keycode 182 to the particular keyboard key, in my case it is the Backspace key. Since I am using gdm, I put the mapping to the /etc/gdm/PostLogin/Default file. The mapping is:

xmodmap -e "keycode 182 = BackSpace"

And that's it.

Update 20120124: Now that Ubuntu switched to lightdm, the key mapping can be made permanent by adding the xmodmap commands to separate shell script and add this shell script to /etc/lightdm/lightdm.conf under "greeter-setup-script".

streda, 24. februára 2010

Getting things to work..

When picking the components for my HTPC, I was looking for information whether they work fine with GNU/Linux, preferably Ubuntu. After a few months of usage I can say everything works, sort of.

The first challenge was to get the proper screen resolution on my Samsung LCD via HDMI. After a few sleepless nights I learned I cannot get the maximum resolution (1360x768) via HDMI, only via D-sub. When connected via HDMI I only get 1280x800 and also a few pixels is missing on each side. So I needed to adjust the xorg.conf in order to see as much as I could. Also, when connected via HDMI, it is difficult to see red colored text when switched to console (vt).

The sound works fine. I am using either the TV speakers (via HDMI cable) or my Sony amplifier connected via regular analog card output. The problem with the sound was that sometimes the machine boots up with sound turned down. I needed to turn it up via alsamixer. This was a real problem, because regular user who booted up the PC and started XBMC could not hear anything. I think this was fixed by commenting out "mute_and_zero_levels" in /etc/init.d/alsa-utils.

The wifi dongle was very tricky to get to work right. Initially it connected to my WPA2 network fine, but after some time the connection quality was really bad and it stopped to work completely. The solution was to turn off power management for the wlan0 interface. I have switched from network-manager to wicd because of this.

I will save the TV card, suspend/resume and other annoyances for next blog :)

streda, 27. januára 2010

ccache and Sun compilers

In order to make ccache work with Sun's compilers (I tested with Sun studio 12), the environment variable CCACHE_CPP2 needs to be exported. The variable is described in the manual.

nedeľa, 24. januára 2010


The primary reason to start this blog is to help me remember things and perhaps share information that might help other people.

I bought a HTPC for last Christmas. Actually I bought the components and built it myself. So here is the hardware:
- MB Asus M3N78-VM based on nVidia GeForce 8200
- CPU AMD Athlon(tm) II X2 240 (2.8 GHz)
- RAM Kingston 2GB 800 MHz
- HDD SAMSUNG HD103SJ, 1TB, 7200 rpm, 32 MB
- PSU Enermax ECO80+ 350W
- TV Asus MyCinema P7131 dual
- wireless Asus WL-167g USB
- Arctic Cooling Freezer 7 Pro rev 2
- Sweex wireless keyboard & mouse 2.4 GHz

I tried to pick a hardware that works well with Ubuntu, or other Linux distributions. The other concern was noise so I picked a good cooler and PSU.

My idea was to spend around 300€, finally the cost was about 400€ which is not too bad. The case itself cost more than 100€.
The operating system is Ubuntu 9.10 (32bit) and the media center is XBMC. I am also using MythTV for live TV. The PC is connected to my Samsung LE32 LCD TV via HDMI. I have it for a few years now, it's not a full HD but hey, till now I did not have any HD content to watch; it was sufficient for analog TV and DVDs.

The main reason to build a HTPC was that the DVDs my son watches over and over get ruined easily so I decided to make copies and store them somewhere. I also wanted to store all my photos and home videos in one place and make them available easily. So far this worked out quite well.

Hello world!

There's no better way to start a blog.. ;)