Nautilus Scripts

Write suggestions and new ideas in here
More ideas here http://community.linuxmint.com/idea/welcome
Forum rules
No support questions here please.
Do not post ideas for application developers. Please use GitHub for Cinnamon and Nemo ideas.

Nautilus Scripts

Postby Crashmaxx on Sun Dec 10, 2006 7:17 pm

Automatix installs some nautilus scripts so in the right-click context menu you can open the folder as root and open a file in gedit as root. I think these are awesome, as you don't have to go into terminal to change permissions or move system files or edit a config file.

It would be nice to have these scripts included with install. It would really help noobs or anyone who likes to use GUI to do things.
Crashmaxx
Level 1
Level 1
 
Posts: 15
Joined: Thu Nov 16, 2006 12:26 am

Linux Mint is funded by ads and donations.
 

Postby clem on Sun Dec 10, 2006 7:24 pm

This is a great idea. I also saw in SUSE 10.2 that the terminal was present in the context menu. Do you have more info about these scripts?
User avatar
clem
Level 15
Level 15
 
Posts: 5554
Joined: Wed Nov 15, 2006 8:34 am

Postby Crashmaxx on Sun Dec 10, 2006 9:42 pm

I found this page that tells you most of what you could want to know about it:
http://g-scripts.sourceforge.net/index.php

But the idea is, any script you put in ~/.gnome2/nautilus-scripts, will show up in the right click menu under scripts.

I have a copy of the three main scripts I use, which are gedit-root, root-nautilus-here, and search-here. I can send you them if you'd like, or you can use automatix2, which will install them. I recommend looking around the link I gave, other scripts might be worthwhile too.

Anyway, show be a piece of cake to include and seems to be something built into gnome and nautilus. Gotta love linux, windows would never have something this slick. You'd have to run something in the task bar, or screw with the registry to get something like this for windows.
Crashmaxx
Level 1
Level 1
 
Posts: 15
Joined: Thu Nov 16, 2006 12:26 am

Postby clem on Mon Dec 11, 2006 6:28 am

Is there an "all users" equivalent of ~/.gnome2/nautilus-scripts ? Some sort of /etc/nautilus-scripts or something ?

Clem
User avatar
clem
Level 15
Level 15
 
Posts: 5554
Joined: Wed Nov 15, 2006 8:34 am

Postby clem on Mon Dec 11, 2006 10:19 am

Ok,

I had a look at that and I have some good news: nautilus-open-terminal will be included in Bea. This will allow to open a terminal from any folder from nautilus.. through the context menu.

I test nautilus-gksu which allows to open a folder as root but I found it buggy. It doesn't work with metaaddresses.. (computer and home for instance), and for some reason it opens two windows instead of one. Also it is hard to see which windows are open as root, and which aren't. So I decided not to include that.

Clem
User avatar
clem
Level 15
Level 15
 
Posts: 5554
Joined: Wed Nov 15, 2006 8:34 am

Postby Crashmaxx on Mon Dec 18, 2006 9:58 pm

Very cool. Thanks.

Here are the three automatix gave me, that work fine for me. Just create a file with the name given and paste in the code, and obviously, make them executable and move them into the nautilus-scripts folder.

gedit-root
Code: Select all
#!/bin/bash
#created by arnieboy
foo=`gksudo -u root -k -m "enter your password for gedit root access" /bin/echo "Do you have root access?"`
sudo gedit $NAUTILUS_SCRIPT_SELECTED_URIS


root-nautilus-here
Code: Select all
#!/bin/bash

# Opens a nautilus window as root.

foo=`gksudo -u root -k -m "enter your password for nautilus root access" /bin/echo "got r00t?"`
sudo nautilus --no-desktop $NAUTILUS_SCRIPT_CURRENT_URI


search-here
Code: Select all
#!/bin/bash
cd $NAUTILUS_SCRIPT_CURRENT_URI
exec gnome-search-tool


Clearly, these are pretty easy to make. I'm very happy that I looked into this, cause I learned a lot about this feature. Now I can make my own scripts if I like.

If anyone else has a favorite script, I'd like to see it. Or if you know how to do bash scripting, now hopefully you know how to make a nautilus script.
Crashmaxx
Level 1
Level 1
 
Posts: 15
Joined: Thu Nov 16, 2006 12:26 am


Return to Suggestions & New Ideas

Who is online

Users browsing this forum: No registered users and 4 guests