This is an automated email from the git hooks/post-receive script. x2go pushed a commit to branch master in repository x2godesktopsharing. commit 58316b4197d4a91d9da99515147aa007aeed3447 Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de> Date: Tue Nov 13 23:12:25 2018 +0100 debian/<debconf>: Add two more questions asking for auto-start on logon and auto-activation on logon.of X2Go Desktop Sharing applet. --- debian/changelog | 4 ++- debian/po/templates.pot | 56 ++++++++++++++++++++++++++++++++++++- debian/x2godesktopsharing.config | 10 +++++++ debian/x2godesktopsharing.postinst | 18 ++++++++++++ debian/x2godesktopsharing.templates | 27 ++++++++++++++++++ 5 files changed, 113 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index e69010a..c9abbca 100644 --- a/debian/changelog +++ b/debian/changelog @@ -58,9 +58,11 @@ x2godesktopsharing (3.1.1.5-0x2go1) UNRELEASED; urgency=medium for building the executable. * debian/x2godesktopsharing.menu: + Drop file. The menu file is not allowed if a .desktop file is present. - * debian/<config>: + * debian/<debconf>: + Add debconf configuration dialogs that facilitate setting the system-wide default desktop sharing user. + + Add two more questions asking for auto-start on logon and auto-activation + on logon.of X2Go Desktop Sharing applet. * debian/copyright: + Turn into DEP-5 copyright file format style. + Update copyright attributions. diff --git a/debian/po/templates.pot b/debian/po/templates.pot index 0462062..0c28d7a 100644 --- a/debian/po/templates.pot +++ b/debian/po/templates.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: x2godesktopsharing\n" "Report-Msgid-Bugs-To: x2godesktopsharing@packages.debian.org\n" -"POT-Creation-Date: 2018-11-11 21:03+0100\n" +"POT-Creation-Date: 2018-11-13 23:11+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Language-Team: LANGUAGE <LL@li.org>\n" @@ -122,3 +122,57 @@ msgid "" "The given group does not exist on this system. You should specify an already " "existing group." msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:8001 +msgid "Auto-start X2Go Desktop Sharing applet on desktop session startup?" +msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:8001 +msgid "" +"For the desktop session to be accessible via X2Go Desktop Sharing, the X2Go " +"Desktop Sharing applet needs to be running. It advertises the users X11/X2Go " +"session through an access controlled socket." +msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:8001 +msgid "" +"The applet can be configured to start automatically on desktop session " +"startup, but for security reasons this is not the default." +msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:9001 +msgid "Auto-activate X2Go Desktop Sharing on desktop session startup?" +msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:9001 +msgid "" +"The X2Go Desktop Sharing applet normally starts in non-sharing mode (users " +"that request to share the running desktop session get auto-rejected)." +msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:9001 +msgid "" +"If you voted for the auto-start option in the previous screen, you can " +"additionally choose, if desktop sharing shall be activated when the X2Go " +"Desktop Sharing applet is auto-startet at session login." +msgstr "" + +#. Type: boolean +#. Description +#: ../x2godesktopsharing.templates:9001 +msgid "" +"For security and data protection reasons, this is not the default. Use this " +"auto-activation feature only in appropriate environments (e.g. class rooms)." +msgstr "" diff --git a/debian/x2godesktopsharing.config b/debian/x2godesktopsharing.config index a77cb95..a847666 100755 --- a/debian/x2godesktopsharing.config +++ b/debian/x2godesktopsharing.config @@ -63,3 +63,13 @@ if [ "$create_group" = "true" ] || [ "$use_existing_group" = "true" ]; then fi done fi + +db_input high x2godesktopsharing/auto-start-on-logon || true +db_go +db_get x2godesktopsharing/auto-start-on-logon +auto_start=$RET + +if [ "$auto_start" = "true" ]; then + db_input high x2godesktopsharing/auto-activate-on-logon || true + db_go +fi diff --git a/debian/x2godesktopsharing.postinst b/debian/x2godesktopsharing.postinst index 6374ca9..438cc21 100755 --- a/debian/x2godesktopsharing.postinst +++ b/debian/x2godesktopsharing.postinst @@ -64,6 +64,24 @@ case "$1" in if [ -n "$group" ]; then sed -i /etc/x2godesktopsharing/settings -e "s/group=.*/group=$group/" fi + + db_get x2godesktopsharing/auto-start-on-logon + if [ "$RET" = "true" ] && [ ! -e /etc/xdg/autostart/x2godesktopsharing.desktop ]; then + echo "Setting up system-wide XDG autostart for X2Go Desktop Sharing." + cp /usr/share/applications/x2godesktopsharing.desktop /etc/xdg/autostart/x2godesktopsharing.desktop + elif [ "$RET" = "false" ] && [ -f /etc/xdg/autostart/x2godesktopsharing.desktop ]; then + echo "Disabling system-wide XDG autostart for X2Go Desktop Sharing." + rm -f /etc/xdg/autostart/x2godesktopsharing.desktop + fi + + db_get x2godesktopsharing/auto-activate-on-logon + if [ "$RET" = "true" ] && [ -e /etc/xdg/autostart/x2godesktopsharing.desktop ]; then + echo "Setting up system-wide auto-activation of X2Go Desktop Sharing." + sed -i /etc/xdg/autostart/x2godesktopsharing.desktop -e 's@^Exec=.*@Exec=/usr/bin/x2godesktopsharing --activate-desktop-sharing@' + elif [ "$RET" = "false" ] && [ -e /etc/xdg/autostart/x2godesktopsharing.desktop ]; then + echo "Disabling system-wide auto-activation of X2Go Desktop Sharing." + sed -i /etc/xdg/autostart/x2godesktopsharing.desktop -e 's@^Exec=.*@Exec=/usr/bin/x2godesktopsharing@' + fi ;; abort-upgrade|abort-remove|abort-deconfigure) diff --git a/debian/x2godesktopsharing.templates b/debian/x2godesktopsharing.templates index 8b453ee..40f87aa 100644 --- a/debian/x2godesktopsharing.templates +++ b/debian/x2godesktopsharing.templates @@ -59,3 +59,30 @@ Type: error _Description: Non-existing group The given group does not exist on this system. You should specify an already existing group. + +Template: x2godesktopsharing/auto-start-on-logon +Type: boolean +Default: false +_Description: Auto-start X2Go Desktop Sharing applet on desktop session startup? + For the desktop session to be accessible via X2Go Desktop Sharing, the + X2Go Desktop Sharing applet needs to be running. It advertises the users + X11/X2Go session through an access controlled socket. + . + The applet can be configured to start automatically on desktop session + startup, but for security reasons this is not the default. + +Template: x2godesktopsharing/auto-activate-on-logon +Type: boolean +Default: false +_Description: Auto-activate X2Go Desktop Sharing on desktop session startup? + The X2Go Desktop Sharing applet normally starts in non-sharing mode + (users that request to share the running desktop session get + auto-rejected). + . + If you voted for the auto-start option in the previous screen, you can + additionally choose, if desktop sharing shall be activated when the X2Go + Desktop Sharing applet is auto-startet at session login. + . + For security and data protection reasons, this is not the default. Use + this auto-activation feature only in appropriate environments (e.g. + class rooms). -- Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/x2godesktopsharing.git