Posts about linux (old posts, page 4)

2005-12-27 12:30

Teaching and money

I have been teaching for almost my whole adult life.

My first real job was teaching assistant. I worked in a university for 10 years.

Then I started teaching Linux trainning courses for diverse companies (think LPI kinda stuff).

Then I stopped. Why? Because it makes no sense economically to teach in most cases.

The following is written in pesos, but the idea is probably about the same for other countries.

There are no money signs beause cheetah templates hate them ;-)

A trainer is paid about 35 per hour. If he's pretty good, he gets 50.

A course is about 24 hours, so he gets about 1200 (I am going for the best case scenario here).

Usually he has between 6 and 12 students, which are charged about 900 + taxes, so the gross is average 5500.

Of that, half (or a little less) goes to the classroom rent, leaving about 3000 for the training company.

Pay the teacher, and you have a rather pathetic amount for the training company that pays overhead, salespeople, taxes and whatever.

So, who makes any money out of this? The classroom renters :-P

So, if youa re going to work on training, please don't rent classrooms, it makes no sense.

Now suppose you have a consulting firm and you can do onsite training (at your clients), and just pocket the money.

If you have just three students, you need no facilities, you can charge slightly higher, because its onsite.

It's the same effort for the trainer, because you just change where you commute to (training center vs client).

Since you can make more money with smaller classes, you can still charge a little higher (more personalized attention).

Since the students are all from one company they have more in common and you can structure the teaching better, which makes it way less boring.

So, if you want to make a living teaching, here's how.

  • Market directly to companies, for onsite training.
  • Have your own materials.
  • Be flexible.
  • Buy your own classroom if you have to.

And most of all, don't worry. It's pretty much impossible to lose money training, unless you open a exclusively training company.

2005-12-19 23:31

Rant: The problem with expensive linux

I always liked SuSE's Linux distros. They even used to mail me a box every now and then when there was code of mine in it. It always seemed nicely done, and well integrated. Of course I only used it as a workstation.

Recently, I had the displeasure of installing a SLES9-based server for a client.

I say displeasure, because it was by far the worse experience I had with any Linux distribution ever. It was worse than the time I had to install openldap on a P2 with gentoo that was connected to the internet over a 56k dialup and had only 100MB of free disk space.

And that one was a screamer!

What were the problems?

Well, for starters, it was a punishing throwback to the times of proprietary software installation.

I install it. Ok.

I try to update it. Not Ok.

The problem? You need to authenticate to the servers in order to get the updates. And there is no user/password anywhere in the box. You have a serial number (in a word file inside a CD, not on a sticker), and no explanation on how to go from one to the other.

It turns out you have to call Support to get the auth data, and that depending on how you do it you get data that lets you access to the novell servers or the suse servers (and not the other).

Then, after we got that (48 hours on tech support), I start installing the software I need.

The mission of this server is simple. It's a mail forwarding server. It handles outgoing mail, and it stores incoming mail for a few minutes until a CRM software (in windows) grabs it via POP3.

I can do such a server on CentOS, Debian, (hell, yes, even gentoo) in about 2 hours without counting install+updates, including migration of old data.

I install postfix and imapd (I think it's wu-imapd, which sucks, BTW, but the alternative was cyrus, which was gross overkill).

It seems to work. But the CRM can't fetch the mail. Outlook can, though. What the hell?

Well, SuSE decided to disable plain logins for POP and IMAP over non-SSL connections. And there is no way to enable it.

Since that's the only kind of connection the CRM will do, it will not work.

Mind you, in this case, it is absolutely no security risk whatsowever, since the mail server and the CRM are segregated from the user's network...

Ok, I will install courier-imap, which is better anyway. But it's not on SLES9 CDs, and the RPMs on the web are for every other SuSE and not SLES9. So I had to build it myself.

That is, of course, because there is no free repositories for SLES9. You have what comes with it, or what you can build yourself. Anything else, you are SOL.

The same thing happened for almost everything I wanted to install. Either it was not there, or it was for some other SuSE, so it was time to compile a RPM again.

It was like Gentoo, only without the automatical dependencies, and with no hope for future security updates unless I build them myself.

At that point I was already telling the customer that maybe I could just install OpenSUSE, which was free and would not have these problems (hell, I would even get apt4suse and avoid the damn novell servers).

Of course that means they would be a few hundred dollars poorer for no good reason.

But anyway, it took me roughly 3 extra days to set this up, which made me actually lose money on the gig. ANd I lost the time in the most pathetic way, sitting in a customer's office waiting for tech support, watching my money go away.

That had never happened to me before. I must say I am pretty disappointed.

But what was the root of the problems here?

  • There is no free SLES clone like CentOS

If there were, then there would be 3rd party repos. The customer would still have bought SLES9 because they are support groupies, but my life would have been easier.

Of course, it would probably cut into SLES sales, but hey, that is not my problem, is it?

  • Novell Argentina tech support sucks for Linux.

The guy on the phone literally had no idea what I talked about when I asked about how to get into YOU to update the box.

But don't worry Novell, I heard Red Hat Argentina's is quite bad too.

If you really want SuSE, buy a regular one, the ones with public FTP repositories, and avoid trouble. Or get OpenSUSE.

Me, I'm pretty bummed :-(

2005-12-17 23:20

Unknown jewels of Unix: NoSQL

I have known about Carlo Strozzi's NoSQL for about 6 years. I don't think many others do (it's google score is 39500, compared with 81200000 for MySQL) , and I think it's a shame, because it's a much more interesting idea.

What is it? It's a relational database.

Sure, I can almost hear you think [1] , "like Mysql!" or "like Postgres!" and you are wrong because it's very different.

NoSQL is a relational database implemented in AWK and operated via the unix shell. Yes, NoSQL is the most unixy RDBMS in the world. So all of you so-called unix lovers, shell freaks, you are gonna love this.

Installing it is perhaps a bit harder than it should (who knew there are no MAWK RPMs anymore!), but it seems to be packed for Debian at least ;-)

You can learn to use NoSQL with a nice [2] tutorial that was published on Linux Journal.

The tables are plain text files, and later you can do things like this (from the docs):

% column Item Cost Value < inventory |
row 'Cost > 50' | mean -l Value
Item   Cost  Value
----   ----  -----
3      80    400
6      147   13083
7      175   875
----   ----  -----

Isn't that cool? What it does is take the inventory table, select over columns Item, Cost, Value the rows with Cost > 50, then calculate the mean of the Value column :-)

It even supports reports, joins, a bazillion things.

Honestly, I am not sure I can find a practical use for it [3], but it is a great piece of software, written by a dedicated guy, it is extremely original, and it does work. I'd even say it's pretty powerful, and you must accept, it's unixy as all hell.

So, Carlo Strozzi, here's a toast for you and NoSQL. You are cool.

[1] So good is my hearing

[2] Sadly it's quite old

[3] I did once, but that was when I was a real programmer ;-)

2005-12-07 21:00

Xen on CentOS4

Just in case anyone is wondering if you can install the Xen hypervisor on a CentOS box:

  1. Sure. It works just fine.
  2. Ok, there are a couple of glitches in the install.

Here's how I did it, on a CentOS 4.2 box:

  • Get the install script for RHEL 4.1
  • Fix the validate_os_version function:
validate_os_version() {
    #grep "Red Hat Enterprise Linux AS release 4 (Nahant Update 1)" /etc/redhat-release 2>/dev/null >/dev/null
  • Run it
  • Fix your grub.conf adding this :
title Xen 3.0 / XenLinux 2.6
  kernel /boot/xen-3.0.gz dom0_mem=262144
  module /boot/vmlinuz-2.6-xen root=/dev/hda1 ro console=tty0
  module /boot/initrd-2.6-xen.img
  • Fix your glibc by doing this:
mv /lib/tls/ /lib/tls.disabled
  • Boot on the Xen option from Grub, and you already have a CentOS Dom0. Quite simple, wasn't it? :-)

Main problem: The Xen kernel you are booting sucks, because it supports no unusual hardware. So, it would be a good idea to hack a decent Xen-linux-kernel similar to CentOS unsupported one.

Now it's time to start toying with CentOS partitions, but they are supposed to be simple.

2005-09-02 23:16

Small Linux Revisited

A Little History

Many moons (almost two years!) ago, I wrote an article called Small Linux detailing what I had done to make a reasonable Linux fit in a Toshiba Libretto 50.

That's a very limited notebook, with under 800MB of disk, a 75Mhz Pentium CPU and 16MB of RAM, and it has served me well for a long time.

Now, however, I am using the almost exact opposite, a second-hand Toshiba Satellite 1955-S805.

Where Salma (the Libretto) had a 640x480 screen, Monty (Toshiba), has a 16" 1280x1024. The RAM has increased 32 times. But they have one thing in common....

The 800MB HD

You see, Monty is second hand. My future mother-in-law and brother-in-law brought it from New York when they visited, for Rosario (My future wife, until February 18 2006 ;-).

And it had a broken HD. And I wanted to use it while I got a nice new 60GB one.

So, overcoming my fear of destroying expensive equipment, I got the HD out of Salma and into Monty, and started thinking....

The Tallest Guy In The World

He had a problem: really bad feet. He died of it, too. In the same way, Monty now booted, but the app selection was outdated, and really, lots of things Salma couldn't do, Monty could.

What on earth can one install on that disk when you don't have any other real hardware limitations?

The choice of distribution was tricky.

I am a CentOS guy lately, but the package selection is entangled enough that you can hardly get X installed without crossing the 800MB. The minimal install is about 450MB.

Debian again? Well... no.


Now, that has some serious potential, since I could run the OS from DVD/CD, and then use the whole 800MB for data. But I wanted something where I could choose what to install.

I could have gone the path of one of the modular Knoppix derivatives, but it was yet another task on the pile.

So, I went with.... ARCH.

ARCH Is Arch

Yes, ARCH is saucy. It installs in roughly 200MB, including kernel sources and GCC. That's quite small.

I managed to create a reasonable desktop in about 550MB, including:

A nice text editor
Needed it to work in a few proggies.
I have the RAM. The CPU is a 2.56 P4.
Xorg 8.2 with Nvidia drivers:
And just for kicks, 3ddesktop to see if they work ;-)
I know it, and it's nice enough.
Nicer than xterm, and has a handy SSH builtin.
ROX Filer:
Not really all that useful, but what the hell, for 3MB you get sidebars, a file manager and a few extra tricks.
A very nice xdm replacement. Specially with the mindlock theme :-)
Compress the exes. Save 30MB. Good.
It's what I am working with. And it's only 74KB.
Simple, small tool to set the X root decoration.
Stay synced with my older desktop.

All included, I am at 120 packages, using 557MB of disk (with extensive trimming, see the original article for some examples).

So, what's the difference between this set of apps and my previous choice....

Well, look at the result 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 laughs: here's the old one, when doing roughly the same things: editing an article, browsing the web, a few terminals:

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

Scary isn't it? I am using roughly 25 times the amount of memory I used on the libretto. It's easy to see why, tho.

Consider the desktop. It shows a pretty picture. It is 1280x1024. It is in millions of colors. That is in RAM. That is either 3932160 or 5242880 bytes. On the libretto, I was intentionally not using anything there :-)

So, it really is not comparable anyway, and Monty's life as a malformed box will be short. But it was quite a bit of fun :-)

2005-08-02 19:17

Deployments and stuff

Have been reading the planets lately (I mean and, not astrology) and run into posts by Aaron Seigo and Luis Villa which are, let's say, interesting.

Luis' post took me to this page which is interesting too, and I would like to see something like it for KDE (and I am sure it is somewhere, but I can't seem to find it)

And I don't mean the page is interesting only for having Australia listed as an asian country ;-)

Some of the items talk about hundreds of thousands (or hundreds of millions) of desktops, and others talk about 11 seats.

Is there nothing in the middle, or is it just not reported?

I decided to put out another datapoint.

Here in Argentina, the best-selling OS has KDE as the default desktop. It's a Linux from Pixart , and is more or less what on other countries is sold as Xandros.

It seems Pixart made some development work for Corel, and then for Xandros when they bought the linux distro business. Their boss is the former (?) boss of Corel argentina, too.

Almost every whitebox clone is sold with one of their distros installed and preconfigured.

Oh, sure, most of them get wiped out and replaced with a stolen windows xp in 24 hours, but it's quite a number. Think 100K or 200K sold each year, at least.

Of some concern is that some of the GNOME deployments used to be KDE deployments. For example, the Sao Paulo telecentros used to be Conectiva boxes with KDE (and windows, in dualboot).

The City of Largo used KDE for quite a while.

But what the heck, we are both desktops squeezed into a ketchup bottle, there's a whole world outside to spread into ;-)

2005-04-04 23:59

Impudent abuse of copy&paste

I often check on the comments for the longer articles I write.

Since most of those are of a technical nature often I find someone posting a question, even years after the article was posted (thank google for that), and I like to answer them.

So, I check on my Linux Booting Process Unveiled article, and I find this:

This article is posted on this site as well, and in its entirety: posted by Joshua Purcell at 2005-03-14 16:14:41.492867-06

And guess what? It is! Thanks Joshua!

Ok, it's not just a copy. For instance, he removed the joke at the beginning, and managed to misspell inittab in a title (as INNITAB).

I am not against copying content from my site. In fact, it says right here at the right side that you can. As long as you do the following:

  • Keep my name on it
  • If you change contents, clearly say so
  • Link back at me.

These guys at Section 6, specifically TBonius decided to do the following:

  • Replace my name with his alias. They even say all their content is (c) nobody. Well, not quite all, guys!.
  • Edit and not mark it
  • Not link back

I would contact them except that:

  • They provide no easy way to do so
  • This doesn't look like a honest mistake (like some vietnamese site did), because of the editing.

So... whatever dudes. I can write articles like this in a couple of hours, while hangover. Nice that you find it worth stealing (badly) down to the footnotes!. But hey, that's just lame. Or, as you may understand better:

Section6 1z 7h3 5ux0rz!

2005-03-17 23:59

Linux: a not-unix-like OS.

Well, I am still experimenting with my concept-distro.

I am now up to a running PyQt using uClibc, which I thought unlikely ;-)

I completely removed all the sysv init stuff, and replaced it with runit, which has an interesting effect:

It boots to a graphical login in about 15 seconds. Inside qemu. In a 900Mhz duron. Including kernel loading.

Of course the trick is that you have the login while stuff is still loading, but I am working on that, too.

Since using runit it's pretty simple to get a overview of where the booting process is (services have dependencies, they simply get started in order, and in parallel), I will hack a system-wide ksplash-like thing on a side of the xdm (probably will end up writing my own whateverdm).

Think of it as Fedora's rhgb, only you can login instead of getting bored.

I also switched to a root-free system Ubuntu style. Not decided yet on it, but it's not hard to do (or use).

Next step: hack Knoppix HW-detection script (or rather rewrite them in a real language).

I understand why there are 743 Linux distros. It's quite a lot of fun to hack one together.

Oh, and it needs a name. It's not going to be useful for anyone, it's just a personal toy, but it needs one.

Come on, Planetkde guys, throw me names for a non-unix like linux, if you dare ;-)

2005-03-15 23:59

Source-based distributions, the good side.

I am no fan of source-based distributions. I think that for most practical purposes, a distribution where installing KDE takes over a day (I own a lowly Duron as my fast computer) is useless.

However, they are good for one particular niche.

Custom distributions. Weird distributions. Personal distributions.

I have several computers. Most of them too slow and small.

As I was considering reinstalling Linux on my Libretto for fun, I looked at what was installed in it, and decided that really, 90% of it was of no use whatsoever.

The problem was, since it had Debian installed, it has a rather wide network of dependencies that simply could not be done without.

On a regular computer, that's not an issue, but in this tiny workhorse, with 16MB of RAM and a 800MB HD, it makes a lot of difference. The smallest I could get Debian to be, and still have network, PCMCIA and X11, was about 250MB.

And the performance was not awesome, either (but not terrible).

So, what would happen if instead of a regular distribution it had something like this:

  • uClibc instead of glibc
  • runit instead of SYSVinit
  • dropbear instead of OpenSSH
  • X built as kdrive (formerly tinyX)
  • python/qt (or maybe python/fltk) for basic admin tools

And so on. Basically rejigger the whole software selection slanting it towards the small side, and dropping a bazillion non-fundamental dependencies along the way.

Well, it can be done. It's just that it's a heck of a lot of work. But here, a source-based distribution gives you a headstart.

For example, I decided to start from ucrux, a uClibc-based port of Crux. Since the native toolchain in ucrux is uClibc, I don't have to worry much about a whole class of mess that happens when you build uClibc-based binaries on a glibc-based system (it's practically cross-compiling).

Qemu lets me install ucrux and work on it somewhat faster than on the target P75 (if I could make KQEmu work I'd be happiest).

Since crux's software packaging mechanism is simplicity itself (a shell script that installs to a fake root), although it's severely underpowered (no dependencies), I can start from ucrux, hack the build of one package at a time, then put everything on a CD very quickly.

So, if you want to hack your own distribution, Crux (or some other similar kit) is quite a nice thing.

For general use... well, my requirements start at apt-get or equivalent ;-)

Now, if only TinyCC worked for more programs, that P75 would be a pocket development powerhouse!

2004-11-10 15:16

What linux needs on the desktop is...

... oh, screw it, why not say what it doesn't need? It's better for my blood pressure.

  • It doesn't need Be refugees whining about how BeOS was so awesome and Linux desktops suck. You know what, guys? If BeOS was so cool, and Linux sucks so much, how come BeOS is dead? Now put a sock in it and go practice your OS-necrophilia.
  • It doesn't need windows users saying "it's not like windows, it sucks". If Linux was just like windows, you would say that there is no reason to switch, so put a sock in it, because you can't have it both ways.
  • It doesn't need Mac users saying how there's no point working on it because OSX is already as good a unix desktop as there's gonna be, so why bother?. Put a (designer) sock on it, because in order to use OSX you have to buy an ungodly expensive (except the 12" ibook, that's kinda cheap and cute) computer that provides only adequate performance, and I am a cheap bastard.
  • It doesn't need old unix gurus explaining how there's no need to work on KDE or GNOME because Window Maker is lighter, and all that's needed is a way to keep their xterms sorted. Put a sock in it, because xterm sucks, Window Maker is featureless, and you can't do anything useful for a regular user with just xterms and Window Maker, so you are comparing apples to apple orchards.

Most of all, it doesn't need any "What linux needs on the desktop" editorials.

On other news, I will be speaking about Linux on the desktop at the UADE in Buenos Aires, Argentina, this saturday, and about PyQt/PyKDE programming this friday.

More information at the CafeLUG site. If you read it here and mention my blog, I will pay you a beer (offers limited to a maximum stock of three beers).

Contents © 2000-2018 Roberto Alsina