4

I have just installed MATE under Ubuntu Saucy. No problems. Except I am trying to setup Texmaker, the LaTeX IDE, and cannot figure out how to set the paths to the LaTeX tools (pdflatex, etc.) which Texmaker spawns.

Now I have used Texmaker for several years under Ubuntu Precise with Gnome fallback, and I know to set the path in ~/.gnomerc. But I cannot find the equivalent of ~/.gnomerc under Mate. (You would have thought .materc but it appears not.)

So how do I set environment variables under Mate?

  • Have you tried manually create $HOME/.gnomerc file and set your variables here? Previosly MATE have sourced that file just like GNOME. But I'm not sure if still works. – diffycat Jan 19 '14 at 13:00
  • 1
    Pardon my ignorance here if MATE for whatever visionary reason replaces or bypasses use of the shell, but can't these be set the normal way (.profile, .bashrc, etc.)? – goldilocks Jan 19 '14 at 14:06
  • I'm with @goldilocks why don't you use the normal methods? Just add the relevant lines to your ~/.profile or ~/.bashrc. In any case, texmaker should not need any variables, you can just give it the full path to the commands you need it to find. – terdon Jan 19 '14 at 14:42
  • 1
    Putting the environment variables in ~./bashrc does not work. Texmaker, which is a GUI program, is not descended from the bash shell but from the window manager(?). So the normal method will not work. – user57115 Jan 20 '14 at 19:03
  • I could add the full path to the commands. But I view this as a hack. Environment variables are provided for a very good purpose! What I am trying to do is possible under Gnome via ~/.gnomerc. What's the Mate equivalent given that it's fork of Gnome? – user57115 Jan 20 '14 at 19:07
1

I have (eventually) answered my own question! The solution is to add the export PATH = ... statement to a file (*.sh) in /etc/profile.d. This is executed when both the bash shell and window session manager start. And it applies for all users, unlike the .gnomerc solution in my original post.

See https://help.ubuntu.com/community/EnvironmentVariables for further details.

0

There is a generic place to add things like this: ~/.xsessionrc.

This is on Ubuntu Trusty 14.04:

$ grep -rs USERXSESSIONRC /etc/
/etc/gdm/Xsession:USERXSESSIONRC=$HOME/.xsessionrc
/etc/X11/Xsession:USERXSESSIONRC=$HOME/.xsessionrc
/etc/X11/Xsession.d/40x11-common_xsessionrc:if [ -r "$USERXSESSIONRC" ]; then
/etc/X11/Xsession.d/40x11-common_xsessionrc:  . "$USERXSESSIONRC"
0

On Debian 8.7, modifying the path in /etc/profile does not work for Mate Desktop. The only thing I could get working, was to add this entry to /etc/security/pam_env.conf (in this case to add the TexLive binaries to PATH):

PATH DEFAULT=${HOME}/bin:/usr/local/bin:/bin\ :/usr/bin:/usr/local/texlive/2016/bin/x86_64-linux

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.