Fix VNC options

Fixes #74
This commit is contained in:
Serge Schneider 2020-01-13 12:49:43 +00:00
parent f69ab6dc76
commit cabd4289a6
2 changed files with 11 additions and 7 deletions

1
debian/changelog vendored
View File

@ -2,6 +2,7 @@ raspi-config (20200109) UNRELEASED; urgency=medium
* Add proxy configuration * Add proxy configuration
* Handle cases where SUDO_USER is unset * Handle cases where SUDO_USER is unset
* Fix VNC options
-- Serge Schneider <serge@raspberrypi.org> Thu, 09 Jan 2020 14:38:50 +0000 -- Serge Schneider <serge@raspberrypi.org> Thu, 09 Jan 2020 14:38:50 +0000

View File

@ -800,15 +800,18 @@ do_vnc() {
RET=$1 RET=$1
fi fi
if [ $RET -eq 0 ]; then if [ $RET -eq 0 ]; then
if [ ! -d /usr/share/doc/realvnc-vnc-server ] ; then if [ -d /usr/share/doc/realvnc-vnc-server ] || apt-get install realvnc-vnc-server; then
apt-get install realvnc-vnc-server systemctl enable vncserver-x11-serviced.service &&
systemctl start vncserver-x11-serviced.service &&
STATUS=enabled
else
return 1
fi fi
systemctl enable vncserver-x11-serviced.service &&
systemctl start vncserver-x11-serviced.service &&
STATUS=enabled
elif [ $RET -eq 1 ]; then elif [ $RET -eq 1 ]; then
systemctl disable vncserver-x11-serviced.service && if [ ! -d /usr/share/doc/realvnc-vnc-server ] ; then
systemctl stop vncserver-x11-serviced.service && systemctl disable vncserver-x11-serviced.service
systemctl stop vncserver-x11-serviced.service
fi
STATUS=disabled STATUS=disabled
else else
return $RET return $RET