On Saturday, November 2, 2024 12:30:07 PM MST Don Armstrong wrote:
> On Fri, 01 Nov 2024, Soren Stoutner wrote:
> > On Friday, November 1, 2024 11:05:57 PM MST Don Armstrong wrote:
> > > Where is this documented in the Debian dictionary policy?
> > 
> > It is documented in the dictionaries-common package. Specifically, you
> > can see the changes that were added to this package in the following
> 
> > two MRs:
> Thanks for cluing me in; I should have checked there first.
> 
> > "The Qt packages will install the following system-wide environment
> > variable in /etc/environment.d/ so that programs that use Qt WebEngine
> > will be able to find the .bdic dictionaries:
> > 
> > QTWEBENGINE_DICTIONARIES_PATH=/usr/share/hunspell-bdic/”
> 
> The challenge with this approach is that the environment.d is only read
> by systemd and processes launched from the systemd manager, and only
> when they are directly launched.
> 
> So if you started your window manager before that file was put there,
> any programs you launch from your window manager won't obey that file
> and won't be able to find the dict files. [For example, my system
> currently doesn't have that environmental variable set.]
> 
> Also, that file isn't read if you're not using systemd (or otherwise
> starting a process that doesn't cause systemd-environment-d-generator to
> be called).
> 
> If we want to use /usr/share/hunspell-bdic instead of the default, we
> should push a patch to change the default value for that environmental
> variable instead. Until then, keeping the symlinks will make things work
> if that variable isn't set.

That is an interesting concern that didn’t come up in the previous discussion, 
including from the Qt maintainers (who suggested that solution, as it 
integrates with the upstream Qt code, which is looking for that variable 
specifically for this purpose).  I must admit that I have not tested this on 
any system not running Systemd, so I am not aware of how that plays out or if 
there are any workarounds to make it process those environment variables.  I 
should note that the upstream maintainer of qutebrowser uses a similar 
technique to help his program find .bdic files on Windows.  In fact, he was the 
one years ago who submitted the patch adding this environmental variable 
support to upstream.  If you think this is a significant issue with non-Systemd 
systems, I would recommend you open a bug report against dictionaries-common-
dev to involve the wider community in finding a solution.  If you do, please 
copy me on the bug report as I would like to follow along.

-- 
Soren Stoutner
so...@debian.org

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to