This is a read-only archive. Find the latest Linux articles, documentation, and answers at the new Linux.com!

Linux.com

errata regarding /usr/share/nautilus-scripts

Posted by: Administrator on May 19, 2006 11:08 PM

Installing your script to<nobr> <wbr></nobr>/usr/share/nautilus-scripts will not automatically work for all users.



However, you can make scripts placed in this folder available to users by running nautilus-script-manager, which creates a symbolic link to your script in a user's ~/.gnome2/nautilus-scripts folder.



This only creates the link for the user who runs nautilus-script-manager though.



Steps to allow all new users to be able to use Nautilus Scripts from a global scripts folder:



1) Install your script to<nobr> <wbr></nobr>/usr/share/nautilus-scripts



2) Add a symbolic link to your script in the<nobr> <wbr></nobr>/etc/skel/.gnome2/nautilus-scripts folder.



mkdir<nobr> <wbr></nobr>/etc/skel/.gnome2

mkdir<nobr> <wbr></nobr>/etc/skel/.gnome2/nautilus-scripts

ln -s<nobr> <wbr></nobr>/usr/share/nautilus-scripts/myscript



This way all new users will have a link to your script created when they first login and they can delete the symlink if they don't want it anymore.



Alternatively you could add these lines to your<nobr> <wbr></nobr>/etc/skel/bashrc file:



if [ -x nautilus-script-manager ]

if [ ! -h<nobr> <wbr></nobr>.gnome2/nautilus-scripts/myscript ]

nautilus-script-manager enable myscript

fi

fi



This checks for and creates a symbolic link to your script, if it does not exist in the local user's<nobr> <wbr></nobr>.gnome2/nautilus-scripts folder, each time he logs in.



See man nautilus-script-manager for more info

#

Return to Extending Nautilus with Scripts and Extensions