summaryrefslogtreecommitdiff
path: root/Specifications/file-manager-interface.mdwn
blob: 47781538f09da50ed0bced9b8fb1b29f5b536e19 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# 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 with `file:///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 on `file:///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

* [[Discussion in xdg-list|http://lists.freedesktop.org/archives/xdg/2011-May/011949.html]] 
* [[Gnome bugzilla entry for Nautilus's implementation|https://bugzilla.gnome.org/show_bug.cgi?id=636269]]