GNOME Bugzilla – Bug 712245
background: also monitor the wallpapers directory
Last modified: 2021-06-09 16:12:42 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.
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".
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?!
(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 ?
(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
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.
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.
(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.
Should we fix Nautilus to copy into ~/.cache/gnome-control-center/backgrounds instead?
(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.
(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.
Bastien, which user's data dir do you refer to?
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.
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?
I submitted this proposal for discussion on XDG list here: http://lists.freedesktop.org/archives/xdg/2014-January/013149.html
A first implementation of this proposal is now available at http://lists.freedesktop.org/archives/xdg/2014-March/013219.html
*** Bug 738664 has been marked as a duplicate of this bug. ***
*** Bug 757097 has been marked as a duplicate of this bug. ***
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.
(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.
(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.
(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.
> 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.
(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
(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?
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.
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.