Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

odd fontconfig cache location from appimage build #239

Open
hexpunk opened this issue Jun 1, 2020 · 7 comments
Open

odd fontconfig cache location from appimage build #239

hexpunk opened this issue Jun 1, 2020 · 7 comments

Comments

@hexpunk
Copy link

hexpunk commented Jun 1, 2020

This is a minor annoyance, but with the Linux AppImage build of Cura, the bundled libfontconfig is placing its cache directory in my home directory ($HOME/fontconfig) instead of utilizing the normal cache directory ($HOME/.cache/fontconfig). I don't know if this is an issue with the version of libfontconfig that's being shipped or a configuration issue. I don't know if the issue is here or upstream. But it is annoying.

@hexpunk hexpunk changed the title fontconfig cache location from appimage build odd fontconfig cache location from appimage build Jun 1, 2020
@Ghostkeeper
Copy link
Contributor

Ghostkeeper commented Jun 3, 2020

I'm not able to reproduce that, actually (using Ubuntu 20.04). I did have a folder ~/fontconfig. I deleted that and then ran the AppImage for Cura 4.6.1. It didn't recreate the folder. Are you sure it's Cura and not some other application that creates it? How do you reproduce this problem?

@hexpunk
Copy link
Author

hexpunk commented Jun 3, 2020

I'm running Ubuntu 16.04 and Cura 4.6.1. I'm absolutely sure it's Cura. The only AppImage programs I run are Cura and OpenSCAD and I've been able to consistently reproduce that the cache directory is created every time I open Cura.

My best guess is that since I don't have a ton of XDG-prefixed env vars defined, it's using a default value. But I'd say this is a poor default. I've seen other reports of similar behavior from other programs.

@Ghostkeeper
Copy link
Contributor

Ghostkeeper commented Jun 5, 2020

What do you get when you run echo $XDG_CACHE_HOME in a terminal? I'm getting an empty string then.

Our fontconfig should be on version 2.13, as that comes with the CentOS 7 installation that builds our AppImages.

@hexpunk
Copy link
Author

hexpunk commented Jun 5, 2020

I also get an empty string. When I run env | grep -i xdg I get the following, FWIW:

XDG_VTNR=7
XDG_SESSION_ID=c2
XDG_GREETER_DATA_DIR=/var/lib/lightdm-data/jsherby
XDG_MENU_PREFIX=gnome-
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
XDG_SESSION_TYPE=x11
XDG_SEAT=seat0
XDG_SESSION_DESKTOP=ubuntu
XDG_DATA_DIRS=/usr/share/ubuntu:/usr/share/gnome:/usr/local/share/:/usr/share/
XDG_RUNTIME_DIR=/run/user/1000
XDG_CURRENT_DESKTOP=Unity

I also took a look at the strings in the libfontconfig.so.1 file that ships in the AppImage. Although I couldn't confirm the lib version, I did notice several references to the path ~/.fontconfig. So I'm not sure why that path isn't being used. I confirmed that that path doesn't exist in my home directory. I'll do a little more digging and I'll see what I can find.

@hexpunk
Copy link
Author

hexpunk commented Jun 5, 2020

The only reference I could find to XDG_CACHE_HOME was in libQt5Core.so.5. 🤷

@Bapf
Copy link

Bapf commented Jun 23, 2020

Same behaviour here on Fedora 32 with the Cura 4.6.1 Appimage.

echo $XDG_CACHE_HOME returns an empty string and the fontconfig version installed is fontconfig-2.13.92-9.fc32.x86_64.

@sixtyfive
Copy link

Same problem here, Manjaro running Plasma, $XDC_CACHE_HOME is unset. Mildly annoying, but definitely a papercut.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants