Global PATH in Debian Wheezy XFCE

As a step in a long term plan to get rid of all MS dependencies of my workspace, I tried to setup TeXLive together with TeXstudio on my Wheezy machine. Got the TeXLive installer, ran the install-tl, which completed, after some choking, with a message, that I should now setup PATH so that it be visible, but without any hint how to do so. Some googling brought the advice to link the binaries to /opt/texbin by typing ln -s /usr/local/texlive/2013/bin/* /opt/texbin as root so that this directory is to be linked instead of /usr/local/texlive/2013/bin. So far, so good. Now, it seems that the installer of TeXstudio is able to detect a TeXLive installation provided it is visible, and installation shall be run as root. It would therefore seem worthwhile to have one central place to append /opt/texbin to the PATH setting of any user running any shell (or clicking on some activator in the GUI). More googling brought information on /etc/profile, ~/.profile, ~/.bashrc and the like, but they are either user or bash–specific, as far as I understand. Then there is /etc/environment, but since this is not a script but a definition file, it seems it is not possible to actually append a path to a preexisting system–set PATH, but to replace it altogether, which, as far as I understand, may lead to a nasty hard–to–understand situation, should the system modify its default PATH. And ultimately, at least according to google, there is the /etc/login.defs file, which is supposed to actually contain the systemwide defaults defined separately for root and non–root users in lines

ENV_SUPATH PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV_PATH PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

So that seemed to be what I was looking for. Read more of this post

Advertisements