Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Publicaciones sobre linux (publicaciones antiguas, página 9)

I am **so** not a guru.

I got this nice mul­ti­func­tion print­er+s­can­ner+­copier, called HP PSC 1410.

Cheap, too!

Works nice, even!

Ex­cep­t... it can't be net­worked. You sim­ply can't, us­ing HP's soft­ware, print on that thing from any oth­er com­put­er on your net­work.

Ex­cep­t, that is, if they are both run­ning win­dows XP. Not even oth­er ver­sions of win­dows will work. And HP says so. (Cor­rec­tion, maybe not even with XP?)

On Lin­ux? Well, it shoul­da kin­da work, says lin­ux­print­ing.­com.

And then I sup­pose I could ex­port a post­script queue and let the lin­ux driv­er do the job, and get some print­ing done from the must-be-win­dows-98 note­book run­ning the le­gal case man­age­ment soft­ware.

But you know what? I am so tired of this crap. It does­n't work right on Lin­ux. It's crip­pled on win­dows. What ex­act­ly are we sup­posed to run for this piece of en­gi­neer­ing to work?

Why does this, a rather new mod­el, lack a fea­ture ev­ery god­for­sak­en print­er has had since the dawn on Win­dows For Work­groups 3.11?????

I know my page is read by no win­dows print­ing gu­ru, but I re­al­ly can use a hand here.

FaxWeb is done

FaxWe­b, a web fron­tend for mget­ty+send­fax is fin­ished. It work­s. It's prob­a­bly close to bugfree ;-)

The miss­ing piece is a nicer reim­ple­men­ta­tion of re­spond (and this one will be cross-­plat­for­m, too) us­ing PyQt, which is 50% done.

I am on­ly miss­ing how to im­ple­ment por­ta­ble systray icon­s. On Mac they make no sense, on Lin­ux I have it work­ing, on Win­dows I have no idea.

Here's the sim­ple in­ter­face for faxwe­b:

http://static.flickr.com/54/139230422_f453d38430_t.jpg http://static.flickr.com/50/139230433_0d87a2f0ae_t.jpg http://static.flickr.com/47/139230434_f91f8d0b01_t.jpg

It even has a lit­tle AJAXy "the page does­n't reload" niceties cour­tesy of MochiK­it!

Al­so from MochiK­it, the nicer, round­ed look&feel. Com­pare to this old­er, ugli­er one:

http://static.flickr.com/48/137206420_07ca331974_t.jpg

I know the new one is not good, ei­ther, but I have de­cid­ed that since I can't aim for awe­some, I should aim for ad­e­quate, and set­tle for bor­ing and harm­less.

Of course, if any CSS/X­HTML gu­ru vol­un­teers for a makeover, I'd be very hap­py, since I use the same CSS ev­ery­where (even on parts of this blog ;-).

All in al­l, a plea­sure to write this thing, thanks to Cher­ryPy!

The state of simple Linux fax server software

A cus­tomer asked me to im­ple­ment for him a sim­ple fax serv­ing so­lu­tion.

Here's what he want­ed:

  • A cen­­tral re­­ceived fax re­pos­i­­to­ry.

  • A way to send, as sim­­ple as pos­si­ble (the clas­sic fax-print­­er sce­­nar­i­o).

I vague­ly re­mem­bered know­ing that Lin­ux could do that, so I said yes. Then I start­ed try­ing to fig­ure out how to do it.

The 500lb go­ril­la of lin­ux fax soft­ware is of course Hy­lafax. And it's just about as pret­ty and cud­dly as a 500lb go­ril­la, too!

Put it sim­ply: waaaaaay too much soft­ware for the goal.

Hy­lafax is a very com­plex soft­ware pack­age, and while it does have some tools to make man­age­ment sim­ple, it would prob­a­bly have forced me to sup­port this thing for­ev­er. And that's not mi idea of fun.

Not to men­tion that I could­n't find Cen­tOS/RHEL4 pack­ages (not too big a prob­lem, but an­noy­ing).

Then I spent 10 hours try­ing to make it pick up the phone. And I start­ed be­ing an­noyed.

So, I start­ed look­ing for sim­pler stuff, and the sec­ond go­ril­la seems to be mget­ty+send­fax.

The more I read about it, the more I liked it, and I fi­nal­ly im­ple­ment­ed us­ing it.

The good news:

  • It's re­al­­ly sim­­ple. I was re­­ceiv­ing fax­es in 5 min­utes.

  • It was way less fid­gety about mo­­dem set­up than Hy­lafax.

  • The fax qual­i­­ty was very good (prob­a­bly not their mer­it, but it was nice).

Now, the bad news:

  • It's old soft­­ware. Check the we­b­­page and look at the bro­ken links and an­­cient re­leas­es.

  • The win­­dows client sup­­port was pa­­thet­ic.

How pa­thet­ic: ok, here is how you make it work:

  • Set­up mget­­ty+send­­fax enough that you can make it send from the CLI.

  • Set­up sam­­ba enough that you can do a shared print­­er from the win­­dows side.

  • The shared print­­er should print to print­­­fax.­­pl (look at the ger­mglish page).

  • On the win­­dows side, start re­spond and then when you print to the fax, the fax serv­er hooks to the clien­t's port 5555, and re­spond show a huge pop­up ask­ing for the num­ber, re­­cip­i­en­t, and sender.

  • Ex­­plain to your client that where it says "name" he should put his email ad­­dress. There is no way to save that ad­­dress so it's not asked again.

  • Af­ter the fax is sen­t, the us­er gets an email (if he filled the form cor­rec­t­­ly) with the re­­port.

  • The al­ter­­na­­tive no­ti­­fi­­ca­­tion mech­a­nism is win­pop­up. Which is­n't there in XP any­­more any­way.

Amaz­ing­ly, it does work fair­ly well, and the client is not ter­ri­bly an­noyed. I would be, though.

So, what can be done:

  1. Now that there is a PyQt4/Win32 I may write a re­spond re­­place­­men­t.

  2. Maybe print­­­fax.­­pl can be ex­­tend­ed/re­­placed to give re­­port in­­­for­­ma­­tion to that re­spond re­­place­­men­t.

Sounds like a nice fun projec­t... NOT! But it is a fair­ly sim­ple, nec­es­sary one.

So I will prob­a­bly do it. Or else, I may have to learn how to prop­er­ly use Hy­laFax.

Things that should exist.

One of my great­est frus­tra­tions as an ad­e­quate pro­gram­mer is that I think of things I be­lieve should ex­ist, yet I am not able to im­ple­ment them my­self.

To­day I will men­tion one (or two) of them.

There should be a Xen-based dis­tro.

Xen is a very good vir­tu­al­iza­tion pack­age, which gives you mul­ti­ple si­mul­ta­ne­ous vir­tu­al lin­ux in­stal­la­tions with very lit­tle over­head.

Sad­ly, to make it work, right now, you have to get a lin­ux work­ing, then in­stall Xen, then in­stall one or more ex­tra lin­ux­es as xen ma­chines.

Which is not ter­ri­bly hard, but could be done much eas­i­er.

I am think­ing of some­thing like this:

In­stalling Xen-Lin­ux in­stalls a very sim­ple ba­sic set­up as the su­per­vi­sor par­ti­tion, sets up Xen prop­er­ly, and sets you with a sin­gle Xen vir­tu­al ma­chine.

Al­so, in an­oth­er part of the disk, it has a gzipped file with a sim­ple, ba­sic lin­ux set­up which you use as a tem­plate for fur­ther vir­tu­al ma­chine ini­tial­iza­tion­s.

So, when­ev­er you want a new ma­chine, you run a scrip­t, it sets it up, starts it, you get some­thing like first­boot ask­ing you the usu­al net­work/lan­guage/what­ev­er ques­tion­s.

Then, you are dropped in­to a nice pack­age se­lec­tion tool, where you choose what you want in­stalled in this vir­tu­al in­stance.

And that's it.

This would en­cour­age the ad­min­is­tra­tor to al­ways set up his servers as vir­tu­al ma­chi­nes, which ex­cept in cas­es of re­al hard­core per­for­mance re­quire­ments is a good idea (y­ou can im­ple­ment HA as ful­l-im­age fall­back. You can mi­grate to a new box in min­utes!)

I could do most of this. How­ev­er, that leads me to an­oth­er thing that should ex­ist...

A sim­ple in­stall­er

Wait, you may say "Lin­ux in­stall­ers are sim­ple al­ready!!!" and youa re right.

I mean a sim­ple in­stall­er for a guy try­ing to make his own dis­tro!

I ac­tu­al­ly like ana­con­da a lot. But I would like it even bet­ter if I could just get some sort of tool that, giv­en a list of pack­ages, would cre­ate an ana­con­da-based CD with cus­tom­iz­a­ble in­stall script­s.

And that is the piece I am not sure I can im­ple­men­t.

So, if any­one knows of any such thing, I would love to hear about it.

And as a pre­emp­tive mes­sage: No, I don't want to do it with Gen­too, or De­bian, or Ubun­tu, or Suse, or kick­start. I want to cre­ate a RP­M-based, Cen­tOS-based, ana­con­da-based in­stall­er that works just like a reg­u­lar Cen­tOS/RHEL in­stall­er CD.

2006 resolution

I will make some of my work pub­lic.

The best can­di­date is one that will prob­a­bly not ap­peal to any­one: my per­son­al lin­ux dis­tro.

I have it, I use it all the time. It's not pub­lished yet, though, since it con­sists of a base Cen­tOS + a lot of work.

So, I will try to make it sys­tem­at­ic, call it an in­staller, and drop it on the un­sus­pect­ing au­di­ence.

Don't hold your breath, though.

Here are some of the fea­tures:

  • Serv­er ori­en­t­ed. I use it for my clients' server­s.

  • Qmail+­­couri­er+vpop­­mail+round­cube+s­­pa­­mas­sas­s­in+­­cla­­mav mail sys­tem.

  • Squid prox­­y+fw­builder fire­wall

  • Smart for pack­­age man­age­­ment

  • runit-based boot/ser­vices.

  • KDE as a GUI. Ac­c­s­si­ble via FreeNX/se­cure VNC.

  • Open­VPN for sim­­ple VPN man­age­­men­t.

  • Cus­­tom cher­rypy-based ad­min tools

  • No SeLin­ux (sor­ry, it's a pain in the but­t. Se­cure, but a pain).

  • Bac­u­la for back­­ups

  • Cus­­tom tool to back the whole disk to a bootable DVD (Sys­tem Res­cue DVD)

  • /etc in SVN+­­Trac (yes, re­al­­ly, and the ad­min tools force you to use it)

  • Prob­a­bly djbdns for DNS.

All in al­l, it's a pret­ty or­di­nary Cen­tOS-based thing, ex­cept that the switch to runit makes ser­vice man­age­ment way sim­pler and reg­u­lar ( you can do things like hav­ing a non-­root us­er that can man­age some ser­vices, yay!)

On the oth­er hand, the cher­rypy-based tools would prob­a­bly need a bit of a rewrite, since some are pret­ty crud­dy.

Most­ly, I have been gath­er­ing these pieces over the last 6 years as I re­al­ly don't like the way any of the Lin­ux serv­er dis­tros are built.

I based it on Cen­tOS be­cause do­ing the whole dis­tro by hand is way too much work.

I can prob­a­bly show it around June, if I don't get too side­tracked. Hope­ful­ly, some­one will read this list and tell me "but graxzst lin­ux al­ready does all that!" ;-)


Contents © 2000-2024 Roberto Alsina