[jhbuild/wip/carlosg/xcursor-path: 64/64] env: Set fallback paths on XCURSOR_PATH
- From: Christoph Reiter <creiter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [jhbuild/wip/carlosg/xcursor-path: 64/64] env: Set fallback paths on XCURSOR_PATH
- Date: Fri, 22 Nov 2019 13:06:20 +0000 (UTC)
commit 66365430911df0f5b1264cc39f442bcef30b5dee
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Nov 22 13:00:19 2019 +0100
env: Set fallback paths on XCURSOR_PATH
As libXcursor works, the XCURSOR_PATH environment variable overrides
any default lookup paths. This makes the jhbuild prefix the only
lookup path then, triggering X cursor lookup errors after `jhbuild
build mutter`, as adwaita-icon-theme is not part of its build chain.
Users might also have a non-default cursor theme, making the issue
even harder to spot and fix. It makes sense to add the default lookup
paths in the jhbuild environment, so all this works out of the box.
jhbuild/environment.py | 11 +++++++++++
1 file changed, 11 insertions(+)
---
diff --git a/jhbuild/environment.py b/jhbuild/environment.py
index 85b5d9db..9b96bdad 100644
--- a/jhbuild/environment.py
+++ b/jhbuild/environment.py
@@ -211,6 +211,17 @@ def setup_env(prefix):
addpath('XDG_CONFIG_DIRS', xdgconfigdir)
# XCURSOR_PATH
+ if not os.environ.get('XCURSOR_PATH'):
+ # The XCURSOR_PATH envvar overrides the default paths,
+ # so include them here.
+ xcursorpath = [ os.path.join(os.environ['HOME'], '.local', 'share', 'icons'),
+ os.path.join(os.environ['HOME'], '.icons'),
+ '/usr/share/icons',
+ '/usr/share/pixmaps',
+ '/usr/X11R6/lib/X11/icons' ]
+ for xcursorpathdir in xcursorpath:
+ addpath('XCURSOR_PATH', xcursorpathdir, prepend=False)
+
xcursordir = os.path.join(prefix, 'share', 'icons')
addpath('XCURSOR_PATH', xcursordir)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]