You are not logged in.

#1 2004-06-28 15:33:50

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

nautilus enrichement via script

I am totally newb. smile

A while ago, I read about nautilus could be enhanced via scripts. I found no hint how to do it, where to place the scripts. If this was a helpful feature, I thought there would be a honeypot in the www, but I found none.

Anyone who enhanced his nautilus with scripts that could give reply?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#2 2004-06-28 15:43:46

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: nautilus enrichement via script

One second later, I had the idea to have a deeper look in gnome's pages. Shame on me, I haven't done before, and did only google queries.

Here is the pot:
http://g-scripts.sourceforge.net/


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#3 2005-02-25 18:01:20

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: nautilus enrichement via script

Aaaargh. Nautilus won't like my scripts in ~/.gnome2/nautilus-scripts/ anymore. There isn't even a scripts entry in context menues. Ermh?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#4 2005-03-17 21:32:19

lubot
Member
Registered: 2003-10-18
Posts: 14

Re: nautilus enrichement via script

You have to remove the shebang ("#!/bin/bash") from your scripts.

Offline

#5 2005-03-17 21:43:03

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: nautilus enrichement via script

the most useful nautilus script i have found is this one:

#!/bin/sh
# Original by two other scripts merged together
# Modified by Eugenia Loli and Kon, Oct 2004
# This script either opens in the current directory,
# or in the selected directory
# Doesn't work with the ~/Desktop or the ~/.Trash folders (Nautilus' limitation).
####place file in .gnome2/nautilus-scripts
 
base="`echo $NAUTILUS_SCRIPT_CURRENT_URI | cut -d'/' -f3- | sed 's/%20/ /g'`"
 
if [ -z "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
     dir="$base"
else
     while [ ! -z "$1" -a ! -d "$base/$1" ]; do shift; done
     dir="$base/$1"
fi
 
if [ "$NAUTILUS_SCRIPT_CURRENT_URI" == "x-nautilus-desktop:///" ]; then
dir="Desktop"
fi
 
if [ "$NAUTILUS_SCRIPT_CURRENT_URI" == "trash:" ]; then
dir="$HOME/.Trash"
fi
 
if [ "$NAUTILUS_SCRIPT_CURRENT_URI" == "file:///" ]; then
dir="/"
fi
 
FIRST_URI="`echo -n $NAUTILUS_SCRIPT_SELECTED_URIS`"
 
if [ "$FIRST_URI" == "x-nautilus-desktop:///home" ]; then
dir="$HOME"
fi
 
if [ "$FIRST_URI" != "" ]; then
dir="`echo $FIRST_URI | cut -c8-`"
fi
 
if [ "$FIRST_URI" == "x-nautilus-desktop:///computer" ]; then
dir="/"
fi
 
gnome-terminal --working-directory="$dir" &

I called it "terminal-here" when i put it in my scripts folder. I don't recall what is was called originally..
I love being able to right click a folder and get a terminal that is in that folder..
Thanks Eugenia Loli and Kon
wink


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2005-03-18 07:40:07

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: nautilus enrichement via script

sounds like you where using beos somedays ...

Since gnome 2.1o my scripts are no more used. Did anyone hear anythin' about it?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#7 2005-03-18 10:35:37

lubot
Member
Registered: 2003-10-18
Posts: 14

Re: nautilus enrichement via script

Have you tried to remove the shebang from your script?
I am running nautilus-2.10.0-1 too and as soon as i removed the shebang of a script the menu entry "Scripts" appears at "Files" and at the context menu and shows the script.

Offline

#8 2005-03-18 15:37:52

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: nautilus enrichement via script

lubot wrote:

Have you tried to remove the shebang from your script?
I am running nautilus-2.10.0-1 too and as soon as i removed the shebang of a script the menu entry "Scripts" appears at "Files" and at the context menu and shows the script.

Shebang? Hegang? What is a Shebang? smile

I removed #!/bin/bash, from one script, and it shows up again. Hm. Let's test another perl one ... and those are not working. Is there another trick?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#9 2005-03-29 16:06:02

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: nautilus enrichement via script

I am lazy. I want to have files and directories checked for virus via nautilus script. It's a simple one. Here it is:

#
# Nautilus script -> check selected files using clamav
# Dependence :     Nautilus (of course)
#        Clamav        
xterm  -bg darkred -fg lightgrey -e 'clamscan -i -r --bell $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; read'

Here is an output example:


/home/ines/Eicar/eicar.com: Eicar-Test-Signature FOUND
/home/ines/Eicar/eicar.com.txt: Eicar-Test-Signature FOUND
/home/ines/Eicar/eicar_com.zip: Eicar-Test-Signature FOUND
/home/ines/Eicar/eicarcom2.zip: Eicar-Test-Signature FOUND

----------- SCAN SUMMARY -----------
Known viruses: 32184
Scanned directories: 4
Scanned files: 55
Infected files: 4
Data scanned: 0.00 MB
I/O buffer size: 131072 bytes
Time: 0.554 sec (0 m 0 s)


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

Board footer

Powered by FluxBB