File Manager DBus Interface
Applications sometimes need to interact with the desktop's file manager. This page documents a simple DBus interface that can be used for that purpose.
<interface name='org.freedesktop.FileManager1'>
<method name='ShowFolders'>
<arg type='as' name='URIs' direction='in'/>
<arg type='s' name='StartupId' direction='in'/>
</method>
<method name='ShowItems'>
<arg type='as' name='URIs' direction='in'/>
<arg type='s' name='StartupId' direction='in'/>
</method>
<method name='ShowItemProperties'>
<arg type='as' name='URIs' direction='in'/>
<arg type='s' name='StartupId' direction='in'/>
</method>
</interface>
These three methods take an array of URI strings, and a startup id as specified by the startup notification specification.
ShowFolders
assumes that the specified URIs are folders; the file manager is supposed to show a window with the contents of each folder. Calling this method withfile:///etc
as the single element in the array of URIs will cause the file manager to show the contents of /etc as if the user had navigated to it. The behavior for more than one element is left up to the implementation; commonly, multiple windows will be shown, one for each folder.ShowItems
doesn't make any assumptions as to the type of the URIs. The file manager is supposed to select the passed items within their respective parent folders. Calling this method onfile:///etc
as the single element in the array of URIs will cause the file manager to show a file listing for "/", with "etc" highlighted. The behavior for more than one element is left up to the implementation.ShowItemProperties
should cause the file manager to show a "properties" window for the specified URIs. For local Unix files, these properties can be the file permissions, icon used for the files, and other metadata.
Activation
Applications are supposed to use the org.freedesktop.FileManager1
DBus name and the /org/freedesktop/FileManager1
object path. The interface name is org.freedesktop.FileManager1
.
Implementations
This interface is implmented in the following environments:
- Nautilus 3.4 and later.
- Dolphin 15.08 and later
References
License
Copyright 2012, Federico Mena Quintero & contributors
Code samples in this document are released under the MIT license, and other content under CC-BY. If you contribute to it, you agree to license your contributions in the same way.