Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 270852 - x11-misc/xdg-user-dirs-0.10: xdg-user-dirs-update is not autorun when login in
Summary: x11-misc/xdg-user-dirs-0.10: xdg-user-dirs-update is not autorun when login in
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Freedesktop bugs
URL:
Whiteboard:
Keywords:
Depends on: 382685
Blocks:
  Show dependency tree
 
Reported: 2009-05-22 18:25 UTC by Pacho Ramos
Modified: 2011-09-12 10:37 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Suggested ".desktop" file (user-dirs-update.desktop,408 bytes, text/plain)
2011-02-12 02:02 UTC, Otávio Cipriani
Details
Suggested ".desktop" file (user-dirs-update.desktop,441 bytes, text/plain)
2011-02-12 02:31 UTC, Otávio Cipriani
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2009-05-22 18:25:57 UTC
Even when upstream homepage says:
The way it works is that xdg-user-dirs-update is run very early in the login phase. This program reads a configuration file, and a set of default directories. It then creates localized versions of these directories in the users home directory and sets up a config file in $(XDG_CONFIG_HOME)/user-dirs.dirs (XDG_CONFIG_HOME defaults to ~/.config) that applications can read to find these directories. 
http://www.freedesktop.org/wiki/Software/xdg-user-dirs

It's not run and I need to manually run it for getting proper xdg dirs.

I have seen that fedora is installing the following script in /etc/X11/xinit/xinitrc.d:
#!/bin/sh
# Copyright (C) 2007 Red Hat, Inc. All rights reserved. This
# copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the
# GNU General Public License version 2.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
if [ -x /usr/bin/xdg-user-dirs-update ]; then
    /usr/bin/xdg-user-dirs-update
fi    

Thanks

Reproducible: Always
Comment 1 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-05-23 10:26:49 UTC
It provides a .desktop file that any xdg compliant session manager should find and start accordingly. I guess people using other setups don't really care about xdg default folders so I'll close wontfix. Please reopen if you disagree.
Comment 2 Pacho Ramos gentoo-dev 2009-05-23 17:41:00 UTC
It doesn't provide any autostart file. The file you are referring is provided by x11-misc/xdg-user-dirs-gtk but its provided xdg-user-dirs-GTK-update doesn't create the directories and I finally need to manually run xdg-user-dirs-update (from x11-misc/xdg-user-dirs)

I am trying it with gnome-2.24
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-05-23 18:19:03 UTC
ah right, but the reason for not doing this (as I thought about doing this in postinst at the beginning or some such) is that you don't want uncontrolled updates of your folders unless you are admin of a multi-user machine maybe, while xdg-user-dirs-gtk does that per user and allows user to discard eventual changes.

This is imho the correct approach.
Comment 4 Pacho Ramos gentoo-dev 2009-05-23 19:44:47 UTC
The problem is that I tried to leave "as is" after installing both packages and files weren't autogenerated for users, even when they didn't have any ~/.config/user-dir.dirs :-/
Comment 5 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-05-23 19:57:33 UTC
(In reply to comment #4)
> The problem is that I tried to leave "as is" after installing both packages and
> files weren't autogenerated for users, even when they didn't have any
> ~/.config/user-dir.dirs :-/
> 

indeed, that's a non-intrusive approach like I said. We could add a word about it in the ebuild if you want.
Comment 6 Pacho Ramos gentoo-dev 2009-05-23 20:29:47 UTC
It would be better than current status of course but seems that I would need to get every user to run it, or not? (it can be a bit tedious with machines with 8-10 users)

Also, I am not sure if it's too intrusive as every user can still configure it with ~/.config/user-dir.dirs , and upstream seems to suggest this "intrusive" way

But maybe I am missing something as I am still not sure about the purpose of x11-misc/xdg-user-dirs-gtk :-/
Comment 7 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-05-23 21:25:32 UTC
the only purpose of x11-misc/xdg-user-dirs-gtk is to update folder names when user changes locale.

Any there is no reverse deps on this package besides -gtk so we can probably do whatever we want and add big phat warnings just in case :)
Comment 8 Pacho Ramos gentoo-dev 2009-05-24 18:11:10 UTC
Well, as already commented, I would prefer to get it run everytime. 

Other option could be being able to run xdg-user-dirs-update for getting it generating dirs in all homedirs automatically, but I am not sure how could it be done :-/
Comment 9 Jeremy Guitton 2010-10-15 11:14:47 UTC
I agree with you pacho and users that don't want autogenerated directory can set enabled=False in /etc/xdg/user-dirs.conf.
Comment 10 Otávio Cipriani 2011-02-12 02:02:37 UTC
Created attachment 262183 [details]
Suggested ".desktop" file

I agree there should be an autostart file for "xdg-user-dirs-update". I attached one I created and I am currently using it. Works perfectly for me.
Comment 11 Otávio Cipriani 2011-02-12 02:31:28 UTC
Created attachment 262185 [details]
Suggested ".desktop" file

This is a better version of the file I just uploaded. It uses "X-GNOME-Autostart-Phase=Initialization" to make sure that it runs before "user-dirs-update-gtk.desktop" (if you are using GNOME).
Comment 12 Samuli Suominen (RETIRED) gentoo-dev 2011-02-12 06:03:17 UTC
The .desktop file is in xdg-user-dirs-gtk package:

/etc/xdg/autostart/user-dirs-update-gtk.desktop

Not sure why this bug is open ... closing
Comment 13 Pacho Ramos gentoo-dev 2011-07-19 09:23:16 UTC
The problem is still valid, I need to manually run xdg-user-dirs-update on every user account to let it work, once it's run, autostart file will do its job but, until then, nothing changes and directories are not created. This causes some usability problems, for example:
- gnome-screensaver has an option to use "Images" folder, default desktop won't have it created and people will need to manually generate it (that is a bit confusing as, for example, I don't know if I need to call it "Imágenes" or "Images" 

- Some browsers like chromium or epiphany defaults to "Downloads" folder for downloading files.
Comment 14 Pacho Ramos gentoo-dev 2011-07-31 17:21:03 UTC
I have just rechecked fedora and opensuse are still using that xinitrc file to let this work as expected, we should do the same from my point of view
Comment 15 Otávio Cipriani 2011-08-19 00:32:01 UTC
(In reply to comment #12)
> The .desktop file is in xdg-user-dirs-gtk package:
> 
> /etc/xdg/autostart/user-dirs-update-gtk.desktop

That file runs "xdg-user-dirs-gtk-update", witch is NOT the same as "xdg-user-dirs-update".

"xdg-user-dirs-gtk-update" only adds the shortcuts to Nautilus and such, while the "xdg-user-dirs-update" is the one responsible for actually CREATING the directories.

Also, "xdg-user-dirs-gtk-update" only creates the shortcuts if the directories exist BEFORE it runs.
Comment 16 Pacho Ramos gentoo-dev 2011-09-12 09:57:23 UTC
Looks like this is being done now in gnome-session, should we keep it there (to not disturb people running other desktops), or move it to this one?
Comment 17 Samuli Suominen (RETIRED) gentoo-dev 2011-09-12 10:10:21 UTC
(In reply to comment #16)
> Looks like this is being done now in gnome-session, should we keep it there (to
> not disturb people running other desktops), or move it to this one?

First of all, sorry for Comment #12, which was misunderstanding.

Now that both GNOME and Xfce are executing xdg-user-dirs-update on their own, without the .desktop file, I propose to close this as WONTFIX.

And if someone doesn't like the decision, they should push this to upstream instead of here. Why do you think desktop upstreams are doing this on their own now?
I'm still not seeing a link to upstream bug URL and this bug is 2 years old.
Comment 18 Pacho Ramos gentoo-dev 2011-09-12 10:18:51 UTC
(In reply to comment #17)
> (In reply to comment #16)
> > Looks like this is being done now in gnome-session, should we keep it there (to
> > not disturb people running other desktops), or move it to this one?
> 
> First of all, sorry for Comment #12, which was misunderstanding.
> 
> Now that both GNOME and Xfce are executing xdg-user-dirs-update on their own,
> without the .desktop file, I propose to close this as WONTFIX.
> 

I agree

> And if someone doesn't like the decision, they should push this to upstream
> instead of here. Why do you think desktop upstreams are doing this on their own
> now?
> I'm still not seeing a link to upstream bug URL and this bug is 2 years old.

I reported:
https://bugs.freedesktop.org/show_bug.cgi?id=21900

long time ago, not sure if this was what you were referring to :-/
Comment 19 Pacho Ramos gentoo-dev 2011-09-12 10:37:30 UTC
This is wontfix as discussed with Samuli then, specially after XFCE upstream started to handle this themselves