2006-08-31 11:47

Big news in my life

Rosario is pregnant. Yipee! :-)

She is now about 6 weeks pregnant, and all three of us are doing fine (but she's having bad morning nausea... should go away in another 6 weeks... but that doesn't seem to be any help ;-)

The first echography is scheduled for Sept. 15, expect pictures of the tiny bean-like alien invader.

It's the first grandkid on her side of her family, so it's being preemptively spoiled by all her/his/its aunts/grandparents/whatever. Our house is being prepared for a flooding of knitted outfits and redundant childware by strengthening the floorboards.

I am quite at a loss for words, and have not been useful for almost anything for the last two weeks since we found out... I am totally spastic with happiness.

On other news, I was just starting to work on preparing my studio... which will now be made the child's bedroom. Do I care? No! It's just an excuse to actually build the office in the roof I wanted all along (so I can work with my cats, too :-), so everybody wins.

2006-08-17 15:52

Linux Installation Kung Fu

I decided to try Arch Linux on my notebook. The reasons don't matter.

However, there was this problem about the CD drive being broken, and the lack of a floppy drive.

So, how did I do it?

I had a partition I could destroy (/dev/hda3)

I installed qemu.

Then, I started qemu using the whole HD and a CD ISO image (booting from the CD!):

qemu -hda /dev/hda -cdrom arch-0.7.1.iso -boot d

Then, very carefully I installed it on hda3 and did not install GRUB.

Copied the kernel and initrd images to /boot on the other linux installation.

Edited grub.conf, adding the Arch entry...

And it worked.

Keep in mind that if you make a mistake, this will completely destroy all your data. But if you are careful, and have enough space, you can install your next Linux while you use your current one.

Now, is that cool or what? :-)

2006-08-17 13:40

Cool toys: Synergy

In the last week or so I have been reorganizing my workspace. Or rather, Rosario's workspace, and that meant moving some furniture my way.

One of the things I got is a long desktop, with room for two PCs (it was used in the classroom in Conectiva, and I got it as part of my severance payment).

So, I put my desktop on it, a keyboard and mouse of the tray below, and my home server on the other side of it.

That home server has been headless for a loooong time.

But since I have room in the table, I hooked a monitor, keyboard, mouse set to it, and thought "maybe it will work as a guest machine", for when someone comes to work or stay at my place.

Then I thought, there must be some way to use one keyboard and mouse to drive both machines, and started looking for KVM switches and stuff.

Then I thought... maybe there is a way to do it by software... and yeah! Enter synergy ...

You run a server on the box with the keyboard, and a client on the others. Explain the relationship between them in the simple config file... that's it.

Now I can slide the mouse off a screen to the other computer's, and you even share a clipboard!

Really, really, really nice stuff. Works flawlessly.

And since I am a bit weird in my ways, now... how can I make this work as a xinerama solution, where all the apps are in my notebook, and the other is just a display server?

Right now, I am starting a full screen FreeNX session pointed back at me, so everything is on the same box. But I can't move windows between both monitors.

I think with some creative thinking this can work. X app display migration...

2006-08-14 15:42

Ideas for SMTP plugins

The only current software I wrote that some people actually use is called RA-Plugins. It's a series of proggies you plug in your SMTP server's conversation, and do diverse things with it, like rejecting messages that fail certain criteria, checking the status of the recipient's account, whatever.

Injecting this stuff in the middle of SMTP is good because it means you will reject the messages before they get into your server. But... I am running out of ideas, so... have any you can spare? :-)

You can see the current plugin list here and the only ideas I have left are:

  • A plugin that calls back to the sender's email server and tries to email him, ala milter-sender to catch forged senders.
  • A plugin to autowhitelist in spamassassin those addresses to which you send mail.
  • A plugin to keep an account of how many connections you hold to each IP, and limit them. (Not currently possible)

If you understand what I wrote, and have any ideas... feel free to post them as comments and/or email me with them!

2006-08-11 23:50

Annoying APIs: djbdns

Looking for a simple way to lookup the MXs for a given domain, I ran into libdjbdns. Which has a delightfully simple API.

Of course it has its wrinkles.

Consider the MX lookup interface:

dns_mx(&out,&fqdn);

Where out and fqdn are strallocs (a sort of string that can contain 0).

But just try parsing out! Here's the explanation:

Each MX record is a two-byte MX distance followed by a 0-terminated dot-encoded domain name. If the domain does not exist in DNS, or has no MX records, out will be empty.

Because almost noone uses MX distances higher than 256, sadly, this usually looks like this (sorry for the notation ;-)

\0 10 f i r s t . m x \0 \0 20 s e c o n d . m x

So, you can not split on the NULLs because there are NULLs in the distances.

Which is not hard to parse, but is definitely more annoying than it should be. How hard would it be to return an array of structs?

2006-08-11 14:42

CMake is nice. Or not?

I am playing with CMake. Specifically, I am trying to replace the simplistic handmade Makefiles for my RA-Plugins project.

The parts about detecting libraries and conditionally compiling plugins based on what you have were surprisingly easy!

Until I ran into ... man pages.

Here is a Makefile that would build all the manpages for the plugins:

MANPAGES=plugins-ra.8 authchecks.8 rcptchecks.8
man: \$(MANPAGES)
%.8: %.man.txt
      txt2man -t \${basename $< .man.txt} < $< > [email protected]

As you can see... trivial. All I need to do in order to add a man page is add whatever.8 to the list, and it will be created from whatever.man.txt.

But... how does one do that using CMake?

I started thinking of using a FILE (GLOB *.man.txt) and then a FOREACH over that, and then... then what? Really, I am stumped. I am a newbie, though, and getting the big, difficult stuff done is enough to switch. I should generate these before distribution anyway.

So, I wrote a wee Makefile.manpages and added this for CMAKE:

ADD_CUSTOM_TARGET ( manpages make -f Makefile.manpages )

But I am curious about finding the cmakeish way.

2006-08-03 16:12

Misterious referrer

For some reason, there seems to be an image, somewhere in this site, that gets a bazillion hits from google's image search.

I have no idea what image it is, or why it is sought.

Since statcounter truncates the referrers, and it seems to be on many many pages... it's just weird.

For some reason, a domain in some language I don t speak (njoyschool.net) seems to be involved...

Here's some example referrers:

images.google.at/imgres?imgurl=http://www.njoyschool.net/data-new/
club/bbs033/sorry.gif&imgrefurl=//ralsina.me/
lateral/sto

images.google.dk/imgres?imgurl=http://www.njoyschool.net/data-new/
club/bbs033/sorry.gif&imgrefurl=//ralsina.me/
lateral/sto

images.google.co.ma/imgres?imgurl=http://www.njoyschool.net/data-new/
club/bbs033/sorry.gif&imgrefurl=//ralsina.me/lateral/

Anyone has any idea what the heck those are? They are almost all I got in my referrers log!

2006-08-03 15:54

Linux and a TrendNet TEW-PC16

So, I am trying to use this ancient card with Linux and all I get when I plug it is a message in the logs:

Aug  3 13:11:28 monty cardmgr[12752]: unsupported card in socket 0
Aug  3 13:11:28 monty cardmgr[12752]:   product info: "PCMCIA", "11M WLAN Card", "", ""
Aug  3 13:11:28 monty cardmgr[12752]:   manfid: 0x0274, 0x1601  function: 6 (network)
Aug  3 13:11:44 monty cardmgr[12752]: exiting

A little digging showed me the following:

  1. This card is supposed to work with the hostap driver
  2. It has never been a popular card.
  3. Noone seems to have used the thing on Linux. Or if they did, they never documented it.

So... all you have to do is inform the PCMCIA thing in Linux that this card works with hostap.

After you installed hostap correctly for your kernel, edit /etc/pcmcia/hostap_cs.conf and add this:

card "TrendNet TEW PC16"
   manfid 0x0274, 0x1601
   bind "hostap_cs"

Reboot (or restart the pcmcia service, unplug, plug, etc), and that's it.

2006-08-02 16:48

Fixing windows the unixy way

A while ago, I wrote about my misery trying to use a HP PSC 1410 printer attached to a XP box as a network printer.

Basically:

  • The Linux driver freezes the printer if you print remotely (but works locally)
  • The basic windows driver will not even install on a WindowsMe notebook with 32MB of RAM (says it requires 128MB and closes)
  • The full featured driver requires the printer to be locally connected to install succesfully. And if you do that, you can't later tell it that the printer is remote (plus it installs about 600MB of garbage)

Since attaching the printer to the linux box and using PS drivers was not practical (because it has to be used as a scanner too...whatever), I thought... wait a second. Why not do that on windows?

And what the hell, it worked.

If you have a rebel can't be networked printer, do this and be sorta happy. It explains how to create a Ghostscript-based virtual printer that you can share.

And of course, the client PS drivers works just fine on any OS. Which means you can use printers that, for example, have no Linux drivers. Or no Windows9x/Me/NT drivers.

Only problem really is that it's a bit sluggish (it may wait a minute or two before it prints) because the XP box is slow... but it beats copying files.

2006-07-04 08:58

Skeletonz: Site in a Can

I tested the Skeletonz CMS. I liked it. Lots more details, of course, following the link.

Contents © 2000-2019 Roberto Alsina