Using arch-linux
with xorg
and dwm
, environment variables seem not available to the wohle system. E.g. when starting the NNN
file-browser inside a manually started terminal emulator (st
) all bookmarks are available (NNN loads settings through environment variables, here set inside the .profile
file, which loads them from the .bashrc
file). However, when I start NNN by a dwm
-keybinding the bookmarks are not(!) available (here NNN is started via st -e nnn
more precisely i.e. via { "st", "-e", "nnn", NULL };
inside the config.h
file of dwm
). So it seems that here the environment variables are not loaded in this case.
Do you have any idea why? Or how to solve this issue?
EDIT added the .profile
file content:
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
EDIT-2: Added the bookmarks loading line inside .bashrc
export NNN_BMS='h:~/;d:~/Documents/'
.bashrc
they will not be read. – terdon Nov 12 '20 at 15:14.profile
to also read.bashrc
(with:. "$HOME/.bashrc"
) so it certainly reads the variables when starting. It seems more discrete -- however too deep for me. – alex Nov 19 '20 at 19:49st
isn't being ru – terdon Nov 19 '20 at 19:58shell
andbash
, as well as what/why a 'interactive' shell actually is/exists. – alex Nov 19 '20 at 22:17.profile
instead of.bashrc
? That's the simplest way of checking. It's also the right place for global variables, they have no business being set in.bashrc
. – terdon Nov 20 '20 at 09:22