You are not logged in.
I want to add mutt to my fluxbox menu, I add mutt to ~/.fluxbox/menu using the command
urxvt -e neomuttI have an environment variable set in my .bashrc that exports $EDITOR as "nvim" so that when programs ask for this variable it opens neovim. I have
set editor=`echo \$EDITOR` set in my muttrc.
I would normally expect it to apply the environment variable nvim so that when I wish to edit my emails it edits them in neovim. but running urxvt -e does not seem to apply. them, as I get a an error:
~/.config/neomutt/neomuttrc:1: Option editor may not be emptyI am still able to open the program normally by simply executing it in the terminal.
Is there a way to apply environment variables through executing programs this way? I searched google and i haven't found any good results, rxvt-unicode's man pages seems to only refer to environment variables when it comes to the shell (or at least thats how i interpreted it, didn't really read too in detail)
Thanks.
Last edited by gehenna14 (2024-02-19 02:50:14)
Offline
urxvt -e bash -c 'exec neomutt'
urxvt -e env EDITOR=nvim neomutt"-e" runs the given process directly, it'll inherit the environment of the parenting shell (fluxbox) but not some random interactive shell.
Offline
urxvt -e bash -c 'exec neomutt' urxvt -e env EDITOR=nvim neomutt"-e" runs the given process directly, it'll inherit the environment of the parenting shell (fluxbox) but not some random interactive shell.
Ah okay. I will probably just stick to opening it with the env variable set in the command. tried opening it via bash with that and it didn't seem to work.
Offline
"bash -ic" might be required instead of just "bash", depending on where to source the variable from.
But OC just controlling the environment directly w/o invoking a complete interactive shell setup is preferable.
Offline