Posts Tagged nautilus scripts
Right click>Set As wallpaper ;)
Yeah i can’t open it it everytime then navigate to all the menus and set my background. So i wanted a right click and set as wallpaper.So here it is. First of all let me tell you the limitation of the script. I’m not able to handle files with a space in its path. I guess ‘ll try to fix tat soon. So i had to rename everything on my hdd by replacing the space with an _ .
So here is the “renamer” script first
find -type f -name "*." > files ;
while read x;
y=`echo $x|sed 's;%20;_;g'
mv "$x" "$y" ;
done < files ;
Enter the path to the wallpaper folder in the your path and the extension like .jpg .png etc in the extension field one by one and run the script.
Next is the objective script. I know this one is very bad script here. But my job was done.. so ‘m happy..
write the code in a file at ~/.gnome2/nautilus-scripts and make it an exectuable. You will get the script at the right click as in the old scripts.
test=$NAUTILUS_SCRIPT_SELECTED_URIS
test=`echo $test|sed 's;file\:\/\/;;'`
gconftool-2 -t string -s /desktop/gnome/background/picture_filename "$test"
4 comments November 14, 2008
ISO Mounter
Inspired by the script from gnome-look.org i decided to make my own iso mounter with the GUI
This one mounts your iso file to /media/ISO
right click ,initate script and enter the sudo password and mount it
similarly you can unmount it.
Mounter code:
gksudo -u root -k -m "got r00t?
" echo "this statement is to create a sudo environment">/dev/null
if sudo mount -o loop -t iso9660 “$*” /media/ISO
then
zenity –info –title “ISO Mounter” –text=”ISO Mounted successfuly /media/ISO”
else
zenity –error –title “ISO Mounter” –text=”Error occured during mount operation. Check filetype of $* and if /media/ISO is busy!!”
fi

Unmounter code:
gksudo -u root -k -m "got r00t?
" echo "this statement is to create a sudo environment">/dev/null
if grep “$*” /etc/mtab
then
if zenity –question –title ISO Mounter –text “Confirm unmount”
then
sudo umount “$*”
fi
else
zenity –error –title ISO Mounter –text “Nothing Mounted”
fi

Sorry that you will not be able to unmount it via the default nautilus cd unmount method. You will either have unmount using my script or by using the command
sudo umount /media/ISO
I’ve made the code a little future upgradable.. So whatever u think is useless is not. Coz i have things in mind to implement but now there was no enuf time to code.
For installation use the tar package provided.
To install it extract the .tar.gz, navigate in and type
./install
click here to download the tar
2 comments November 10, 2008








