Skip to content

NoVNC python3 not found because no /usr/local/bin in $PATH for shell script started by service #72

@infostud

Description

@infostud

In novnc/utils/websockify/run

#!/usr/bin/env sh
set -e
cd "$(dirname "$0")"
exec python3 -m websockify "$@"

After service clonos-vnc2wss start

tail -f /var/log/messages
Dec 26 16:03:36 tyche clonos_vnc2wss[39879]: Warning: could not find self.pem
Dec 26 16:03:36 tyche clonos_vnc2wss[39879]: Using local websockify at /usr/local/www/clonos/public/novnc/utils/websockify/run
Dec 26 16:03:36 tyche clonos_vnc2wss[39879]: Starting webserver and WebSockets proxy on port 6081
Dec 26 16:03:36 tyche clonos_vnc2wss[39879]: exec: python3: not found
Dec 26 16:03:37 tyche clonos_vnc2wss[39879]: Failed to start WebSockets proxy

because /usr/local/bin isn't in the $PATH where python3 is located. A quick and dirty solution is to include the full path /usr/local/bin/python3 in the run shell script. Most Linux distributions include python3 in system directories. *BSD advocates might say that is polluting the system core directories with third-party software.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions