Non-root media mounting using udisks-glue

Due to HAL deprecation, I’m using udisks-glue for media automounting on my Gentoo box. Its documentation is pretty good and it includes sample configurations for the most common cases, but it doesn’t say a word about giving non-root users the possibility to mount media.

Continue reading

Non-Latin characters in archive files

I was recently moving files whose names contained non-Latin characters between Linux and Windows. Using Samba (version 3.4), everything worked fine. Yet creating a ZIP or TAR archive on Linux and extracting it on Windows resulted in mangled filenames. As it turns out, this is an expected behavior: neither ZIP nor TAR format allows including character encoding information in the archive. As a result, creating an archive in a system which uses e.g. UTF-8 (most modern Linux systems) and extracting it in Windows causes weird characters to appear in filenames due to the lack of conversion between UTF-8 and Windows’ codepage during extraction. The same goes for creating an archive in Windows and extracting it in Linux. The solution is to use a format which saves character encoding information in the archive (e.g. 7z) or to use Samba (which is able to automatically convert filenames between different encodings) for moving the data.

Trunks on old Cisco switches

When dealing with older Cisco switches it is worth remembering that ISL was once the default trunking protocol on these devices. You can check the trunking protocol used on a given interface using the show interface [interface_name] switchport command. To force a specific protocol, use the switchport trunk encapsulation [dot1q|isl] interface configuration mode command. I’ve come across this problem while trying to setup a trunk between Cisco WS-C3524-XL and HP 1700-24 switches (the latter uses 802.1q by default).

dd and damaged media

Recently I’ve tried creating an image of a disk with a single NTFS partition using dd. While copying, it turned out the disk had bad sectors. After a moment of googling I’ve found a tip to use the conv=noerror,sync switches in order for dd to replace the faulty areas with zeros in the created image. It looked like the disk was copied fine, but my attempt to mount the NTFS partition from the image failed with a message from ntfs-3g to run a chkdsk /r on the problematic partition and reboot twice into Windows which was installed on it. That’s what I did, but even after performing these steps an image created using the same method was useless.

Continue reading

Firefox, Thunderbird: “Server not found”, other applications work OK

Recently I’ve come across a strange situation: Mozilla applications (Firefox, Thunderbird) stopped resolving hostnames. Connecting to servers using their IP addresses worked fine, but when I used a DNS name – the application gave me the finger :( Other programs worked flawlessly. After a lot of digging, I’ve found the culprit – the Kaspersky Internet Security suite.

Continue reading

Using LIRC to control a TV

Time for a longer entry in response to a four-month-long posting drought :) I’ve been struggling for a long time to get a Logitech Harmony 515 remote to do discrete input switching on a Sharp LC-46LE600E TV. “Discrete input switching” means I wanted to switch the TV to a specific input using a single button press, instead of cycling through all the inputs (which is the only solution using the remote bundled with the TV).

Continue reading

Firefox 3.6, Flash 10.1 and problems

For a long time I’ve been using Firefox 3.6 with Flash 10.0 and I haven’t run into any problems. After updating Flash to version 10.1 some serious issues emerged – some SWFs caused the browser to hang and the only thing that helped was killing Firefox‘s process using the Task Manager. At least that’s what I thought. Until I realised that if you kill the plugin-container.exe process, the browser “survives”, printing an error message in the place where the SWF object was supposed to be displayed.

Continue reading