Kategorien: computer, hardware


Properly disable terminal capabilities for alternate screen in tmux

A lot of places recommend to use the following tmux config to disable the (outer) terminal emulator's alternate screen:

set -g terminal-overrides 'xterm*:smcup@:rmcup@'

But this will override the default value of the `terminal-overrides` setting, and therefore the following should be used instead:

set -ga terminal-overrides ',xterm*:smcup@:rmcup@'

Without using the "append" (-a) option with "set", the defaults would be overwritten, which are currently:

*256col*:colors=256,xterm*:XT:Ms=\E]52;%p1%s;%p2%s\007:Cs=\E]12;%p1%s\007:Cr=\E]112\007:Ss=\E[%p1%d q:Se=\E[2 q,screen*:XT

The tmux FAQ has been updated.

Another method to remove the "smcup" and "rmcup" capabilities globally is the following (via ~/.zshrc, ~/.bashrc etc):


# Remove smcup/rmcup term capabilities globally.
# See also ~/.dotfiles/tmux.common.conf (terminal-overrides).
# Source: https://blogs.oracle.com/samf/entry/smcup_rmcup_hate
# Fixed: remove escaping backslash from sed regexps.
TERMINFO="/tmp/$(id -un)-terminfo-$TERM-$(uname -s)-fixed"
if [[ ! -d $TERMINFO ]]; then
    mkdir -p $TERMINFO
    infocmp | sed -e 's/smcup.*,' -e 's/rmcup.*,' -e '/^[ \t]*$/d' \
      > $TERMINFO/fixed
    sed -e '1d' -e '3,$d' < $TERMINFO/fixed | grep -w $TERM >/dev/null 2>&1
    if [[ $? -ne 0 ]]; then
        mv $TERMINFO/fixed $TERMINFO/broken
        sed -e "2s/^/$TERM|/" < $TERMINFO/broken > $TERMINFO/fixed
    tic $TERMINFO/fixed
By Daniel in computer, Snippets, Planet Ubuntu2014-11-06 English (EU) Email


Bleeding heart fixed

xkcd.com/1354 provides a very nice explanation of the „OpenSSL Heartbleed“ bug that has been discovered a few days ago:

FWIW I have re-newed the SSL certificates for my services (and revoked the old ones).

By Daniel in Ankündigungen, computer, Security04/12/14 English (US) Email


Use hybrid suspend method by default with pm-utils/Linux (suspend to RAM and disk)

There is this nice method of suspending a computer to RAM (which is quick to suspend and resume, but still uses some battery) and after a given amount of time to disk, if it has not been waken up since then (e.g. after 15 minutes).

Ubuntu (and any other distribution using pm-utils) supports this via the pm-utils package and its pm-suspend-hybrid script.

Unfortunately this is not used by default (even hibernation is not available from the menu by default), but only normal suspend.

The following configuration snippet will make pm-utils use the "suspend_hybrid" method instead of "suspend" when being invoked:

You have to create a file like /etc/pm/config.d/00-use-suspend-hybrid and add the following code (e.g. via sudo -e /etc/pm/config.d/00-use-suspend-hybrid):


# Always use suspend_hybrid instead of suspend
if [ "$METHOD" = "suspend" ]; then

I came up with this solution after having asked for a method to do so at Ask Ubuntu.

This way hybrid suspend will be used automatically if you select e.g. "Suspend" from the menu or close your laptop's lid (both actions call pm-suspend which then gets remapped).

You can configure the amount of time before hibernation (Suspend To Disk) is being invoked with the PM_HIBERNATE_DELAY variable (in seconds), which you can just configure in the same file, too:


# Always use suspend_hybrid instead of suspend
if [ "$METHOD" = "suspend" ]; then
PM_HIBERNATE_DELAY=300  # invoke hibernation to disk after 5 minutes (300 seconds)

You might want to make sure that the hybrid method is supported on your system via the following code. If it says "0" it should work:


sudo pm-is-supported --suspend-hybrid && echo $?

Happy suspending.

Update (2013-10-09): I have updated my own answer at AskUbuntu with another (really hybrid, often preferred method), which you can use with Linux 3.6+.


SuperSchnelleDisk (SSD)

Habe mir ein Solid State Drive gegönnt: eine OCZ Vertex 2, 120GB.

Seit längerem schon als Performance-Upgrade angedacht, und um meine doch sehr "nervig knatternde" Raptor-Platte abzulösen.

Ich habe nun meine "root"-Partition (wo das System drauf liegt) und die "home"-Partition (wo Benutzerdaten liegen) dorthin verschoben: das System startet viel schneller, ebenso wie sich Programme merklich schneller starten lassen.

Einfach ein sehr sinnvolles Upgrade!

Von Daniel in hardware15.12.10 German (DE) E-Mail



Es ist schon erstaunlich, wenn eine IE5 Installation unter Ubuntu von 2006-06-18 immer noch läuft.

Hatte das damals mit ie4linux installiert, wenn ich mich recht erinnere - und wine packt es einfach weiterhin, auch wenn ich es jahrelang nicht genutzt habe (und weiterhin nicht nutzen werde).

Von Daniel in Ubuntu, computer21.04.10 German (DE) E-Mail


HAL configuration for Kingsis Peripherals Evoluent VerticalMouse 3

To configure my Kingsis Peripherals Evoluent VerticalMouse 3, I've added the following fdi (HAL configuration info) to /etc/hal/fdi/policy/evoluent-verticalmouse3.fdi:


<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">
    <match key="info.capabilities" contains="input.mouse">
      <match key="input.product" string="Kingsis Peripherals  Evoluent VerticalMouse 3">
        <merge key="input.x11_driver" type="string">evdev</merge>
        <merge key="input.x11_options.Emulate3Buttons" type="string">no</merge>
        <merge key="input.x11_options.EmulateWheelButton" type="string">0</merge>
        <merge key="input.x11_options.ZAxisMapping" type="string">4 5</merge>
        <merge key="input.x11_options.ButtonMapping" type="string">1 2 2 4 5 6 7 3 8</merge>

The most important part (for me) here is ButtonMapping: by default only the wheelbutton triggers middle click, but since it's rather hard to press (and I use it often for pasting), I've mapped it to the middle button on the right side, too.
Also, the thumb button becomes "Back" (in browsers) and the lowest button on the right triggers the context menu.

Update: This was meant to included in Ubuntu Karmic (see bug 451729), but then got removed again (not everybody liked it).

Update^2: for udev (which is used solely since Ubuntu Lucid), I've transformed it into the following file (which you can store as /etc/udev/rules.d/90-local-xorg.rules):


ACTION!="add|change", GOTO="xorg_local_end"
KERNEL!="event*", GOTO="xorg_local_end"
ENV{ID_INPUT_MOUSE}!="1", GOTO="xorg_local_end"
ENV{ID_MODEL}!="Evoluent_VerticalMouse_3", GOTO="xorg_local_end"
ENV{x11_options.ZAxisMapping}="4 5"
ENV{x11_options.ButtonMapping}="1 2 2 4 5 6 7 3 8"

(see also https://wiki.kubuntu.org/X/InputConfiguration for more information)

Update^3: This is bugged in Ubuntu Lucid.



Link: http://getpopfile.org/

POPFile lets you easily handle your POP/IMAP email incoming folders and filters your mails into "buckets".

It allows more than the usual "spam" / "ham" buckets - you can use it to filter by language, too.

I have quite a special email setup, and it says currently:

Messages classified:   108,230
Classification errors: 2,948
Accuracy:              97.27% 

My buckets are: b2evo, backscatter, bugs, jedit, logspam, newsletter, personal, server, spam, traffic-watch, ubuntu, ubuntu-ack

Training messages into new buckets is as easy as moving them into another folder, when using IMAP - the POPFile process will recognize the movement and re-train this message.

If you're still using POP3, POPFile is a nice application anyway (it can be used as a proxy), but please consider switching to IMAP for your own sake.