open file in directory action

David Faure faure at kde.org
Mon Apr 22 12:15:39 PDT 2013


On Sunday 21 April 2013 23:22:39 Hans de Goede wrote:
> That threads talks about a d-bus interface, which seems unnatural
> to me, since for all other kind of open actions, we use mime-types ->
> application logic.

But only for the basic "open this file in an application that supports this 
type of file" action.

For everything else, more is needed. And doing that multiplying the command-
line hacks (I think anyone opening the code of xdg-open will agree with that 
assesment) doesn't sound right, nor is inventing special-case mimetypes.

Instead, allowing DBus method calls in the newly-started or already-running 
app allows to extend the available functionality to infinity.

> As discussed in that thread, the dbus interface
> idea adds nothing that allows the user to specify which file-manager
> he wants to use (similar to how the user can select a preferred browser
> and a preferred mail client).

The recently discussed (but not yet formalized) "Intents" spec will allow to 
do exactly that:
1) pick the preferred file manager from .desktop files
(including the possibility for the user to change preference using a local 
file, similar to mimeapps.list)
2) start it if not already running (knowing for sure which DBus name it will 
register under)
3) make a dbus call to it, using a pre-agreed dbus interface, in this example 
"select these files".
This is much more flexible, because whichever your next request will be, it 
can be added to that method call, or additional method can be added.

And it will all fit under a much more general-purpose spec (doing anything 
with any app) compared to a "solving the specific issue of selecting files in 
file managers" solution.


PS: meanwhile, you can use dolphin --select <urls> :-)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list