[X2Go-Commits] [live-build-x2go] 111/186: added startup script to generate Desktop files for 3270 sessions

git-admin at x2go.org git-admin at x2go.org
Wed Mar 20 22:55:24 CET 2019


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch feature/mate-minidesktop-stretch
in repository live-build-x2go.

commit 2213d185d8d5cc276dcbeb7d3b2fdd96e3b1bd4c
Author: Stefan Baur (BAUR-ITCS) <kontakt at baur-itcs.de>
Date:   Wed Jan 16 15:43:22 2019 +0000

    added startup script to generate Desktop files for 3270 sessions
---
 .../lib/live/config/2910-x3270-config              | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/config/includes.chroot/lib/live/config/2910-x3270-config b/config/includes.chroot/lib/live/config/2910-x3270-config
new file mode 100755
index 0000000..dd5a27b
--- /dev/null
+++ b/config/includes.chroot/lib/live/config/2910-x3270-config
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+X3270Config ()
+{
+	# Output startup message
+	#
+	echo -n " x3270config"
+
+	X3270SERVERS=$(sed -e 's/ \([^ ]*\)=/\n\1=/g' -e 's/\([^=]["'"'"']\) /\1\n/g' -e 's/ \([^ "'"'"']\)/\n\1/g' /proc/cmdline | \
+		      awk -F'=' ' /^x3270servers=/ { print $2 } ' | tr -dc 'a-zAZ0-9:.|' | tr '|' ' ')
+	if [ -n "$X3270SERVERS" ] && [ -n "$(which x3270)" ] ; then
+		HOSTCOUNT=0
+		for HOST in $X3270SERVERS; do
+			HOSTNAME=${HOST%%:*}
+	        cat >>/usr/share/applications/x3270-$HOSTCOUNT.desktop <<X3270CONFIG
+[Desktop Entry]
+Name=X3270 $HOSTNAME
+Comment=Connect to Host '$HOSTNAME' via Telnet 3270
+Exec=x3270 $HOST
+Icon=computer
+Terminal=false
+Type=Application
+StartupNotify=false
+Categories=Network;RemoteAccess;
+X3270CONFIG
+		HOSTCOUNT=$((HOSTCOUNT+1))
+		done
+	fi
+}
+
+X3270Config

--
Alioth's /home/x2go-admin/maintenancescripts/git/hooks/post-receive-email on /srv/git/code.x2go.org/live-build-x2go.git


More information about the x2go-commits mailing list