Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have written a tool in python which i want to be able to launch from the right click of the folder in the File and folder explorer... and I want to pass the folder i right click as argument to the python script !!

share|improve this question
Are you using nautilus as your explorer? – sayantankhan Dec 29 '13 at 14:39
yes, exactly.. why ? – Ciasto piekarz Dec 29 '13 at 14:43
You may be interested in python-nautilus which will enable you to directly integrate your script using the nautilus python bindings. – Takkat Dec 29 '13 at 21:08

First check the version on Nautilus:

nautilus --version
  • If 3.6 or above go to the folder: ~/.local/share/nautilus/scripts
  • Else go to ~/.gnome2/nautilus-scripts

Now you should be able to just put a script in this folder. This works for bash (right click and there is an option called scripts), I think it works for python too. If the python script does not appear then you may have to make a bash script to call the python. Remember to make your script executable! Also check out this link for more info (such as variables nautilus defines when your run scripts from right clicking, such as the folder or the file you clicked on).

share|improve this answer
Well this seems very easy, tomorrow morning I will give it a try! Thanks – Ciasto piekarz Dec 29 '13 at 17:48

Your Answer


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.