• # .

    Posté par . En réponse au message Lancer OpenOffice en headless sur Ubuntu. Évalué à 4.

    J'ai pas le temps d'investiguer sur ton problème, mais au cas où ça t'aide, je te colle un bout de script que j'ai utilisé à une époque lointaine et qui fonctionnait ( je le jure ).
    C'etait sur une distrib à base de rpms avec une vieille version de OO.


    cat << EOF > /etc/init.d/openofficeorg
    #!/bin/sh
    #
    # openofficeorg This shell script takes care of starting and stopping
    # openoffice server.
    #
    # chkconfig: 2345 99 35
    # description: openoffice provides a merge and pdf printer service.


    . /etc/rc.d/init.d/functions

    HOME=/root
    JAVA_HOME=/usr/java/j2sdk1.4.2_07/
    KBCHARSET=iso-8859-15
    KEYBOARD=fr
    KEYTABLE=fr-latin1
    LINES=60
    LOGNAME=root
    USER=root
    USERNAME=root

    # See how we were called.
    case "\1ドル" in
    start)
    gprintf "Starting openoffice: "
    /usr/X11R6/bin/Xvfb :8101 &
    sleep 5
    export DISPLAY=:8101.0
    /usr/local/OpenOffice.org1.1.5/program/soffice &
    echo
    ;;
    stop)
    gprintf "Shutting down openoffice: "
    killproc soffice.bin
    echo
    ;;
    restart)
    \0ドル stop
    \0ドル start
    ;;
    status)
    echo "Servers listening on port 8100 :"
    netstat -taupe | grep 8100 | wc -l
    netstat -taupe | grep 8100
    echo "Processes named soffice :"
    ps -ef | grep -i soffice | grep -v grep
    echo "Processes named Xvfb :"
    ps -ef | grep -i xvfb | grep -v grep
    ;;
    *)
    gprintf "Usage: openoffice_org2_0_1 {start|stop|restart|status}\n"
    exit 1
    esac

    exit 0

    EOF


    chmod a+x /etc/init.d/openofficeorg
    chkconfig --level 5 openofficeorg on
    service openofficeorg start
    service openofficeorg status


    J'ajoute qu'il ne faut pas oublier de lancer au moins une fois openoffice pour passer l'assistant d'enregistrement.