[Nix-dev] fixing the annoying "Cannot find terminfo entry for 'rxvt-unicode'"

Marc Weber marco-oweber at gmx.de
Mon Jun 6 01:56:02 CEST 2011


urxvt ships its own terminal file which you can install system wide using NixOS's option pathsToLink = ["/"] easily.

Additionally adding this to the system wide bashrc:

        # try to find current terminal setting in system or user profile:
        for p in {/var/run/current-system/sw,~/.nix-profile}/share/terminfo; do
          [ -e "$p/${TERM:0:1}/$TERM" ] && {
            export TERMINFO="$p"
            # looks like we have to reset TERM after telling zsh where to find TERMINFO ?
            TERM=$TERM
          }
        done
        unset p

will set TERMINFO accordingly and suddenly mutt, screen etc can be
started without tweaking TERM first.

The complicated for loop has been chosen so that it is also enough if
the user installs urxvt into the profile.

You can find minor fix in my branch nix2/multi-shell-support.

Marc Weber



More information about the nix-dev mailing list