diff --git a/client-py3/full/linux/Makefile b/client-py3/full/linux/Makefile index 20efd8d7..2f78d8a2 100644 --- a/client-py3/full/linux/Makefile +++ b/client-py3/full/linux/Makefile @@ -96,3 +96,12 @@ build-igel: zip -j ../udsclient3-$(VERSION)-igel.zip $(DESTDIR)/UDSClient-Profile.xml $(DESTDIR)/UDSClient.inf $(DESTDIR)/UDSClient.tar.bz2 cd .. rm -rf $(DESTDIR) + +build-thinpro: + rm -rf $(DESTDIR) + mkdir -p $(DESTDIR) + cp -r thinpro/* $(DESTDIR) + cp UDSClient-$(VERSION)-x86_64.AppImage $(DESTDIR)/UDSClient + tar cjvf ../udsclient3-$(VERSION)-thinpro.tar.bz2 -C $(DESTDIR) . + rm -rf $(DESTDIR) + diff --git a/client-py3/full/linux/build-packages.sh b/client-py3/full/linux/build-packages.sh index 00f214da..e0ef588e 100755 --- a/client-py3/full/linux/build-packages.sh +++ b/client-py3/full/linux/build-packages.sh @@ -47,4 +47,7 @@ make DESTDIR=appimage DISTRO=i686 VERSION=${VERSION} build-appimage # we need first to create the Appimage for x86_64 make DESTDIR=igelimage DISTRO=x86_64 VERSION=${VERSION} build-igel +# Create the thinpro version +make DESTDIR=thinproimage DISTRO=x86_64 VERSION=${VERSION} build-thinpro + rpm --addsign ../*rpm diff --git a/client-py3/full/linux/thinpro/UDSClient.desktop b/client-py3/full/linux/thinpro/UDSClient.desktop new file mode 100644 index 00000000..7173bfe9 --- /dev/null +++ b/client-py3/full/linux/thinpro/UDSClient.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Name=UDSClient +Comment=UDS Helper +Keywords=uds;client;vdi; +Exec=/bin/udsclient %u +Icon=help-browser +StartupNotify=true +Terminal=false +Type=Application +Categories=Utility; +MimeType=x-scheme-handler/uds;x-scheme-handler/udss; diff --git a/client-py3/full/linux/thinpro/firefox7.1/45-uds b/client-py3/full/linux/thinpro/firefox7.1/45-uds new file mode 100644 index 00000000..55a16190 --- /dev/null +++ b/client-py3/full/linux/thinpro/firefox7.1/45-uds @@ -0,0 +1,2 @@ +# UDS handlers.json +restore "/lib/UDSClient/firefox/handlers.json" "$FIREFOX_PROFILE_HANDLERS" diff --git a/client-py3/full/linux/thinpro/firefox7.1/handlers.json b/client-py3/full/linux/thinpro/firefox7.1/handlers.json new file mode 100644 index 00000000..f3c90ee7 --- /dev/null +++ b/client-py3/full/linux/thinpro/firefox7.1/handlers.json @@ -0,0 +1,50 @@ +{ + "defaultHandlersVersion":{ + "en-US":4 + }, + "mimeTypes":{ + "application/pdf":{ + "action":3, + "extensions":["pdf"] + }, + "application/x-ica":{ + "action":2, + "handlers":[{ + "name":"wfica", + "path":"/usr/bin/hptc-firefox-run-wfica.sh" + }], + "extensions":["ica"] + }, + "application/x-rdp":{ + "action":2, + "handlers":[{ + "name":"HP xfreerdp", + "path":"/usr/bin/hptc-run-rdp-file-freerdp.sh" + }], + "extensions":["rdp"] + } + }, + "schemes":{ + "vmware-view":{ + "action":2, + "handlers":[{ + "name":"VMWare Horizon View", + "path":"/usr/bin/vmware-view" + }] + }, + "udss":{ + "action":2, + "handlers":[{ + "name":"UDS Client", + "path":"/bin/udsclient" + }] + }, + "uds":{ + "action":2, + "handlers":[{ + "name":"UDS Client", + "path":"/bin/udsclient" + }] + } + } +} diff --git a/client-py3/full/linux/thinpro/firefox7.1/syspref.js b/client-py3/full/linux/thinpro/firefox7.1/syspref.js new file mode 100644 index 00000000..280c0d4e --- /dev/null +++ b/client-py3/full/linux/thinpro/firefox7.1/syspref.js @@ -0,0 +1,37 @@ +// This file can be used to configure global preferences for Firefox +// Example: Homepage +//pref("browser.startup.homepage", "http://www.weebls-stuff.com/wab/"); +pref("plugin.default.state", 2); +pref("xpinstall.signatures.required", false, locked); +pref("extensions.autoDisableScopes", 0, locked); +pref("extensions.pocket.enabled", false, locked); +pref("extensions.screenshots.disabled", true, locked); +pref("datareporting.policy.dataSubmissionEnabled", false, locked); +pref("datareporting.policy.dataSubmissionEnabled.v2", false, locked); + +pref("app.update.auto", false, locked); +pref("app.update.enabled", false, locked); +pref("browser.download.manager.closeWhenDone", true, locked); +pref("browser.helperApps.neverAsk.openFile", "application/x-rdp, application/x-java-jnlp-file", locked); +pref("browser.EULA.3.accepted", true, locked); +pref("browser.rights.3.shown", true, locked); +pref("browser.safebrowsing.enabled", false, locked); +pref("browser.search.update", false, locked); +pref("browser.sessionstore.enabled", false, locked); +pref("browser.sessionhistory.cache_subframes", false, locked); +pref("datareporting.healthreport.service.enabled", false, locked); +pref("datareporting.healthreport.uploadEnabled", false, locked); +pref("devtools.toolbox.host", "none", locked); +pref("extensions.autoDisableScopes", 14, locked); +pref("extensions.blocklist.enabled", false, locked); +pref("extensions.update.enabled", false, locked); +pref("intl.charsetmenu.browser.cache", "UTF-8", locked); + +pref("network.protocol-handler.external.mailto", false, locked); +pref("network.protocol-handler.external.news", false, locked); +pref("network.protocol-handler.external.snews", false, locked); +pref("network.protocol-handler.external.nntp", false, locked); +pref("network.protocol-handler.external-default", false, locked); +pref("network.protocol-handler.external.vmware-view", true, locked); +pref("network.protocol-handler.external.uds", true, locked); +pref("network.protocol-handler.external.udss", true, locked); diff --git a/client-py3/full/linux/thinpro/install-uds-client.sh b/client-py3/full/linux/thinpro/install-uds-client.sh new file mode 100755 index 00000000..896c5e57 --- /dev/null +++ b/client-py3/full/linux/thinpro/install-uds-client.sh @@ -0,0 +1,31 @@ +#!/bin/sh + +# unlocks so we can write on TC +fsunlock +# Common part +cp UDSClient /bin/udsclient +chmod 755 /bin/udsclient +cp UDSClient.desktop /usr/share/applications/UDSClient.desktop +# RDP Script for UDSClient. Launchs udsclient using the "Template_UDS" profile +cp udsrdp /usr/bin + +INSTALLED=0 +# Installation for 7.1.x version +grep -q "7.1" /etc/issue +if [ $? -eq 0 ]; then + # Allow UDS apps without asking + cp firefox7.1/syspref.js /etc/firefox + # Copy handlers for firefox + mkdir -p /lib/UDSClient/firefox/ > /dev/null 2>&1 + cp firefox7.1/handlers.json /lib/UDSClient/firefox/ + cp firefox7.1/45-uds /etc/hptc-firefox-mgr/prestart + INSTALLED=1 +fi + +# If not installed, show a message +if [ $INSTALLED -eq 0 ]; then + echo "UDSClient is not installable for this version of ThinPro: " + cat /etc/issue +fi + +fslock diff --git a/client-py3/full/linux/thinpro/udsrdp b/client-py3/full/linux/thinpro/udsrdp new file mode 100755 index 00000000..be2375e5 --- /dev/null +++ b/client-py3/full/linux/thinpro/udsrdp @@ -0,0 +1,390 @@ +#!/bin/bash + +function clearParams { + mclient set $REGKEY/address "" + mclient set $REGKEY/username "" + mclient set $REGKEY/password "" + mclient set $REGKEY/domain "" + + mclient set $REGKEY/authorizations/user/execution 0 + + mclient commit +} + +function getRegKey { + # Get Template_UDS + for key in `mclient get root/ConnectionType/freerdp/connections | sed "s/dir //g"`; do + val=`mclient get $key/label | sed "s/value //g"` + if [ "$val" == "Template_UDS" ]; then + REGKEY=$key + fi + done +} + +function createUDSConnectionTemplate { + TMPFILE=$(mktemp /tmp/udsexport.XXXXXX) + cat > $TMPFILE << EOF + + + UDS Template Profile + root/ConnectionType/freerdp/connections/{ff064bd9-047a-45ec-b70f-04ab218186ff} + + t420 + T7X62022 + 6.2.0 + standard + + + + + + + 0 + bool + + + 0 + bool + + + 0 + number + + + + + 3 + number + + + 2 + number + + + 3 + number + + + 3 + number + + + + + + 0 + string + + + 0 + string + + + + + + string + + + + string + + + NLCR.1 + rc4 + + + + string + + + Template_UDS + string + + + password + string + + + 0 + bool + + + 443 + number + + + 1 + bool + + + password + string + + + Remote Computer + string + + + Remote Application + string + + + 0 + bool + + + full + string + + + 70 + number + + + 1024 + number + + + 768 + number + + + 1 + bool + + + 1 + bool + + + 1 + bool + + + 1 + bool + + + 0 + bool + + + 1 + bool + + + 1 + bool + + + 1 + bool + + + 0 + number + + + auto + string + + + 1 + number + + + 1 + number + + + 1 + number + + + 1 + number + + + 1 + number + + + 1 + number + + + 2 + number + + + 0 + number + + + 1 + number + + + 1 + number + + + 0 + number + + + 0 + number + + + 0 + number + + + 1 + bool + + + 6000 + number + + + 0 + bool + + + 30000 + number + + + 0 + number + + + 0 + bool + + + 0 + bool + + + 0 + bool + + + 0 + bool + + + 0 + bool + + + 0 + bool + + + 1 + bool + + + 0 + number + + + 1 + bool + + + 0 + bool + + + 0 + bool + + + + + +EOF + mclient import $TMPFILE + rm $TMPFILE +} + +ADDRESS= +USERNAME= +PASSWORD= +DOMAIN= +REGKEY= +CLEAR=0 + +# Try to locate registry key for UDS Template +getRegKey + +if [ "$REGKEY" == "" ]; then + # Not found, create on based on our template + createUDSConnectionTemplate + getRegKey +fi + +for param in $@; do + if [ "/u:" == "${param:0:3}" ]; then + USERNAME=${param:3} + CLEAR=1 + fi + + if [ "/p:" == "${param:0:3}" ]; then + PASSWORD=${param:3} + CLEAR=1 + fi + + if [ "/d:" == "${param:0:3}" ]; then + DOMAIN=${param:3} + CLEAR=1 + fi + + if [ "/v:" == "${param:0:3}" ]; then + ADDRESS=${param:3} + CLEAR=1 + fi +done + +if [ "$CLEAR" -eq 1 ]; then + clearParams +fi + +ID=`basename $REGKEY` +RESPAWN=0 + +if [ "" != "$ADDRESS" ]; then + mclient set $REGKEY/address "${ADDRESS}" + RESPAWN=1 +fi + +if [ "" != "$USERNAME" ]; then + mclient set $REGKEY/username "${USERNAME}" + RESPAWN=1 +fi + +if [ "" != "$PASSWORD" ]; then + mclient set $REGKEY/password "${PASSWORD}" + RESPAWN=1 +fi + +if [ "" != "$DOMAIN" ]; then + mclient set $REGKEY/domain "${DOMAIN}" + RESPAWN=1 +fi + +if [ "$RESPAWN" -eq 1 ]; then + mclient set $REGKEY/authorizations/user/execution 1 + mclient commit + exec $0 # Restart without command line +fi + +process-connection $ID + +clearParams