Addin to Nautilus right click menu
I have a script that I use for resizing a jpg and uploading it using ftp onto my webserver. Is there some way I can add this script to the nautilus right click menu so that I can just right click on a jpg(or multiple jpg's) and select upload and the script will do the rest?
Paddy |
Put that script in your nautilus-script folder (~/.gnome2/nautilus-scripts). It will then be accessible through right-click > script > scriptName.
You'll probably need to modify your script a little bit as nautilus scripts expect to read their arguments from an environment variable. As a starter example, here is a script I use for rotating jpeg files. For more info, http://g-scripts.sourceforge.net/ has some valuable scripts and tips. Code:
#!/bin/bash |
Thanks for the info! Before your post I actually discovered nautilus-actions. I think it is probably just a gui for putting scripts in the ~/.gnome2/nautilus-scripts directory!
Do you know what user the scripts run as? Is it the user who is logged in? I have a script that resizes and uplaods pictures to a web server. It works perfectly when I run it from the command line but doesn't work through the menu, any idea where the error messages go? Can't find them in /var/log/messages. Sorry for all the question! Here is my script, it resizes the files ok but then when it tries to execute ./ftp.pl it fails. Code:
#!/bin/sh |
Change ./ftp.pl to an absolute path. I guess that is your problem.
For the other questions: yes, the script run as the loged in user. Those script are in a personal directory anyway in your home and are not shared with other users. About standard output and error, that's the bad part: it does not go anywhere (at least nowhere I could find). I've found this messageadvising to run nautilus from a command line to get standard output and error in the same terminal. Unfortunately it does not work for me (nautilus launches a new window and exits). |
Thanks I can't believe I missed that, it was late last night when I was playing with this ha ha!
It's a pity that you can't catch the output/error, it would greatly enhance this software. In my case if I had got a "file not found ./ftp.pl" message it would have made solving my problem a lot easier! Paddy |
Quote:
|
All times are GMT -5. The time now is 12:06 PM. |