Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about linux (old posts, page 17)

DBUS-reactor, or AsusOSD must die!

How to write a tiny python app (less than 50 lines) that re­acts to events on the DBUS bus­es. For ex­am­ple, dis­play­ing a no­ti­fi­ca­tion when you press one of your key­board­s' spe­cial keys.

Read all about it

I'll be speaking in Mar Del Plata

I will be do­ing a brand-new nev­er seen in­tro­duc­tion to PyQt pro­gram­ming at the "Jor­nadas de Soft­ware Li­bre y Open Source" in Mar del Pla­ta to­mor­row or the next day.

More in­fo at http://­soft­ware­li­­p.ut­n.e­

If you men­tion this blog and ask nice­ly, you get a can of cheap na­tion­al beer to­mor­row night (lim­it: 2 cans ;-)

Simple KDE Trick #2: using remote desktops with avahi, krfb and krdc

Most peo­ple nowa­days have more than one com­put­er. Of­ten, you are us­ing one, and would like to do some­thing in an­oth­er. In this video, I will ex­plain how triv­ial it is to do that with­out leav­ing your seat in a mod­ern Lin­ux us­ing KDE.

We will use the fol­low­ing:

  • Avahi, a ze­ro­­conf im­­ple­­men­­ta­­tion to let you find your com­put­ers in your net­­work with­­out wor­ry­ing about IP ad­­dress­es, DNS, etc.

  • kr­f­b, the KDE Re­­mote Frame Buf­fer. This is a pro­­gram to share your desk­­top over the net­­work.

  • krd­c, the KDE Re­­mote Desk­­top Clien­t, a VNC, RDP clien­t, which is what you use to see a desk­­top shared via kr­f­b.

I am sure users of oth­er op­er­at­ing sys­tems or desk­top en­vi­ron­ments will say they can do it just as eas­i­ly. In that case, feel free to do your own videos ;-)

Keep in mind that ac­cess­ing re­mote desk­tops over the in­ter­net is a whole dif­fer­ent beast, and this so­lu­tion is not meant for that case.

As usu­al, this video was record­ed us­ing qt-record­my­desk­top. There was mi­nor edit­ing us­ing men­coder.

The com­put­er used is the orig­i­nal Asus eee PC 701 4G, so you can see this is not ex­act­ly a hard­ware-in­ten­sive op­er­a­tion. I find the eee's small screen is great for this kind of ful­l-screen de­mo, be­cause it's not big enough to drown the im­por­tant part­s.

Responding to random blog posts. Today: 2009: software installation in GNU/Linux is still broken -- and a path to fixing it

While ran­dom­ly click­ing to­day I saw this ar­ti­cle with the fun ti­tle of "2009: soft­ware in­stal­la­tion in GNU/Lin­ux is still bro­ken -- and a path to fix­ing it" by Tony Mo­bi­ly.

As I don't have an ac­count at FSM and don't in­tend to open one to­day, I will post a re­sponse here, where noone will ev­er no­tice it. Be­cause that's how self­-­con­fi­dent I am. I warn you, this re­sponse is full of proof-by-asser­tion and in­valid gen­er­al­iza­tion­s, but hey, it's opin­ion.

It starts with an in­ter­est­ing claim:

And yet, soft­ware in­stal­la­tion in GNU/Lin­ux is bro­ken. No, not bro­ken… it’s ter­ri­bly bro­ken. Why is that, and what can be done to fix it?

I in­tend to show how there is one lit­tle prob­lem with that state­men­t: re­al­i­ty. As in "what's the most suc­cess­ful soft­ware de­liv­ery plat­form for 'nor­mal' users in 2009, and why that mat­ters here" re­al­i­ty (hin­t: it's not win­dows, it's noth­ing on a Mac).

I mean the iphone, and its App Store. And what he is propos­ing is aban­don­ing some­thing that works a lot like it, and go back to the cave-age "down­load this from the ap­p's site" mod­el win­dows us­es.

He de­scribes the usu­al in­stal­la­tion pro­ce­dure, be it ap­t, yum or pac­man, al­most all dis­tros do the same thing nowa­days, then starts de­scrib­ing the prob­lem­s.

  • Users need to have root ac­cess in or­der to in­­stall a piece of soft­­ware; no per-us­er in­­stal­la­­tion is al­lowed

This would have been a prob­lem in the old days of shared com­put­er­s. Nowa­days, you are root, or (in some cas­es) root's mom. All mod­ern dis­tros use su­do so you don't need root ac­cess, you just use your own pass­word (or no pass­word at al­l).

So, this is a non-is­sue.

  • It’s very tricky to in­­stall sev­er­al ver­­sions of the same piece of soft­­ware. Just think of the poor graph­ic de­sign­er who needs to in­­stall sev­er­al ver­­sions of Opera and Fire­­fox; Users are stuck with the piece of soft­­ware in­­stalled sys­tem-wide;

How do you in­stall iFart 1.0 and 2.0 in an iphone? Can you? Spe­cial users (like graph­ics de­sign­er­s) should be pro­vid­ed by spe­cial so­lu­tion­s, like por­ta­ble fire­fox. Think there's a need for it? Go ahead, it's maybe one day of work.

  • The soft­­ware needs to be down­load­­ed from the of­­fi­­cial re­pos­i­­to­ries. Well, it does­n’t need to, but an av­er­age us­er wants to stay well away from un­of­­fi­­cial re­pos­i­­to­ries for tech­ni­­cal rea­­son­s;

The iphone soft­ware needs to be down­load­ed from the app store. That has not hurt any­one (other than app de­vel­op­er­s, I mean)

  • In some cas­es (e­spe­­cial­­ly when the us­er adds re­pos­i­­to­ries or in­­stalls pack­­ages di­rec­t­­ly), the de­pen­­den­­cy-check­­ing mech­a­nism of­ten fails and users end up with cir­cu­lar de­pen­­den­­cies. They are nasty;

I have not seen a cir­cu­lar de­pen­den­cy since 2003. But hey, maybe they do ex­ist. In that case, don't do that.

  • A piece of soft­­ware is bound to a spe­­cif­ic dis­­tri­bu­­tion, and — what’s worse — to a spe­­cif­ic ver­­sion of that dis­­tri­bu­­tion too. It’s not triv­ial to in­­stall Open­of­fice 3.1 on Ubun­­tu 8.10. You can ar­gue that you can in­­stall the bunch of .deb pack­­ages from OpenOf­­fice’s web site. Tell that to your grand­­moth­­er or your av­er­age in­­ex­pe­ri­enced com­put­er us­er.

Some iphone apps will not work with­out the 3.0 firmware. So­lu­tion? Up­grade your firmware. How's that dif­fer­ent in Lin­ux?

  • It’s not triv­ial to “give” a pro­­gram to a friend. To the end user, giv­ing a pro­­gram to a friend should be as sim­­ple as drag­ging an icon on­­to a mem­o­ry stick; in­­stead, files are scat­tered all over the sys­tem.

It'­sev­en sim­pler than that: here, let me give you rst2pdf for ubun­tu: "Tony, in­stall rst2pdf, it's in 'u­ni­verse'". I don't even need to give you a flop­py disk or what­ev­er kids use these days.

Oh, and "how do you give some­one an iphone ap­p?"

Then, he pro­pos­es so­lu­tion­s, which I think are worse than the sta­tus quo:

  • Users should be able to in­­stall soft­­ware even with­­out be­ing root

Users are root, or root's mom. This is not a prob­lem.

  • Users should be able to in­­stall dif­fer­­ent ver­­sions of the same soft­­ware im­­mense­­ly eas­i­­ly

The on­ly way to do this is to make ev­ery­thing stat­ic or freeze the sys­tems li­braries.

Do this for "portable" ver­sions of spe­cif­ic apps if you wan­t. Don't make the sys­tem suck, please.

  • Users should be able to run ei­ther their own ver­­sion of the soft­­ware, or the one in­­stalled on the sys­tem (if any)

Fine by me. OTO­H, how do you do that on an iphone? You don't. Please, stop di­verg­ing from what is work­ing in 2009.

  • It should be pos­si­ble to down­load and in­­stall soft­­ware even though it does­n’t come from an of­­fi­­cial re­pos­i­­to­ry

Again, the iphone does­n't, and noone cares. If you care, you are not the nor­mal us­er you claim to ad­vo­cate.

  • Soft­­ware just needs to work — un­changed — even if it’s a bit old and it’s run on a new­er dis­­tri­bu­­tion

Yes, I want Quick Shot for iphones with 3.0 firmware!. Again, al­most noone cares, ex­cept app de­vel­op­er­s.

You are act­ing like a Lin­ux user, dude!

  • It should be pos­si­ble to “give” a piece of soft­­ware to a friend by sim­­ply drag­ging an icon on­­to a mem­o­ry stick

Just tell the guy the name of the app al­ready!

All this is true with Ap­ple’s OS X. They got soft­ware in­stal­la­tion just right — al­though a few pro­gram­s, late­ly, seem to come with an ug­ly in­stal­la­tion process.

Noone choos­es a mac for this. They choose it be­cause it's pret­ty, or be­cause they are told they are bet­ter, or what­ev­er, but any­one ac­tu­al­ly say­ing "hey, on a mac I can give you Of­fice by shar­ing this 800MB dmg!"? Not on­ly noone does it, it's freak­ing il­le­gal.

Be­sides, you give the dmg to your friend, and 92% of the time, your friend has win­dows or Lin­ux and can't use it. So your chance of suc­cess is about 8%.

Imag­ine if it on­ly worked if your friend's com­put­er was an Ac­er? There you would have a 10.5% chance! (see here) Noone would say that's good!

No, sharin apps like that is not the prob­lem.

Please, dear lin­ux dis­tro de­vel­op­er­s, look around you, and see what works in 2009.

Amaz­ing­ly, what works looks an aw­ful lot like what we have been en­joy­ing since 1998 or what­ev­er, so let's en­joy it and make it bet­ter, in­stead of try­ing to be­come like a mac, or like win­dows, old style plat­forms in the age of the smart­phone and the net­book.

UP­DATE: you can check more com­ments about this sto­ry in red­dit, lx­er and OS­News.

About 80% of what's wrong with Linux users, all in a post

My post about Arch Lin­ux from yes­ter­day got post­ed at tux­ma­chines and there was a com­ment there.

I can't re­ply at the site be­cause:

  • It re­quires lo­­gin.

  • I can't find a place to get an ac­­coun­t.

  • It has freak­ing google ads pop­ups

So I re­ply here be­cause:

  • Hey, it's my own blog, so I can do what­ev­er I wan­t.

Here's the com­ment by hus­sam with my (ad­mit­ted­ly ranty) re­spon­se:

I've been us­ing Arch­Lin­ux as my on­ly dis­tri­bu­tion/­op­er­at­ing sys­tem since ear­ly 2006. It is re­al­ly a good dis­tri­bu­tion but late­ly there have been a lot of re­al­ly bad choic­es which I call bad com­pro­mis­es:

1. Too many Arch­Lin­ux users think gnome/kde are bloat and in­stead in­stall some half de­vel­oped win­dow man­ag­er and some ter­mi­nal em­u­la­tor and call it a "min­i­mal­ist" desk­top.

Why is that any of your busi­ness? And what "com­pro­mise" is there?

2. Op­tion­al de­pen­den­cies are the worst idea ev­er. If a pack­age is linked against lib­some­thing.­so then lib­some­thing should be a de­pen­den­cy not an op­tion­al de­pen­den­cy. Mak­ing lib­some­thing an op­tion­al de­pen­den­cy just be­cause "min­i­mal­ist" users don't want to in­stall de­pen­den­cies is plain stupid.

That's not what op­tion­al de­pen­den­cies are for. For ex­am­ple, con­sid­er the ex­am­ple I men­tioned, rst2pdf. It can use python­mag­ick. It can al­so not use it. You will lose one small fea­ture that AFAIK on­ly one per­son ev­er used. If you need that fea­ture, the man­u­al tells you what to do: in­stall python­mag­ick.

Maybe there should be a pac­man op­tion "in­stall opt­de­pend­s" which turns op­tion­al de­pen­den­cies in­to reg­u­lar ones. That would make you hap­py and keep oth­ers hap­py too.

3. Bad lead­er­ship. Aaron is fan­tas­tic guy but I know at least two Arch­Lin­ux de­vel­op­ers who can do a much bet­ter job.

That's just stupid and mean.

4. Too many Arch­Lin­ux users now like bad­ly au­to­ma­tion scripts like yaourt or what­ev­er it is called.

Parse er­ror. And then again: yaourt is great. You don't like it? Act as if it does­n't ex­ist and be hap­py. You seem to have a big prob­lem ig­nor­ing peo­ple who dis­agree with you. That's a re­al­ly, re­al­ly se­ri­ous per­son­al flaw. I sug­gest you grow up.

5. Too many noobs who do dumb things like peo­ple adding their users to hal, disk and dbus group­s.

Sure, they should add them­selves to op­ti­cal and stor­age. So what? It's a sim­ple prob­lem and it has a sim­ple so­lu­tion.

Then again, the ad­dus­er scripts prob­a­bly should do that for reg­u­lar us­er ac­counts. Af­ter al­l, who wants to cre­ate a reg­u­lar us­er that can't use re­mov­able stor­age? And if said use case ex­ist­s, that should be doable by re­mov­ing the user, and not vicev­er­sa!

On the oth­er hand, I don't give a damn, be­cause I can fix it triv­ial­ly.

The main rea­son why I don't think I will switch to an­oth­er dis­tri­bu­tion soon is that cre­at­ing Arch­lin­ux pack­ages from scratch is very easy and the initscript sys­tem is re­al­ly fan­tas­tic.

All in al­l, Arch­Lin­ux is a re­al­ly strong dis­tri­bu­tion now and it's con­stant­ly grow­ing.

I ex­pect you, like most elit­ist poseurs, will run away when you feel Arch is too pop­u­lar and ac­ces­si­ble to "too many noob­s" or some sim­i­lar non­sense.

Which, like the ti­tle says, is why you are a big part of what's wrong with Lin­ux user­s.

Contents © 2000-2024 Roberto Alsina