Bug 1259896 - gnome-initial-setup does not create folders for Documents, Download, Music, Pictures, Videos
Summary: gnome-initial-setup does not create folders for Documents, Download, Music, P...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: xdg-user-dirs
Version: 23
Hardware: All
OS: Unspecified
unspecified
medium
Target Milestone: ---
Assignee: Matthias Clasen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-09-03 18:17 UTC by Christian Stadelmann
Modified: 2015-09-25 15:07 UTC (History)
7 users (show)

Fixed In Version: 0.15-7.fc23
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-09-20 15:22:48 UTC


Attachments (Terms of Use)

Description Christian Stadelmann 2015-09-03 18:17:49 UTC
Description of problem:
Gnome-initial-setup does not create folders named Documents, Download, Music, Pictures, Videos. Tracker thinks they were existing.


Version-Release number of selected component (if applicable):
Fedora 23 Alpha Workstation installer


How reproducible:
Warnings happen on every boot


Actual results:
Those folders don't exist.
Warnings printed by Tracker:

Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &DOWNLOAD. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &DOCUMENTS. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &DOWNLOAD. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &MUSIC. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &PICTURES. Ignoring this location.
Sep 03 19:19:23 hostname gnome-session[1947]: (tracker-miner-fs:2283): Tracker-WARNING **: Unable to get XDG user directory path for special directory &VIDEOS. Ignoring this location.


Expected results:
Folders should exist or tracker should not print warnings. I prefer the first.


Additional info:
This might be a bug in tracker instead, depending on whether you think those folders should be created by default on any GNOME desktop. I think they should be created so I filed this bug against gnome-initial-setup. Feel free to reassign if you have a different opinion.
I know that this is a possible duplicate of bug #832608
Tracker prints some errors in case those folders are missing, see bug #1248157

Comment 1 Rui Matos 2015-09-04 12:50:51 UTC
xdg-user-dirs is supposed to create these directories the first time you login to a new user account and it seems to work here on a quick test with F23 beta TC1.

How did you create this user account and how did you login?

Comment 2 Christian Stadelmann 2015-09-04 13:23:07 UTC
I created the user account from anaconda from a F23 Alpha Workstation live image. After successful installation I just logged in from gdm. I don't recall whether I logged in into a Gnome/X or Gnome/Wayland session.

From my existing account I just created another account and logged in (Gnome/Wayland) and the same issue happened. Those folders are not created.

I can't test it on a fresh Gnome/X session because every time I log in it freezes my whole computer (this is a different issue I can't report right now).

Comment 3 Christian Stadelmann 2015-09-04 13:40:01 UTC
According to xdg-user-dir, all those folders default to /home/[username]

Running xdg-user-dirs-gtk-update does nothing.
Running xdg-user-dirs-update creates the missing folders. This is a workaround.

> I don't recall whether I logged in into a Gnome/X or Gnome/Wayland session.
According to journal it was a Gnome/Wayland session. This means that gnome-initial-setup ran under Wayland.

Comment 4 Rui Matos 2015-09-04 13:50:22 UTC
Right, I think we're not running the xinitrc.d scripts on wayland sessions so that's why you got that since xdg-user-dirs-update is called from

/etc/X11/xinit/xinitrc.d/xdg-user-dirs.sh

I think Ray looked at this before, not sure what's the current status.

Comment 5 Ray Strode [halfline] 2015-09-08 14:13:25 UTC
i don't recall looking into this before, but xdg-user-dirs probably needs to ship an autostart file.

wayland sessions aren't going to run through a stack of shell scripts at login time.

Comment 6 Matthias Clasen 2015-09-08 18:57:12 UTC
From a quick across-the-cubewall discussion, the solution here is to have an autostart file for xdg-user-dirs-update, so it gets run regardless of xinitrc. Just make sure to put it in the init phase, so it runs early enough that nautilus hasn't started yet (for classic mode).

Comment 7 Rui Matos 2015-09-09 16:17:14 UTC
I've got a patch for the rpm here that seems to work for GNOME both on X11 and wayland as well as classic (i.e. with nautilus on the desktop).

But I have one doubt: the xinitrc script always runs and runs early enough regardless of desktop environment or window manager. The autostart file won't run on every desktop and worse it might not run at the right time for some desktops.

Should I limit it to GNOME sessions? But then isn't it a regression for other desktops? Do we have a list of desktops we should care about regarding this?

Comment 8 Christian Stadelmann 2015-09-09 16:42:42 UTC
Why is it so important that it runs before nautilus starts? How about restarting nautilus in case it is already running?

Comment 9 Fedora Update System 2015-09-09 16:49:28 UTC
xdg-user-dirs-0.15-7.fc23 has been submitted as an update to Fedora 23. https://bodhi.fedoraproject.org/updates/FEDORA-2015-15487

Comment 10 Rui Matos 2015-09-09 16:52:30 UTC
http://pkgs.fedoraproject.org/cgit/xdg-user-dirs.git/commit/?id=ab68ec8fc845792c964732801d5fe2d337c10e47

also includes a line for KDE to start it early enough

Comment 11 Ray Strode [halfline] 2015-09-09 18:03:38 UTC
(In reply to Rui Matos from comment #7)
> But I have one doubt: the xinitrc script always runs and runs early enough
> regardless of desktop environment or window manager.
well that's not true. it doesn't run for weston or gnome on wayland ! So the xinitrc script only works on legacy desktop environments.

> The autostart file won't run on every desktop 
Well, the autostart spec is much older than user-dirs (like 2005 or 2006 i think) so it's more likely that a desktop environment supports it than relies on user dirs I think. Also, xdg-user-dirs-gtk-update already relies on autostart... If someone complains you could always add it back i guess in a compat subpackage, but I don't think anyone will complain

> worse it might not run at the right time for some desktops.
I think that desktops that rely on it getting run, should use whatever session manager they have to make sure it gets run. It's sort of a shame the autostart spec doesn't have support for phased start up (or whatever) but those things vary from desktop to desktop anyway so I guess it would be hard. Note, actually there's a race anyway with xdg-user-dirs-gtk-update since if the user switches locales the folders will get renamed at the *end* of start up, and so components that can't handle it getting changed, or can't handle the directories not existing are going to misbehave when the directories get renamed, so code must be somewhat robust to things not matching expectations anyway.

> Should I limit it to GNOME sessions? But then isn't it a regression for
> other desktops? 
Priority should be fedora workstation (so gnome and kde), of course. Everything else is best effort, but I think in this case best effort will more than likely be good enough without fallout.  And, if there is fallout we can always introduce a compat subpackage.

Thanks for fixing this!

Comment 12 Fedora Update System 2015-09-10 05:51:11 UTC
xdg-user-dirs-0.15-7.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.\nIf you want to test the update, you can install it with \n su -c 'yum --enablerepo=updates-testing update xdg-user-dirs'. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-15487

Comment 13 Fedora Update System 2015-09-20 15:22:46 UTC
xdg-user-dirs-0.15-7.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 14 Kevin Kofler 2015-09-25 15:07:57 UTC
This change causes bug #1266243.


Note You need to log in before you can comment on or make changes to this bug.