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 509475 - Cheese does not use xdg user dirs
Cheese does not use xdg user dirs
Status: RESOLVED FIXED
Product: cheese
Classification: Applications
Component: general
2.21.x
Other Linux
: Normal major
: ---
Assigned To: Cheese Maintainer(s)
Cheese Maintainer(s)
: 526327 (view as bug list)
Depends on:
Blocks: 523057
 
 
Reported: 2008-01-14 20:25 UTC by Frej Soya
Modified: 2009-07-10 21:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch which solves this issue (10.53 KB, patch)
2008-05-02 16:24 UTC, Felix Kaser
committed Details | Review

Description Frej Soya 2008-01-14 20:25:14 UTC
Currently xdg saves photos/videos in ~/.gnome2/cheese using XDG_PICTURES_DIR and XDG_VIDEOS_DIR would be more them easy accessible from other programs.

Maybe even XDG_PICTURES_DIR/Cheese and XDG_VIDEOS_DIR/Cheese.
Comment 1 Jaap A. Haitsma 2008-01-14 20:53:14 UTC
I'm not so sure if would like Cheese to save all the pictures taken in my XDG_PICTURES_DIR

The idea so far was to store them in a sort of hidden directory. The pictures or videos that the user likes can then be saved or exported.

I agree that if we do a Save As the default should be XDG_PICTURE_DIR or XDG_VIDEO_DIR?

Frej, do you agree with this reasoning?
Comment 2 Frej Soya 2008-01-15 14:17:36 UTC
What about XDG_PICTURES_DIR/Cheese?  - The app name is a bit weird  ;)
Very difficult to translate as well. In danish it would be "Appelsiiiiin" (Orange).Offtopic.... 

Thinking about it....(rambling)

The problem comes from:
How do i send a picture i've taken yesterday in via IM.
How do i set my picture from last week, as a profile picture on facebook

Especially in the facebook case...
If i select browse in Epiphany there is no way to locate the picture when i select "Browse". I first have to open cheese, then "export" the picture from cheese. Then "import/open" it in the browser. Especially the step of opening Cheese to open a picture it is a bit complicated - compared to the original goal of the user. 

There never is a(n) easy/correct solution but accessing previously taken pictures could be a bit easier. Especially the facebook case where we have to interact with crappy web applications that only have files/folders as interaction possibilities.

Maybe dnd could solve a lot of these issues, but I doubt many of our users have the habit of actually using DnD for anything other than files/folders (nautilus) and windows (metacity). But it would be a solution with no Save dialogs! ;).
http://freedesktop.org/wiki/Specifications/XDS
Comment 3 daniel g. siegel 2008-01-15 14:29:08 UTC
> The problem comes from:
> How do i send a picture i've taken yesterday in via IM.
> How do i set my picture from last week, as a profile picture on facebook

the best way would be imho using conduit

> Maybe dnd could solve a lot of these issues, but I doubt many of our users have
> the habit of actually using DnD for anything other than files/folders
> (nautilus) and windows (metacity). But it would be a solution with no Save
> dialogs! ;).
> http://freedesktop.org/wiki/Specifications/XDS

dnd is already implemented in cheese
Comment 4 daniel g. siegel 2008-01-17 21:14:26 UTC
the initial idea was to hide any media from the user and let him export his files through cheese.
Comment 5 Frej Soya 2008-01-17 21:40:05 UTC


>the best way would be imho using conduit
(In reply to comment #3 and #4)
> > The problem comes from:
> > How do i send a picture i've taken yesterday in via IM.
> > How do i set my picture from last week, as a profile picture on facebook
> 
> the best way would be imho using conduit

I don't think you can rely on conduit, it won't have plugins for every application (web or not). Even then - the work of setting up conduit is not that easy. (How do i even discover it, and then actually guess what it does?).

>the initial idea was to hide any media from the user and let him export his
>files through cheese.
Is there any reason for hiding the media? (Sincere question) :)

The generic "data sharing" between applications is either the filepicker or dnd/copy-paste. 

Most applications currently use a filepicker dialog for opening pictures. 
If I have to go into Cheese first - then export - then back to filepicker it's not easier. You would have to know that cheese has an export hidden in the "file" menu.

Sorry if i'm repeating myself ;) 
Comment 6 daniel g. siegel 2008-01-27 20:32:36 UTC
> I don't think you can rely on conduit, it won't have plugins for every
> application (web or not). Even then - the work of setting up conduit is not
> that easy. (How do i even discover it, and then actually guess what it does?).

youre probably right here

> Is there any reason for hiding the media? (Sincere question) :)

ehm.. yeah ;) it was more like a thing like we dont want to flood a certain directory with pictures and videos. there were 2 usecases:

a person, who just want to take _some_ pictures and videos and send them to their friends

a person, who is doing a party and is doing many many pictures and want to send all media to their friends.

as more users will go for the first usecase, we decided to "hide" the media, but to let people know, where the media is, so that they can copy all files around too if they want.

> The generic "data sharing" between applications is either the filepicker or
> dnd/copy-paste. 

cheese has dnd capabilites ;)
Comment 7 Frej Soya 2008-02-02 01:49:56 UTC
With dnd we have no big problems. But feel free to close this bug :)

It's still a sore point for me that we _can't_ use XDG_dirs  for what they are intended as - storing the users data. So other apps can use it as default.
 If we can't use them because it might "flood" the dir  - What would qualify as reasonable use ;).

Being really harsh, I think it's a made up problem :) "Thinking ahead"

Ok i'll stop now - sorry! :) Again, feel free to close this.
Comment 8 Bastien Nocera 2008-02-18 23:30:35 UTC
I'm going to reopen this. The images just aren't findable in the file manager, because they're hidden in "system" directories. I don't think there's anything bad about using $XDG_PICTURES_DIR/Cheese as the default location.
Comment 9 Patryk Zawadzki 2008-02-19 10:49:00 UTC
I'd second the $XDG_PICTURES_DIR request but would prefer "camera" or "webcam" as a subdirectory instead of "cheese" (as was stated earlier, the app's name is not translated literally and means "smile" in pl_PL so it would not be obvious where to look for the files).
Comment 10 daniel g. siegel 2008-03-02 00:13:52 UTC
i wouldnt use the xdg directory, but lets summarize:


- if you are doing a lot of photos videos, you are spamming your xdg folder
- we would need two directories, one for videos and one for photos
- if we are doing some synchronisation abilities for cheese, this becomes redundant
+ easier access for people
+ naming problem of the xdg directory
Comment 11 Patryk Zawadzki 2008-03-02 12:37:04 UTC
Daniel:

Why do you consider putting photos in the photos directory "spamming?" ;)
Comment 12 Frej Soya 2008-03-05 23:57:53 UTC
- if you are doing a lot of photos videos, you are spamming your xdg folder
So if we can't manage the data, we hide it?
Second, your experience of spamming is probably extreme since you tested the app(GREAT!) when developing. Ie, your use is not regular use.

If it's a problem we should make it possible to handle for other apps.
We could tag the image with "cheese" if we accidently "spam" some photo apps.
(Or just get over it and use extended attributes if available)

- we would need two directories, one for videos and one for photos
True, but the application could preserve the "single view".

- if we are doing some synchronisation abilities for cheese, this becomes
redundant
Tagging / Extended attributes to the rescue ;).
Comment 13 daniel g. siegel 2008-03-14 02:16:01 UTC
hmm.. i still didnt hear a good argument to convince me.. in my opinion its ok like we do now..

come on guys, why do you want to have that feature? (you would have to convince me or to buy vuntz some ice cream)
Comment 14 Patryk Zawadzki 2008-03-14 08:11:09 UTC
Because currently using a photo online involves running cheese, taking a photo, finding it in the possibly long horizontal scroller, dragging it to desktop so you can find it, going online, clicking browse, selecting a picture from the 100+ files and folder you put there due to such software habits ;)
Comment 15 Bastien Nocera 2008-03-14 17:35:39 UTC
> - we would need two directories, one for videos and one for photos

Yes, there's Videos, and there's Pictures. Both are listed in the "special dirs".

The point is being able to:
1) find the images without knowing where to look (you can't now, it's hidden)
2) being able to manage the files in other applications (file-manager or application like gthumb) than cheese itself (because it's a rubbish file manager, and I'd be concerned if it wasn't ;)
3) Other apps can find the pictures without knowing about cheese (just like sound-juicer creates files in ~/Music by default, and Rhythmbox uses that directory to search for files). So F-Spot or gthumb could import the photos without any particular handling of F-Spot.

That also means that Conduit could find your pictures and videos without needing a plugin for Cheese, and upload them to flickr/YouTube/whatever.

Finally to get back to 2), I can't archive files in a zip file with cheese, I can't send the files via e-mail or Bluetooth. The file manager can do that...
Comment 16 daniel g. siegel 2008-03-14 18:23:25 UTC
a) dont call my file manager rubbish! ;)
b) you _can_ send the files via email

bluetooth would be a nice addition though.. 

as i stated in an other bug report, i dont think that cheese should support all the export mechanism, a general gnome framework should do that and if that framework needs the files in XDG-dir or whatever, im ok with that
Comment 17 XioNoX 2008-03-30 12:45:47 UTC
If you don't save data (pictures and videos) in the DG_PICTURES_DIR
and XDG_VIDEOS_DIR you can at least apply the $XDG_DATA_HOME ($HOME/.local/share) recomendation. And don't save pictures in .gnome2.
You can use $XDG_CACHE_HOME for the log file to.
And $XDG_CONFIG_HOME ($HOME/.config) if any futur config files.


See :
http://standards.freedesktop.org/basedir-spec/latest/
and :
http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data

Thanks
Comment 18 daniel g. siegel 2008-04-02 01:34:08 UTC
hmm.. there are really many people who want to have the pictures in a configurable folder like XDG_whatever. so i think that we would move to it for gnome 2.24

for the log file: i dont see any reason to move that outside of .gnome2

everybody happy now? ;)
Comment 19 Jaap A. Haitsma 2008-04-02 04:50:20 UTC
I think adding the log file to XDG_CACHE_HOME is a good idea (The vala branch already does this), because every application doing his own thing is bad
Comment 20 daniel g. siegel 2008-04-05 16:04:29 UTC
*** Bug 526327 has been marked as a duplicate of this bug. ***
Comment 21 Michael Monreal 2008-04-06 14:28:08 UTC
Heh... another duplicate from me :/

But here's my +1 for XDG_DIR* from me. I just got a usable cam a few days ago, so I was already using nautilus 2.22.x. With that, DnD as mentioned above, is broken. I really wondered where the photos are stored and .gnome/cheese/ was not one if my first guesses...

Even with the DnD fixed, hiding media in a dot directory is a bad idea IMHO. $XDG_PICTURES_DIR/Webcam sounds like a good idea. I don't think it needs translation either, at least in german using "Webcam" is totally fine (I don't think there are many languages that translate this kind of new tech stuff?)
Comment 22 Felix Kaser 2008-05-01 17:14:36 UTC
Hey everybody...

It's my first comment here, so I want to introduce myself with a few words:
As you can see from my username, my name is felix. I've been accepted to soc08 and my task will be the integration of cheese into gnome.

As my first action as soc-student I'll write a patch to solve this bug. According to previous comments on this bug there will be 3 different directories where cheese saves it's files (picture, video and log directory).


Since now there was only one directory where cheese saved the media files, but now it will be two. So what about the thumbnail section? It would be easier to scan only one directory and show only the pictures (if in photo-mode) or only the videos (if in video-mode). But easier does not mean better...

Separated thumbnails or everything in one single pot? This question really beats me... I think one single pot would be nice, because switching between video and photo mode is not "really" fast!

Opinions?
Comment 23 daniel g. siegel 2008-05-01 17:37:17 UTC
felix, in my opinion we just should use 

XDG_PICTURES_DIR/Webcam for photos

and

XDG_VIDEOS_DIR/Webcam for videos.

monitoring those two folders isnt that expensive.

about the video/photo story: there were some usability suggestions about splitting photos and videos up. but in my opinion, this could be a possible feature, but we should use the single pot for all our media files.
Comment 24 Felix Kaser 2008-05-02 16:24:11 UTC
Created attachment 110280 [details] [review]
patch which solves this issue

Videos now are saved under $XDG_VIDEOS_DIR/Webcam and the Pictures under $XDG_PHOTO_DIR/Webcam.

Logs remain in the directory $HOME/.gnome2/cheese!
Comment 25 daniel g. siegel 2008-05-02 16:49:57 UTC
committed to trunk, thanks felix!

please open a new bug, if you want to change further behaviour, e.g. the name of the created folder