Skip to main content

Ralsina.Me — Roberto Alsina's website

Posts about open source (old posts, page 2)

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.

More fun with rst2pdf, poppler and PyQt

First: I re­al­ly, re­al­ly need a name for this thing. I am tired of say­ing "my rst2pdf pre­view­er/ed­i­tor ap­p".

Now, here's a video of how it looks nowa­days af­ter all the yak shav­ing (sor­ry about my en­glish, I write lots of it, but nev­er speak it):

As you can see, the ba­sic app is fair­ly com­plete, even if it lacks all the ameni­ties that would make some­one use it (like, search? save? ;-).

It has one big prob­lem, though: I can't pub­lish it yet.

Why? Be­cause I need to use pop­pler from PyQt, and the code I found to do it has no li­cense (see the code).

I am try­ing to con­tact the au­thor (Ra­jeev J Se­bas­tian), so there should be news soon!

As soon as that's cleared, the PDF wid­get is a whole post by it­self, be­cause it's pret­ty neat, if I may say so my­self.

UP­DATE: the bind­ing is now un­der MIT li­cense, thanks to Ra­jeev Se­bas­tian!

Yay! sphinx-rst2pdf-builder works!

Ok, it kin­da works a lit­tle.

I got com­mit rights in the mer­cu­ri­al re­po, so now you can get the very very al­pha ver­sion here.

This trig­gered sev­er­al bugs in rst2pdf, so you need SVN rst2pdf for it to work.

What work­s:

  • Glos­sary

  • Plain re­struc­­tured text ... with some caveats (ex­am­­ple: foot­notes are semi-bro­ken)

  • In­­dex gen­er­a­­tion (not 100%, but maybe 75%)

I don't know what oth­er pieces of sphinx re­quire spe­cif­ic rst2pdf sup­port, but I will be hit­ting them as they come.

rst2pdf: almost sphinx-ready

Some guys at PyAr are trans­lat­ing the python tu­to­ri­al to span­ish.

That tu­to­ri­al, like all the new python doc­s, us­es sphinx.

Since sphinx is very pop­u­lar, I want rst2pdf to work as well as pos­si­ble as Sphinx's PDF pro­duc­er. So, two dif­fer­ent things itch­ing, I start­ed scratch­ing.

Well, progress has been made. While the sphinx changes cur­rent­ly re­side on­ly on my com­put­er, I will pub­lish them soon, and the rst2pdf changes are al­ready com­mit­ted.

Here's a sam­ple to whet your ap­petite.

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.


Contents © 2000-2024 Roberto Alsina