I wish to drag files from Nautilus onto a certain executable (.desktop file) in my Unity quick launcher (so that the executable file will run with the path of the dragged file as its first argument).

I find this behaviour works fine when I drag a file from Nautilus onto the .desktop file in another Nautilus window, but when I try to drag the file onto the quick launcher, my executable becomes disabled. Is there a remedy?

enter image description here

  • What you're showing on the screenshot is pdf file, not .desktop. Simply dragging and dropping to launcher should work. I've several .desktop files that I pinned to my launcher by the same method – Sergiy Kolodyazhnyy Aug 12 '15 at 0:15
  • @Serg, I'm not trying to drag a .desktop onto the launcher; I'm trying to drag a data/text file onto a .desktop (executable) file in the launcher. – JellicleCat Aug 12 '15 at 0:42
  • OK, I see what you mean. Is there a particular program that doesn't work or just all programs on the launcher don't allow dragging and dropping ? I've noticed although LibreOffice Writer doesn't light-up with I drag text files onto it, but it still does open the file i dragged. Have you tried dropping the file onto the icon despite it not lighting up ? – Sergiy Kolodyazhnyy Aug 12 '15 at 0:48
  • 2
    Only launcher items that have the same mimetype in their .desktop file as the file being dragged will stay active. To see with a .pdf add evince (Document Viewer) to the unity launcher, when dragging a pdf it will remain active. So check the Mimetype= line in the .desktop of the launcher item you want active for pdf mimetypes listed (or any other file/mime – doug Aug 12 '15 at 14:09
  • Thanks, @doug. I added MimeType=text/*;application/*; to my .desktop file, and it now supports drag-and-drop for the files that I wanted. – JellicleCat Aug 12 '15 at 15:57

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.