nixos-shell icon indicating copy to clipboard operation
nixos-shell copied to clipboard

Inheriting TERM variable leads to broken terminal

Open mpickering opened this issue 4 years ago • 4 comments

nixos-shell will inherit the TERM variable from the user environment which leads to a broken terminal in some situations.

For example, I have TERM=rxvt-unicode-256color, which is inherited and leads to a broken terminal. Probably because rxvt_unicode is not in the system packages?

mpickering avatar Feb 02 '21 12:02 mpickering

Does inheriting $TERMINFO_DIRS fix this issue?

Mic92 avatar Feb 02 '21 14:02 Mic92

No, it's still broken inheriting that variable.

mpickering avatar Feb 02 '21 17:02 mpickering

I have:

echo $TERMINFO_DIRS
/home/joerg/.nix-profile/share/terminfo

I assume it has your system profile in there? So maybe something like TERMINFO_DIRS=$(realpath $TERMINFO_DIRS) could fix it.

Mic92 avatar Feb 03 '21 05:02 Mic92

One would need to add all terminals to environment.systemPackages to fix this properly.

Mic92 avatar Aug 14 '24 05:08 Mic92