1

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
MimeType=application
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.

2

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.

| improve this answer | |
  • Which Dropbox plugin? Should I restart the system to make the command work? – Gabriel Feb 7 '17 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. – Jeremy Wootten Feb 8 '17 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 Feb 8 '17 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 – Jeremy Wootten Feb 9 '17 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. – Jeremy Wootten Feb 9 '17 at 16:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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