You are not logged in.

#1 2015-07-01 16:02:15

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

TeX Live and vim-latexsuite PATH problems

I have installed TeX Live according to these instructions
https://wiki.archlinux.org/index.php/Te … rk_install
and vim-latexsuite (community/vim-latexsuite 20141116-1).

Question 1:
According to https://www.tug.org/texlive/doc/texlive … 310003.4.1 PATH has to be amended.
I tried to do this on the “per user” basis
https://wiki.archlinux.org/index.php/En … s#Per_user
and amended ~/.bash_profile by adding the line

export PATH="${PATH}:/usr/local/texlive/2015/bin/i386-linux"

But after a new user login and also after a reboot PATH does not contain the new directory. I have to add it manually (or I could change to the “Globally” version).

So, what's wrong with the “per user” environment variables mechanism?

Question 2:
Using vim-latexsuite I have encountered the “Compiling does not seem to work for me” problem and consulted
http://vim-latex.sourceforge.net/index. … &title=FAQ, 2nd Question
Trying in normal mode !latex -interaction=nonstopmode % or something similar as !pdflatex % always results in an error message, saying:

/bin/bash: latex: command not found.
Shell finish 127

If I use the command together with the whole path to /usr/local/texlive/2015/bin/i386-linux

!/usr/local/texlive/2015/bin/i386-linux/latex -interaction=nonstopmode %

the compilation of the tex file works!

So again there is a problem with the PATH!
Any idea what's wrong?

Thanks!

Offline

#2 2015-07-01 21:28:20

ryzion
Member
Registered: 2012-03-20
Posts: 95

Re: TeX Live and vim-latexsuite PATH problems

I remember these issues. Never got to solve them though. I'd recommend you to do a normal install if you're not too tight on disk space.

Offline

#3 2015-07-01 21:35:55

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

So the only real problem here has nothing to do with latex specifically - you're only having trouble setting the PATH variable.  Please post your full ~/.bash_profile


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2015-07-01 21:52:16

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

Yes that was my guess too.

#
# ~/.bash_profile
#

export PATH="${PATH}:/usr/local/texlive/2015/bin/i386-linux"
[[ -f ~/.bashrc ]] && . ~/.bashrc

Offline

#5 2015-07-01 22:35:23

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

What is your PATH within a shell?  Do you set PATH somewhere else?

$ echo $PATH

$ grep PATH ~/.* 2>/dev/null

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#6 2015-07-02 20:41:41

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

In my HOME directory now there is only ~/.bash_profile with a “PATH” definition that I have added. Everything else is contained in /etc as is was done automatically during the ARCH installation:

/etc/profile

# /etc/profile

#Set our umask
umask 022

# Set our default path
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
export PATH

# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
	for profile in /etc/profile.d/*.sh; do
		test -r "$profile" && . "$profile"
	done
	unset profile
fi

# Source global bash config
if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then
	. /etc/bash.bashrc
fi

# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP

# Man is much better than us at figuring this out
unset MANPATH

and /etc/profile.d/*.sh
So I decided to add a new latex.sh there instead of ~/.bash_profile.

cat /etc/profile.d/latex.sh
export PATH="${PATH}:/usr/local/texlive/2015/bin/i386-linux"

This gives a stable:

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/local/texlive/2015/bin/i386-linux:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

The still open question is why the “per user” mode https://wiki.archlinux.org/index.php/En … s#Per_user does not work.

Offline

#7 2015-07-02 20:45:10

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

KarlP wrote:

But after a new user login and also after a reboot PATH does not contain the new directory.

In your first post you said the PATH variable didn't contain the new directory.  But now you just showed in your last post that it clearly does.  What changed?  Is latex working now?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#8 2015-07-02 21:11:27

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

I have changed the definition mode of PATH from the “per user” to the “Globally” version.
https://wiki.archlinux.org/index.php/En … _variables, i.e. I have removed the PATH definition line from ~/.bash_profile and added a new latex.sh to the /etc/profile.d/ directory instead.

cat /etc/profile.d/latex.sh
export PATH="${PATH}:/usr/local/texlive/2015/bin/i386-linux"

This works now. And yes, latex is working now too.
But the open question is still why the “per user” mode of the PATH definition does not work.

Offline

#9 2015-07-02 21:58:37

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

*headdesk*

How should I know.  I was asking for diagnostic information that would help figure out where the per-user approach failed.  But if you are not currently using the per-user setup then all the diagnostics are worthless.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#10 2015-07-02 22:57:29

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

Oh, I'm sorry.
Now I have reproduced the per-user approach:

echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl

The grep PATH ~/.* 2>/dev/null only delivers entries in the ~/.bash_history and in ~/.viminfo files.

grep PATH ~/.* 2>/dev/null | tail -n 25
/home/karl/.bash_history:grep PATH /etc/.* 2>/dev/null
/home/karl/.bash_history:grep PATH /etc/* 2>/dev/null
/home/karl/.bash_history:grep PATH /etc/* 2>/dev/null
/home/karl/.bash_history:grep PATH /etc/* 2>/dev/null
/home/karl/.bash_history:grep PATH ~/.* 2>/dev/null
/home/karl/.bash_history:echo $PATH
/home/karl/.bash_history:find /etc -type f -exec grep -l -i PATH '{}' \;
/home/karl/.bash_history:find /etc -type f -exec grep -l PATH '{}' \;
/home/karl/.bash_history:sudo find /etc -type f -exec grep -l PATH '{}' \;
/home/karl/.bash_history:sudo find /etc -type f -exec grep -l PATH '{}' \;
/home/karl/.bash_history:grep PATH ~/.* 2>/dev/null
/home/karl/.bash_history:find /etc -type f -exec grep -l PATH '{}' \;
/home/karl/.bash_history:sudo find /etc -type f -exec grep -l PATH '{}' \;
/home/karl/.bash_history:echo $PATH
/home/karl/.bash_history:echo $PATH
/home/karl/.bash_history:echo $ PATH
/home/karl/.bash_history:echo $PATH
/home/karl/.bash_history:echo $PATH
/home/karl/.bash_history:echo $PATH
/home/karl/.bash_history:grep PATH ~/.* 2>/dev/null
/home/karl/.bash_history:grep LC=C PATH ~/.* 2>/dev/null
/home/karl/.viminfo:?/PATH
/home/karl/.viminfo:	What is your PATH within a shell?  Do you set PATH somewhere else?
/home/karl/.viminfo:	$ echo $PATH
/home/karl/.viminfo:	$ grep PATH ~/.* 2>/dev/null

And the behaviour in vim-latexsuite is the same as I alredy wrote in #1.

Offline

#11 2015-07-02 23:04:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

OK - so it seems ~/.bash_profile isn't being read.  But this shouldn't be possible.  Can you post the output of the following commands all ran in the same shell under the same conditions:

$ echo $UID $USER

$ pwd

$ cat ~/.bash_profile

$ echo $PATH

$ source ~/.bash_profile && echo $PATH

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#12 2015-07-03 05:57:41

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

$ echo $UID $USER
1000 karl
$ pwd
/home/karl
$ cat ~/.bash_profile
#
# ~/.bash_profile
#

export PATH="${PATH}:/usr/local/texlive/2015/bin/i386-linux"
[[ -f ~/.bashrc ]] && . ~/.bashrc

$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
$ source ~/.bash_profile && echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/usr/local/texlive/2015/bin/i386-linux

Offline

#13 2015-07-03 10:48:22

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

So bash_profile works, but is definitely not read when your shell starts up.  Previous output indicated that you do use bash as your shell, can you confirm this: you don't use zsh, fish, or some other shell do you?

Is the texlive path included in the PATH variable if you log in to the tty?  If not, (A) is it includeded if you start a new subshell there (just tpye `bash` to start a new subshell, then `echo $PATH` to check. If so (B) how do you start X and what terminal emulator do you use?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#14 2015-07-03 17:34:34

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

The texlive path is included in the PATH variable if I log in to the tty.

I start X by:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec startlxde

and use LXTerminal.

What concerns the question of the shell I use, I must admit that I have never before thought about that. So I guess it is bash. I even did not consider before trying another shell.

Offline

#15 2015-07-03 18:37:39

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

If you haven't done anything to change your shell, then you are using bash.

To start X do you first login to a tty then run xinit/startx or do you use a display manager with a graphic boot target?

Do you have other terminals you can try as it seems the problem exists in a LXTerminal session, but not in the only other shell session tested - so this might be specific to LXTerminal.  Does LXTerminal have any options by which it might override PATH settings?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#16 2015-07-03 20:47:19

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

Well, I use LXDE, login with LXDM display manager and have LXTerminal, UXTerm and XTerm offered in the lxpanelctl menu.

Looking for config files containing PATH with

find ~/.config -type f -exec grep -l PATH '{}' \;

does give no results at all.
Where else could I search?

Offline

#17 2015-07-03 20:53:01

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

KarlP wrote:

Well, I use LXDE, login with LXDM

Aha, that could be it.  If LXTerminal doesn't run a login shell bash_profile would not be parsed.  If you login to a tty then start x with xinit/startx this wouldn't matter as the terminal login would already have read the bash_profile and the PATH variable would be inherited by child processes.

You can test this by either logging in to a tty and starting X manually (xinit, startx, or startlxde) or by running a login shell in lxterminal (`lxteminal -l`).


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#18 2015-07-03 21:13:44

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

You are right, logging in to a tty and starting X manually does result in having now the missing texlive directory in PATH.

But, running a login shell seems not to work.

lxterminal –loginshell

.. starts only another window with LXTerminal!

Offline

#19 2015-07-03 21:21:53

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,560
Website

Re: TeX Live and vim-latexsuite PATH problems

And in that new window the PATH is still missing the texlive path?


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#20 2015-07-03 21:43:59

KarlP
Member
From: Vorderstoder, AUSTRIA
Registered: 2015-01-01
Posts: 31

Re: TeX Live and vim-latexsuite PATH problems

That's the case!

Offline

Board footer

Powered by FluxBB