Texlive Path Setup

Zdenek Wagner zdenek.wagner at gmail.com
Tue Jan 18 15:38:18 CET 2022


Hi,

I hope nomody minds that I am sending it publicly, the size is really
small (1111 bytes). The contents of my /usr/locat/texlive is as
follows:

$ ll /usr/local/texlive/
total 76
drwxr-xr-x.  7 zw zw 4096 Jul 27  2007 2007
drwxr-xr-x. 12 zw zw 4096 Mar  5  2021 2008
drwxrwxr-x. 10 zw zw 4096 Mar  5  2021 2009
drwxrwxr-x. 11 zw zw 4096 Mar  5  2021 2010
drwxr-xr-x. 11 zw zw 4096 Mar  5  2021 2011
drwxrwxr-x. 12 zw zw 4096 Mar  5  2021 2012
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2013
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2014
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2015
drwxrwxr-x. 10 zw zw 4096 Mar  5  2021 2016
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2017
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2018
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2019
drwxrwxr-x.  9 zw zw 4096 Mar  5  2021 2020
drwxrwxr-x.  9 zw zw 4096 Dec 17 01:00 2021
lrwxrwxrwx.  1 zw zw    4 May  5  2021 current -> 2021
drwxr-xr-x.  8 zw zw 4096 Dec 17 01:39 texmf-devel
drwxr-xr-x. 15 zw zw 4096 Dec 17 01:39 texmf-local
drwxr-xr-x.  7 zw zw 4096 Feb  5  2012 ufalpbml
drwxr-xr-x.  7 zw zw 4096 Dec 17 01:39 velthuis

As you can see, I have a few additional directories with my own
development. They should not be recognized by the switching tool. The
tool contains two files, tl and tl.tk. Both must be in the same
directory which is listed in PATH. The mail file is tl and its
executable flag is unset intentionally. It is invoked this way:

. tl

Notice the space after the period. It is important, it guarantees that
it is called in the same shell, without it the PATH change will have
no effect. tl.tk does the job, a very simple dialogue is presented and
a user can select a version. Of course, a pure textual version can be
prepared but this tool can even work reasonably fast via X-forwarding.

Zdeněk Wagner
http://ttsm.icpf.cas.cz/team/wagner.shtml

út 18. 1. 2022 v 14:41 odesílatel Georg Rast <rastiber at web.de> napsal:
>
> Hey Everyone,
>
>   Thanks for the input. It sounds really neat. I will definitely try that.
>
> @Zdeněk Wagner:
>
> I would love to take a look at it. Haven't used Tcl before, but i should
> be able to translate it into a shellscript.
>
>
> Greetings George
>
>
>  > Hi,
>  >
>  > there are many ways. My setup contains
>  > /usr/local/texlive/current/bin/x86_64-linux almost at the beginning of
>  > PATH (I have good reasons to override some binaries but it needs
>  > caution). Here "current" is a symlink to a version which I want to
>  > use. In addition, I have a script written in Tcl/Tk. It looks into
>  > /usr/local/texlive/ and offers all directories representing years and
>  > current. It then replaces the "current" element with the selected path
>  > but for the current terminal only. Thus I have one version selected
>  > for my general work but can switch to an older version or to a testing
>  > version just in one terminal. And I can return to current if I like.
>  > If a new version of TL comes and I want to switch to it as the
>  > default, I just change the "current" symlink and it is recognized
>  > immediatelly in all terminals unless they have a special version
>  > activated temporarily. If you like, I can send you my Tcl/Tk script.
>  >
>  > Zdeněk Wagner
>  > http://ttsm.icpf.cas.cz/team/wagner.shtml
>  >
>  > po 17. 1. 2022 v 20:46 odesílatel Nikos Platis <nplatis at gmail.com>
> napsal:
>  >>
>  >> Hi,
>  >>
>  >>>
>  >>> Now I'm curious though:
>  >>>
>  >>> Is there any way to elegantly tell Linux which version of texlive
> to use?
>  >>>
>  >>> I know that some folks out there have multiple versions running. Like
>  >>> one for each release or stuff like that.
>  >>>
>  >>> There has to be a better way then to just update your environment
>  >>> variables every time....
>  >>
>  >>
>  >> Yes there is another way, which I think is more elegant: in
> /usr/local/texlive you create a symlink named, e.g. "current", pointing
>  >to the year you want to use; also, to be on the safe side, you rename
> your "texmf-local" folder to something corresponding to the
>  >texlive year, e.g. "texlive-local-2021", and make "texmf-local" a
> symlink to that folder. Then you put the "current" folder in your
>  >path.
>  >>
>  >> Now, when you want to switch to another year, you just change the
> symlinks to point to the other [year] and texmf-local-[year]
>  >folders respectively. There is no need to change your path anymore and
> the switch is instant!
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tl-switch.tar.bz2
Type: application/x-bzip
Size: 1111 bytes
Desc: not available
URL: <https://tug.org/pipermail/tex-live/attachments/20220118/6f363b17/attachment.bin>


More information about the tex-live mailing list.