I'm trying to create a .contract file for pantheon-files that will produce a shareable link for a file/folder within my Dropbox.

So far, I have this:

[Contractor Entry]
Name=Share Dropbox link
Description=Obtain the url for sharing the file/folder with Dropbox
Exec=dropbox sharelink %F | xclip -sel clip

but it does not work.

The command dropbox sharelink %F | xclip -sel clip works properly when used in terminal (replacing %F with the name of a file or folder). It will generate the share link, and copy it to the clipboard.

What am I missing and/or doing wrong?

Also, is it possible to add perhaps a system message showing "The link was generated and copied to clipboard" if the command is successful, and some kind of "Error" if it is not?

There is not much info on .contract files that I know of.

  • I'm trying to do the same, but with zenity dialog, from where I can copy the link myself. The plugin from Gabriel's answer worked for a while, but stopped working months ago. I even tried to report it to its dev (Cody Garver, co-founder of elementary), but I couldn't find the repo. I think an answer that actually helps with the contractor would be much more useful, even for other purposes.
    – jena
    Commented Jul 10, 2020 at 9:40
  • BTW I use MimeType=!inode, I copied it from the send-via-bluetooth contractor (I think). Do you have a reason for using application instead? And my exec is Exec=dropbox sharelink %f | zenity --text-info, which also works fine in terminal but fails in a contractor file :/
    – jena
    Commented Jul 10, 2020 at 9:47

1 Answer 1


If you install the dropbox plugin then you get a "Copy Dropbox link" option in the context menu when in your Dropbox folder.

You will need to use the latest plugin package version - 0.1-0-26 in Loki.

If you want to use a contract, you could try running the commands in a terminal e.g. using pantheon-terminal -e [command] as the Exec line.

  • Which Dropbox plugin? Should I restart the system to make the command work?
    – Gabriel
    Commented Feb 7, 2017 at 12:05
  • In the Elementary repository there is a package "pantheon-files-plugin-dropbox". You need to have the proprietary dropbox client installed separately. I cannot remember whether I had to reboot but it I do not think so. You have to restart pantheon-files though so it would be advisable to log out and back in. Commented Feb 8, 2017 at 13:39
  • I just installed the package after downloading the file from here, restarted, and nothing. No icons, no menu option. I checked for the error mentioned here, but it is not there. Have you tried this package yourself? Does it work for you? What version of elementary OS are you running?
    – Gabriel
    Commented Feb 8, 2017 at 15:48
  • Yes, I am running it (although I compiled and installed from source) and it works for me. Make sure you have the proprietary dropbox client running - put it in the System Settins/Applications/Startup if necessary . I downloaded it from the dropbox.com website (64 bit Ubuntu version if you are running Loki) and follow their instructions for installing the deb file. You should be able to see the Dropbox process running using gnome-system-monitor or the terminal. I'll try uninstalling my version of the plugin and installing from the package to check that works Commented Feb 9, 2017 at 16:23
  • 1
    It might be advisable to completely uninstall any other dropbox plugins (e.g. the nautilus one) you might have tried. Check the folder /usr/lib/x86_64-linux-gnu/pantheon-files/plugins/ - there should the files dropbox.plug and libpantheon-files-dropbox.so in it if the plugin is correctly installed. Commented Feb 9, 2017 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.