Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Small Linux Revisited

A Lit­tle His­to­ry

Many moons (al­most two years!) ago, I wrote an ar­ti­cle called Small Lin­ux de­tail­ing what I had done to make a rea­son­able Lin­ux fit in a Toshi­ba Li­bret­to 50.

That's a very lim­it­ed note­book, with un­der 800MB of disk, a 75Mhz Pen­tium CPU and 16MB of RAM, and it has served me well for a long time.

Now, how­ev­er, I am us­ing the al­most ex­act op­po­site, a sec­ond-­hand Toshi­ba Satel­lite 1955-S805.

Where Salma (the Li­bret­to) had a 640x480 screen, Mon­ty (Toshiba), has a 16" 1280x1024. The RAM has in­creased 32 times. But they have one thing in com­mon....

The 800MB HD

You see, Mon­ty is sec­ond hand. My fu­ture moth­er-in-law and broth­er-in-law brought it from New York when they vis­it­ed, for Rosario (My fu­ture wife, un­til Feb­ru­ary 18 2006 ;-).

And it had a bro­ken HD. And I want­ed to use it while I got a nice new 60GB one.

So, over­com­ing my fear of de­stroy­ing ex­pen­sive equip­men­t, I got the HD out of Salma and in­to Mon­ty, and start­ed think­ing....

The Tallest Guy In The World

He had a prob­lem: re­al­ly bad feet. He died of it, too. In the same way, Mon­ty now boot­ed, but the app se­lec­tion was out­dat­ed, and re­al­ly, lots of things Salma could­n't do, Mon­ty could.

What on earth can one in­stall on that disk when you don't have any oth­er re­al hard­ware lim­i­ta­tion­s?

The choice of dis­tri­bu­tion was trick­y.

I am a Cen­tOS guy late­ly, but the pack­age se­lec­tion is en­tan­gled enough that you can hard­ly get X in­stalled with­out cross­ing the 800M­B. The min­i­mal in­stall is about 450M­B.

De­bian again? Well... no.

Knop­pix?

Now, that has some se­ri­ous po­ten­tial, since I could run the OS from DVD/CD, and then use the whole 800MB for da­ta. But I want­ed some­thing where I could choose what to in­stal­l.

I could have gone the path of one of the mod­u­lar Knop­pix deriva­tives, but it was yet an­oth­er task on the pile.

So, I went with­.... ARCH.

ARCH Is Arch

Yes, ARCH is saucy. It in­stalls in rough­ly 200M­B, in­clud­ing ker­nel sources and GC­C. That's quite smal­l.

I man­aged to cre­ate a rea­son­able desk­top in about 550M­B, in­clud­ing:

Scite:

A nice text ed­i­tor

Python:

Need­ed it to work in a few prog­gies.

Firefox:

I have the RAM. The CPU is a 2.56 P4.

Xorg 8.2 with Nvidia drivers:

And just for kick­s, 3d­desk­top to see if they work ;-)

fluxbox:

I know it, and it's nice enough.

putty:

Nicer than xter­m, and has a handy SSH builtin.

ROX Filer:

Not re­al­ly all that use­ful, but what the hel­l, for 3MB you get side­bars, a file man­ag­er and a few ex­tra trick­s.

Slim:

A very nice xdm re­place­men­t. Spe­cial­ly with the mind­lock theme :-)

upx:

Com­press the ex­es. Save 30M­B. Good.

CherryPy:

It's what I am work­ing with. And it's on­ly 74K­B.

habak:

Sim­ple, small tool to set the X root dec­o­ra­tion.

rsync:

Stay synced with my old­er desk­top.

All in­clud­ed, I am at 120 pack­ages, us­ing 557MB of disk (with ex­ten­sive trim­ming, see the orig­i­nal ar­ti­cle for some ex­am­ples).

So, what's the dif­fer­ence be­tween this set of apps and my pre­vi­ous choice....

Well, look at the re­sult of free:

             total       used       free     shared    buffers     cached
Mem:        512544     408924     103620          0      33468     162916
-/+ buffers/cache:     212540     300004
Swap:            0          0          0

Just for laugh­s: here's the old one, when do­ing rough­ly the same things: edit­ing an ar­ti­cle, brows­ing the we­b, a few ter­mi­nal­s:

                total    used    free    shared   buffers        cached
Mem:            14708   14144     564      4644       816          5304
-/+ buffers/cache:       8024    6684
Swap:           47992   18880   29112

Scary is­n't it? I am us­ing rough­ly 25 times the amount of mem­o­ry I used on the li­bret­to. It's easy to see why, tho.

Con­sid­er the desk­top. It shows a pret­ty pic­ture. It is 1280x1024. It is in mil­lions of col­ors. That is in RAM. That is ei­ther 3932160 or 5242880 bytes. On the li­bret­to, I was in­ten­tion­al­ly not us­ing any­thing there :-)

So, it re­al­ly is not com­pa­ra­ble any­way, and Mon­ty's life as a mal­formed box will be short. But it was quite a bit of fun :-)

FSMism

Just for the record, I have re­cent­ly con­vert­ed to Fly­ing Spaghet­ti Mon­ster­is­m.

More in­for­ma­tion here and there.

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­up.py that will do it:

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

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

setup(
  name = "systray",
  ext_modules=[
    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 setup.py install or somesuch, then you can use it in your app like in Torsten's systray2.py example, and it will work.

Deployments and stuff

Have been read­ing the plan­ets late­ly (I mean plan­etkde.org and plan­et.g­nome.org, 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­b.biz 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.


Contents © 2000-2022 Roberto Alsina