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"

screenshot-1

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

1

screenshot-technomaniac-file-browser

23


3

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
51

6

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

screenshot-3

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


Tags

airtel on linux amarok beryl bluetooth and ubuntu bootloader chainloader compiz compiz fusion cube dual boot evil first look on ubuntu fun gdm gnome grub GUI root install KDE4 lilo linux linux basic software M$ nautilus scripts obex pidgin restore grub root ruby script shipit shutdown su sudo sudo -i time up dude ubuntu vi vim vlc windows windows sucks wvdial zenity zenwalk

 

November 2009
S M T W T F S
« Oct    
1234567
891011121314
15161718192021
22232425262728
2930  

About Me

Cyriac Thomas

A GNU/Linux enthusiast, Amateur Photographer, Design enthusiast who loves simplicity. An active tweeter @cyriacthomas.

RSS Photoblog

My Recent Tweets

Links

Archives

Blog Stats

Flickr Photos

I <3 the web

20032008(026)

20032008(021)

More Photos

del.icio.us/cyriacsmail

Bot Comments ;)