Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DietPi-Software | TigerVNC: Resolve immediate coredump on connect + other minor issues #3086

Merged
merged 4 commits into from
Sep 1, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Bug Fixes:
- DietPi-NordVPN | Resolved an issue where the server menu could have wrong entries or even fail, if foreign files were placed inside the config directory. Many thanks to @svh1985 for reporting this issue and implementing a fix: https://github.com/MichaIng/DietPi/pull/3047
- DietPi-Services | Resolved an issue where single service calls failed if their names contain certain special characters, like dots. Many thanks to @maartenlangeveld for reporting this issue: https://github.com/MichaIng/DietPi/issues/3059
- DietPi-Config | Resolved an issue on RPi where I2C baudrate was not applied correctly, thus selection was ineffective. Many thanks to @flashspys for reporting this issue: https://github.com/MichaIng/DietPi/issues/2966
- DietPi-Software | Resolved an issue where the script tells you that SQLite will be installed as pre-req, while actually a desktop is required and LXDE will be installed.
- DietPi-Software | Gitea: Resolved an issue where install fails on ARMv7 systems. Many thanks to @maschiw for reporting this issue: https://github.com/MichaIng/DietPi/issues/2959
- DietPi-Software | Node-RED: Resolved an issue where install fails due to missing data dir creation. Many thanks to @Orfait for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975
- DietPi-Software | Node-RED: Resolved an issue where user creation fails if "gpio" group is not present. Many thanks to @marcobrianza for reporting this issue: https://github.com/MichaIng/DietPi/issues/2975#issuecomment-513917360
Expand All @@ -32,6 +33,8 @@ Bug Fixes:
- DietPi-Software | Sonarr: Resolved an issue where install failed due to an outdated APT repository key. Many thanks to @GregoryDosh and @GulyFMG for reporting this issue: https://github.com/MichaIng/DietPi/issues/3029
- DietPi-Software | Plex Media Server: Resolved an issue where DietPi-Update failed for versions prior to v6.23, due to the obsolete Plex Media Server dev2day repository being offline now. This repo is now removed via pre-patches, prior to G_AGUP being called. During regular patches PMS is reinstalled, applying the new official APT repo. Many thanks to @p-roman for reporting this issue: https://github.com/MichaIng/DietPi/issues/3038
- DietPi-Software | Pi-hole: Resolved an issue, where the blocking page was only shown, if the blocked URL contained the domain only, without any appending path: https://github.com/MichaIng/DietPi/pull/3072
- DietPi-Software | TigerVNC: Resolved an issue on Debian Buster, where the VNC connection fails immediately due to an external bug, if no read-only password has been applied via vncpasswd. Many thanks to @Trunkzeh for reporting this issue and providing the workaround: https://github.com/MichaIng/DietPi/issues/3070
- DietPi-Software | TigerVNC: Resolved minor error messages on login and in logs: "No session for PID ...", "DE is (null); No desktop environnement set, fallback to LXDE", "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver"

As always, many smaller code performance and stability improvements, visual and spelling fixes have been done, too much to list all of them here. Check out all code changes of this release on GitHub: https://github.com/MichaIng/DietPi/pull/XXXX

Expand Down
42 changes: 25 additions & 17 deletions dietpi/dietpi-software
Original file line number Diff line number Diff line change
Expand Up @@ -2710,11 +2710,11 @@ DietPi-Software will decrypt and use it for software installs. You can change it
${aSOFTWARE_INSTALL_STATE[26]} < 1 &&
${aSOFTWARE_INSTALL_STATE[173]} < 1 )); then

# - If no desktop is selected or installed (0), default to LXDE
# If no desktop is selected or installed, default to LXDE
aSOFTWARE_INSTALL_STATE[23]=1
G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[$software_id]} will be installed"
G_DIETPI-NOTIFY 2 "${aSOFTWARE_NAME[23]} will be installed"

# Pretent software requiring Xserver, to mark it below, in case desktop ID already passed:
# Pretent software requiring Xserver, to mark it below, in case desktop ID already passed
aSOFTWARE_REQUIRES_XSERVERXORG[$i]=1

fi
Expand Down Expand Up @@ -4482,7 +4482,9 @@ _EOF_
Banner_Installing
# TigerVNC allows connecting to a virtual desktop
# X11VNC allows connecting to a real desktop session, thus shared desktop sessions as well
G_AGI tigervnc-standalone-server tigervnc-common x11vnc
# netbase is required to solve: "Use of uninitialized value $proto in socket at /usr/bin/tigervncserver"
# - It is a recommendation and no dependency of perl, but expected by some packages depending on perl only: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939055
G_AGI tigervnc-standalone-server tigervnc-common x11vnc netbase

fi

Expand Down Expand Up @@ -9151,8 +9153,6 @@ _EOF_
(( ${aSOFTWARE_INSTALL_STATE[28]} == 1 )) && software_id=28 || software_id=120
Banner_Configuration

echo -e "$GLOBAL_PW=\n$GLOBAL_PW=\nn\n" | vncpasswd

cat << _EOF_ > /etc/systemd/system/vncserver.service
[Unit]
Description=Manage VNC Server (DietPi)
Expand All @@ -9161,6 +9161,7 @@ After=dietpi-boot.service

[Service]
RemainAfterExit=yes
User=root
PAMName=login
Environment=HOME=/root
ExecStart=/usr/local/bin/vncserver start
Expand Down Expand Up @@ -9218,17 +9219,17 @@ case "\$1" in
# Virtual desktop mode
else

WIDTH=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
HEIGHT=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
DEPTH=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
DISPLAY=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
WIDTH=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_WIDTH=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt)
HEIGHT=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_HEIGHT=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt)
DEPTH=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DEPTH=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt)
DISPLAY=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt)
\$BINARY_FP :\${DISPLAY:-1} -geometry \${WIDTH:-1280}'x'\${HEIGHT:-720} -depth \${DEPTH:-16} || exit 1

fi
;;

stop)
DISPLAY=\$(grep -m1 '^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=' /DietPi/dietpi.txt | sed 's/^[^=]*=//')
DISPLAY=\$(sed -n '/^[[:blank:]]*SOFTWARE_VNCSERVER_DISPLAY_INDEX=/{s/^[^=]*=//p;q}' /DietPi/dietpi.txt)
\$BINARY_FP -kill :\${DISPLAY:-1} &> /dev/null
killall -qw x11vnc Xtigervnc
;;
Expand All @@ -9254,27 +9255,27 @@ _EOF_
# DESKTOP_LXDE
if (( ${aSOFTWARE_INSTALL_STATE[23]} > 0 )); then

cmd_launch_desktop='lxsession -s LXDE &'
cmd_launch_desktop='lxsession -s LXDE -e LXDE'

# DESKTOP_MATE
elif (( ${aSOFTWARE_INSTALL_STATE[24]} > 0 )); then

cmd_launch_desktop='mate-session &'
cmd_launch_desktop='mate-session'

# DESKTOP_GNUSTEP
elif (( ${aSOFTWARE_INSTALL_STATE[26]} > 0 )); then

cmd_launch_desktop='x-window-manager &'
cmd_launch_desktop='x-window-manager'

# DESKTOP_XFCE
elif (( ${aSOFTWARE_INSTALL_STATE[25]} > 0 )); then

cmd_launch_desktop='xfce4-session &'
cmd_launch_desktop='xfce4-session'

# DESKTOP_LXQT
elif (( ${aSOFTWARE_INSTALL_STATE[173]} > 0 )); then

cmd_launch_desktop='startlxqt &'
cmd_launch_desktop='startlxqt'

fi

Expand All @@ -9286,10 +9287,17 @@ export SHELL='/bin/bash'
[[ -r '/root/.Xresources' ]] && xrdb /root/.Xresources
xsetroot -solid grey
vncconfig -iconic &
$cmd_launch_desktop
$cmd_launch_desktop &
_EOF_
chmod +x /root/.vnc/xstartup

# Set control + read-only passwords
vncpasswd -f << _EOF_ > /root/.vnc/passwd
$GLOBAL_PW
$GLOBAL_PW
_EOF_
chmod 600 /root/.vnc/passwd

fi

software_id=74 # InfluxDB
Expand Down