If I create an application launcher with the following command:

mate-terminal -e /usr/local/bin/nnn 

a terminal opens and runs nnn. However, nnn doesn't have a configuration file and settings such as bookmarks are read from environment variables written in ~/.bashrc. When the above launcher command is executed, nnn is not reading its variables from .bashrc, so no bookmarks. If I open a terminal and then type 'nnn' everything runs normally.

  • Does it work if you source bashrc? Try mate-terminal -e ". ~/.bashrc; /usr/local/bin/nnn. – terdon Jun 13 '20 at 16:23
  • Just tried: mate-terminal -e ". ~/bashrc; /user/local/bin/nnn" and the terminal opened and then closed. – w2kpro Jun 13 '20 at 16:51

Please refer to the nnn Wiki section on Desktop integration.

To whoever deleted the earlier response: I have now linked to the project Wiki which I believe would be live as long as the project is. If the project isn't, the question becomes irrelevant.

I would like to link it instead of copying the current information here because the answer is not a one-liner and the specific project is the authentic source of the information and not stackexchange. The data can change and the commenters may not even be aware of it or remember to come back and edit their old comments.

  • Thanks for the info. I kept the exports in .bashrc and changed the Exec entry in ~/.local/share/application/nnn.desktop to: Exec=bash -ilc "nnn %f". Please note, it fails without the bash '-i' option. Also, I had to make a small adjustment to the icon path so that it was correctly displayed in the menu system. – w2kpro Jun 14 '20 at 9:54
  • Also, the Application launcher now works with the following command: "mate-terminal --title='nnn file manager' --hide-menubar --profile=nnn -e 'bash -ilc /usr/local/bin/nnn'" – w2kpro Jun 14 '20 at 10:14
  • Feel free to update the relevant program wiki (which is publicly editable) section if you have some new/interesting stuff to add. – Arun Prakash Jana Jun 15 '20 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.