There are, however, some issues:
- To enable environment modules the file
/usr/share/modules/init/$shell
, has to be sourced. ($shell is the name of the shell). This is supposed to be done by/etc/profile
which sources all *.sh-files in/etc/profile.d
where the installation of the package puts the filemodules.sh
which sources the initialisation file in/usr/share/modules/init/
. Assuming the shell is bash this works fine in text login because then bash reads/etc/profile
but apparently/etc/profile
is not read during graphical login, at least not in Mate, which leaves environment modules uninitialised when a terminal window is opened as bash does not read/etc/profile
because it is not invoked as a login shell.
To remedy this I edited~/.bashrc
to directly source/etc/profile.d/modules.sh
as~/.bashrc
is read by bash every time a terminal window is opened. Incidentally, this file is not read by bash when invoked as a login shell which is the reason why usually~/.profile
which also is read during text login sources~/.bashrc
. There is also a bunch of other *.sh-files in/etc/profile.d/
but I guess corresponding initialisations are not needed in a graphical terminal window otherwise I could of course just as easily have sourced/etc/profile
in~/.bashrc
. Comments here would be appreciated. The question is if this is the best way to solve the problem. Is there perhaps some way to tell the graphical login process to read/etc/profile
(or if that's not advised then only the initialisation file)? I imagine it would be good to have environment modules initialised once and for all instead of having to do it all the time.
If not reading/etc/profile
during graphical login is intended it would have been nice if the installation process issued a warning that environment modules might need initialisation as it took me a bit of investigation to find out what the trouble was.
- Once initialised environment modules behaves a bit odd. If the querie command
module avail
is entered the response is the following:i.e. it looks like the command repeats itself invisibly. The same goes for a bunch of other commands that generate output. Other than that things seem to work. I don't know if this behaviour is caused by Mint system tweaks or if the same thing would happen on Ubuntu. Does anybody know what's going on here? If so, do tell.Code: Select all
> module avail ---------------------------------- /usr/share/modules/modulefiles ---------------------------------- dot module-git module-info modules null use.own ---------------------------------- /usr/share/modules/modulefiles ---------------------------------- dot module-git module-info modules null use.own