Permalink
Browse files

v137

+ VNC servers, shared desktop modes:
#607
  • Loading branch information...
1 parent 686916b commit b0079a6444561068aef751228292f2356f4a133f @Fourdee committed Nov 14, 2016
Showing with 98 additions and 74 deletions.
  1. +1 −0 CHANGELOG.txt
  2. +1 −0 dietpi.txt
  3. +30 −29 dietpi/dietpi-funtime
  4. +16 −4 dietpi/dietpi-software
  5. +38 −38 dietpi/finalise
  6. +12 −3 dietpi/patch_file
View
@@ -8,6 +8,7 @@ Changes / Improvements / Optimizations:
DietPi-Cloudshell | Storage scenes: now supports upto 5 additional drives. All of which can be configured and setup in dietpi-cloudshell: https://github.com/Fourdee/DietPi/issues/582
DietPi-Config | RPI 3: Onboard wifi can now be toggled on or off. This allows for use of a USB WiFi device if required: https://github.com/Fourdee/DietPi/issues/576
DietPi-Drive_Manager | RPi/Odroids: You can now transfer RootFS (SD card) to a USB drive. This feature is currently in testing, we recommend it should only be used on a fresh installation: https://github.com/Fourdee/DietPi/issues/509
+DietPi-Software | TightVNC/VNC4 servers now support running in a shared desktop mode. Set dietpi_vncserver_shared_desktop=1 in dietpi.txt: https://github.com/Fourdee/DietPi/issues/607
DietPi-Update | Will now use multiple mirrors during updates.
General | Added exit paths to DietPi scripts. This is to prevent use by underprivileged users, where root/sudo access is required.
View
@@ -209,6 +209,7 @@ dietpi_vncserver_width=1280
dietpi_vncserver_height=720
dietpi_vncserver_depth=16
dietpi_vncserver_display=1
+dietpi_vncserver_shared_desktop=0
#Optional username for nextcloud admin account, default is admin. Applied during installation.
dietpi_nextcloud_username=admin
View
@@ -42,35 +42,36 @@
local passes=0
- local -a marker=(
- '# processing | D I E T P I #'
- 'D# processing | D I E T P I #g'
- 'D # processing | D I E T P I #ng'
- 'D I# processing | D I E T P I #ing'
- 'D I # processing | D I E T P I #sing'
- 'D I E# processing | D I E T P I #ssing'
- 'D I E # processing | D I E T P I #essing'
- 'D I E T# processing | D I E T P I #cessing'
- 'D I E T # processing | D I E T P I #ocessing'
- 'D I E T # processing | D I E T P I #rocessing'
- 'D I E T P# processing | D I E T P I #processing'
- 'D I E T P # processing | D I E T P I # processing'
- 'D I E T P I# processing | D I E T P I # processing'
- 'D I E T P I # processing | D I E T P I# processing'
- 'D I E T P I # processing | D I E T P # processing'
- 'D I E T P I #processing | D I E T P# processing'
- 'D I E T P I #rocessing | D I E T # processing'
- 'D I E T P I #ocessing | D I E T # processing'
- 'D I E T P I #cessing | D I E T# processing'
- 'D I E T P I #essing | D I E # processing'
- 'D I E T P I #ssing | D I E# processing'
- 'D I E T P I #sing | D I # processing'
- 'D I E T P I #ing | D I# processing'
- 'D I E T P I #ng | D # processing'
- 'D I E T P I #g | D# processing'
- 'D I E T P I # | # processing'
- 'D I E T P I #|# processing'
- 'D I E T P I # processing'
+ local marker=(
+
+ '# processing | D i e t P i #'
+ 'D# processing | D i e t P i #g'
+ 'D # processing | D i e t P i #ng'
+ 'D i# processing | D i e t P i #ing'
+ 'D i # processing | D i e t P i #sing'
+ 'D i e# processing | D i e t P i #ssing'
+ 'D i e # processing | D i e t P i #essing'
+ 'D i e t# processing | D i e t P i #cessing'
+ 'D i e t # processing | D i e t P i #ocessing'
+ 'D i e t # processing | D i e t P i #rocessing'
+ 'D i e t P# processing | D i e t P i #processing'
+ 'D i e t P # processing | D i e t P i # processing'
+ 'D i e t P i# processing | D i e t P i # processing'
+ 'D i e t P i # processing | D i e t P i# processing'
+ 'D i e t P i # processing | D i e t P # processing'
+ 'D i e t P i #processing | D i e t P# processing'
+ 'D i e t P i #rocessing | D i e t # processing'
+ 'D i e t P i #ocessing | D i e t # processing'
+ 'D i e t P i #cessing | D i e t# processing'
+ 'D i e t P i #essing | D i e # processing'
+ 'D i e t P i #ssing | D i e# processing'
+ 'D i e t P i #sing | D i # processing'
+ 'D i e t P i #ing | D i# processing'
+ 'D i e t P i #ng | D # processing'
+ 'D i e t P i #g | D# processing'
+ 'D i e t P i # | # processing'
+ 'D i e t P i #|# processing'
+ 'D i e t P i # processing'
)
@@ -3767,7 +3767,7 @@ _EOF_
Banner_Installing
- AGI tightvncserver --no-install-recommends
+ AGI tightvncserver x11vnc --no-install-recommends
fi
@@ -3777,7 +3777,7 @@ _EOF_
Banner_Installing
- AGI vnc4server --no-install-recommends
+ AGI vnc4server x11vnc --no-install-recommends
fi
@@ -6786,11 +6786,13 @@ _EOF_
#Globals
VNC_INSTALLED=0
BINARY_FP=0
+SHARED_MODE=0
WIDTH=\$(cat /DietPi/dietpi.txt | grep -m1 '^dietpi_vncserver_width=' | sed 's/.*=//')
HEIGHT=\$(cat /DietPi/dietpi.txt | grep -m1 '^dietpi_vncserver_height=' | sed 's/.*=//')
DEPTH=\$(cat /DietPi/dietpi.txt | grep -m1 '^dietpi_vncserver_depth=' | sed 's/.*=//')
DISPLAY=\$(cat /DietPi/dietpi.txt | grep -m1 '^dietpi_vncserver_display=' | sed 's/.*=//')
+SHARED_MODE=\$(cat /DietPi/dietpi.txt | grep -m1 '^dietpi_vncserver_shared_desktop=' | sed 's/.*=//')
#TightVNC or VNC4server?
if [ -f /usr/bin/vnc4server ]; then
@@ -6808,11 +6810,20 @@ fi
case "\$1" in
start)
- \$BINARY_FP :\$DISPLAY -geometry \$WIDTH'x'\$HEIGHT -depth \$DEPTH
+ if (( \$SHARED_MODE )); then
+
+ x11vnc -display :0 -usepw -forever &
+
+ else
+
+ \$BINARY_FP :\$DISPLAY -geometry \$WIDTH'x'\$HEIGHT -depth \$DEPTH
+
+ fi
;;
stop)
- \$BINARY_FP -kill :\$DISPLAY
+ \$BINARY_FP -kill :\$DISPLAY &> /dev/null
+ killall -w x11vnc &> /dev/null
;;
esac
@@ -8524,6 +8535,7 @@ _EOF_
AGP tightvncserver
AGP vnc4server
+ AGP x11vnc
rm /etc/systemd/system/vncserver.service
rm /etc/init.d/vncserver
View
@@ -120,44 +120,6 @@
systemctl daemon-reload
#////////////////////////////////////
- # WiFi country code to GB
- /DietPi/dietpi/func/dietpi-set_hardware wifi enable # Must be enabled to set.
- /DietPi/dietpi/func/dietpi-set_hardware wificountrycode GB
- iw reg get
-
- #Copy Network Interface conf
- cp /DietPi/dietpi/conf/network_interfaces /etc/network/interfaces
-
- # Disable wifi and bluetooth modules on all devices.
- /DietPi/dietpi/func/dietpi-set_hardware bluetooth disable
- /DietPi/dietpi/func/dietpi-set_hardware wifi disable
-
- # - Enable onboard WiFi chips (removes them from blacklist)
- /DietPi/dietpi/func/dietpi-set_hardware wifi onboard_enable
-
- # Disable forced eth speed if set
- /DietPi/dietpi/func/dietpi-set_hardware eth-forcespeed disable
-
- # Reset IP version pref
- /DietPi/dietpi/func/dietpi-set_hardware preferipversion auto
-
- #Set Hostname
- cat << _EOF_ > /etc/hosts
-127.0.0.1 localhost
-127.0.1.1 DietPi
-_EOF_
-
- cat << _EOF_ > /etc/hostname
-DietPi
-_EOF_
-
-
- #////////////////////////////////////
- #Set Pi cmdline.txt back to normal
- # - Remove root delay
- sed -i "s/ rootdelay=10//g" /boot/cmdline.txt
-
- #////////////////////////////////////
# Set Pi Config.txt back to normal
wget https://raw.githubusercontent.com/Fourdee/DietPi/testing/config.txt -O /DietPi/config.txt
@@ -197,6 +159,44 @@ _EOF_
wget https://raw.githubusercontent.com/Fourdee/DietPi/testing/README.md -O /boot/README.md
#////////////////////////////////////
+ # WiFi country code to GB
+ /DietPi/dietpi/func/dietpi-set_hardware wifi enable # Must be enabled to set.
+ /DietPi/dietpi/func/dietpi-set_hardware wificountrycode GB
+ iw reg get
+
+ #Copy Network Interface conf
+ cp /DietPi/dietpi/conf/network_interfaces /etc/network/interfaces
+
+ # Disable wifi and bluetooth modules on all devices.
+ /DietPi/dietpi/func/dietpi-set_hardware bluetooth disable
+ /DietPi/dietpi/func/dietpi-set_hardware wifi disable
+
+ # - Enable onboard WiFi chips (removes them from blacklist)
+ /DietPi/dietpi/func/dietpi-set_hardware wifi onboard_enable
+
+ # Disable forced eth speed if set
+ /DietPi/dietpi/func/dietpi-set_hardware eth-forcespeed disable
+
+ # Reset IP version pref
+ /DietPi/dietpi/func/dietpi-set_hardware preferipversion auto
+
+ #Set Hostname
+ cat << _EOF_ > /etc/hosts
+127.0.0.1 localhost
+127.0.1.1 DietPi
+_EOF_
+
+ cat << _EOF_ > /etc/hostname
+DietPi
+_EOF_
+
+
+ #////////////////////////////////////
+ #Set Pi cmdline.txt back to normal
+ # - Remove root delay
+ sed -i "s/ rootdelay=10//g" /boot/cmdline.txt
+
+ #////////////////////////////////////
#Disable serial console
/DietPi/dietpi/func/dietpi-set_hardware serialconsole disable
View
@@ -1839,9 +1839,10 @@ _EOF_
elif (( $VERSION_CURRENT == 136 )); then
#-------------------------------------------------------------------------------
- #DietPi-Cloudshell updates
- # - Reinstall to apply new service for tty1 use
- /DietPi/dietpi/dietpi-software reinstall 62
+ #Reinstalls
+ # - DietPi-Cloudshell: Reinstall to apply new service for tty1 use
+ # - vnc servers: Reinstall to allow use of new shared desktop mode
+ /DietPi/dietpi/dietpi-software reinstall 62 27 28
# - requires new save file
if [ -f /DietPi/dietpi/.dietpi-cloudshell ]; then
@@ -1853,6 +1854,14 @@ _EOF_
fi
#Add roon to dietpi-process_tool: http://dietpi.com/phpbb/viewtopic.php?f=9&t=826#p3711
+
+ #-------------------------------------------------------------------------------
+ #Shared VNC server options: https://github.com/Fourdee/DietPi/issues/607
+ if (( $(cat /DietPi/dietpi.txt | grep -ci -m1 'dietpi_vncserver_shared_desktop=') )); then
+
+ echo -e "\ndietpi_vncserver_shared_desktop=0" >> /DietPi/dietpi.txt
+
+ fi
#-------------------------------------------------------------------------------

0 comments on commit b0079a6

Please sign in to comment.