Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

In Windows Explorer (and other file managers) if you drag a file onto a script/executable, then it runs the script/executable with that file as the first argument.

Is it possible to get a similar behaviour in Nautilus? (Would I have to use .desktop files / launchers?)

How about other linux file managers?

share|improve this question
add comment

1 Answer 1

up vote 3 down vote accepted

You need a .desktop file with EXEC= entry.

See related feature request on launchpad and bugzilla.

share|improve this answer
    
Thanks for that. I googled extensively on this, and somehow missed these (really old!) feature requests. Of course, for a .desktop file you can't use relative paths, but at least I can now drag-and-drop to execute my python script. –  Simon Jul 13 '11 at 0:26
    
@Simon: you're welcome! :) –  Vanni Totaro Jul 13 '11 at 14:13
    
I have the same problem, but I can't figure out your answer. Could you give more details (say, a sample .desktop name, where to store it, what name shall it have). Or give a link on relevant pages ? (the links given didn't help me). –  kebs Dec 22 '13 at 21:42
    
@kebs my answer was from 2011 (i just edited it to remove a dead link pointing to Ubuntu Brainstorm that is no more). I just tried the .desktop solution again under Ubuntu 13.10 and it seems to not work anymore, maybe because the handling of drop-a-file-over-another-file has been removed from Nautilus. Not a big surprise, because of the major changes to Nautilus in Gnome 3.x ( see en.wikipedia.org/wiki/Nautilus_(file_manager)#History ) –  Vanni Totaro Dec 23 '13 at 22:52
    
Thanks anyway, I'm running 12.04 for the LTS advantage, but this doesn't help. I'll probably post a question about this. Already 4 years as a happy linux user, but this is a major feature I miss from those Windows days... I find this so convenient, I can't figure out why it is so complicated to implement on gnome desktop. –  kebs Dec 24 '13 at 16:28
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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