SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Which takes one or more arguments. For each of its arguments it prints to stdout the full
path of the executables that would have been executed when this argument had been entered
at the shell prompt. It does this by searching for an executable or script in the directo‐
ries listed in the environment variable PATH using the same algorithm as bash(1).
So I would suspect that you have different $PATH specifications. Try 'echo $PATH' before each 'which" call.
-, -l, --login
Provide an environment similar to what the user would expect had
the user logged in directly.
When - is used, it must be specified before any username. For
portability it is recommended to use it as last option, before any
username. The other forms (-l and --login) do not have this
restriction.
this explain why I get this:
Code:
$ su
# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/sbin:/bin:/usr/bin
and this
Code:
$ su -
# echo $PATH
/usr/local/texlive/2021/bin/x86_64-linux:/usr/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/lib64/libexec/kf5:/usr/lib64/qt5/bin
Sure, I can create an alias as "su = 'su -'". But, is there any file that I can change in order to "su" to have the same $PATH as "su -" ?
In that same man page for su, it states that when not using "su -" (which is the same as "su --login"):
Code:
Note that the default behavior for the environment is the following:
The $HOME, $SHELL, $USER, $LOGNAME, $PATH, and $IFS environment variables
are reset.
If --login is not used, the environment is copied, except for the variables
above.
It also says exactly what these environment variables are reset to:
Code:
$PATH
reset according to the /etc/login.defs options ENV_PATH or ENV_SUPATH ...
I have checked the defaults in Slackware's "/etc/login.defs" file, and they indeed match the PATH output that you posted in the OP for "su":
Since the texlive package provided by a full installation of slackware64 15.0 is not complete, I removed it.
Glad your issue was solved, another option would have been to install texlive-extra and texlive-docs from SBo to have a complete texlive installation.
I'd like to know if you just didn't know about that, or if there are other reasons to prefer the iso-installation.
Glad your issue was solved, another option would have been to install texlive-extra and texlive-docs from SBo to have a complete texlive installation.
I'd like to know if you just didn't know about that, or if there are other reasons to prefer the iso-installation.
Before installing Slackware 15.0 I was using Devuan (and I always installed texlive-full to avoid any missing package/feature). Last year one of my students (I'm a professor) sent to me a PDF that was different of what I was expecting (the font on the pdf was different when compiled on my machine). After several days trying to figure out what was happening, I realized that one package, more precisely the 'ae' package, changed from texlive 2019 to 2020 (or from 2020 to 2021, not sure about the year). Am I sure that is the 'ae' package? Yes....
So, I decided to install texlive 2021 on Devuan, and voilá!! Using/not using the 'ae' package was giving me different font on the generated PDF.
Also, I realized that installing from iso it is possible to have a up-to-date texlive installation (although this is not a big deal).
WHen I installed Slackware 15, I just started using the provided texlive package (and the SBo for 15.0 wasn't ready yet ... but now they are).
Compiling one document with the provided texlive was giving me wrong font (not fault of 'ae' package this time) on the PDF.
The easiest solution to me was to install from iso, since I already have (almost)all step-by-step to do it.
The curiosity about "su" and "su -" was just a small thing since I'm the only one that uses the computer.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.