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 712245 - background: also monitor the wallpapers directory
background: also monitor the wallpapers directory
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: Background
unspecified
Other All
: Normal normal
: ---
Assigned To: Debarshi Ray
Control-Center Maintainers
: 738664 757097 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-11-13 20:36 UTC by William Jon McCann
Modified: 2021-06-09 16:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
background: also monitor the wallpapers directory (4.87 KB, patch)
2013-11-13 20:37 UTC, William Jon McCann
needs-work Details | Review

Description William Jon McCann 2013-11-13 20:36:59 UTC
We aren't looking in the sub-folder where Files copies images when 
the user selects "Set as Wallpaper". We'd like to recommend that other
applications use this location too.
Comment 1 William Jon McCann 2013-11-13 20:37:06 UTC
Created attachment 259749 [details] [review]
background: also monitor the wallpapers directory

This is where Files etc will copy images when the user selects
"Set as Wallpaper".
Comment 2 Bastien Nocera 2013-11-14 09:08:15 UTC
Review of attachment 259749 [details] [review]:

::: panels/background/bg-pictures-source.c
@@ +651,1 @@
+  wallpapers_path = g_build_filename (pictures_path, "Wallpapers", NULL);

This isn't localised?!
Comment 3 Debarshi Ray 2013-11-14 10:28:20 UTC
(In reply to comment #0)
> We aren't looking in the sub-folder where Files copies images when 
> the user selects "Set as Wallpaper". We'd like to recommend that other
> applications use this location too.

Maybe Settings should also use it instead of ~/.cache/gnome-control-center/backgrounds ?
Comment 4 Debarshi Ray 2013-11-14 10:31:30 UTC
(In reply to comment #2)
> Review of attachment 259749 [details] [review]:
> 
> ::: panels/background/bg-pictures-source.c
> @@ +651,1 @@
> +  wallpapers_path = g_build_filename (pictures_path, "Wallpapers", NULL);
> 
> This isn't localised?!

No: https://git.gnome.org/browse/nautilus/tree/src/nautilus-view.c#n6442
Comment 5 Bastien Nocera 2013-11-14 10:50:59 UTC
That's a bug... We really don't have a good story for application provided directories within XDG dirs.

We should start by categorising all the sub-dirs we currently use (or want to use) and see whether xdg-user-dirs can be extended to support that.

~/Pictures
  -> Wallpapers
  -> Screenshots (requested in another bug)
  -> Webcam (from Cheese)
~/Videos
  -> Webcam (from Cheese)
~/Documents
  -> E-Books (discussed in gnome-docs)
~/Music
  -> Records (gnome-sound-recorder)

etc.
Comment 6 William Jon McCann 2013-11-14 14:57:24 UTC
That's perhaps an interesting discussion but not one I think that we should have in this bug. Let's fix the obvious problem here first.
Comment 7 Bastien Nocera 2013-12-12 00:42:02 UTC
(In reply to comment #6)
> That's perhaps an interesting discussion but not one I think that we should
> have in this bug. Let's fix the obvious problem here first.

I don't think nautilus should be copying to directory with hard-coded English directory name.
Comment 8 Cosimo Cecchi 2014-01-08 00:15:28 UTC
Should we fix Nautilus to copy into ~/.cache/gnome-control-center/backgrounds instead?
Comment 9 William Jon McCann 2014-01-08 01:36:12 UTC
(In reply to comment #8)
> Should we fix Nautilus to copy into ~/.cache/gnome-control-center/backgrounds
> instead?

No, clearing the cache should not lose data. We also want "Screenshots" and "Screencasts" to be a separate directories as well and those need to be in the user data dirs. I understand the desire to translate these but breaking the background settings panel in the meanwhile is really lame.
Comment 10 Bastien Nocera 2014-01-08 15:58:16 UTC
(In reply to comment #8)
> Should we fix Nautilus to copy into ~/.cache/gnome-control-center/backgrounds
> instead?

We should copy it in the user's data dir, and make both g-c-c and nautilus use that.
Comment 11 Cosimo Cecchi 2014-01-08 16:11:51 UTC
Bastien, which user's data dir do you refer to?
Comment 12 William Jon McCann 2014-01-08 16:13:07 UTC
That isn't as simple as it sounds.

You'd need a way to make sure it doesn't grow unbounded. Have a way for users to remove that data. Perhaps provide a way for files to be edited there.

One way that could work is to have something that keeps "N recent wallpapers". Provide a remove action in the background settings.

And add a way for all but the current one to be cleared in the privacy settings somehow.
Comment 13 Cosimo Cecchi 2014-01-10 00:27:45 UTC
I'm interested in working on a proper solution to this bug.
It seems to me like the first thing we need here is a way for applications to describe and own subdirectories of XDG user dirs, with their translations. A good way to implement this could be through the installation of .desktop files in a known location (e.g. $XDG_DATA_DIR/xdg-user-dirs).

The desktop file would have a simple structure like:

[Directory]
Name=Wallpapers
Name[fr]=...
Name[it]=...
Parent=$XDG_PICTURES_DIR
Icon=foo-bar-media (optional)

Not sure we need much else.

Then an utility like xdg-user-dirs-gtk-update will enumerate those files and add the directories to the list of those needed to be created, or renamed when the locale changes.

The last piece of the puzzle is a library function, possibly in GLib, that gives you the path of one of these directories. I think the easiest implementation would be looking up the desktop file by basename, similar to how it works for applications.
So Nautilus and g-c-c would call something like g_get_user_special_dir_for_desktop_id('gnome-wallpapers.desktop') to get the correct path.

What do you think?
Comment 14 Cosimo Cecchi 2014-01-15 19:01:46 UTC
I submitted this proposal for discussion on XDG list here: http://lists.freedesktop.org/archives/xdg/2014-January/013149.html
Comment 15 Cosimo Cecchi 2014-03-04 00:54:26 UTC
A first implementation of this proposal is now available at http://lists.freedesktop.org/archives/xdg/2014-March/013219.html
Comment 16 Debarshi Ray 2015-10-27 11:24:11 UTC
*** Bug 738664 has been marked as a duplicate of this bug. ***
Comment 17 Debarshi Ray 2015-10-27 11:31:35 UTC
*** Bug 757097 has been marked as a duplicate of this bug. ***
Comment 18 Britt Yazel 2016-04-13 06:49:55 UTC
As this hasn't really been addressed again in a couple of years, what is the rationale behind not allowing more than the root of the Pictures directory? 

Is it unreasonable to ask for a simple button at the very least that will just open the gtk-file-chooser dialog such as to select a picture from literally *any* location other than the root /Pictures? I think this is the simplest possible solution to at least tide us over until you guys can work out a "proper" way to address this.

To do something as simple as changing my background image, right now I have to resort to using Gnome-Tweak-Tool, solely for the purpose of the gtk-file-chooser dialog that it provides. And, trust me, I and many other people would much much rather just use the control-center for such a simple task.

It looks a bit odd when I try to sell Gnome to my friends, and they come to me and say "hey..why the heck can't I choose a background image from /pictures/foo? Wheres the option?" and I have to explain "Well you see, the designers don't want you to be able to do it that way for...reasons...?"

Not to mention that if I do choose to play ball, and I stick all of my wallpapers in the root of /pictures, when I choose a wallpaper a copy of it gets put into /pictures/Wallpapers. Which my logic then says, "oh, maybe I should just stick my images in this new folder that Gnome created", so I do, and they don't show up anymore as options in the background settings! Which means that Gnome doesn't even watch its own folder that it created! And, on top of everything else, if I switch between the same few wallpapers, it keeps sending redundant copies into /pictures/wallpapers, taking up lots of space. Just cycling through a bunch of my wallpapers, trying to choose the right one, I duplicated 25+ images (each 5-6Mb), and I constantly have to manually clear out this folder. And if I go into /pictures/Wallpapers and right click on one of the many copies within that directory and say "set as wallpaper", it creates an exact copy of it right there in the same directory! For no reason...

I'm not trying to criticize the motives behind your design decisions guys, but come on... You guys do phenomenal work, but I can't really consider this to be among your best.
Comment 19 Zeeshan Ali 2016-04-13 11:52:47 UTC
(In reply to Britt Yazel from comment #18)
> As this hasn't really been addressed again in a couple of years, what is the
> rationale behind not allowing more than the root of the Pictures directory? 
> 
> Is it unreasonable to ask for a simple button at the very least that will
> just open the gtk-file-chooser dialog such as to select a picture from
> literally *any* location other than the root /Pictures? I think this is the
> simplest possible solution to at least tide us over until you guys can work
> out a "proper" way to address this.
> 
> To do something as simple as changing my background image, right now I have
> to resort to using Gnome-Tweak-Tool, solely for the purpose of the
> gtk-file-chooser dialog that it provides. And, trust me, I and many other
> people would much much rather just use the control-center for such a simple
> task.

Can you not simply keep your pictures under an xdg standard location (~/Pictures in this case)?

> It looks a bit odd when I try to sell Gnome to my friends, and they come to
> me and say "hey..why the heck can't I choose a background image from
> /pictures/foo? Wheres the option?" and I have to explain "Well you see, the
> designers don't want you to be able to do it that way for...reasons...?"

Instead of providing sarcasm, maybe it would be more helpful to inform them of benefits of better organisiing their content? I'm no designer but I see how exposing details like filesystem hierarchy to user is a bad idea in most cases and should be avoided wherever possible.

Even if you don't agree with anything I said, you can think of having your pictures under xdg directories as a work around and hence there is no need for providing work around in the UI and making it ugly.
Comment 20 Debarshi Ray 2016-04-13 13:16:16 UTC
(In reply to Britt Yazel from comment #18)
> To do something as simple as changing my background image, right now I have
> to resort to using Gnome-Tweak-Tool, solely for the purpose of the
> gtk-file-chooser dialog that it provides. And, trust me, I and many other
> people would much much rather just use the control-center for such a simple
> task.

Eh? You should be able to set a wallpaper from nautilus but right-clicking any image file. I don't know why you need gnome-tweak-tool.

You can do that from various other applications too.

> Not to mention that if I do choose to play ball, and I stick all of my
> wallpapers in the root of /pictures, when I choose a wallpaper a copy of it
> gets put into /pictures/Wallpapers.

That only happens if you used nautilus (see above). It doesn't happen if you use Settings -> Background.
Comment 21 Debarshi Ray 2016-04-13 13:24:04 UTC
(In reply to William Jon McCann from comment #0)
> We aren't looking in the sub-folder where Files copies images when 
> the user selects "Set as Wallpaper". We'd like to recommend that other
> applications use this location too.

Here's a dumb question: why does nautilus even copy files that are already somewhere inside ~/Pictures into ~/Pictures/Wallpapers?

gnome-control-center doesn't copy things like that, nor does gnome-photos. They only download and copy the file to ~/.cache if it is remote. eg., a Flickr image.
Comment 22 Britt Yazel 2016-04-13 15:44:47 UTC
> Instead of providing sarcasm, maybe it would be more helpful to inform them
> of benefits of better organisiing their content? I'm no designer but I see
> how exposing details like filesystem hierarchy to user is a bad idea in most
> cases and should be avoided wherever possible.


How is putting wallpaper images in a folder dedicated to holding wallpapers, I.E. /pictures/wallpapers less organized than putting them at the root of the drive? Generally speaking, a clear hierarchical structure of folders is easier at least for me than a flat approach of putting all photos in one directory.

So even with your advice, I cannot inform them of these benefits, as I fundamentally disagree with it.

And I apologize if the sarcasm came off as inappropriate. However, this was a real conversation I had with a new Gnome convert.
Comment 23 Britt Yazel 2016-04-13 15:54:20 UTC
(In reply to Debarshi Ray from comment #20)
> Eh? You should be able to set a wallpaper from nautilus but right-clicking
> any image file. I don't know why you need gnome-tweak-tool.

Yes you are correct, however I don't like to use Nautilus due to the afformentiond unnecessary copying of the images. Further, with this method I cannot set span/center/stretch/etc, nor can I set a lock screen image this way.

> That only happens if you used nautilus (see above). It doesn't happen if you
> use Settings -> Background.
Yes you are right. This seems to be a Nautilus specific event
Comment 24 Britt Yazel 2016-04-13 15:59:35 UTC
(In reply to Zeeshan Ali (Khattak) from comment #19)

> Even if you don't agree with anything I said, you can think of having your
> pictures under xdg directories as a work around and hence there is no need
> for providing work around in the UI and making it ugly.

I don't really think a single button or other clickable option to open the file chooser dialog will drastically effect or worsen the appearance. Do you have an example where adding such an option made an application worse and less usable than prior?
Comment 25 Britt Yazel 2016-04-13 18:22:03 UTC
I have created bugs 765010 and 765044 to ask the nautilus developers to reevaluate their decisions regarding creating duplicate copies of images, and to potentially add a "set as lock-screen wallpaper" to the file dialog.

Though even with changes in nautilus, I still believe that the Background/Wallpaper options could be redesigned in a way that can better suit multiple usage cases, and I would be happy to discuss further. It just depends on whether or not the devs see any need for modifications or are otherwise happy with the way it currently works.
Comment 26 André Klapper 2021-06-09 16:12:42 UTC
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org.
As part of that, we are mass-closing older open tickets in bugzilla.gnome.org
which have not seen updates for a longer time (resources are unfortunately
quite limited so not every ticket can get handled).

If you can still reproduce the situation described in this ticket in a recent
and supported software version, then please follow
  https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines
and create a new bug report at
  https://gitlab.gnome.org/GNOME/gnome-control-center/-/issues/

Thank you for your understanding and your help.