ungoogled-chromium icon indicating copy to clipboard operation
ungoogled-chromium copied to clipboard

include xdg basedir patch

Open 0x08088405 opened this issue 2 years ago • 4 comments

Description

Chromium makes ~/.pki for libnss on launch, despite libnss now supporting the XDG Base Directory Specification for many years now.

The problem

NSS got the option to have $XDG_DATA_HOME/pki instead of $HOME/.pki for nssdb in an issue opened 10 years ago. Chromium still makes $HOME/.pki on launch preventing this change from taking effect (as you'll see in the patch below). This has been reported (many times) and people have written patches for it, but none have been included to date.

Note that this does not solve the problem of Chromium's poor XDG Base Directory implementation where it dumps absolutely everything into $XDG_CONFIG_HOME/chromium but that's a separate issue.

Possible solutions

There is a working patch for it already: https://bugs.chromium.org/p/chromium/issues/attachmentText?aid=452806, which is packaged on the AUR: https://aur.archlinux.org/cgit/aur.git/tree/xdg-basedir.patch?h=ungoogled-chromium-xdg which gives a good idea of the one place in the codebase that would need patching. The one potential concern is that it does not fall back the same way libnss does -- https://github.com/nss-dev/nss/blob/d7909db807572ae3135fefeb5d4f20f231f0d534/lib/sysinit/nsssysinit.c#L64-L72 but that would mainly mean that jumping from regular Chromium to Ungoogled Chromium would create a separate nssdb folder instead of sharing it (it would however would work coming from Firefox which does not have this problem).

0x08088405 avatar Feb 25 '23 00:02 0x08088405

Is this still an issue?

PF4Public avatar Jun 10 '23 22:06 PF4Public

Is this still an issue?

yeah

prez avatar Jun 19 '23 18:06 prez

It's a longstanding issue, personally I have a timer which deletes that folder flooding my home directory, which virtually no other app creates, so I would welcome this patch.

Seems like an inoffensive change for all users, and removes an annoyance to those who wish to have XDG-compliant apps for backups and whatnot

BachoSeven avatar Aug 11 '23 15:08 BachoSeven

Does changing the path with an update cause issues?

networkException avatar Aug 20 '23 15:08 networkException