Difference between revisions of "Creating nautilus scripts"

From Notes_Wiki
(Created page with "=Creating nautilus scripts= We can write nautilus scripts which can be executed through pop-up menu which is generated when one right clicks somewhere in nautilus window. =...")
 
m
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=Creating nautilus scripts=
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Desktop tools]] > [[Nautilus]] > [[Creating nautilus scripts]]


We can write nautilus scripts which can be executed through pop-up menu which is generated when one right clicks somewhere in nautilus window.
We can write nautilus scripts which can be executed through pop-up menu which is generated when one right clicks somewhere in nautilus window.
Line 14: Line 14:
</pre>
</pre>
and save it in ~/.nautilus/scripts folder. So that whenever we right click folder we get option 'Open Terminal here' which opens terminal in current folder.
and save it in ~/.nautilus/scripts folder. So that whenever we right click folder we get option 'Open Terminal here' which opens terminal in current folder.
[[Main Page|Home]] > [[CentOS]] > [[CentOS 6.x]] > [[Desktop tools]] > [[Nautilus]] > [[Creating nautilus scripts]]

Latest revision as of 13:33, 24 August 2022

Home > CentOS > CentOS 6.x > Desktop tools > Nautilus > Creating nautilus scripts

We can write nautilus scripts which can be executed through pop-up menu which is generated when one right clicks somewhere in nautilus window.


Open terminal

We can create a script with name 'Open Terminal Here' with following contents:

	#!/usr/bin/env bash
	newPath=${NAUTILUS_SCRIPT_CURRENT_URI/file:\/\//}
	newPath=${newPath//%20/ }
	gnome-terminal --working-directory="$newPath"

and save it in ~/.nautilus/scripts folder. So that whenever we right click folder we get option 'Open Terminal here' which opens terminal in current folder.


Home > CentOS > CentOS 6.x > Desktop tools > Nautilus > Creating nautilus scripts