! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
org.freedesktop.FileManager1 service should be supported by Thunar
Status:
RESOLVED: FIXED
Severity:
enhancement

Comments

Description xrsquared 2016-01-20 08:41:10 CET
This service is used by Firefox's "Open Containing Folder" for downloaded files, and also by Eclipse. 

Currently with Firefox, Thunar opens the directory without selecting the file since xdg-open is used instead of the dbus service.

Not having this services is also causing weird issues for users that also have Nautilus installed. See https://bugzilla.mozilla.org/show_bug.cgi?id=1106916.

The details for the specification is here: http://www.freedesktop.org/wiki/Specifications/file-manager-interface/

I think these overlap nicely with org.xfce.FileManager, so they shouldn't be hard to do. It would be really nice to get support for this.

The service is currently supported by Nautilus and Dolphin.
Comment 1 Matias De lellis 2017-02-24 13:18:11 CET
Hi,
https://github.com/dirk-olmes/dbus-file-manager 

Not ideal, but I'm out of a hurry .. ;)
Comment 2 RichtigFalsch 2017-03-04 15:06:51 CET
*** Bug 13406 has been marked as a duplicate of this bug. ***
Comment 3 Andre Miranda editbugs 2019-01-03 01:52:48 CET
*** Bug 15003 has been marked as a duplicate of this bug. ***
Comment 4 Andre Miranda editbugs 2019-01-03 03:36:28 CET
Created attachment 8221 
wip patch

WIP implementation of org.freedesktop.FileManager1
Comment 5 Andre Miranda editbugs 2019-01-10 03:04:20 CET
Created attachment 8233 
filemanager1.patch

Complete patch, soon to be merged and released in 1.8.3, but I'm posting it here for testers/reviewers.
Comment 6 Andre Miranda editbugs 2019-01-13 16:21:19 CET
Created attachment 8239 
Updated patch

Updated patch, better handling for malformed URIs.
Comment 7 Git Bot editbugs 2019-01-13 22:21:14 CET
Andre Miranda referenced this bugreport in commit ec15879865962489c29043c7e4908d500e4220d9

Add support for org.freedesktop.FileManager1 (Bug #12414)

https://git.xfce.org/xfce/thunar/commit?id=ec15879865962489c29043c7e4908d500e4220d9
Comment 8 Git Bot editbugs 2019-01-13 22:22:12 CET
Andre Miranda referenced this bugreport in commit c06074065460e63cf78ef1c5b7eb819fa6a86430

Add support for org.freedesktop.FileManager1 (Bug #12414)

https://git.xfce.org/xfce/thunar/commit?id=c06074065460e63cf78ef1c5b7eb819fa6a86430
Comment 9 alexxcons editbugs 2019-01-14 22:03:46 CET
*** Bug 11024 has been marked as a duplicate of this bug. ***
Comment 10 Evangelos Foutras 2019-01-25 06:44:58 CET
The newly added service file conflicts with the one shipped by Nautilus. To be exact:

> thunar: /usr/share/dbus-1/services/org.freedesktop.FileManager1.service exists in filesystem (owned by nautilus)

How should this be handled by Linux distros (with no Debian-like alternatives system)?
Comment 11 vladimir 2019-01-25 12:14:53 CET
(In reply to Git Bot from comment #8)
> Andre Miranda referenced this bugreport in commit
> c06074065460e63cf78ef1c5b7eb819fa6a86430
> 
> Add support for org.freedesktop.FileManager1 (Bug #12414)
> 
> https://git.xfce.org/xfce/thunar/
> commit?id=c06074065460e63cf78ef1c5b7eb819fa6a86430

while installing nautilus and thunar, there is a conflict of /usr/share/dbus-1/services/org.freedesktop.File Manager 1.service
Comment 12 alexxcons editbugs 2019-01-25 14:29:41 CET
One possibility would be to add "Thunar"/"Nautilus" to the name of the file ... but that seems to be no good solution, and is not recommended by freedesktop either:

From https://dbus.freedesktop.org/doc/dbus-daemon.1.html

> If a particular service is found in more than one <servicedir>, the first directory listed in the configuration file takes precedence.
> If two service files providing the same well-known bus name are found in the same directory, it is arbitrary which one will be chosen
> (this can only happen if at least one of the service files does not have the recommended name, which is its well-known bus name
> followed by ".service").

So in this case, it would be arbitrary which filemanager is called .. not very nice.


What about just overwriting the file and dont remove it after package uninstall ( ok, this is bad if the filemanager got uninstalled )

Or the other way around : Dont overwrite, remove on package uninstall  ( could lead to the question "why is this filemanager used, and not that?" )

The cleanest solution comming to my mind would be, to provide one dbus-1 <servicedir> per filemanager(package) installation. So the first directory listed in the configuration file would win.

I am not a packager .. this dbus problem smells like it already must have been solved in some way. Thunar probably is not the first package which provides some dbus service which is provided by multiple packages. How it is done for other dbus services which are provided by multiple packages ?
Comment 13 vladimir 2019-01-25 14:49:43 CET
(In reply to alexxcons from comment #12)
> One possibility would be to add "Thunar"/"Nautilus" to the name of the file
> ... but that seems to be no good solution, and is not recommended by
> freedesktop either:
> 
> From https://dbus.freedesktop.org/doc/dbus-daemon.1.html
> 
> > If a particular service is found in more than one <servicedir>, the first directory listed in the configuration file takes precedence.
> > If two service files providing the same well-known bus name are found in the same directory, it is arbitrary which one will be chosen
> > (this can only happen if at least one of the service files does not have the recommended name, which is its well-known bus name
> > followed by ".service").
> 
> So in this case, it would be arbitrary which filemanager is called .. not
> very nice.
> 
> 
> What about just overwriting the file and dont remove it after package
> uninstall ( ok, this is bad if the filemanager got uninstalled )
> 
> Or the other way around : Dont overwrite, remove on package uninstall  (
> could lead to the question "why is this filemanager used, and not that?" )
> 
> The cleanest solution comming to my mind would be, to provide one dbus-1
> <servicedir> per filemanager(package) installation. So the first directory
> listed in the configuration file would win.
> 
> I am not a packager .. this dbus problem smells like it already must have
> been solved in some way. Thunar probably is not the first package which
> provides some dbus service which is provided by multiple packages. How it is
> done for other dbus services which are provided by multiple packages ?

Dolphin uses /usr/share/dbus-1/services / org.kde.dolphin.File Manager 1.service
Comment 14 alexxcons editbugs 2019-01-25 15:05:19 CET
IMO not an optimal solution. So it will be random which FileManager will be picked.
But at least it would solve your conflict ... will do some testing and see if I can provide a patch this or next evening.

Did you as well open a bug for Nautilus ?
Comment 15 vladimir 2019-01-25 15:13:21 CET
(In reply to alexxcons from comment #14)
> IMO not an optimal solution. So it will be random which FileManager will be
> picked.
> But at least it would solve your conflict ... will do some testing and see
> if I can provide a patch this or next evening.
> 
> Did you as well open a bug for Nautilus ?

No, I didn't open anything.....only here wrote
Comment 16 alexxcons editbugs 2019-01-25 22:25:02 CET
Created attachment 8264 
rename service file

Attached a patch to rename the service file accordingly to org.xfce.Thunar.FileManager1.service
Comment 17 vladimir 2019-01-26 03:57:29 CET
(In reply to alexxcons from comment #16)
> Created attachment 8264 
> rename service file
> 
> Attached a patch to rename the service file accordingly to
> org.xfce.Thunar.FileManager1.service

build the package with this patch drops

make[2]: *** No rule to make target 'org.freedesktop.FileManager1.service.in', needed by 'org.freedesktop.FileManager1.service'.  Stop.
make[2]: *** Waiting for unfinished jobs....
  GEN      org.xfce.FileManager.service
  GEN      org.xfce.Thunar.service
Comment 18 Yves-Alexis Perez editbugs 2019-01-26 10:23:55 CET
I've opened a bug on Debian BTS against Nautilus. We'll definitely have issues there (even with a renaming): https://bugs.debian.org/920460

Apparently Nautilus doesn't automatically start on GNOME session, it's DBus activated so they'll definitely have the issue. In Xfce I think Thunar should be started by default and take ownership of the DBus name.
Comment 19 alexxcons editbugs 2019-01-26 23:02:49 CET
@vladimir
Cannot reproduce. Just checked: The string "org.freedesktop.FileManager1.service" is not found in the sources after patching. Possible you just need to run ./autogen.sh again or "make clean" before make.

The following build from scratch works fine for me:
git clone --branch thunar-1.8.3 https://git.xfce.org/xfce/thunar
cd thunar
curl https://bugzilla.xfce.org/attachment.cgi?id=8264 | git apply
./autogen.sh
make

@ Yves-Alexis Perez
Thanks for the bug ! Curious to where it will lead ;)
Comment 20 Git Bot editbugs 2019-01-27 21:20:10 CET
Alexander Schwinn referenced this bugreport in commit 250ceaa18561fe25046176a33617c85ec0700b3c

renamed org.freedesktop.FileManager1.service.in to  org.xfce.Thunar.FileManager1.service.in to avoid name clashes  (Bug #12414)

https://git.xfce.org/xfce/thunar/commit?id=250ceaa18561fe25046176a33617c85ec0700b3c
Comment 21 Git Bot editbugs 2019-01-27 21:22:36 CET
Alexander Schwinn referenced this bugreport in commit f0c0ab425b9825c975c9de0db94c179395835b28

renamed org.freedesktop.FileManager1.service.in to  org.xfce.Thunar.FileManager1.service.in to avoid name clashes  (Bug #12414)

https://git.xfce.org/xfce/thunar/commit?id=f0c0ab425b9825c975c9de0db94c179395835b28
Comment 22 alexxcons editbugs 2019-01-27 21:49:06 CET
Just did a "emergency" release of 1.8.4 with renamed .service file and a bugfix .. majorly because of Bug #15088  (sorry for all that confusion)

Bug #12414

Reported by:
xrsquared
Reported on: 2016-01-20
Last modified on: 2019-01-27
Duplicates (3):
  • 11024 dbus - request to implement showItems method
  • 13406 Thunar won't open as default file manager after other file manager has been installed
  • 15003 Highlight the file that selected by "openning destination folder"

People

Assignee:
Xfce Bug Triage
CC List:
14 users

Version

Attachments

wip patch (12.17 KB, patch)
2019-01-03 03:36 CET , Andre Miranda
no flags
filemanager1.patch (16.74 KB, patch)
2019-01-10 03:04 CET , Andre Miranda
no flags
Updated patch (16.84 KB, patch)
2019-01-13 16:21 CET , Andre Miranda
no flags
rename service file (1.30 KB, patch)
2019-01-25 22:25 CET , alexxcons
no flags

Additional information