Feb 2024 updates break nnn file manager

nnn bookmarks and plugin selection is broken. Pressing “b” or “;” fails to display a list of selection options and pressing a key gives an “invalid key” error.

OK, nnn’s configuration settings are in .profile, which after the update is no longer being read on startup. running “source .profile” fixes the problem.

That will only work for the current terminal-session.

Add the source to either ~/.bashrc of ~/.zshrc or whatever if it’s not one of those two to make it permanent.

Already done!

In .zshrc:
If [[ -e /home/manjaro/.profile ]]; then
source /home/manjaro/.profile
But why does it not automatically load at startup? There are no .bash_profile or .bash_startup files in ~/, which would stop .profile from loading. Has .profile been depreciated?

It will launch/start/run every time you start a bash session. So every time you open your terminal emulator. Which I think is perfect for nnn

So, you use zsh, that means ~/.zprofile is read, not ~/.profile

.profile has always worked before the Feb updates with zshell. However, it might be worth renaming .profile to .zprofile and see what happens. Thanks for the tip.

Possibly related to the changes made with lightdm 1:1.32.0-5:

1 Like

O.K., maybe I was little bit to strict in my answer. I once did the migration from bash to zsh on my system. So I have both in my home-partition. Maybe it works so that zsh tries first .zprofile and when that’s not in place it used to look for .profile.

Removing the “source .profile” lines from .zshrc and renaming .profile to .zprofile works. Also, if for some reason one needed to keep .profile, a one-linner in .zshrc ‘[[ -f ~/.profile ]] && source ~/.profile’ will work.

Why was that there to begin with?

No reason to do that…

❯ cat ~/.zprofile
emulate sh -c '. ~/.profile'

Leave your .profile alone otherwise other shells like BASH will have nothing to read.

The source .profile lines were not in the original .zshrc, I added them as a work arround to fix .profile not loading. The ~/.zprofile file was never generated when changing the shell from bash to zshell, so there has only been a .profile file. Are you saying keep the .profile file and create a new file named .zprofile with one line “emulate sh -c ‘. ~/.profile’”?

O.K., I have kept the original .profile and .zshrc files and created a .zprofile with one line as suggested above and the contents of .profile are now being read.
Thanks to everyone for the help.

1 Like