After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791709 - Respect XDG_DATA_DIRS
Respect XDG_DATA_DIRS
Status: RESOLVED OBSOLETE
Product: gnome-tweak-tool
Classification: Applications
Component: general
3.26.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Tweak Tool maintainer(s)
GNOME Tweak Tool maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2017-12-17 16:21 UTC by Jan Tojnar
Modified: 2018-01-24 15:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Search for GSettings schemas in system data dirs (1.42 KB, patch)
2017-12-17 16:51 UTC, Jan Tojnar
none Details | Review
Search for themes and icons in system data dirs (3.94 KB, patch)
2017-12-17 16:52 UTC, Jan Tojnar
none Details | Review
Don't show multiple entries for a single theme (2.95 KB, patch)
2017-12-17 16:52 UTC, Jan Tojnar
rejected Details | Review

Description Jan Tojnar 2017-12-17 16:21:47 UTC
Themes and stuff can be actually distributed in several directories, listed in XDG_DATA_DIRS. GNOME Tweaks should use `GLib.get_system_data_dirs()` to get the directories.
Comment 1 Jan Tojnar 2017-12-17 16:51:31 UTC
Created attachment 365642 [details] [review]
Search for GSettings schemas in system data dirs
Comment 2 Jan Tojnar 2017-12-17 16:52:18 UTC
Created attachment 365643 [details] [review]
Search for themes and icons in system data dirs
Comment 3 Jan Tojnar 2017-12-17 16:52:45 UTC
Created attachment 365644 [details] [review]
Don't show multiple entries for a single theme
Comment 4 Jeremy Bicha 2017-12-17 17:02:49 UTC
Do you happen to have a test case for this bug so that I can verify that the patches work?
Comment 5 Jeremy Bicha 2017-12-17 17:04:21 UTC
Review of attachment 365644 [details] [review]:

As far as I can tell, this patch is not needed since it just replaces the new set() fix for this issue introduced in 3.26.4.
Comment 6 Jeremy Bicha 2017-12-17 17:04:28 UTC
Review of attachment 365644 [details] [review]:

As far as I can tell, this patch is not needed since it just replaces the new set() fix for this issue introduced in 3.26.4.
Comment 7 Jeremy Bicha 2017-12-17 17:04:32 UTC
Review of attachment 365644 [details] [review]:

As far as I can tell, this patch is not needed since it just replaces the new set() fix for this issue introduced in 3.26.4.
Comment 8 Jan Tojnar 2017-12-17 18:07:29 UTC
(In reply to Jeremy Bicha from comment #5)
> Review of attachment 365644 [details] [review] [review]:
> 
> As far as I can tell, this patch is not needed since it just replaces the
> new set() fix for this issue introduced in 3.26.4.

You are right, I thought the walk_directories function returns absolute paths since the patch applies os.path.basename to them but apparently it is not the case. The patch from https://bugzilla.gnome.org/show_bug.cgi?id=762789 will suffice, then.

(In reply to Jeremy Bicha from comment #4)
> Do you happen to have a test case for this bug so that I can verify that the
> patches work?

    mkdir -p foodir/themes/FooTheme/gtk-3.0
    touch foodir/themes/FooTheme/gtk-3.0/gtk.css
    mkdir -p foodir/icons/FooTheme/cursors
    touch foodir/icons/FooTheme/index.theme
    env XDG_DATA_DIRS=foodir:$XDG_DATA_DIRS result/bin/gnome-tweak-tool
Comment 9 Jan Tojnar 2017-12-17 18:55:29 UTC
Testing the gsettings patch would be harder, on FHS systems, to prepare, you need to meddle with files managed by package manager:

    mkdir -p foodir/glib-2.0/schemas
    sudo mv /usr/share/glib-2.0/schemas/org.gnome.mutter{,.wayland}.gschema.xml foodir/glib-2.0/schemas
    sudo mv /usr/share/glib-2.0/schemas/gschemas.compiled foodir
    glib-compile-schemas foodir/glib-2.0/schemas
    sudo glib-compile-schemas /usr/share/foodir/glib-2.0/schemas

Then you can test it the same way as with the themes:

    env XDG_DATA_DIRS=foodir:$XDG_DATA_DIRS result/bin/gnome-tweak-tool

If the patch works, the application will start, otherwise you will get `gtweak.gsettings.GSettingsMissingError: org.gnome.mutter`.

Finally, to revert the changes:

    sudo mv foodir/glib-2.0/schemas/org.gnome.mutter{,.wayland}.gschema.xml /usr/share/glib-2.0/schemas
    sudo mv foodir /usr/share/glib-2.0/schemas/gschemas.compiled
Comment 10 GNOME Infrastructure Team 2018-01-24 15:28:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-tweaks/issues/114.