Is this the correct syntax? It seems that Upstart is starting two instances of this daemon:

start on runlevel [2345]
stop on runlevel [06]

limit nofile 32768 32768
env DISPLAY=:0

    [ -r /etc/default/splash ] && . /etc/default/splash
    maxrss=${SPLASH_MAXRSS:-$(awk '/MemTotal/{print $2*0.75/1024}' /proc/meminfo)}
    cachesize=${SPLASH_CACHESIZE:-512}  # 512MB

    chown proxy:proxy $logdir $proxyprofilespath $cachepath $jsprofilespath

# May need to figure out how to run this /usr/bin/xvfb-run --auto-servernum

    exec start-stop-daemon --start \
        --chuid proxy:proxy \
        --pidfile /var/run/splash.pid \
        --exec /usr/bin/xvfb-run /usr/bin/python -- \
            -m splash.server \
            --maxrss $maxrss \
            --logfile $logdir/splash.log \
            --proxy-profiles-path=$proxyprofilespath \
            --js-profiles-path=$jsprofilespath \
            --cache --cache-path=$cachepath --cache-size=$cachesize \
            --manhole \
            >$logdir/splash.out 2>$logdir/splash.err
end script

The ps -ef ...

proxy      701     1  0 21:45 ?        00:00:00 /bin/sh /usr/bin/xvfb-run /usr/bin/python -m splash.server --maxrss 1239.67 --logfile /var/log/splash/splash.log --proxy-profiles-path=/etc/splash/proxy-profiles --js-profiles-path=/etc/splash/js-profiles --cache --cache-path=/var/cache/splash --cache-size=512 --manhole
proxy      776   701  0 21:45 ?        00:00:05 /usr/bin/python -m splash.server --maxrss 1239.67 --logfile /var/log/splash/splash.log --proxy-profiles-path=/etc/splash/proxy-profiles --js-profiles-path=/etc/splash/js-profiles --cache --cache-path=/var/cache/splash --cache-size=512 --manhole
  • Maybe that's how xvfb-run works - two processes. I don't see any indication of this in the docs but I think the one without xvfb-run is a child process – Tony Feb 7 '14 at 0:47

This line:
--exec /usr/bin/xvfb-run /usr/bin/python -- \
Should be:
--exec /usr/bin/xvfb-run -- /usr/bin/python \

Why? The -- seperates the command and arguments. /usr/bin/xvfb-run is the command. /usr/bin/python is the first argument to that command.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.