document.write("
| #!/usr/bin/env bash |
| |
| |
| pid=$(pgrep -f 'websockify') |
| |
| |
| if [ -z "$pid" ]; then |
| echo "websockify process not found. It may not be running." |
| else |
| |
| kill $pid |
| echo "websockify process (PID: $pid) has been stopped." |
| fi |
| |
| #!/usr/bin/env bash |
| |
| |
| default_vnc_port="5900" |
| |
| |
| vnc_port=${1:-$default_vnc_port} |
| |
| |
| websockify -D --web /usr/share/novnc/ 8081 localhost:$vnc_port |
| |
| #!/usr/bin/env bash |
| |
| |
| default_display=":0" |
| |
| |
| display=${1:-$default_display} |
| |
| |
| tigervncserver -kill $display |
| |
| #!/usr/bin/env bash |
| |
| |
| default_geometry="1920x1080" |
| default_depth="32" |
| |
| |
| geometry=${1:-$default_geometry} |
| depth=${2:-$default_depth} |
| |
| |
| tigervncserver -xstartup /usr/bin/xfce4-session -localhost -depth $depth -geometry $geometry -display :0 |
| |
");