This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 457740 - xfce does not respect xdg user directory paths
xfce does not respect xdg user directory paths
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: xfdesktop (Show other bugs)
9
All Linux
medium Severity medium
: ---
: ---
Assigned To: Kevin Fenzi
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-04 08:55 EDT by Andrea Santilli
Modified: 2009-01-24 22:48 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-24 22:48:01 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
patch for thunar (32.28 KB, patch)
2008-08-05 15:35 EDT, Andrea Santilli
no flags Details | Diff
patch for xfdesktop (1.20 KB, patch)
2008-08-05 15:35 EDT, Andrea Santilli
no flags Details | Diff
patch for xfce4-places-plugin (1.29 KB, patch)
2008-08-05 15:36 EDT, Andrea Santilli
no flags Details | Diff
updated patch for thunar (34.97 KB, patch)
2008-08-07 22:36 EDT, Andrea Santilli
no flags Details | Diff
updated patch for xfdesktop (1.59 KB, patch)
2008-08-07 22:37 EDT, Andrea Santilli
no flags Details | Diff
updated patch for xfce4-places-plugin (1.83 KB, patch)
2008-08-07 22:38 EDT, Andrea Santilli
no flags Details | Diff
thunar patch update 2 (37.60 KB, patch)
2008-08-29 19:35 EDT, Andrea Santilli
no flags Details | Diff
xfdesktop patch update 2 (1.60 KB, patch)
2008-08-29 19:35 EDT, Andrea Santilli
no flags Details | Diff
xfce4-places-plugin patch update 2 (1.83 KB, patch)
2008-08-29 19:36 EDT, Andrea Santilli
no flags Details | Diff

  None (edit)
Description Andrea Santilli 2008-08-04 08:55:14 EDT
Description of problem:
Since I'm unsure what component of xfce includes the user directory paths, I filed this bug in xfdesktop.

XFCE ignores directory paths set in $HOME/.config/user-dirs.dirs
In other words it does not consider the variables XDG_DESKTOP_DIR, XDG_DOWNLOAD_DIR, XDG_TEMPLATES_DIR, XDG_PUBLICSHARE_DIR, XDG_DOCUMENTS_DIR, XDG_MUSIC_DIR, XDG_PICTURES_DIR, XDG_VIDEOS_DIR

Exporting those variables does not help either.

I think most of them are useless for xfce but at least the variables XDG_DESKTOP_DIR and XDG_DOCUMENTS_DIR should be considered by the desktop environment, because it currently creates new directories for them.

It looks like the paths are currently hardcoded (ugh).

Version-Release number of selected component (if applicable):
xfdesktop-4.4.2-3.fc9
Comment 1 Kevin Fenzi 2008-08-04 10:58:57 EDT
See this thread from  while back: 

http://www.archivum.info/xfce4-dev@xfce.org/2007-05/msg00006.html

In short, it's probibly going to be in 4.6, but there are no plans to backport it to the current stable release. 

Due to that, I am inclined to close this for now... unless you can think of anything further we can do?
Comment 2 Andrea Santilli 2008-08-05 15:34:27 EDT
I've been searching through the GTK+ and Xfce APIs and I modified xfdesktop, Thunar and xfce4-places-plugin to force them to respect the standard.
I'm sending you the patches, so you'll decide what to do. They just work to me.
Anyway since this was the first time I used those APIs you might want to double check them first.

These are the changes I made:
- xfdesktop now shows the files in the xdg user desktop;
- Thunar now uses xdg user directories for the desktop and templates; when files are sent to the desktop it links them from the right folder; also the "Go" menu now includes all the xdg user directories (of course the menu entries are still untranslated);
- xfce4-places-plugin now sends to the right desktop folder.

Well I hope that's useful
Comment 3 Andrea Santilli 2008-08-05 15:35:11 EDT
Created attachment 313481 [details]
patch for thunar
Comment 4 Andrea Santilli 2008-08-05 15:35:48 EDT
Created attachment 313482 [details]
patch for xfdesktop
Comment 5 Andrea Santilli 2008-08-05 15:36:23 EDT
Created attachment 313484 [details]
patch for xfce4-places-plugin
Comment 6 Andrea Santilli 2008-08-05 15:36:40 EDT
These are the patches.
Comment 7 Andrea Santilli 2008-08-06 13:31:10 EDT
Hmmm Thunar and xfdesktop work fine but the xfce4-places-plugin seems to crash after a while... I have to find out why.
Comment 8 Andrea Santilli 2008-08-07 22:35:16 EDT
updating patches... this time they are much more stable. even the panel plugin shouldn't crash anymore.
Comment 9 Andrea Santilli 2008-08-07 22:36:31 EDT
Created attachment 313775 [details]
updated patch for thunar
Comment 10 Andrea Santilli 2008-08-07 22:37:27 EDT
Created attachment 313776 [details]
updated patch for xfdesktop
Comment 11 Andrea Santilli 2008-08-07 22:38:16 EDT
Created attachment 313777 [details]
updated patch for xfce4-places-plugin
Comment 12 Kevin Fenzi 2008-08-11 20:43:24 EDT
Excellent. Thanks for the patches. 
Also, thanks for posting them upstream!

I will look and see if we can add them into the fedora packages in the mean time.
Comment 13 Andrea Santilli 2008-08-14 09:19:55 EDT
Pleasure :)
The only problem with the patch is that it requires glib2 >= 2.14 while plain xfce requires glib2 >= 2.6.0. 
But this shouldn't be a problem for Fedora 9 since it ships with version 2.16.5.
Comment 14 Christoph Wickert 2008-08-27 09:51:55 EDT
Applied patch from comment #11 in xfce4-places-plugin-1.1.0-2.fc10.

Kevin, I really like the idea, so can I do ahead and check the patches for xfdesktop and Thunar in? I did some changes to xfdesktop yesterday but did not yet build them, so we can apply all fixes in one update.
Comment 15 Kevin Fenzi 2008-08-27 11:24:31 EDT
Yeah, I have been looking at the patches and I like the idea too... 

I'm fine with you going ahead and applying them to xfdesktop and Thunar. 

Hopefully Andrea's work will be upstreamed in 4.6. ;) 

Thanks again for the patches!
Comment 16 Christoph Wickert 2008-08-27 16:21:21 EDT
Applied in xfdesktop-4.4.2-5 on rawhide:

* Wed Aug 27 2008 Christoph Wickert <fedora christoph-wickert de> - 4.4.2-5
- Use Fedora icon for desktop menu plugin (#445986)
- Respect xdg user directory paths (#457740)
- Fix menu icons
- Fix CRITICAL register message on startup
- Fix for x86_64
- Simplify g_list_free code

Quite a lot of changes, so we should think about shipping this as an update for F-9 later.
Comment 17 Kevin Fenzi 2008-08-28 00:00:24 EDT
Yeah, it needs time in rawhide to make sure we aren't missing anything.
Comment 18 Andrea Santilli 2008-08-29 19:33:44 EDT
I suspected there was something wrong...

Thunar was getting slower and slower so I took a look at the patch again.

I found and fixed the memory leaks I accidentally added.

Also I fixed a little mistake in xfdesktop and changed the variable names to comply the xfce source syntax.

Sorry for the mess, now the patches should be fine.
Comment 19 Andrea Santilli 2008-08-29 19:35:05 EDT
Created attachment 315407 [details]
thunar patch update 2
Comment 20 Andrea Santilli 2008-08-29 19:35:53 EDT
Created attachment 315408 [details]
xfdesktop patch update 2
Comment 21 Andrea Santilli 2008-08-29 19:36:49 EDT
Created attachment 315409 [details]
xfce4-places-plugin patch update 2
Comment 22 Andrea Santilli 2008-08-29 19:44:42 EDT
oh I forgot to say that because of the same errors, when thunar launched applications and those exited, it kept them in memory in 'defunct' state.

That's fixed too.
Comment 23 Christoph Wickert 2008-08-30 21:03:27 EDT
(In reply to comment #18)
> I suspected there was something wrong...
> 
> Thunar was getting slower and slower so I took a look at the patch again.
> 
> I found and fixed the memory leaks I accidentally added.

No problem, I had not yet build the new thunar package. I want to apply some other changes (see bug # 450784) that first need to be discussed in the Xfce SIG meeting on Thursday, so I'm not going to build Thunar before Wednesday. The other patches are applied in xfdesktop-4.4.2-6.fc10 and xfce4-places-plugin-1.1.0-3.fc10.
Comment 24 Andrea Santilli 2008-09-13 05:20:47 EDT
hello there :)
I'm going on with the work on these patches and I sent newer ones against 4.5.0 alpha to http://bugzilla.xfce.org/show_bug.cgi?id=4365

It shouldn't be hard to backport them.
Comment 25 Kevin Fenzi 2008-10-09 20:47:05 EDT
Do you think it's worth backporting? 
We already have the patches from the 29th in I think, except for Thunar. 
(which we should push out soon).
Comment 26 Andrea Santilli 2008-10-10 01:34:58 EDT
Thunar 0.9.80 (the svn version) just contains many bugfixes on 0.9.0, so maybe it's better to update the version.

Anyway, in case you don't want to update, the patch for thunar doesnt really need a backport.
Just before building, still in the %build section, remember to run this:

pushd thunar
exo-csource --name=thunar_window_ui thunar-window-ui.xml > thunar-window-ui.h
popd

and you're done. The latest version of the patch is available at http://bugzilla.xfce.org/show_bug.cgi?id=4365

Another thing, maybe a bit offtopic here.
Still in case you aren't going to update, please have a look at this bug report:
http://bugzilla.xfce.org/show_bug.cgi?id=2983
It contains a very important patch for a bug in 0.9.0 that gets even worse with the changes I made.
Comment 27 Christoph Wickert 2008-10-28 06:49:22 EDT
(In reply to comment #26)
> 
> pushd thunar
> exo-csource --name=thunar_window_ui thunar-window-ui.xml > thunar-window-ui.h
> popd

Is this also necessary when applying the patch from comment # 19 to Thunar-0.9.3? I guess it won't hurt, so I did.

> http://bugzilla.xfce.org/show_bug.cgi?id=2983
> It contains a very important patch for a bug in 0.9.0 that gets even worse with
> the changes I made.

Applied. I wonder why this has not been fixed upstream.
Comment 28 Kevin Fenzi 2009-01-14 00:19:02 EST
Are there any further issues here? Or shall we close this now?
Comment 29 Kevin Fenzi 2009-01-24 22:48:01 EST
I'm going to go ahead and close this now... feel free to reopen or file a new bug if you spot any issues.

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