Framebuffer

One of the many millions of readers of this blog 😏 asked how to change the screen resolution in the console.

I usually do the following: I install hwinfo, and issue

hwinfo --framebuffer | grep res

where "res" stands for the desired resolution, such as, for example, 1400.

If you're lucky, you'll get something like

Mode 0x0329: 1400x1050 (+1408), 8 bits

Then, you just have to add this information to the kernel option in your /boot/grub/menu.lst: vga=0x0329

I would also delete any occurence of "quiet" in this file. Ok, forget that I said that. πŸ˜„

Change (yes we can)

Virtual machines enable us to have various operating systems in store for testing or support purposes. Rather than installing each of these systems, one can download the respective virtual appliance and use it instantaneously with the free VMware Player. Alternatively, one may download a virtualbox image and use it in VirtualBox. Now, these appliances often have rather funny sounding host- and usernames, which at least I really want to change to avoid confusion. Here's how.

The hostname is simple...

hostname new_name

That's, however, just temporary.;) A permanent change is achieved by editing /etc/hostname for Debian and Ubuntu, /etc/HOSTNAME for Suse and Slackware, and /etc/sysconfig/network on Redhat, Fedora and Mandriva. Don't forget to check /etc/hosts either.

Changing the username from, say, "Jim" to "John" is not difficult either, but can also be done in a few seconds:

init 3
killall -u Jim
usermod -l John Jim
groupmod -n John Jim //if required...check before with "id Jim"
usermod -d /home/John -m John
usermod -c β€œJohnnie Walker” John
id John //just for checking
shutdown -r now

A consistent naming scheme really helps. πŸ˜‰

X...Server

Let's talk about a dogma: servers must be console only, and they should never have any kind of GUI. That's why Windows server are frowned upon and laughed at, right? Right!

Wrong. The dogma of console-only servers has been born a long time ago, when system resources were scarce and precious. Hell, even 1995 I spent the equivalent of 500 € for a mere 16 MB of RAM. This situation has changed completely. System resources have become ridiculously cheap. Today, one can purchase 4 GB RAM for a mere 50 €. And what's even more important: the display resolution has increased from 640x480 about 20 years ago to today's de facto minimum of 1280x1024. This screen real estate screems for being used!

Let's just consider a real-life example. To do so, I've chosen Ubuntu 8.0.4 LTS Server which I believe to be a good choice for a conservative, yet reasonably up-to-date server installation. You can configure essentials such as the console font and resolution with a simple dpkg-reconfigure console-setup. Since my eye-sight deteriorates rapidly (sigh), I chose Terminus for the former and whatever is the actual physical resolution of the display I'm using. I'm then always amazed by the waste of space.

Wouldn't it be nice to make use of all this space on the screen? As a matter of fact, there is a whole class of window managers which specialize in tiling, explicitly advertise to be lean and claim to be optimized in keyboard navigation. Among the many alternatives, I have chosen wmii, with which I am most familiar for historic reasons. Now, sure the memory consumption of this thing must be unbearably high, enormous, astronomical? Surely all servers will imediately break down when confronted with such a blasphemy...OMG! 😏

Let's see how much it actually is...including tightvnserver, as the X desktop is most frequently used remotely:

plain console single terminal 15780 kB
quad terminal NA
wmii single terminal 32540 kB
quad terminal 40020 kB
wmii/tightvnc single terminal 39872 kB
quad terminal 54104 kB

Indeed. On a relative scale it costs a lot, on an absolute one it is entirely negligible as long as the server running it is reasonably up-to-date. πŸ˜‰

And what do we gain? Much, I think. Just look at these four xterms:

screenshot of wmii

Purists may abhor this sight, but personally I wouldn't want to miss the clarity and convenience I gain by using wmii. To see all these terminals simultaneously is something I find invaluable, and so much more satisfying than screen (which is very useful in its own right, of course).

PS: The configuration of the vncserver is simple: ~/.vnc/xstartup should have the same content as ~/.xinitrc. In the example shown above, this is

xrandr -s 1400x1050
exec wmii

A fresh vision

Halloween is Ubuntu time. πŸ˜‰ The upgrade from Hardy to Intrepid was smooth and without any incident. Kudos to the developers. Upgrading Kubuntu delights you with deleting KDE 3.5.9, and installing 4.1.2.

Ooops. πŸ˜„

It is quite all right, as I was of course prepared. And it's just a virtual machine anyway. πŸ˜‰

I thus was once again required to deal with KDE 4. Hm. I'm not immune to the looks of it, nor do I ignore the obvious improvements made, for example, in the case of Kate. However, I keep wondering why the KDE developers have chosen to play a hide-and-seek with their users. The best example for this behavior is Dolphin...how do you actually type the name of a path?

It's so easy. Just move your mouse next to the path name, in the title bar, until you see "click to edit location". Click there! See! It's so easy!

OMG! *slapforehead* 😏

Desktop performance

Of course, I've heard about the 2D performance problems of Nvidia cards when applications use Xrender. I didn't pay much attention as I thought that this problem wouldn't affect meβ€”I just have a 7300GT and not one of the cards of the 8000 or 9000 series for which these perfomance issues were reported. Alas, I was wrong...though I notice a performance hit only for firefox and KDE4 applications. For the latter, however, the slowdown is truly unbearable when compared to the open nv driver. See also the update of my KDE 4 rant here.

Aesthetics

I hate to admit it, but my vehement dislike of Gnome is not only based on technical arguments. On the contrary, I suspect that much of it is rooted in my entirely subjective and personal aesthetic perception. In other words, I always found Gnome to be plain ugly.

Now, after installing OpenSolaris a couple of months ago, I was surprised by my reacion to the look-and-feel of it. Great, I thought. Well, as it turned out, Sun has spared neither money nor effort to create an attractive theme called "Nimbus" for its JavaDesktop.

Today, when installing OpenSuse 11.0, I thought that Gnome can't possibly be worse than KDE4. True, but Gnome proved to be as ugly as I remembered it to be from my worst nightmares. Salvation came when I found that Nimbus is available for OpenSuse. I think it looks great (don't ask me why) 😊

screenshot of desktop

Technically, the package management of OpenSuse has been much improved over previous versions. Zypper is not yet as fast as its brothers and sisters on Debian and Mandriva, but the improvement in speed is laudable.

Little super

Just shopping, you know, and I found that a mere 20,000 € can buy you a teeny tiny supercomputer. You get ten double Opteron-quadcores, each with 16 GB RAM. Interconnection is by Gbit ethernet, but Infiniband costs only a little more. Holy cow.

The KDE4 disaster

I was patient. I truly was. I tried and tried. But after an intense two-days session with KDE 4.1.2 I've lost my patience, once and for all.

The fact is: KDE 4 is still (i) slow,[1] (ii) utterly unusable,[2] and (iii) prone to crashes like nothing I've seen since Windows 3.1.[3] And I'm afraid that it will stay that way for a very long time.

The problem for a long-time and happy KDE user like me is: there's no official milestone for the further development of KDE 3.5. Furthermore, several applications already exist only in a KDE 4 version, such as, for example, krusader or yakuakeβ€”and believe me, the limitations show.

What to do, then? I really don't know. It saddens me that KDE is ruined in that way, and I'm thinking about alternatives. Gnome isn't one, though. Perhaps xfce? Just having to think about that angers me.

  1. It turned out that the NVidia driver was responsible for this phenomenon. πŸ˜’ See here. With the open driver (nv) KDE4 is just as fast as KDE3 or perhaps even faster.

  2. I could list dozens of examples, but just look at the ways you're required to go to add programs (as opposed to widgets) to the panel and to move them. If there's none of the frequent plasma crashes, ask yourself: now, was that convenient? Or even intuitive?

  3. I've tried it on more than one distribution.

Chop off your heads

Suppose you want to follow Histiaeus, the greek tyrant, and send a message secretly to your fellow tyrant. Suppose, thus, that you shave the heads of your slaves and tattoo messages on their scalp. Great!

Now, you may like that a lot, but the guy next door doesn't like secret messages at all. He doesn't know that you use steganography, but he suspects you to do, since he's utterly paranoid. He thus decides to treat all outgoing messengers with a certain procedure, which he calls "double-stegging". It consists of dunking the head of the unfortunate messenger into a pot of green paint.

A neighboring king has a similar philosophy, but an even simpler, and more pragmatic attitude. He just chops the head off of all messengers who are unfortunate enough to cross his path. D'oh!

An agitated, almost hysterical minister informs you of the complete failure of your military intelligence. Oh my god, he says. Green heads and chopped off ones. Quite obviously, sufficient to destroy any secret message you sent. Why didn't you ever think about that?

Instead of consulting a specialist, you simply order that all future messages should be written on the messengers' feet.

Read the true story of the heroic fight of Keith Bertolino against steganography and its users: "corporate spies, disgruntled employees, or terrorists." And if you suspect the following image to contain a hidden message:

convert steganocat.jpg clearcat.jpg

Hopefully, this line doesn't violate any patents...

Cat

The downs and ups of a Debian user

Well, teeny tiny downs: ever wondered where the gcc manpage might be? It's in a package called gcc-docs, of course, but to install it, you need to enable the non-free repository. Hmm. And is there really just gcc-4.1 in stable? That's two years old!

Big, fat ups: the upgrade to lenny is so simple, fast and overall just pleasant that I'd wish I could do it every day. At least. And in contrast to Ubuntu, you can do all at the command-line...

Just in case you don't know, here's how:

First of all, visit your /etc/apt/sources.list, and change any occurence of etch to lenny. Save. Then, issue:

wajig update
wajig upgrade
wajig dist-upgrade

You have to update the kernel and the kernel sources separately by explicitely issuing the respective commands:

wajig install linux-image-2.6.26-1
wajig install linux-headers-2.6.26-1
etc.