You are not logged in.

#1 2024-02-16 04:41:06

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Where is FONTCONFIG_PATH env variable set in KDE/Plasma

I tried to debug some failures on my TeX Live installation, and found out that it was due to the fact that

FONTCONFIG_PATH=/etc/fonts

environment variable is set. While this is not necessarily wrong, it disturbs some other procedures, so I tried to find **where** this variable is set, but without success. I grepped through all the files in and below /etc, no hit.

Any suggestion/explanation where this variable is set?

Thanks

Offline

#2 2024-02-16 08:17:17

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

Are you sure it's a KDE thing? Does it not show up in an openbox session or the console?
Does it exist for other users (fresh account)?

The variable is frequently used by container systems (flatsnapdockercubes)

Offline

#3 2024-02-16 08:28:16

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

I logged into console and there the env var is not set. So it might be an sddm (the DM I use) or KDE/Plasma, or maybe Wayland?

Offline

#4 2024-02-16 08:31:57

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

Check an openbox (or sway, weston, …) session - ~/.config/plasma-workspace/env would be KDE specific.

Offline

#5 2024-02-16 13:52:54

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

I just tested:
- weston and openbox: the env var is NOT set
- plasma/x11 and plasma/wayland: the env var is set

Furthermore, I checked that ~/.config/plasma-workspace/env is empty for the respective user.

Offline

#6 2024-02-16 14:53:48

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

I'm on Plasma and it isn't set.

grep -r FONTCONFIG_PATH /etc/{profile*,environment} ~/.config ~/.local/share

Last edited by V1del (2024-02-16 21:55:33)

Offline

#7 2024-02-16 14:56:33

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

The OP wrote:

I grepped through all the files in and below /etc, no hit.

and this seems very plasma specific.

Do you use/autostart and container systems (flatsnapdockercubes)?

Offline

#8 2024-02-16 15:01:27

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

Ah didn't see that.... but no one said anything about grepping all the $HOME configs tongue

Last edited by V1del (2024-02-16 15:01:45)

Offline

#9 2024-02-16 16:33:34

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,687

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

If it's any help I ran V1del's command: grep -r FONTCONFIG_PATH /etc/{profile*,environment} ~/.config ~./local/share
and I got this output:

grep: /home/friode/.config/google-chrome/Default/History: binary file matches
grep: /home/friode/.config/google-chrome/Default/Sync Data/LevelDB/001302.log: binary file matches
grep: ~./local/share: No such file or directory

Is the OP using google-chrome (the proprietary version0?

Offline

#10 2024-02-16 21:56:28

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

Ah whoops had a typo in there. It's somewhat unlikely those chrome files would be loaded for the general environment...

Offline

#11 2024-02-17 09:03:55

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

So I did the same grep command, and of course some items showed up in VSCode related dirs, Chrome related dirs etc, but those are all not loaded into a default environment, so that is not the source.

Very strange. Next I will try a clean user ...

Offline

#12 2024-02-17 10:27:36

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

I can confirm with a pristine user and a KDE/Plasma Wayland session, the envvar FONTCONFIG_PATH is being set

Offline

#13 2024-02-17 10:33:49

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

seth wrote:

Do you use/autostart and container systems (flatsnapdockercubes)?

Offline

#14 2024-02-17 10:52:57

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

No flatpak or snaps on my system.
Docker is here, but mostly for home-made docker images and development
No dockercubes

Offline

#15 2024-02-17 11:19:04

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

did you run my (fixed) grep? I could also expect some service injecting into the user session or so. Also you don't happen do be actually running kde-unstable and thus plasma 6 ?

Offline

#16 2024-02-17 11:28:22

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

I did run

grep -r FONTCONFIG_PATH /etc/{profile*,environment} ~/.config ~/.local/share

and no, not on Plasma 6.

Offline

#17 2024-02-17 16:02:09

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

track_env() {
    PID=$1
    while ((PID != 1)); do
        ps hp $PID >&2
        printf " ---------------------------------------------------\n" >&2
        tr '\0' '\n' < /proc/$PID/environ
        printf " ===================================================\n"
        PID=$(awk '/PPid/{print $2}' /proc/$PID/status)
    done
}

Running that w/

track_env $$ | grep FONTCONFIG_PATH

should™ at least tell us where it's starting…

Offline

#18 2024-02-17 23:54:17

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

Cool trick! I adjusted the printf === to go to &2, and got

  60295 pts/3    SNs    0:00 /bin/bash
 ---------------------------------------------------
FONTCONFIG_PATH=/etc/fonts
 ===================================================
  58483 ?        RNl    0:03 /usr/bin/konsole
 ---------------------------------------------------
FONTCONFIG_PATH=/etc/fonts
 ===================================================
  44289 ?        SNsl   0:47 /usr/bin/plasmashell --no-respawn
 ---------------------------------------------------
 ===================================================
  44029 ?        Ss     0:00 /usr/lib/systemd/systemd --user
 ---------------------------------------------------
bash: /proc/44029/environ: Permission denied
 ===================================================

I manually checked /proc/44029/environ, nothing there.

So it is the plasmashell that does it. I tried other terminal emulators, like xterm, and there the var is also set.

Offline

#19 2024-02-18 09:48:18

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

It's not in any file in plasma-workspace-5.27.10-2-x86_64.pkg.tar.zst …

grep -r FONTCONFIG_PATH /usr/lib/systemd

Offline

#20 2024-02-26 05:03:13

npreining
Member
Registered: 2023-03-06
Posts: 34
Website

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

(sorry for the late reply, I was travelling)

Nothing in /usr/lib/systemd (and ~/.local/share/systemd/) either.

A mystery.

Offline

#21 2024-02-26 09:27:34

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 76,009

Re: Where is FONTCONFIG_PATH env variable set in KDE/Plasma

grep -r FONTCONFIG_PATH /usr/lib

Might take a while. A LONG while.

Offline

Board footer

Powered by FluxBB