feat: add automation steps to bash rc
This commit is contained in:
parent
4d8c8d0da9
commit
7b9723e900
39
README.md
39
README.md
|
|
@ -8,6 +8,19 @@
|
|||
./start.sh # Starts both vnc client and server
|
||||
```
|
||||
|
||||
### Allow clipboard
|
||||
For chrome users, please allow the vnc server to use your clipboard. Some clearing of cookies / cache / browsing history might be required
|
||||
```
|
||||
chrome://settings/content/clipboard
|
||||
```
|
||||
|
||||
### Automation via bash.rc
|
||||
Replace `/home/user/workspace/noVNC/start.sh` with your actual full path of this repository and the start shell
|
||||
```sh
|
||||
RUN_IN_BACKGROUND=1 MUTE_ALL_LOGS=1 /home/user/workspace/noVNC/start.sh
|
||||
```
|
||||
|
||||
|
||||
### Description
|
||||
|
||||
noVNC is both a HTML VNC client JavaScript library and an application built on
|
||||
|
|
@ -24,15 +37,23 @@ for a more complete list with additional info and links.
|
|||
|
||||
### Table of Contents
|
||||
|
||||
- [News/help/contact](#newshelpcontact)
|
||||
- [Features](#features)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Browser Requirements](#browser-requirements)
|
||||
- [Server Requirements](#server-requirements)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Installation from Snap Package](#installation-from-snap-package)
|
||||
- [Integration and Deployment](#integration-and-deployment)
|
||||
- [Authors/Contributors](#authorscontributors)
|
||||
- [noVNC: HTML VNC Client Library and Application](#novnc-html-vnc-client-library-and-application)
|
||||
- [Quickstart](#quickstart)
|
||||
- [Allow clipboard](#allow-clipboard)
|
||||
- [Automation via bash.rc](#automation-via-bashrc)
|
||||
- [Description](#description)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [News/help/contact](#newshelpcontact)
|
||||
- [Features](#features)
|
||||
- [Screenshots](#screenshots)
|
||||
- [Browser Requirements](#browser-requirements)
|
||||
- [Server Requirements](#server-requirements)
|
||||
- [Quick Start](#quick-start)
|
||||
- [Installation from Snap Package](#installation-from-snap-package)
|
||||
- [Running noVNC from Snap Directly](#running-novnc-from-snap-directly)
|
||||
- [Running noVNC from Snap as a Service (Daemon)](#running-novnc-from-snap-as-a-service-daemon)
|
||||
- [Integration and Deployment](#integration-and-deployment)
|
||||
- [Authors/Contributors](#authorscontributors)
|
||||
|
||||
### News/help/contact
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
16
start.sh
16
start.sh
|
|
@ -3,16 +3,22 @@
|
|||
#
|
||||
# Sample usage 1: RUN_IN_BACKGROUND=1 ./start.sh
|
||||
# Sample usage 2: RUN_IN_BACKGROUND=1 DESKTOP_ENV=xfce ./start.sh
|
||||
# Sample usage 3: RUN_IN_BACKGROUND=1 MUTE_ALL_LOGS=1 ./start.sh # for use in bash.rc automation, replace ./start.sh with full path
|
||||
# set FORCE_KILL=1 to force restart vnc server and client if it is already running
|
||||
# set FORCE_REINSTALL_TURBOVNC=1 to reinstall turbovnc to the latest version
|
||||
# set RUN_IN_BACKGROUND=1 to start proxy and vnc client in background
|
||||
# set DESKTOP_ENV=xfce to switch desktop environments to xfce instead of default gnome
|
||||
# set MUTE_ALL_LOGS=1 to mute all logs to console, for automation purposes
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
cd "$SCRIPT_DIR"
|
||||
|
||||
if [ ! -z $MUTE_ALL_LOGS ] && [ $MUTE_ALL_LOGS -eq 1 ]; then
|
||||
export LOGGER_LEVEL=ERROR
|
||||
fi
|
||||
|
||||
. ./utils/shell-logger
|
||||
|
||||
hasUpdated=0
|
||||
|
|
@ -22,9 +28,11 @@ NOVNC_PORT=6080
|
|||
info "Selected Desktop environment :: $desktopEnv"
|
||||
|
||||
if [ -z $FORCE_KILL ]; then
|
||||
if pgrep -f novnc_proxy >/dev/null && pgrep -f vncserver >/dev/null && pgrep -f xfce4 >/dev/null; then
|
||||
printf "Virtual desktop already running on $NOVNC_PORT-$WEB_HOST/vnc.html\n"
|
||||
exit
|
||||
if pgrep -f novnc_proxy >/dev/null && pgrep -f vncserver >/dev/null; then
|
||||
if pgrep -fdesktopEnv $ >/dev/null; then
|
||||
info "Virtual desktop already running on $NOVNC_PORT-$WEB_HOST/vnc.html\n"
|
||||
exit
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
@ -101,7 +109,7 @@ if [ ! -z $RUN_IN_BACKGROUND ]; then
|
|||
info "running novnc proxy in background"
|
||||
mkdir -p ~/logs
|
||||
./novnc_proxy --vnc localhost:$displayPort &> ~/logs/novnc.log &
|
||||
printf "\nNavigate to this URL:\n\n$NOVNC_PORT-$WEB_HOST/vnc.html\n"
|
||||
info "\nNavigate to this URL:\n\n$NOVNC_PORT-$WEB_HOST/vnc.html\n"
|
||||
else
|
||||
./novnc_proxy --vnc localhost:$displayPort
|
||||
fi
|
||||
|
|
|
|||
2
vnc.html
2
vnc.html
|
|
@ -15,7 +15,7 @@
|
|||
-->
|
||||
<title>noVNC</title>
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="app/images/icons/novnc.ico">
|
||||
<link rel="icon" type="image/x-icon" href="app/images/icons/penguin.ico">
|
||||
|
||||
<!-- Apple iOS Safari settings -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
|
|
|||
Loading…
Reference in New Issue