Category Archives: FOSS

hostupd v0.92 is out: [DNS-updating helper tool]

Hostupd is a very simple perl script, which makes use of the Net::DNS module, to assist in updating DNS records dynamically.

Here's a sample hostupd command which adds both A and PTR records:

hostupd add myhost myip

on complex environments, it might not autodetect the zone and server ip:

hostupd add -s mynameserver -z myzone myhost myip

The the last commit took place on 2002 (when I was a perl newbie, it shows..). Today, 7 years later (wahhh!), I've found and fixed an annoying bug by a adding a single line.

Avahi and other (relatively) new desktop technologies

Every time when I try to sit and study, I find something better to do. This time it was playing with Avahi and some avahi clients such as pidgin, amarok, pulseaudio.

What is Avahi?

A free zeroconf implementation which is very common on Linux distros, just as Bonjour is Apple's zeroconf implementation. AKA multicast DNS (mDNS), and is probably similar to the Microsoft-backed UPnP.
Long story short: it allows discovering and resolving the available services on the LAN (if they're zeroconf-aware, of course)

How do I use Avahi?

  • Discovering: If the avahi daemon is installed and running, the magical command avahi-browse -a (might require the avahi-utils package) would query and display all the available services.
  • Resolving: the following weird hosts line in /etc/nsswitch.conf enables resolving through avahi (usually with the .local suffix, i.e. ping mymachine.local):

    hosts:          files dns mdns4_minimal [NOTFOUND=return]

Software using Avahi out of the box:

  • Pidgin: simply add a new Bonjour account, and you'll be able to instantly talk to your LAN-neighbors.
  • CUPS or other printer config frontends: find zeroconf-supporting printers on the LAN.
  • Amarok v2: automagically finds all DAAP-shares on the LAN (iTunes, for example). The bad news is: iTunes v7 and newer weren't yet reverse-engineered, so amarok cannot login to the most popular DAAP servers. Apple, why won't you give us a hand?
  • Pulseaudio: using the paprefs program, you can choose to share your sound devices and become zeroconf-discoverable. This means that people running the padevchooser program can find your sound card and redirect audio to/from yours.
    • It seems to require a wide bandwidth (couldn't find an option to lower the sound quality)
    • I've experienced some bugs which required restarting pulseaudio and other voodoo, in order to make things work.

Vim whole word search

In perl regexp syntax, \b (b means bareword) can be used for searching a whole word. I.e. \btext\b:

Will match: text, @text, <space here>text!, etc

Won't match: textile, mytext.

I've been looking for a similar feature in vim for months, with no luck, until today. I've found out how to do that, the syntax is simply  \<text\>. Works for search mode (/,?), substitute (:s), and probably for other modes as well.

Actually that's what the #, * keys do (search for the under-the-cursor whole word), and that's how I found that out.


A global ZoneEdit DNS update problem?

Update: Manually updating it in the web gui seems to fix the issue. I wonder if it's a temporary issue that was solved..

yet another an Is-it-just-me-or-is-it-a-global-problem? post:

A lightning had struck nearby and killed the power at around 03:00UTC. I've turned the computer back on at 09:22UTC (yes I know, I slept too much), and ddclient updated with my new IP.

According to zoneedit's web gui, my IP got updated. But their DNS servers still give the old IP. (It's been 10hrs since my update, for it's 17:00UTC now)

I mailed their support, no reply yet (I'll update in this post, when there's news). Is anybody else experiencing the same problem?

14hrs without a functioning mail. Everything is so quiet and peaceful 🙂

Enough VMware, let's use VirtualBox-OSE!

I've been using VMware server mainly for accessing Windows (sometimes I need MS Office or IE). VMware server is a very good product, but is also closed source, and very disconnected from the community.

Some of the source is open (such as vmmon & vmnet kernel modules), but still VMware don't cooperate with the FOSS community. This means that good people make patches to support newer kernel versions, but they act like pirates. VMware won't apply their patches. VMware can't work out-of-the-box on kernels since ~2.6.21 or so.

Same goes with a more minor, X <-> GTK <-> VMware bug I've been writing about. It might be a non-VMware bug but something in Xorg. But I'd expect them to figure it out and post a message or even help to fix the Xorg bug, if it's an Xorg bug. Instead, they either ignore our requests or tell that we use non supported distros. Which is true. But if the problem is Xorg7.3 integration, they'd better fix it, because RHEL 6 would probably use it as well. Same goes for new kernel versions.

Both bugs are being neglected by VMware for more than a year.

So screw them, I chose a community supported virtualization solution: VirtualBox Open Source Edition. Debian has a kernel module package for each kernel versions, and stuff looks much better so far.
I'd suggest VMware to hire a single FOSS guy for Linux integration and "community special tasks". He'll be very busy, but I think that this is all it takes to change their "community involvement" upside-down.

Update: been using it for few days, VirtualBox is cool 😉

VMware modifier keys bugs: update

Some updates since the last post:

The "GTK dies on a keypress" bug

Good news: it was fixed by Matthias Clasen. It was solved in the SVN version, I guess that we'll have to wait a while till it gets into the next version, Unless package maintainers would manually add it.

Doing a good QA in the FOSS community

I've learned a quick lesson about good QA in the open source community, which I find very rare.

In this case the bug was reported for ~2 months with no activity ("it sometimes crashes" type of report). Until I've added my description, which, probably helped it to get closed.

I'll try to sum up what I've learned:

Continue reading

VMware modifier keys bug status

This annoying vmware-deletes-the-modifier-keys bug I wrote about is still a mystery, but still I gained some more info. There are two problems:

1. VMware deletes modifier keys:

  • Can be replicated by holding a modifier key down inside a guest OS (VMware console). Then moving the mouse out of the guest OS window, while modifier is still down.
  • Happens on modern Ubuntu/Debian/Arch Linux versions.
  • Very likely, but not 100% confirmed: happens since Xorg 7.3.
  • Doesn't happen on CentOS / RedHat EL 5. (Apparently because they use Xorg 7.1.1?)
  • Links: Ubuntu launchpad, VMware forums.

Still, is it an Xorg bug or VMware one? (or GTK)

2. GTK apps crash on a keypress, when X modifiers-list is empty.

  • If 'xmodmap' is emptied (either by the VMware bug described above, or by manually removing all the modifiers), each new-running GTK app would just crash as the first key is pressed.
  • This doesn't happen to KDE or plain-X11 apps.
  • Segmentation fault is received in the _gdk_keymap_key_is_modifier() function in gdkkeys-x11.c:1662.
  • I tried digging the code, but no luck yet (all I could do is skip the function if no modifiers are set, but I don't know GDK enough to know the other effects it can have).
  • Links: Gnome bugzilla.

I'll keep updating in case there'll be something interesting.

Update: gtk bug got fixed.

DOS, anyone?

Recently I've installed FreeDOS inside a VM, both out of curiosity and for my assembly course homework. FreeDOS, for the unfamiliar readers, is a 100% compatible GPL'd DOS OS. It ships with many modern utils such as ssh (Yes, it has Ethernet + TCP/IP support.. EVIL!), lynx, vim, a graphical web browser..

I was astonished to find out this very-active blog, which proved me that DOS is still alive! A new version of 4DOS was just released a few days ago, who'd believe...

A very nice work, though I don't see too many reasons for using DOS nowadays (except for nostalgia and for playing old dos games).. It's still a deprecated, single-tasking, not protected-mode, no package-management OS.. And hardware configuration can be hell, well.