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 694269 - [PATCH] main: Ensure ~/.local exists very early on
[PATCH] main: Ensure ~/.local exists very early on
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-20 14:17 UTC by Colin Walters
Modified: 2013-02-21 09:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] main: Ensure ~/.local exists very early on (1.62 KB, patch)
2013-02-20 14:17 UTC, Colin Walters
none Details | Review
0001-main-Ensure-.local-exists-very-early-on.patch (1.14 KB, patch)
2013-02-20 14:52 UTC, Colin Walters
none Details | Review

Description Colin Walters 2013-02-20 14:17:50 UTC
Created attachment 236932 [details] [review]
[PATCH] main: Ensure ~/.local exists very early on

Many components in GNOME do this (keyboard and color plugins from
gnome-settings-daemon, gnome-shell).  And not all of them do it
correctly (for example, ~/.local should be mode 0700, not 0755).

Let's centralize things here.
---
 gnome-session/main.c |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)
Comment 1 Colin Walters 2013-02-20 14:52:22 UTC
Created attachment 236937 [details] [review]
0001-main-Ensure-.local-exists-very-early-on.patch

Using mkdir_with_parents() is necessary since it's ~/.local/share.
Comment 2 Colin Walters 2013-02-20 14:53:29 UTC
See also https://bugzilla.gnome.org/show_bug.cgi?id=694134 which was the culprit.
Comment 3 Arjan van de Ven 2013-02-20 14:59:19 UTC
might as well also make the set of subdirectories in there that the gnome stack expects...
Comment 4 Colin Walters 2013-02-20 15:38:24 UTC
(In reply to comment #3)
> might as well also make the set of subdirectories in there that the gnome stack
> expects...

Mmmm, were we to go all architecture astronaut on this, ideally we'd have the equivalent of systemd-tmpfiles for the session that was run before anything else was started.

But that aside, I don't see the benefit of centralizing *all* of the stuff in gnome-session, it might as well live where the relevant code does.
Comment 5 Ray Strode [halfline] 2013-02-20 22:17:30 UTC
would the housekeeping plugin in gsd be a better place for this?
Comment 6 Ray Strode [halfline] 2013-02-20 22:18:46 UTC
(keep in mind, gnome-session will probably be relegated to be merely a xsmp server at some point with systemd user sessions on the way)
Comment 7 Bastien Nocera 2013-02-20 23:34:02 UTC
(In reply to comment #5)
> would the housekeeping plugin in gsd be a better place for this?

Done in master. Let me know if works for you. (Note, the priorities of the various g-s-d plugins could probably do with tweaking as well)
Comment 8 Ray Strode [halfline] 2013-02-21 03:04:39 UTC
okay let's close this then.
Comment 9 Colin Walters 2013-02-21 09:49:39 UTC
(In reply to comment #5)
> would the housekeeping plugin in gsd be a better place for this?

But that'd still race against gnome-shell.  Oh well.