Skip to content

Commit

Permalink
v1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
James Bishop committed Jan 2, 2024
1 parent 7ef2dc0 commit 50933a5
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 5 deletions.
5 changes: 5 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change Log

v1.7
* switch from `x11vnc` to `tigervnc-scraping-server` for better vnc performance
* default password `superbird`, to change: `sudo vncpasswd /scripts/vnc_passwd`, and `sudo systemctl restart vnc.service`
* vnc password now survives upgrade via `update_local.sh`

v1.6
* `build_image.sh` can now create full image from a stock dump without extra steps
* `image_config.sh` now contains all user-configurable values for building and updating image
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@ ssh -p 2022 superbird@host-device
1. for landscape, un-comment lines `38` and `71`
5. Edit `/scripts/setup_display.sh` and `/scripts/setup_backlight.sh` to adjust backlight brightness (default 100)
1. Restart backlight script with: `sudo systemctl restart backlight.service`
6. Edit `/scripts/setup_vnc.sh` to adjust VNC server settings and password
1. Restart vnc script with: `sudo systemctl restart vnc.service`
6. Change vnc password: `sudo vncpasswd /scripts/vnc_passwd`
1. Restart vnc server with: `sudo systemctl restart vnc.service`
2. Using your favorite VNC client, connect by VNC to the host device's address, port 5900, if you need to interact with a page (sign in)
3. ?
4. Profit
Expand Down
3 changes: 2 additions & 1 deletion build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ PACKAGES="$PACKAGES xserver-xorg-core xserver-xorg-video-fbdev xterm xinit x11-x
# xorg input
PACKAGES="$PACKAGES xserver-xorg-input-evdev libinput-bin xserver-xorg-input-libinput xinput"
# additional required tools
PACKAGES="$PACKAGES fbset x11vnc"
PACKAGES="$PACKAGES fbset tigervnc-scraping-server"

# NOTE: we cannot install chromium at at the debootstrap stage
# so we install chromium and other packages in a separate stage using chroot
Expand Down Expand Up @@ -259,6 +259,7 @@ install_service usbgadget.service
install_script setup_display.sh
install_script clear_display.sh

install_script vnc_passwd
install_script setup_vnc.sh
install_service vnc.service

Expand Down
6 changes: 5 additions & 1 deletion files/data/scripts/setup_vnc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@
# setup vnc server

LOGFILE="/var/log/vnc.log"
/usr/bin/x11vnc -rfbport 5900 -loop -safer -passwd "superbird" -forever -notruecolor -quiet -display ":0" -shared > "$LOGFILE" 2>&1
# To change password, run: sudo vncpasswd /scripts/vnc_passwd

while :; do
/usr/bin/X0tigervnc -display=:0 -rfbport=5900 -rfbauth=/scripts/vnc_passwd -SecurityTypes=VncAuth > "$LOGFILE" 2>&1
done
1 change: 1 addition & 0 deletions files/data/scripts/vnc_passwd
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
zRqAp�
7 changes: 6 additions & 1 deletion update_local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@

# update scripts and service files on a locally attached device
# will not overwrite any existing buttons_settings.py or chromium_settings.sh
# will not overwrite xorg.conf
# will not overwrite vnc_passwd
# this is intended to run on the host device, and expects key-based ssh authentication has already been setup with superbird

set -e

# all config lives in image_config.sh
source ./image_config.sh

Expand Down Expand Up @@ -45,7 +49,7 @@ echo "Upgrading locally connected device"
echo ""
echo "Installing packages"
# install packages, most of which should already be installed
ssh "${USER_NAME}@${HOST_NAME}" "sudo apt update && sudo apt install -y --no-install-recommends --no-install-suggests chromium python3-minimal python3-pip"
ssh "${USER_NAME}@${HOST_NAME}" "sudo apt update && sudo apt install -y --no-install-recommends --no-install-suggests chromium python3-minimal python3-pip tigervnc-scraping-server"

# install required python packages via pip
ssh "${USER_NAME}@${HOST_NAME}" "sudo chown -R ${USER_NAME} /scripts"
Expand Down Expand Up @@ -79,6 +83,7 @@ fi

deploy_script_if_missing buttons_settings.py
deploy_script_if_missing chromium_settings.sh
deploy_script_if_missing vnc_passwd

deploy_script buttons_app.py
deploy_script clear_display.sh
Expand Down

0 comments on commit 50933a5

Please sign in to comment.