Wiki Ubuntu-it

Indice
Partecipa
FAQ
Wiki Blog
------------------
Ubuntu-it.org
Forum
Chiedi
Chat
Cerca
Planet
  • Pagina non alterabile
  • Informazioni
  • Allegati
  • attachment:aprire-terminale.txt di AmbienteGrafico/Gnome/ScriptNautilus

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.
  • [scarica | mostra] (13/09/2007 09.40.02, 1.3 KB) [[attachment:aprire-terminale.txt]]
  • [scarica | mostra] (24/01/2008 13.42.40, 0.2 KB) [[attachment:bluetooth.txt]]
  • [scarica | mostra] (13/09/2007 09.36.08, 8.0 KB) [[attachment:conversione-file-audio.txt]]
  • [scarica | mostra] (24/01/2008 13.42.35, 0.1 KB) [[attachment:file-root.txt]]
  • [scarica | mostra] (24/01/2008 10.34.17, 0.8 KB) [[attachment:inviare-email.txt]]
  • [scarica | mostra] (24/01/2008 13.35.41, 1.2 KB) [[attachment:inviare-email2.txt]]
  • [scarica | mostra] (24/01/2008 10.36.34, 0.4 KB) [[attachment:montare-iso.txt]]
  • [scarica | mostra] (24/01/2008 13.38.57, 0.8 KB) [[attachment:mostranascondi-filenascosti.txt]]
  • [scarica | mostra] (24/01/2008 13.39.01, 0.4 KB) [[attachment:ricerca.txt]]
  • [scarica | mostra] (24/01/2008 13.39.08, 0.7 KB) [[attachment:ridimensiona-immagini.txt]]
  • [scarica | mostra] (24/01/2008 10.36.38, 0.2 KB) [[attachment:smontare-iso.txt]]
  • [scarica | mostra] (17/04/2008 11.01.21, 0.1 KB) [[attachment:sudo-gedit.txt]]
  • [scarica | mostra] (24/01/2008 13.39.15, 0.9 KB) [[attachment:sudo-nautilus.txt]]
 All files | Selected Files: delete move to page copy to page

Non รจ consentito inserire allegati su questa pagina.