• # pas totalement d'accod

    Posté par (site web personnel) . En réponse au journal Ubuntu 5.04 vs WinXP SP2. Évalué à 1.

    Je trouve ton analyse très bien mais il y a:
    - Ligne de commande disponible partout : avantage Windows : Pas de "ouvrir ligne de commande" alors qu'il y est dans KDE et possible facilement (un clic sur le web) sous Windows ("windows explorer command prompt" sous google).

    Il est possible de trouver des scripts Nautilus ...
    Bien sur, il faut les chercher sur le wiki Ubuntu mais ils fonctionnent très bien.
    A mettre dans ~/.gnome2/nautilus-scripts/ avec le droit d'execution.

    Le script que j'ai:


    #! /bin/bash
    if [ -n "$NAUTILUS_SCRIPT_SELECTED_FILE_PATHS" ]?; then
    set $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
    if [ $# -eq 1 ]?; then
    destination="1ドル"
    # Go to file's directory if it's a file
    if [ ! -d "$destination" ]?; then
    destination="`dirname "$destination"`"
    fi
    else
    zenity --error --title="Error - Open terminal here" \
    --text="You can only select one directory."
    exit 1
    fi
    else
    destination="`echo "$NAUTILUS_SCRIPT_CURRENT_URI" | sed 's/^file:\/\///'`"
    fi

    # It's only possible to go to local directories
    if [ -n "`echo "$destination" | grep '^[a-zA-Z0-9]?\+:'`" ]; then
    zenity --error --title="Error - Open terminal here" \
    --text="Only local directories can be used."
    exit 1
    fi

    cd "$destination"
    exec x-terminal-emulator


    On pourait avoir:


    #! /bin/sh
    if [ -d "1ドル" ]; then
    cd "1ドル"
    fi
    gnome-terminal