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 646631 - GTK should use XDG base dir spec instead of home
GTK should use XDG base dir spec instead of home
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 646509 (view as bug list)
Depends on: 447840 646637
Blocks: 523057 674986
 
 
Reported: 2011-04-03 16:35 UTC by William Jon McCann
Modified: 2012-04-30 10:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Use XDG user config dir for bookmarks (802 bytes, patch)
2011-04-03 18:28 UTC, William Jon McCann
needs-work Details | Review
Try to load modules from user lib dir (2.40 KB, patch)
2011-04-03 18:28 UTC, William Jon McCann
none Details | Review
Try to load modules from user lib dir (2.44 KB, patch)
2011-04-04 01:13 UTC, William Jon McCann
rejected Details | Review
Don't load binary modules from the home directory by default (1.88 KB, patch)
2012-04-27 17:28 UTC, William Jon McCann
accepted-commit_now Details | Review
Migrate to XDG config dir for custom papers (2.75 KB, patch)
2012-04-27 17:28 UTC, William Jon McCann
reviewed Details | Review
Try to load css themes from the XDG config directory first (1.95 KB, patch)
2012-04-27 17:29 UTC, William Jon McCann
reviewed Details | Review
Prefer xdg data directory to legacy .icons directory (1019 bytes, patch)
2012-04-27 17:29 UTC, William Jon McCann
accepted-commit_now Details | Review
Migrate to XDG config dir for bookmarks (2.96 KB, patch)
2012-04-27 17:29 UTC, William Jon McCann
reviewed Details | Review
Migrate to XDG config dir for custom papers (2.76 KB, patch)
2012-04-28 01:46 UTC, William Jon McCann
accepted-commit_now Details | Review
Try to load css themes from the XDG config directory first (1.94 KB, patch)
2012-04-28 01:46 UTC, William Jon McCann
accepted-commit_now Details | Review
Prefer xdg data directory to legacy .icons directory (1019 bytes, patch)
2012-04-28 01:46 UTC, William Jon McCann
accepted-commit_now Details | Review
Migrate to XDG config dir for bookmarks (2.96 KB, patch)
2012-04-28 01:47 UTC, William Jon McCann
accepted-commit_now Details | Review
Mention XDG Base Dir migration in README for 3.6 (769 bytes, patch)
2012-04-28 01:47 UTC, William Jon McCann
accepted-commit_now Details | Review
Mention XDG Base Dir migration in README for 3.6 (1.32 KB, patch)
2012-04-30 10:51 UTC, Matthias Clasen
committed Details | Review
Migrate to XDG config dir for bookmarks (2.96 KB, patch)
2012-04-30 10:51 UTC, Matthias Clasen
committed Details | Review
Prefer xdg data directory to legacy .icons directory (1019 bytes, patch)
2012-04-30 10:51 UTC, Matthias Clasen
committed Details | Review
Try to load css themes from the XDG config directory first (1.94 KB, patch)
2012-04-30 10:51 UTC, Matthias Clasen
committed Details | Review
Migrate to XDG config dir for custom papers (2.76 KB, patch)
2012-04-30 10:51 UTC, Matthias Clasen
committed Details | Review
Don't load binary modules from the home directory by default (1.88 KB, patch)
2012-04-30 10:51 UTC, Matthias Clasen
committed Details | Review

Description William Jon McCann 2011-04-03 16:35:06 UTC
It would be good if the toolkit followed the XDG basedir spec for configuration files etc.
Comment 1 William Jon McCann 2011-04-03 18:28:14 UTC
Created attachment 185056 [details] [review]
Use XDG user config dir for bookmarks
Comment 2 William Jon McCann 2011-04-03 18:28:16 UTC
Created attachment 185057 [details] [review]
Try to load modules from user lib dir
Comment 3 William Jon McCann 2011-04-04 01:13:20 UTC
Created attachment 185071 [details] [review]
Try to load modules from user lib dir
Comment 4 Matthias Clasen 2011-04-04 04:10:34 UTC
Review of attachment 185056 [details] [review]:

This doesn't makes sense without a migration story.
Comment 5 Matthias Clasen 2011-04-04 04:11:49 UTC
Review of attachment 185071 [details] [review]:

There's no such thing as a user lib dir. And I'm opposed to introducing it.
Comment 6 William Jon McCann 2011-04-04 04:27:04 UTC
Hence the depends on...
Comment 7 Matthias Clasen 2011-09-05 04:11:18 UTC
*** Bug 646509 has been marked as a duplicate of this bug. ***
Comment 8 William Jon McCann 2012-04-27 17:28:52 UTC
Created attachment 212984 [details] [review]
Don't load binary modules from the home directory by default

We should rely on the module path environment variables being
set correctly for the architecture rather than load from .gtk-3.0
Comment 9 William Jon McCann 2012-04-27 17:28:58 UTC
Created attachment 212985 [details] [review]
Migrate to XDG config dir for custom papers

Will read from old location if new location isn't found but will
only write to the new location.
Comment 10 William Jon McCann 2012-04-27 17:29:02 UTC
Created attachment 212986 [details] [review]
Try to load css themes from the XDG config directory first

Will fall back to previous locations.
Comment 11 William Jon McCann 2012-04-27 17:29:06 UTC
Created attachment 212987 [details] [review]
Prefer xdg data directory to legacy .icons directory
Comment 12 William Jon McCann 2012-04-27 17:29:10 UTC
Created attachment 212988 [details] [review]
Migrate to XDG config dir for bookmarks

Will read from old location if new location isn't found but will
write it out to the new location.
Comment 13 Matthias Clasen 2012-04-28 01:17:27 UTC
Review of attachment 212984 [details] [review]:

Looks ok to me.
Can you start a 'Release notes for 3.6' section in README.in and mention this change there ?
Comment 14 Matthias Clasen 2012-04-28 01:20:41 UTC
Review of attachment 212985 [details] [review]:

::: gtk/gtkcustompaperunixdialog.c
@@ +149,3 @@
+
+  filename = g_build_filename (g_get_user_config_dir (),
+                               "gtk",

Use gtk-3.0 here - we already use that directory elsewhere.

@@ +255,3 @@
   filename = custom_paper_get_filename ();
+  parentdir = g_build_filename (g_get_user_config_dir (),
+                                "gtk",

We already use ~/.config/gtk-3.0 for other config files - I suggest we stick to one directory.
Comment 15 Matthias Clasen 2012-04-28 01:22:22 UTC
Review of attachment 212986 [details] [review]:

::: gtk/gtkcssprovider.c
@@ +2730,2 @@
        */
+      path = g_build_filename (g_get_user_config_dir (), "gtk", "themes", name, subpath, NULL);

Shouldn't this be ~/.local/share/themes ? I think it should
Comment 16 Matthias Clasen 2012-04-28 01:23:08 UTC
Review of attachment 212987 [details] [review]:

Ok
Comment 17 Matthias Clasen 2012-04-28 01:25:02 UTC
Review of attachment 212988 [details] [review]:

::: gtk/gtkfilesystem.c
@@ +226,3 @@
+  gchar *filename;
+
+  filename = g_build_filename (g_get_user_config_dir (), "gtk", "bookmarks", NULL);

~/.config/gtk-3.0, please
Comment 18 William Jon McCann 2012-04-28 01:46:39 UTC
Created attachment 213005 [details] [review]
Migrate to XDG config dir for custom papers

Will read from old location if new location isn't found but will
only write to the new location.
Comment 19 William Jon McCann 2012-04-28 01:46:53 UTC
Created attachment 213006 [details] [review]
Try to load css themes from the XDG config directory first

Will fall back to previous locations.
Comment 20 William Jon McCann 2012-04-28 01:46:57 UTC
Created attachment 213007 [details] [review]
Prefer xdg data directory to legacy .icons directory
Comment 21 William Jon McCann 2012-04-28 01:47:02 UTC
Created attachment 213008 [details] [review]
Migrate to XDG config dir for bookmarks

Will read from old location if new location isn't found but will
write it out to the new location.
Comment 22 William Jon McCann 2012-04-28 01:47:08 UTC
Created attachment 213009 [details] [review]
Mention XDG Base Dir migration in README for 3.6
Comment 23 Matthias Clasen 2012-04-28 15:52:02 UTC
Review of attachment 213005 [details] [review]:

fine
Comment 24 Matthias Clasen 2012-04-28 15:53:39 UTC
Review of attachment 213006 [details] [review]:

ok
Comment 25 Matthias Clasen 2012-04-28 15:54:04 UTC
Review of attachment 213007 [details] [review]:

ok
Comment 26 Matthias Clasen 2012-04-28 15:55:41 UTC
Review of attachment 213008 [details] [review]:

good
Comment 27 Matthias Clasen 2012-04-28 15:57:31 UTC
Review of attachment 213009 [details] [review]:

::: README.in
@@ +77,3 @@
+
+* Now follows the XDG Base Directory specification for user
+  configuration and data files.

Could be a bit more concrete here, e.g. listing the new locations we look for, and also say that we still look in the old locations. But we can fix that up later
Comment 28 Matthias Clasen 2012-04-30 10:51:12 UTC
The following fixes have been pushed:
922b404 Mention XDG Base Dir migration in README for 3.6
ceb3fec Migrate to XDG config dir for bookmarks
f10176e Prefer xdg data directory to legacy .icons directory
9f5e580 Try to load css themes from the XDG config directory first
bbb7b29 Migrate to XDG config dir for custom papers
fa0d612 Don't load binary modules from the home directory by default
Comment 29 Matthias Clasen 2012-04-30 10:51:18 UTC
Created attachment 213087 [details] [review]
Mention XDG Base Dir migration in README for 3.6
Comment 30 Matthias Clasen 2012-04-30 10:51:21 UTC
Created attachment 213088 [details] [review]
Migrate to XDG config dir for bookmarks

Will read from old location if new location isn't found but will
write it out to the new location.
Comment 31 Matthias Clasen 2012-04-30 10:51:24 UTC
Created attachment 213089 [details] [review]
Prefer xdg data directory to legacy .icons directory
Comment 32 Matthias Clasen 2012-04-30 10:51:28 UTC
Created attachment 213090 [details] [review]
Try to load css themes from the XDG config directory first

Will fall back to previous locations.
Comment 33 Matthias Clasen 2012-04-30 10:51:31 UTC
Created attachment 213091 [details] [review]
Migrate to XDG config dir for custom papers

Will read from old location if new location isn't found but will
only write to the new location.
Comment 34 Matthias Clasen 2012-04-30 10:51:34 UTC
Created attachment 213092 [details] [review]
Don't load binary modules from the home directory by default

We should rely on the module path environment variables being
set correctly for the architecture rather than load from .gtk-3.0