Allegato "aprire-terminale.txt"
Scarica 1 #!/bin/bash
2
3 #
4
5 # This script opens a gnome-terminal in the directory you select.
6
7 #
8
9 # Distributed under the terms of GNU GPL version 2 or later
10
11 #
12
13 # Install in ~/.gnome2/nautilus-scripts or ~/Nautilus/scripts
14
15 # You need to be running Nautilus 1.0.3+ to use scripts.
16
17 # When a directory is selected, go there. Otherwise go to current
18
19 # directory. If more than one directory is selected, show error.
20
21 if [ -n "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]; then
22
23 set $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
24
25 if [ $# -eq 1 ]; then
26
27 destination="$1"
28
29 # Go to file's directory if it's a file
30
31 if [ ! -d "$destination" ]; then
32
33 destination="`dirname "$destination"`"
34
35 fi
36
37 else
38
39 zenity --error --title="Error - Open terminal here" \
40
41 --text="You can only select one directory."
42
43 exit 1
44
45 fi
46
47 else
48
49 destination="`echo "$NAUTILUS_SCRIPT_CURRENT_URI" | sed 's/^file:\/\///'`"
50
51 fi
52
53 # It's only possible to go to local directories
54
55 if [ -n "`echo "$destination" | grep '^[a-zA-Z0-9]\+:'`" ]; then
56
57 zenity --error --title="Error - Open terminal here" \
58
59 --text="Only local directories can be used."
60
61 exit 1
62
63 fi
64
65 cd "$destination"
66
67 exec x-terminal-emulator
Allegati
Per riferirsi agli allegati di una pagina, usare attachment:NOME_FILE, come mostrato qui sotto nell'elenco degli allegati. NON usare l'URL che si trova in corrispondenza del collegamento [scarica], potrebbe cambiare in futuro.Non รจ consentito inserire allegati su questa pagina.