• [^] # Re: Trouver une instance Thunderbird...

    Posté par . En réponse au message Liens mailto: dans Firefox vers Thunderbird. Évalué à 1.

    Il semble que ce script-là marche pour moi:
    #!/bin/sh # export MOZILLA_FIVE_HOME=/usr/lib/MozillaThunderbird/ if [ $(ps aux | grep thunderbird | wc -l) -gt 4 ]; then echo "thunderbird is running (thunderbird est lance)"; $MOZILLA_FIVE_HOME/mozilla-xremote-client -a Thunderbird "mailto(1ドル?subject=2ドル)" else echo "thunderbird is not running (thunderbird n'est pas lance)"; $MOZILLA_FIVE_HOME/thunderbird -P default -compose mailto:1ドル; fi
    Ce qui est traitre dans mozilla-xremote-client dit cela dans son "aide":
    Usage: mozilla-xremote-client [-a firefox|thunderbird|mozilla|any] [-u ] [-p ] COMMAND
    Mais si je tape  /usr/lib/MozillaThunderbird/mozilla-xremote-client -a thunderbird "mailto(toto@foo.bar)"
    on me répond :
    /usr/lib/MozillaThunderbird/mozilla-xremote-client: Error: Failed to find a running server.
    
     alors que si je tape: /usr/lib/MozillaThunderbird/mozilla-xremote-client -a Thunderbird "mailto(toto@foo.bar)" ,
     TB ouvre un composeur de message. Je ne sais pas à quel point ce n'est pas un bug.
    J'ai fait l'erreur de ne pas mettre mon /home/djax/bin/mailto.sh en executable, ce qui produisait l'erreur:
    
    fgrep: /usr/lib/MozillaThunderbird/defaults/pref/thunderbird.js: No such file or directory
    /usr/lib/MozillaThunderbird/mozilla-xremote-client: Error: Failed to find a running server.
    No running windows found
    
    C'était AMHA pas très parlant comme message d'erreur,
     mais bon, c'est ma faute, donc je vais pas trop rouspéter :-).