I am using VSCode -installed from the .deb provided by microsoft- on Linux Mint 22 and texlive -installed with the official guide-. Previously I was a loyal user of miktex and that worked fine (most times), but there's been no release for Mint 22. So off to Tex Live I go. and now I'm using with the Latex Workshop extension, and I run for the first time into the ENOENT issue.
After digging around configurations, and looking at other questions here, I find a number of solutions which seemed odd to me but apparently worked for other people: using chown to change the ownership of the texlive folder to the local user, chmod to change privileges and even just restarting VSCode. I didn't try the second one because I checked the files and it all seemed fine to me; meanwhile, the first 2 didn't change anything.
I have texlive on $PATH. I can call which pdflatex, which latexmk... it gives me the answers I expect:
$ echo $PATH /home/*/.pyenv/shims:/home/*/.pyenv/bin:/usr/local/texlive/2025/bin/x86_64-linux:/home/*/.cargo/bin:/home/*/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin $ which latexmk /usr/local/texlive/2025/bin/x86_64-linux/latexmk Finally I check the workshop log and find the $PATH it calls to is defined differently:
Does the executable exist? $PATH: /home/*/.cargo/bin:/home/*/.pyenv/shims:/home/*/.pyenv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin, $Path: undefined, $SHELL: /bin/bash For whatever reason, this variable is different to the one printed at terminal!
I also don't remember what method I used to add texlive to the variable, since the line export PATH =/usr/local/texlive/2025/bin/x86_64-linux:$PATH appears commented in my bashrc file. And uncommenting makes a not a valid identifier error appear on the terminal.
Now, I'm pretty certain that it used to work a while ago (I'm not sure because I use several devices), but I hadn't used latex in a few weeks; the one notable change I had in this system since the last time I recall using it was swapping the DE from Cinnamon to Plasma.
Update1: I found that I had added texlive to the path globally, at /etc/bash.bashrc and that let me also realize that I had a syntax error on the local .bashrc... now the texlive path does appear at the very beginning of the variable on echo... but it's still not the $PATH that Latex Workshop finds.
Update2: As per their documentation I've tried adding a path.sh with the command to $HOME/.config/plasma-workspace/env/path. Then I followed cfr's comment and did the same to /etc/profiles.d. Neither of them solved the issue.
.profilefile, then log out and in again (it is only executed at login). Then processes that does not execute bash should also be alve to see the proper PATH setting~/.bashrcis read bybashshells. I doubt vscode startsbash. on my system, I have a snippet under/etc/profile.d/which sets this for all users, but mint may have a different setup. you need to ensure the path is set correctly for gui apps and not just for interactive shells (and certainly not only for bash shells).~/.bashrcis read by non-login interactivebashshells.~/.bash_profile, which should generally source it, is read by login interactivebashshells. if you start the gui from abashshell, rather than using a display manager, the variable should be exported to the environment. but if you use a display manager or have a different shell as default, neither~/.bashrc/~/.bash_profilenor/etc/bashrcwill be read.$PATHread by workshop.But I'm looking at the KDE docs and it turns out that it read the variable differently, so I'm gonna try that.