APP in VNC mode with button 2

main
Links 2022-04-18 18:34:14 +02:00
rodzic 244af20134
commit b95317c982
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 68FB9F01C0C482FC
4 zmienionych plików z 56 dodań i 26 usunięć

Wyświetl plik

@ -17,7 +17,7 @@ currently the buttons under the screen are used.
- no Button: Boot internal storage (X6100 orginal OS)
- 1 Button: stock Kernel + Armbian with X6100 APP on screen
- 2 Button: stock Kernel + Armbian with xfce on screen + X6100 APP hidden but running for CAT
- 2 Button: stock Kernel + Armbian with xfce on screen + X6100 APP hidden but running for CAT and VNC on port 5901
- 3 Button: Armbian Kernel + boot to console
Notes:
@ -69,7 +69,9 @@ on the command line use `nmtui` or use the Network Manager UI after login.
| TCP 9090 | RAW CAT |
| TCP 7000 | RF RX (audio/x-raw,rate=16000,channels=2,format=S16LE) |
| TCP 6080 | noVNC |
| TCP 6081 | noVNC APP (Only running when Button 2 where pressed) |
| TCP 5900 | VNC (xfce) |
| TCP 5901 | VNC APP (Only running when Button 2 where pressed) |
| TCP 4532 | rigctld |
| TCP 3389 | xrdp (untested) |
| TCP 22 | SSH |

Wyświetl plik

@ -27,7 +27,7 @@ Main() {
#touch /root/.no_rootfs_resize
apt-get install -y quisk tigervnc-standalone-server socat ser2net gdb-minimal gdbserver strace e2fsprogs xfce4-battery-plugin xfce4-power-manager xfce4-systemload-plugin libqt5sql5-sqlite xinetd
apt-get install -y quisk tigervnc-standalone-server tigervnc-viewer socat ser2net gdb-minimal gdbserver strace e2fsprogs xfce4-battery-plugin xfce4-power-manager xfce4-systemload-plugin libqt5sql5-sqlite xinetd
apt-get install -y gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-base gstreamer1.0-pulseaudio gstreamer1.0-alsa
apt-get install -y nano htop curl ncdu gpg dtrx localepurge mtr-tiny screen iotop git wget net-tools sudo file bash-completion psmisc dnsutils software-properties-common apt-transport-https xauth aptitude fzf tcpdump
apt-get install -y bluez-alsa-utils bluez bluez-tools

Wyświetl plik

@ -0,0 +1,12 @@
[Unit]
Description=noVNC for APP
Requires=x6100_app.service
ConditionKernelCommandLine=x6100_app_hide=1
[Service]
Type=simple
ExecStart=/usr/bin/websockify --web=/usr/share/novnc/ 6081 localhost:5901
Restart=on-failure
[Install]
WantedBy=multi-user.target

Wyświetl plik

@ -6,6 +6,7 @@ CAT_DEV_NEW=/dev/ttyS2_VIRT
function cleanup()
{
echo "cleanup"
echo 0 > /sys/class/gpio/gpio138/value
if [ -e "/mnt/x6100/${CAT_DEV}" ] ; then
@ -19,29 +20,6 @@ function cleanup()
trap cleanup EXIT
trap cleanup SIGINT
if grep -r "x6100_app_hide=1" /proc/cmdline > /dev/null ; then
cat > /root/qtkmsconfig.json <<EOL
{
"device": "/dev/dri/renderD128",
"headless": "800x480"
}
EOL
else
cat > /root/qtkmsconfig.json <<EOL
{
"device": "/dev/dri/card1",
"hwcursor": false,
"pbuffers": true,
"outputs": [
{
"name": "LCD",
"mode": "800x480"
}
]
}
EOL
fi
until [ -e ${CAT_DEV_NEW} ] ; do
echo "waiting for ${CAT_DEV_NEW}"
sleep 1
@ -57,5 +35,43 @@ mount -o bind ${CAT_DEV_NEW} /mnt/x6100${CAT_DEV}
echo 1 > /sys/class/gpio/gpio138/value
TZ=$(cat /etc/timezone)
APP_ARGS=""
APP_VNC=0
chroot /mnt/x6100 /bin/bash -c "source /etc/profile && export TZ=${TZ} && nice --5 /usr/app_qt/x6100_ui_v100"
if grep -r "x6100_app_hide=1" /proc/cmdline > /dev/null ; then
APP_VNC=1
fi
if [ "$1" == "vnc" ] ; then
APP_VNC=1
fi
if [ "${APP_VNC}" == "1" ] ; then
echo "Starting in VNC mode"
# Note: the APP is not happy to run in VNC mode (no egl)
# but its runnimg so we hode all the error messages to not spam the log.
APP_ARGS="--platform vnc:port=5901:size=800x480 >/dev/null 2>&1"
cat > /root/qtkmsconfig.json <<EOL
{
"device": "/dev/dri/renderD128",
"headless": "800x480"
}
EOL
else
cat > /root/qtkmsconfig.json <<EOL
{
"device": "/dev/dri/card1",
"hwcursor": false,
"pbuffers": true,
"outputs": [
{
"name": "LCD",
"mode": "800x480"
}
]
}
EOL
fi
chroot /mnt/x6100 /bin/bash -c "source /etc/profile && export TZ=${TZ} && nice --5 /usr/app_qt/x6100_ui_v100 ${APP_ARGS}"