Skip to main content

Ralsina.Me — Roberto Alsina's website

Not letting stuff fall off the ' net

For a bunch of apps I write, I of­ten want to be able to add a systray icon.

But... I write them us­ing PyQt, and the systray stuff is in PyKDE.

But... Torsten Marek did write a mod­ule to do that. The on­ly prob­lem for me is the python-c­types re­quire­men­t, but it's no big deal for my apps that are not mas­sive­ly de­ployed.

You can find his code, in a some­what man­gled for­m, here

And since build­ing ex­ten­sion mod­ules is not com­plete­ly triv­ial, here's a sim­ple set­ that will do it:

#!/usr/bin/env python
# -*- coding: utf-8 -*-

from distutils.core import setup
from distutils.extension import Extension

  name = "systray",
    Extension('traywin', ['traywin.c'],  libraries=["X11"],library_dirs=['/usr/X11R6/lib'])],

Put it in the same folder with his code, then you can do python install or somesuch, then you can use it in your app like in Torsten's example, and it will work.

Deployments and stuff

Have been read­ing the plan­ets late­ly (I mean plan­ and plan­et.g­, not as­trol­o­gy) and run in­to posts by Aaron Sei­go and Luis Vil­la which are, let's say, in­ter­est­ing.

Luis' post took me to this page which is in­ter­est­ing too, and I would like to see some­thing like it for KDE (and I am sure it is some­where, but I can't seem to find it)

And I don't mean the page is in­ter­est­ing on­ly for hav­ing Aus­tralia list­ed as an asian coun­try ;-)

Some of the items talk about hun­dreds of thou­sands (or hun­dreds of mil­lion­s) of desk­top­s, and oth­ers talk about 11 seat­s.

Is there noth­ing in the mid­dle, or is it just not re­port­ed?

I de­cid­ed to put out an­oth­er dat­a­point.

Here in Ar­genti­na, the best-selling OS has KDE as the de­fault desk­top. It's a Lin­ux from Pixart , and is more or less what on oth­er coun­tries is sold as Xan­dros.

It seems Pixart made some de­vel­op­ment work for Corel, and then for Xan­dros when they bought the lin­ux dis­tro busi­ness. Their boss is the for­mer (?) boss of Corel ar­genti­na, too.

Al­most ev­ery white­box clone is sold with one of their dis­tros in­stalled and pre­con­fig­ured.

Oh, sure, most of them get wiped out and re­placed with a stolen win­dows xp in 24 hours, but it's quite a num­ber. Think 100K or 200K sold each year, at least.

Of some con­cern is that some of the GNOME de­ploy­ments used to be KDE de­ploy­ments. For ex­am­ple, the Sao Paulo tele­cen­tros used to be Conec­ti­va box­es with KDE (and win­dows, in du­al­boot).

The City of Largo used KDE for quite a while.

But what the heck, we are both desk­tops squeezed in­to a ketchup bot­tle, there's a whole world out­side to spread in­to ;-)

The ethics of advertising

Just fin­ished read­ing an ar­ti­cle at Tim­o­thy But­ler's site (see here) and it was a weird feel­ing.

On one hand, I find the idea of the im­moral­i­ty of avoid­ing ads strange. I mean, I am watch­ing TV, ads come, I flip. In­stant­ly. That's why I like that my TV has a way to pro­gram it to cy­cle through se­lect­ed sta­tion­s. That way I can keep com­ing back eas­i­ly, un­til the ads end.

On mag­a­zines and news­pa­per­s... well, if some­one came and told me that flip­ping through the ad pages is moral­ly wrong, I would re­al­ly not give a damn.

But the weird thing is not that (or rather, the oth­er weird thing is some­thing else).

His ar­gu­ment goes like this:

  1. TT has to make mon­ey

  2. The way to make mon­ey is sel­l­­ing their in­­tel­lec­­tu­al prop­er­­ty in some cas­es (in oth­­er­s, it's giv­en for free)

  3. Tim­o­thy says that's not ok.

The oth­er hand says:

  1. Peo­­ple who write on we­b­sites has to make mon­ey.

  2. The way to make mon­ey is to put ads on the site.

  3. Peo­­ple are avoid­ing the ad­s.

  4. That's not ok.

Those two ideas don't seem to have much in com­mon, but lets re­think the is­sue, in terms of pro­vid­ing in­tel­lec­tu­al preper­ty, be it a web­site or soft­ware.

Sup­pose TT would make Qt ad­ware. What do you think Tim­o­th­y's po­si­tion on Qt would be if he could use it for any­thing, but the app would al­ways show an an­i­mat­ed ad us­ing 30% of the screen. With sound.

That is what web­sites are pro­vid­ing. In­t­elec­tu­al prop­er­ty as ad­ware. TT is pro­vid­ing in­tel­lec­tu­al preper­ty in two ways:

  • As free soft­­ware

  • As pro­pri­e­tary com­mer­­cial soft­­ware.

Of course we know that both prop­er­ties are the same code, but it is pro­vid­ed in two ways.

I find both de­liv­ery mech­a­nisms vast­ly su­pe­ri­or to ad­ware, or nag­ware. Tim­o­thy does­n't.

So, in the same way he sug­gest­ed KDE and TT to part ways, I sug­gest how he can avoid all his trou­ble with ad­block­er­s.

Tim­o­thy But­ler should turn of­ in­to a paysite. He should charge you if you want to read it.

Or, he should be up­front about it like sa­lon.­com is: see this ad, then you can read. Of course now I check sa­lon maybe once a week.

So, the main prob­lem would be, for that so­lu­tion, that prob­a­bly noone would pay to read it. Well, wel­come to cap­i­tal­is­m, Tim­o­th­y.

The evil of sliding

I am not too ac­tive in the pub­lic speak­ing busi­ness any­more (not that I ev­er charged for speak­ing, ei­ther ;-).

A few years ago, I would do it about once a mon­th, now it's about twice a year. But I have done it some 50 times, with crowds of up to 1000, and I think I am pret­ty good at it (but get­ting worse by the min­ute). And I have been to a mil­lion or two.

And for some rea­son, I have de­cid­ed I want to talk about it. Many of the KDE guys & gals have to do it ev­ery once in a while, and a bunch will do it in aKade­my so, maybe this can help some­one :-)

Of course, this is sure­ly the wrong way to do things for 90% of the peo­ple, so read with­out any care ;-)

En­ter­tain­ing is bet­ter than bor­ing

Ob­vi­ous, right? Well, then why are 99% of these things so dul­l?

The main rea­son is, of course, that the one speak­ing is scared (not ner­vous. Scared.) , or that he re­al­ly is a dull per­son on first con­tac­t.

Most of the free soft­ware peo­ple I know are not dull at al­l. But when you first talk to them, they are about as in­ter­est­ing as a brick.

That's prob­a­bly shy­ness. Most ex­tro­verts don't make a liv­ing by stay­ing im­movile in small places and look­ing at the same three ob­jects for hours at a time.

So, how can a shy per­son be in­ter­est­ing quick­ly? By not try­ing. For Christ's sake, don't make a joke (un­less it's re­al­ly un­avoid­able [1]). Just try to chill out, and speak about what you want to say, in a nat­u­ral tone. Stam­mer if you have to. Think be­fore an­swer­ing ques­tion­s.

Spe­cial­ly, al­low the au­di­ence to ask ques­tions dur­ing your ex­po­si­tion, if you can do it. Who knows, it may not let you say what you want­ed to say, but it will let the au­di­ence learn about what they want to learn, which is just as good.

It helps a lot if you talk about some­thing you re­al­ly know. Don't try to over­reach. I could­n't speak about C++ de­vel­op­ment be­cause I am not good enough. Sure, I could give a crap­py lec­ture. Just not a good one.

So, if you have to, stay on a sim­ple top­ic. The au­di­ence will lead you from there, but if they lead you some­where you don't know... well, say you don't, and then you both can try to fig­ure it out or ask some­one else.

Avoid slides un­less ab­so­lute­ly nec­es­sary

One prob­lem is that they will be­lieve the slides are the lec­ture. They aren't.

If what you have to say can be said in 30 pages with 6 lines each, then why the hell are you tak­ing 45 min­utes to say it? If it can't, then what are they for?

They lock you in a path. Un­less it's ab­so­lute­ly nec­es­sary that you get a spe­cif­ic mes­sage out, I say don't both­er.

Use graph­ic­s? Sure. Use a live app show­ing how to do some­thing cool? Sure. A blue back­ground with a pic­ture of app A say­ing "app A can do some­thing cool"? Yeech.

To con­nect it with the oth­er one, some peo­ple think slides will make things more in­ter­est­ing. Guys slides are in­cred­i­bly bor­ing. They are more bor­ing than the speak­er mak­ing fun­ny shad­ows on the screen.

What the heck, put some nice screen­saver hacks and leave it at that.

[1] I was once show­ing how to rip MP3s in kon­qi and asked any­one for a au­dio CD. I got one from a 16 year old. Writ­ten in huge let­ters on top of the CD was "crap­py mu­sic". I won't say what I said, but you can say your own in the com­ments ;-)

Some more about the docs

An­swer to com­ments on my pre­vi­ous docs item. First of al­l, chill­out peo­ple. This is just the blog of a re­tired guy. It's not ex­act­ly In­foworld, ok?

Sor­ry if I ru­ined your day, that was not my goal. I had an idea. Nowa­days, be­ing a re­tired guy, when I have an idea, I ei­ther code it for my­self or put it in my blog so oth­ers can read it. Some­times it work­s, some­times it does­n't.

It was not my goal to say that the writ­ers or ed­i­tor's job is bad. I meant to say that it can get bet­ter, and I had a small idea that may help there.

Rain­er: hm­m­m... well, I trans­lat­ed all of KDE 1.0 (or maybe ear­lier?) to span­ish on­ce, be­fore there was a trans­la­tions team ;-) but I am sure that does­n't coun­t.

I men­tioned in the ar­ti­cle that there is no need to write doc­book, and that you can send plain text to the docs team. I re­al­ly re­al­ly did, so don't ride me about it.

BTW: the docs don't say where to send that plain text email. For ex­am­ple, the kcalc man­u­al says the doc­u­men­ta­tion is copy­right­ed by Bernd Wuebben and Pamela Roberts (in an ob­fus­cat­ed man­ner, but that's ok).

I am damn sure that if you send Bernd an email with cor­rec­tions for kcal­c's man­u­al, he won't ap­ply them, be­cause he has been out of KDE de­vel­op­ment for 5 years. Pamela Roberts I don't know.

So, who ex­act­ly is one sup­posed to send a 20 line ex­pla­na­tion of the M-but­tons to?

Oh, I get it, you are sup­posed to fig­ure out that doc­ (which is not men­tioned in the man­u­al) has a "Con­tact us" link... which sends you to­doc­u­men­ta­tion/ which then sug­gests you learn doc­book (which is not nec­es­sary) and go to­doc/in­dex-scrip­t.php where you are told to con­tact the app au­thor and kde-­

For a 20-­line write­up? Does that sound rea­son­able?

Maybe the tem­plate used to gen­er­ate the docs could be mod­i­fied to add some­thing in the last page, like "For con­tri­bu­tions or cor­rec­tions to this man­u­al, please send email to".

I mean, if that does­n't ru­in your day.

But hey, I can see the at­ti­tude of Lau­ri is more open, at least. And yeah, Lau­ri, thanks for your job, I'm sor­ry I dropped the app lat­er :-(

Sort­ing through the re­al­ly bad garbage is not all that dif­fi­cult. Would I of­fer to triage? Sure, if it's made con­ve­nien­t. Make it come as clear­ly tagged mail with, say, two hy­per­links in it, one for send­ing to docs team for fur­ther re­view, one for declar­ing it crap, I can do a hun­dred of those a day.

Can­l­laith: I share the feel­ing about wi­ki markup. Re­struc­tured­Text is nice, if you find a wi­ki that sup­ports it.