I have the following command in my .emacs
(setq org-roam-directory
(concat (getenv "BASEDIR") "/data/org-roam/"))
The purpose is to the set the directory for org-roam
(but really it could be any other package) on different systems where the variable $BASEDIR
has different paths. $BASEDIR
is defined in .bashrc
. This works well if I start emacs from the command line, but fails if emacs is started from, e.g., the file manager.
Is there a way to have emacs read the shell environment variables at startup, regardless on how it is launched?
EDIT: I am running Ubuntu and Arch with GNOME. The file manager is graphical (nautilus or double commander) but of course this also happens if emacs is launched from the apps menu.