Short Howto: key bindings in shells

Tux
This short howto explains how to figure out which key binding is connected with which key.

I just read a post about zsh and once again was curious about the possibilities and the advantages of that shell. The author provided a customized .zshrc which I used for tests. And despite the good intentions of the author it was almost unusable.

One reason for that was that the key bindings weren’t right: when I pressed the DEL key a new char “~” appeared instead of another one deleted. POS1 and END keys also just produces more “~” chars. This was due to the fact that the key bindings for the keys were set to the wrong keys: bindkey '^[OF' end-of-line simply didn’t work for me.

So I had to figure out the right key binding – this is easily done by calling cat and afterwards press the key which key binding you’d like to have. For me it was ^[[4~, and I used it to replace the ^[OF from above. It worked, and now the appropriate keys work on my system as well with:

# the "del" key
bindkey '\e[3~' delete-char
# home
bindkey '^[[1~' beginning-of-line
# end
bindkey '^[[4~' end-of-line
# insert
bindkey '\e[2~' overwrite-mode

Posted in HowTo, Linux. Comments Off

hardinfo on Fedora

fedora-logo-bubble
hardinfo, a tool for gathering hardware data and benchmark information was submitted to Fedora 7 updates testing.

I just discovered hardinfo in the Fedora repositories while I was checking for some data about my own packages and was curious what the program is capable of. And judging from the first looks the tool is indeed very helpful.

The first thing I noticed was that the GUI is well designed and user friendly: you have a good overview and can quickly navigate to see the information you need. In this regard it reminds me of the KDE info center.

hardinfo-main-GUI

But hardinfo stands out because of the amount of data which it can collect: besides the usual hardware data it can also reads the current logged in and generally available users, statistics about boots, network interfaces, supported languages, kernel modules, and so on. And it can export all these data as a report – in HTML format. This can become quite helpful when you need some help with your machine.
However, since so many information are included you should be a bit careful with the data security wise.

The second really interesting point for me is that the tool comes along with a set of benchmarks. And for better comparison the benchmarks also show results of other machines so that you can compare them more easily. However, as you see in the screenshot, the output does not check for different notations of decimal numbers: on a German machine one and a half is 1,5 and not 1.5 like on English machines. Although, after several tests the numbers seem sometimes to be quite strange (too fast or too slow). But these are just a minor bugs, I guess.

hardinfo-benchmark-output

You can also update the list of benchmarks of other machines to have an even better comparison. I’m not sure how useful it is to have the benchmark data of dozens of machines here for comparison, but the intention it good.

And I have to admit that I do miss proper benchmarking under Linux: it would be nice to have some figures to better compare Linux machines against each other. If hardinfo would add other benchmarks over time it would be nice. I think of hard disk and RAM bechnmarks, of GPU benchmarks and maybe even network benchmarks.

Posted in Fedora, Linux, Screenshots. Comments Off