x2gothinclient-1.5.0.1/cdmanager/init/x2gothinclient-cdmanager.init0000644000000000000000000000520313570107075022141 0ustar #!/bin/sh # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ### BEGIN INIT INFO # Provides: x2gothinclient-cdmanager # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start and stop the x2go CD/DVD manager daemon ### END INIT INFO set -e # use system's locale settings for the X2Go Client in TCE mode if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi . /lib/lsb/init-functions PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin export HOSTNAME DAEMON=/usr/sbin/x2gocdmanager NAME=x2gothinclient-cdmanager DESC=x2gothinclient-cdmanager test -x $DAEMON || exit 0 case "$1" in start) # only start the X2Go CD Manager if x2gothinclientd is configured as the default display manager if [ -e /etc/X11/default-display-manager ] && [ "$(cat /etc/X11/default-display-manager)" = "/usr/sbin/x2gothinclientd" ]; then log_daemon_msg "Starting $DESC" "x2gocdmanager" start-stop-daemon --start --quiet --pidfile /run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS log_end_msg $? fi ;; stop) log_daemon_msg "Stopping $DESC" "x2gocdmanager" start-stop-daemon --oknodo --stop --quiet --pidfile /run/$NAME.pid || true log_end_msg $? ;; status) log_daemon_msg "Status of $DESC" "x2gocdmanager" start-stop-daemon --oknodo --status --quiet --pidfile /run/$NAME.pid || true log_end_msg $? ;; force-reload) start-stop-daemon --stop --test --quiet --pidfile /run/$NAME.pid && $0 restart || exit 0 ;; restart) log_daemon_msg "Restarting $DESC" "x2gocdmanager" $0 stop sleep 1 $0 start log_end_msg $? ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 x2gothinclient-1.5.0.1/cdmanager/init/x2gothinclient-cdmanager.service0000644000000000000000000000052113570107075022634 0ustar [Unit] Description=X2Go TCE CD/DVD Manager Daemon Documentation=man:x2gocdmanager(8) [Service] Type=forking ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/x2gothinclientd" ]' ExecStart=/usr/sbin/x2gocdmanager PIDFile=/run/x2gothinclient-cdmanager.pid [Install] WantedBy=multi-user.target x2gothinclient-1.5.0.1/cdmanager/man/x2gocdmanager.80000644000000000000000000000120113570107075017010 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gocdmanager 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gocdmanager \- CD/DVD Management Daemon running on X2Go Thin Clients. .SH SYNOPSIS 'nh .fi .ad l \fBx2gocdmanager\fR .SH DESCRIPTION \fBx2gocdmanager\fR is a CD/DVD management daemon that runs on X2Go thin clients. .PP .SH OPTIONS \fBx2gocdmanager\fR has no known options. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/cdmanager/man/x2goejectcd.10000644000000000000000000000117613570107075016474 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2goejectcd 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2goejectcd \- CD/DVD bay eject tool for X2Go Thin Clients. .SH SYNOPSIS 'nh .fi .ad l \fBx2goejectcd\fR .SH DESCRIPTION \fBx2goejectcd\fR is used to eject the CD/DVD bay of optical discs built into X2Go thin clients. .PP .SH OPTIONS \fBx2goejectcd\fR has no known options. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/cdmanager/powerej/eject-button.png0000644000000000000000000000040413570107075020213 0ustar PNG  IHDR x0}usBIT|d pHYs B(xtEXtSoftwarewww.inkscape.org<IDAT8͒A 0 gK~ߓ?%{RSb4!]lsf=aۇ QH Xw=+0}md  ZKGڢL qDyM9_=$uۂ &8}/#o?)IENDB`x2gothinclient-1.5.0.1/cdmanager/powerej/eject.cpp0000644000000000000000000000427413570107075016711 0ustar /*************************************************************************** * Copyright (C) 2005-2019 by Oleksandr Shneyder * * o.shneyder@phoca-gmbh.de * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU General Public License * * along with this program; if not, write to the * * Free Software Foundation, Inc., * * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. * ***************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #if QT_VERSION < 0x050000 #include #else #include #endif using namespace std; int main(int argc, char *argv[]) { QApplication app(argc,argv); #if QT_VERSION < 0x050000 app.setStyle(new QPlastiqueStyle()); #else app.setStyle(QStyleFactory::create("fusion")); #endif // QFrame*fr =new QFrame(0,Qt::WindowStaysOnTopHint|Qt::X11BypassWindowManagerHint); MPushButton*fr =new MPushButton(); fr->setFixedSize(24,12); fr->move(app.desktop()->screenGeometry().width()-24,app.desktop()->screenGeometry().height()-12); fr->show(); return app.exec(); } x2gothinclient-1.5.0.1/cdmanager/powerej/mb.cpp0000644000000000000000000000146213570107075016211 0ustar #include "mb.h" #include #include #include #include MPushButton::MPushButton():QPushButton("",0) { QPixmap p(":/eject-button.png"); setIcon(p); setFlat(true); connect(this,SIGNAL(clicked()),this,SLOT(slot_cl())); } void MPushButton::slot_cl() { FILE* ptr=fopen("/proc/mounts","rt"); if(!ptr) { qDebug()<<"couldn't open"; return; } char ln[255]; while(!feof(ptr)) { fgets(ln,254,ptr); QString line = ln; if(line.indexOf("CDROM")!=-1) { QStringList arg; arg< class MPushButton: public QPushButton { Q_OBJECT public: MPushButton(); private slots: void slot_cl(); }; #endif x2gothinclient-1.5.0.1/cdmanager/powerej/powerej.pro0000644000000000000000000000175013570107075017304 0ustar ###################################################################### # Automatically generated by qmake (3.1) Fri Nov 23 03:41:04 2018 ###################################################################### TEMPLATE = app TARGET = x2goejectcd INCLUDEPATH += . # The following define makes your compiler warn you if you use any # feature of Qt which has been marked as deprecated (the exact warnings # depend on your compiler). Please consult the documentation of the # deprecated API in order to know how to port your code away from it. DEFINES += QT_DEPRECATED_WARNINGS # You can also make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. # You can also select to disable deprecated APIs only up to a certain version of Qt. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 # Used modules. QT += widgets # Input HEADERS += mb.h SOURCES += eject.cpp mb.cpp RESOURCES += resources.rcc x2gothinclient-1.5.0.1/cdmanager/powerej/resources.rcc0000644000000000000000000000012113570107075017601 0ustar eject-button.png x2gothinclient-1.5.0.1/cdmanager/x2gocdmanager0000755000000000000000000000742513570107075016110 0ustar #!/usr/bin/perl # Copyright (C) 2007-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. use Fcntl; use strict; use File::Path::Expand; sub catch_term { unlink("/var/run/x2gocdmanager.pid"); exit; } # fork to background, check if forked state is ok... my $pid = fork(); if (not defined $pid) { print "resources not avilable.\n"; } elsif ($pid != 0) { open (F,">/var/run/x2gocdmanager.pid"); print F "$pid\n"; close(F); } elsif ($pid == 0 ) { # silence this daemon script completely... close(STDIN); close(STDOUT); close(STDERR); $SIG{TERM}=\&catch_term; my @mounted; my @idedrives; my $cpath=$ENV{PWD}; chdir ("/proc/ide"); opendir(DIR,"/proc/ide"); my @dirs=grep(/^hd/,grep (-d,readdir(DIR))); closedir(DIR); # retrieve a list of IDE/ATAPI CD/DVD drives (by the nature of IDE this list will be static) for (my $i=0;$i<@dirs;++$i) { chdir ("/proc/ide"); chdir(@dirs[$i]); open (F,"; close(F); if ($ln =~ m/ide-cdrom/) { push(@idedrives,"/dev/@dirs[$i]"); } } chdir($cpath); while(sleep 4) { # scan for SCSI-like CD/DVD drives, do this in intervals of # four seconds (to notice plugged-in USB-devices) my @scsidrives; my $otp=`lsscsi`; my @lines=split("\n","$otp"); for(my $i=0;$i<@lines;++$i) { if(@lines[$i] =~ m/cd\/dvd/) { my @words=split(" ",@lines[$i]); push(@scsidrives,@words[$#words]); } } # this now is our collection of possible CD/DVD drives my @drives=(@idedrives,@scsidrives); my @cdarray; # deal with each one individually, detect if it really is a CDROM for my $i(0..$#drives) { sysopen(CDROM,@drives[$i],O_RDONLY|O_NONBLOCK); my $rez=ioctl(CDROM,21287,0); if(!$rez) { print "can't ioctl\n"; } elsif($rez==101) { push(@cdarray,@drives[$i]); } close (CDROM); } # force device unlocking every check interval system("echo 0 > /proc/sys/dev/cdrom/lock"); # enumerate all mounted CD/DVD devices for (my $i=$#mounted; $i>=0 ;$i--) { # unmount a CD/DVD device if not available anymore (USB unplugging) my @arr=grep { "$_" eq "@mounted[$i]"} @cdarray; if (@arr == 0) { my @name=split("/","@mounted[$i]"); my $name="CDROM-@name[2]"; open (D,">",expand_filename("~x2gothinclient/export/$name.unexport")); print D "unexport=/media/$name\n"; close(D); system("umount -ff /media/$name"); system("killall x2goejectcd"); splice(@mounted,$i,1); } } # enumerate all available CD/DVD devices for my $i (0..$#cdarray) { # mount the CD/DVD device if not yet mounted... my @arr=grep { "$_" eq "@cdarray[$i]" } @mounted; if (@arr == 0) { my @name=split("/","@cdarray[$i]"); my $name="CDROM-@name[2]"; mkdir("/media"); mkdir("/media/$name"); if(system("mount @cdarray[$i] /media/$name -o uid=x2gothinclient")==0) { open (D,">",expand_filename("~x2gothinclient/export/$name")); print D "export=/media/$name\n"; close(D); push (@mounted,@cdarray[$i]); system("killall x2goejectcd"); system("DISPLAY=:0 x2goejectcd&"); } } } } } x2gothinclient-1.5.0.1/ChangeLog0000644000000000000000000007302413570107075013270 0ustar x2gothinclient (1.5.0.1-0x2go2) unstable; urgency=medium [ Mihai Moldovan ] * New upstream release (1.5.0.1): - management/etc/x2gothinclient_settings: remove heuler from apt line. - management/etc/x2gothinclient_settings: add "extras" component. - misc: update copyright notices. - misc manpages: pre-release version and date updates. * usbmount/x2gousbmount: - Whitespace- and comment-only changes. - Rework x2gothinclientd check. - Remove uni_xlate from ntfs and vfat mounts, add utf8 option to vfat mounts and document this choice. * debian/control: + Add hicolor-icon-theme as an alternative to nuvola-icon-theme. + Replace lightdm dependency with nodm for now. This breaks MMD! Nodm is a bad choice in general, but lightdm has "dependency problems" (requires a package that provides the logind virtual package) and is apparently "too big". However, nodm is stale software and upstream considered replacing it with a lightdm wrapper, so let's see where that gets us... [ Stefan Baur ] * New upstream release (1.5.0.1): * usbmount/x2gousbmount: - Pull (most) changes from doc:howto:tce wiki page. [ Mike Gabriel ] * New upstream release (1.5.0.1): - 19_x2gothinclient-minidesktop.gschema.override: Explicitly use MATE- specific theming of the desktop UI. (Fixes: #1364). - Install minidesktop's background SVG to DATADIR and symlink to it in ETCDIR. - Provide empty/dummy FreeRDPv2 known_hosts2 file if not already there. - management/share/etc/x2gothinclient_init.d/010_x2gothinclient-fresh-home: Make X2Go Client desktop link executable, so that it becomes a real desktop link. - minidesktop/init/: Drop init script for mini desktop variant. Always been a no-op script. - Provide systemd service files for x2gothinclient-cdmanager and x2gothinclient-displaymanager. - init scripts: Use /run rather than /var/run for placing PID files. - minidesktop: Rename LTSP display manager override script to 88-... (from 60-...). As suggested by Alkis Georgopoulos. * debian/rules: + Convert to pure debhelper rules file. + Remove Qt5 build cruft from cdmanager/powerej/. * debian/control: + Prefer lightdm over nodm for the minidesktop variant. With lightdm the minidesktop is set-up out of the box. + Add Rules-Requires-Root: field and set it to "no". + Bump Standards-Version: to 4.4.1. No changes needed. + Don't use first person plural pronoun in LONG_DESCRIPTION. + Add D (any bin:pkg reported by lintian): lsb-base. * debian/{control,x2gothinclient.}: + Drop all transitional packages. * debian/x2gothinclient-minidesktop.init: + Drop init script, never had functionality. * debian/x2gothinclient-*.serivce: + Symlink to upstream files. -- X2Go Release Manager Fri, 29 Nov 2019 04:16:47 +0100 x2gothinclient (1.5.0.0-0x2go1) unstable; urgency=low [ Mike Gabriel ] * New upstream release (1.5.0.0): - Stop advertising GNOME in default session profile. Switching to MATE. - Use type=auto for automatic keyboard detection as default in example session profiles. - Avoid error message in x2gothinclient_shell if the chroot does not have a file-or-symlink /etc/resolv.conf. - Use resolv.conf file from host system when running x2gothinclient_upgrade. - Add COPYING file. - Run x2gothinclient_shell and x2gothinclient_upgrade with LANG=C. - Don't run x2gothinclient_init inside TCE chroot operations (x2gothinclient_shell or x2gothinclient_upgrade). - Avoid x2gothinclient_init failures, use if..then..fi instead of the test command. - Init scripts: Provide status option. - Use lazy unmounts for unmounting bind-mounted /proc, /sys, /dev/pts after exiting the TCE chroot (x2gothinclient_create, x2gothinclient_shell, x2gothinclient_upgrade, x2gothinclient_cleanup). - Assure that a tmpfs under /root gets mounted and cleanly unmounted (x2gothinclient_shell, x2gothinclient_upgrade). - Use run-parts to initialize the TCE during runtime. (Fixes: #419). - New TCE component: x2gothinclient-minidesktop. Instead of using X2Go Client as login manager, we launch a minimal MATE desktop and connect to X2Go sessions from there. . Add WindowList applet to MATE panel. . On $HOME creation, copy x2gothinclient-minidesktop.desktop into ~/Desktop. . Provide init script for x2gothinclient-minidesktop to handle maintenance tasks if TCE is installed with in minidesktop flavour. . Tweak MATE minidesktop via GScheme overrides. . Launch MATE minidesktop via LightDM autologin feature. . Add XDG autostart .desktop file for the TCE's X2Go Client. . Add VERSION. file for x2gothinclient-minidesktop. . Make X2Go TCE layout / appearance overridable by installing debian-edu-artwork package. . Use default X2Go Client background for x2gothinclient-minidesktop. Provide configurable desktop background instead. Install desktop background as desktop-base alternative. . On minidesktop TCE creation based on wheezy, pull in packages from wheezy-backports (i.e. MATE desktop environment). . MATE Application menu: Move the default X2Go Client .desktop file out of the way (dpkg-divert) and provide the TCE's .desktop file instead. . Make sure that launching x2goclient via a terminal or the run command box in MATE results in the restricted TCE X2Go Client. . Make contrib and non-free software available on minidesktop TCE creation. . Disallow Caja to handle storage media (automounting, opening, etc.). . Enable usbmounts and smartcard rules for minidestop TCE flavour. . Enforce TCE session restart after logout. . Provide Web browser shortcut in the MATE panel. . Enable native-protocol-tcp module in pulseaudio on every X2Go Client launch. Allow access from local host only, require auth cookie. - Adapt management package to TCE flavouring. Add new configuration option in x2gothinclient_settings: TC_FLAVOUR (can be: minidesktop or displaymanager). - Use proper quotations in several X2Go TCE scripts. - Don't choke if /etc/resolv.conf in the TCE chroot is a symbolic link (in x2gothinclient_shell, x2gothinclient_upgrade). - README.i18n: Add file that explains the translation workflow for this package. Thanks to Mark Pedersen-Cook for drafting this file. - For X2Go TCE in display manager mode, set login backgrounds of all screens (if more than one is used) to a blue'ish background color. (Fixes: #718). - TCE in display manager mode: Don't align multiple heads next to one another if a (Wacom) touchscreen is detected in the list of heads. (Fixes: #719). - management/sbin/x2gothinclient_update: Create $TC_CHROOT/etc/x2go/x2gothinclient_init.d/ before copying files into it. - management/sbin/x2gothinclient_update: Consider known_hosts2 FreeRDP host key files, known_hosts was used for FreeRDP v1.x and are in fact deprecated nowadays. - management/sbin/x2gothinclient_create: Stop using deprecated --force-yes. - 010_x2gothinclient-fresh-home: Install FreeRDPv2's known_hosts2 file into ~x2gothinclient user's home dir when creating a fresh home. - x2gothinclient_sessions: Provide RDP-Direct session profile example that utilizes FreeRDPv2 rather than deprecated FreeRDPv1.x. (On Debian stretch, it is recommended to use FreeRDPv2 from Debian stretch-backports). - x2gothinclient-_start: Drop requirement of having symlink /etc/x2go/x2gothinclient_start. Now all code passages that use the _start wrapper, use the x2gothinclient-_start file directly. * debian/control: + Rename bin:package: x2gothinclient -> x2gothinclient-daemon. + Make sure x2gothinclient-minidesktop pulls in X11 and X2Go Client. + New bin:package: x2gothinclient-common. Commonly shared by x2gothinclient-minidesktop and x2gothinclient-displaymanager + Add D (displaymanager flavour, minidesktop flavour): pinentry-x2go. + Add D (x2gothinclient-minidesktop): lightdm. + Add R (x2gothinclient-minidesktop): flashplugin-nonfree. + Add R (x2gothinclient-chroot): ntp. + Move to Pre-D (x2gothinclient-minidesktop): x2goclient, lightdm. Make sure those packages are installed already avoiding dpkg-divert failures. + Allow co-installation of displaymanager and minidesktop bin:pkgs. They have no conflicting files and we should rather make the startup mode configurable through debconf. * debian/copyright: + Use copyright-format 1.0. [ Stefan Baur ] * New upstream release (1.5.0.0): - Allow Xinerama / XRandR setup via /proc/cmdline. (Fixes: #726). * usbmount/x2gousbmount: - Make user pseudo-selectible via a variable and fix usage across file. - Try to create file-sharing facilities harder. - Fix desktop/thinclient mode detection. Fixes: #1136. - Set default username to x2gothinclient for MATE minidesktop builds, even for X2GO TCE Live builds. - Add support for (V)FAT, NTFS, HFS, HPFS and EXT* (via fuse-ext2) file systems. [ Mark Pedersen-Cook ] * debian/po: + Add DebConf translation to Danish. [ Kaan Ozdincer ] * debian/po: + Add DebConf translation to Turkish. [ Mihai Moldovan ] * New upstream release (1.5.0.0): - Change string "X2go" to "X2Go" where appropriate. - displaymanager/init/x2gothinclient-displaymanager.init: fix unchanged "gdm" string in log message. Fixes: #997. - management/share/etc/x2gothinclient-minidesktop_start: correctly continue commented out command on the next line. Fixes: #1147. - displaymanager/sbin/x2gothinclientd: correctly break long strings over several lines and concatenate them. - management/share/etc/x2gothinclient_init.d/ 950_x2gothinclient-minidesktop: call Xsession in mate-minidesktop builds of X2Go TCE Live. - misc: update copyright notices, but for Mike Gabriel. - README.howto: fix typos. - misc: update http:// to https:// URLs where appropriate. - misc: drop whitespace from hashbangs. - debian/x2gothinclient-common.postrm: newline at EOF change. - misc: update Oleksandr's mail address. - misc manpages: whitespace only. - misc manpages: pre-release version and date updates. - cdmanager/powerej/mb.{cpp,h}: whitespace only. - cdmanager/powerej/powerej.pro: regenerate with Qt5's qmake and merge. - cdmanager/powerej/eject.cpp: use PlastiqueStyle with Qt4 and Fusion with Qt5. - cdmanager/powerej/eject.cpp: include QStyleFactory. - misc manpages: pre-release date update. * usbmount/x2gousbmount: - Fix typo int -> print. Fixes: #840. - Update copyright notice. - Fix left-over check_x2gothinclientd definition (should have been check_x2gothinclientmode). * debian/control: - Whitespace only. - x2gothinclient-cdmanager: drop libqt4-gui Depends. Already handled by libqt4-dev Build-Depends and shlibs and misc Depends. - Maintainer change in package: X2Go Developers . - Uploaders: add myself. Also, force a rebuild due to the changed versioning. - Resurrect x2go{thinclient-management,usbmount,cdmanager,smartcardrules} as dummy packages in the spirit of x2gothinclient for a smooth upgrade path. - mate-media-pulse and mate-settings-daemon-pulse are gone in Stretch. Depend on them lightly. - Replace iceweasel dependency with firefox-esr. All suites provide the newer name. Avoids an ugly outdated menu entry. - Build-depend upon Qt5 instead of Qt4. - Bump DH compat level to 9. * management/share/etc/x2gothinclient-minidesktop_start: - Correctly quote pactl command line arguments, avoids the shell interpreting the embedded semicolon as a command separator. * debian/po: - Minor fixup on author name. - Regenerate templates and files. - Update template with metadata. - fr.po: update metadata. - Update bugs address in template. - Update translation metadata. - da.po: fixup. - de.po: fixup. * debian/copyright: - Remove obsolete and wrong obviouslynice.de address. * debian/rules: - Whitespace only. - Switch to building cdmanager/powerej via Qt5. - Modernize respective build flags. - Add all clause. - Make sure to select Qt5 variant, even though we probably won't use debhelper to build Qt projects. - Call qmake instead of qmake-qt5. * debian/compat: - Bump DH compat level to 9. [ Oleksandr Shneyder ] * x2gothinclientd: load config file when starting PulseAudio. Fixes: 1092. * upgrade to debian stretch. * set oldsatble to jessie in x2gothinclient_settings. * install linux-image-4.9.0-4-686 instead of dummy-package * add pxelinux in recommends for x2gothinclient-management * fix links in x2gothinclient_preptftpboot * fix link in x2gothinclient_create * install chroot for amd64 * fix x2gothinclient_update to create files needed by x2gothinclientd * let user choose architecture by setting TC_ARCH variable. Default amd64. * improve support for gnupg and dbus. * modify x2gothinclientd to start scripts needed by gpg agent. * install meta-package for linux-image to get most recent version. Thanks to Mike for the hint. * start openbox to make xinerama work. Thanks to Walid Moghrabi for the hint. * fix Xorg checking in x2gothinclientd. * remove nomedeset option from x2go-tce.cfg. This option prevent loading of drm and disabling advanced graphic functions. * add openbox dependency. * do not start openbox any more. Xinerama issue should be fixed in x2goagent. [ Martti Pitkänen ] * debian/po: + Add DebConf translation to Finnish. [ Thierry Kauffmann ] * New upstream release (1.5.0.0): - debian/po: add French translation file. -- X2Go Release Manager Sun, 02 Dec 2018 04:10:28 +0100 x2gothinclient (1.1.0.2-0x2go1) unstable; urgency=low * New upstream version (1.1.0.2): - No upstream changes. * debian/control: + Add libfile-path-expand-perl to Depends: field of x2gothinclient bin:package. (Fixes: #366). * debian/source/format: + Switch to format 1.0. -- Mike Gabriel Thu, 27 Feb 2014 12:02:21 +0100 x2gothinclient (1.1.0.1-0~x2go1) unstable; urgency=low [ Mike Gabriel ] * New upstream version (1.1.0.1): - Switch to VT-7 on TC shutdown. - Syntax fix in x2gousbmount script. - Make ~x2gothinclient rw-able on TCE machines. Thanks to Peter Schneider for pointing at this. - Remove chroot bootstrap cruft when finished with creating the TCE chroot. - Deactivate serial line terminals on X2Go thinclients. - Install TCE dependencies via meta-package x2gothinclient-chroot. - Move init scripts from debian/ folder into upstream folders. - Provide x2gothinclient-chroot.init script that tweaks the chroot during thin client startup. - Patch /etc/init.d/checkroot-bootclean.sh during TCE creation to avoid failures when clean tmp files on the read-only NFS root-fs. - Work around Debian bug #729373 during TCE creation. Replace alsa-utils init script and ALSA's utils.sh (for Debian wheezy+jessie chroots). - Refrain from using "~" when launching X2Go Client as it cannot handle it, yet. Use "~" instead (handable by X2Go Client >= 4.0.1.2). - Tweak the /etc/os-release more comprehensively. - Update initramfs at the very end of the TCE creation. - Do not over-mount /run as tmpfs. This is already done by the Debian boot process. - Monitor mounted USB devices via ~x2gothinclient/mounts (and not via deprecated location /var/run). - Add TC_NONINTERACTIVE (commented out) to x2gothinclient_settings config file. - Add syslog support to x2gousbmount. - Install radeon and i915 kms/drm module into initrd image for Debian (>= 7). * debian/control: + New bin:package x2gothinclient-chroot. + Make sure x2gothinclient-chroot pulls in editing tools like mc, vim, less via Recommends: field. + Depend on x2goclient (>= 4.0.1.2-0~). + Suggest some helpful firmware packages (also from non-free) in bin:package x2gothinclient-chroot. [ Arnold Krille ] * New upstream version (1.1.0.1): - Extend x2gothinclient_shell to run anything given as arguments and fall back to $TC_SHELL when nothing is given. (Fixes: #301). - Allow non-interactive execution of x2gothinclient_create. (Fixes: #300). -- Mike Gabriel Fri, 22 Nov 2013 23:51:33 +0100 x2gothinclient (1.1.0.0-0~x2go1) unstable; urgency=low [ Mike Gabriel ] * New upstream version (1.1.0.0): - When X2Go TCE has plymouth installed, make sure pressing the halt button does not change to the wrong tty. - Truncate echo output lines to less than 80 chars. - Use sed to patch initramfs configuration (rather than a patch that fails on wheezy). The change is needed for squeeze only. - Fix x2go_tce_shell.sh script, escape braces. - Change method of mounting /proc, /sys and /dev inside of chroots. - Step towards wheezy, enable plymouth boot splash. - Symlink /etc/mtab to /proc/mounts before installing any kernel during the chroot creation process. - Handle /etc/fstab in TCE chroot differently for squeeze and wheezy (/dev/pts does not need an entry in fstab on wheezy systems, /var/run got relocated to /run). - /etc/network/interfaces in wheezy already contains a loopback device entry. - Mount proc and sysfs from outside chroot, cleanly unmount both in case there are more than one mountpoints for sysfs or proc mounted. - Do not fail if proc or sysfs are already mounted within chroot. - Allow thin client management (x2gothinclient_shell, x2gothinclient_upgrade) while thin clients are in use. - Disable kms for radeon and i915 graphics adapters. - x2gothinclient_shell now does not affect boot behavious of the TCE machines anymore, thus, removing the notification output when launching the X2Go TCE maintenance shell. - Drop i686 kernel support, use i486 kernel by default. In Debian wheezy we only find a 686-pae kernel which fails on some (virtual) hardware (e.g. virtualbox). - Make sure that kernel + initrd symlinks are relative symlinks. - Keep mounts for /proc and /dev/pts with option noauto for mounting inside of chroot. They are not needed during TCE boot. - Make the SSH daemon listen on IPv4 localhost address only. - Provide /dev/pts inside chroot. - Move configuration template from /usr/share/tce to /usr/share/tce/etc. - Add direct FreeRDP support for defaults TCE installation. - Add empty known_host file for FreeRDP. - Start with US keyboard as default keyboard layout. - Only mount /proc, /sys, /dev/pts inside chroot if not already mounted. - Xorg appears as /usr/bin/X in ps ax output. Make sure it gets detected. - Provide a README.hostname file in doc folder of x2gothinclientmanagement. - For TCE stations with multiple heads, align heads next to each other in order of appearance in xrandr. - Fix multi-head detection failures where xrandr writes output to stderr (closes upstream issue #48). - Rename x2goclient user to ,,x2gothinclient'' user (system user account). Make sure that the system user account gets created during x2gothinclient_create and during installation of the x2gothinclient package (closes upstream issue #47). - x2gothinclient_create: replace /home by /var/lib/x2gothinclient in /etc/fstab template. - x2gothinclient_update: make sure config target folders exist. - x2gothinclient_create: syntax fix, spotted by Thomas Güttler (Fixes: #95). - Export $LANG and $LANGUAGE to TCE daemon. - Use qx instead of open3 to launch x2goclient. (Fixes: #66). - Only make x2gousbmount and x2gognupgccid scripts functional if x2gothinclientd is running. - When finishing x2gothinclientd, wait when killing processes till all processes have vanished. Only kill processes owned by user x2gothinclient. - When finishing x2gothinclientd, make sure no dbus-* processes remain. - Unmount /proc, /sys and /dev/pts before doing x2gothinclient_cleanup. - Add README.qemu that explains how to test the X2Go TCE with qemu. (Fixes: #115). - Fix code that turns absolute symlinks into relative symlink for /vmlinuz and /initrd.img. - Fix shutdown button failures. - TCE management: Do an apt-get clean after TCE creation/upgrade. - TCE creation: fix installation path of FreeRDP's known_hosts file. - TCE creation: install the TCE from the nightly builds while this project is not yet released. (Fixes: #251). - TCE creation: default to wheezy for creating new TCE environments. * /debian/control: + Maintainer change in package: X2Go Developers . + Priority: optional. + Add dependency (x2gothinclient bin:package): x11-xserver-utils (for xrandr support). + Add dependency (x2gousbmount, x2gocdmanager): libfile-path-expand-perl. + Bump Standards to 3.9.3 (no changes needed). + Remove TCE tools (vim, mc, ...) from Recommends: field, install those via x2gothinclient_create. Add pulseaudio, dbus-x11, policykit-1 to Depends: field. * /debian/rules: + Fix lintian issue: debian-rules-missing-recommended-target build-arch + Fix lintian issue: debian-rules-missing-recommended-target build-indep * /debian/x2gothinclient.examples: + Fix src location of example config files. * /debian/x2gothinclient.install: + Install TCE config files into /etc/x2go by default. * /debian/x2gothinclientmanagement.manpages: + Make sure all man pages for bin:package x2gothinclientmanagement get installed into package. * /debian/x2gothinclient.init: + Update pointer to X2Go TCE documentation on http://wiki.x2go.org. * /debian/x2gothinclient.postrm: + On action=purge, wait for 20s until x2gothinclientd has stopped. * /debian/po/*: + Use po-debconf for translating debconf templates. Add German debconf translation. * Launch X2Go TCE via /etc/X11/default-display-manager. Add debconf template to handle default display manager selection. Inspired by Debian's gdm package. * Only start X2Go CD Manager if x2gothinclientd is the default display manager. [ Oleksandr Shneyder ] * New upstream version (1.1.0.0): - Use expand_file from File::Path::Expand to detect full path of ~x2gothinclient/.halt. -- Mike Gabriel Fri, 19 Jul 2013 23:31:10 +0200 x2gothinclient (1.0.1.8-0~x2go1) unstable; urgency=low * New upstream version (1.0.1.8): - Remove .halt file before shutting down. - Make x2gothinclient init script more robust. - Stop x2gothinclient init script if either x2gothinclient_init or x2gothinclient_start is missing/non-executable. - Fix spelling of X2Go. -- Mike Gabriel Fri, 10 Aug 2012 10:44:07 +0200 x2gothinclient (1.0.1.7-0~x2go1) unstable; urgency=low * New upstream version (1.0.1.7): - Fix typo in copyright file. - Drop outdated README.howto and point to Wiki page with TCE documentation. - Replace red background with default blue background because of rendering problems and recognizablitity -- Mike Gabriel Wed, 13 Jun 2012 22:24:15 +0200 x2gothinclient (1.0.1.6-0~x2go2) unstable; urgency=low * Fix dependency on x2goclient. -- Mike Gabriel Thu, 08 Mar 2012 13:10:14 +0100 x2gothinclient (1.0.1.6-0~x2go1) unstable; urgency=low [ Mike Gabriel ] * New upstream version (1.0.1.6): - Add background image support. - Add new boot splash background image. - New look'n'feel for boot splash menu. * Let x2gothinclient break and replace x2gothinshutdown. * Depend on x2goclient (>= 3.99.1.1). [ Oleksandr Shneyder ] * New upstream version (1.0.1.6): - x2gothinshutdown is removed. - Options --thinclient and --haltbt added to x2gothinclient_sessions. - x2gothinclientd is modified to use x2goclient shutdown button instead of x2gothinshutdown. - gnupg-agent, pinentry-x2go and gpgsm added to "Recommends" section for package x2gothinclient. - Changes in x2gothinclientd, pulseaudio parameter "--exit-idle-time=65535", breaking pulseaudio start command into in to several lines. -- Mike Gabriel Wed, 07 Mar 2012 20:47:20 +0100 x2gothinclient (1.0.1.5-0~x2go1) unstable; urgency=low * New upstream version (1.0.1.5): - Fixes file permission problem introduced in 1.0.1.4. -- Mike Gabriel Wed, 01 Feb 2012 13:47:42 +0100 x2gothinclient (1.0.1.4-0~x2go1) unstable; urgency=low * New upstream version (1.0.1.4): - Fix default value for shell in x2gothinclient_shell script. - Install alsa-base in X2Go TCE chroot and tmpfs mount /var/lib/alsa. - Pre-select example session after X2Go thin client has booted. - Rename every X2go string (in docs, screen output, etc.) to X2Go. -- Mike Gabriel Wed, 18 Jan 2012 15:15:09 +0100 x2gothinclient (1.0.1.3-0~x2go1) unstable; urgency=low [ Mike Gabriel ] * New upstream version (1.0.1.3): - Split up x2gocdmanager package into x2gocdmanager and x2gothinshutdown package - Fix USB mounting, CD mounting, - Improve code layout (tab stops, inline comments) - Add HTTP_PROXY and FTP_PROXY support to x2gothinclientmanagement (APT package download) - Add example files/symlinks for tftpboot environment. - Add syslinux boot splash with X2Go flavour. - Install 486 and 686 kernels in TCE chroot. - Move PXE tftpboot examples to x2gothinclient/share/tftpboot. - Improval of syslinux boot screen. - Add x2gothinclient_preptftpboot script. - Add man page for x2gothinclient_preptftpboot. - Do not run management script if there is a problem with the X2Go TCE chroot. - Sanity checks: X2Go TCE management script have to run as root. - Add HTTPS_PROXY support. - Add x2gothinclient_cleanup script. - Add man page for x2gothinclient_cleanup. - Run x2gothinclient_init from x2gothinclientd init script. - Fix udev rules path in x2gosmartcardrules, improval of udev script, plus man page. - Fix udev rules path in x2gousbmount. - Add comment that names possible boot profiles to tftp config template. - Add kernel module blacklisting for x2gothinclient_create. - Tweak mtab diversion on X2Go Thin Client to avoid error messages. - Add some more PXE/TFTP info at end of x2gothinclient_pretftpboot script. - Disable service restarts in chroot. - Add a ,,hit before TCE creation. - Add tmpfs mount for /var/lib/dbus. - Reduce x2goclient CPU load from ~100% to ~0-1%. - Boot TCE kernel with nomodeset boot option to avoid gCard incompatibilities (Fb vs. Xorg). - Move kernel/initrd symlinks after install rather than copying. - Add detection of kernel upgrades to x2gothinclient_upgrade script. - Adapt chroot file created by x2gothinclient_upgrade, escaping $-signs. - Use --no-session-edit option when starting x2goclient on TCE. - Delay thinshutdown button appearance for 4+6 seconds on X server (re)start (that is: 10s on tce start or X server restart and 4s after session logout). - Add post-run instructions of x2gothinclient_preptftpboot to its man page. * Add acpid to x2gothinclient's Recommends: section. * Remove ssh (=openssh-server) dependency for x2gothinclient package. * Add memtest86+ to x2gothinclient's Recommends: section. * Add midnight commander to Recommends: of x2gothinclient. * x2gothinshutdown: conflicts x2gocdmanager<=1.0.1.2. [ Coco ] * Improvements for upstream version (1.0.1.3): - Replace tmpfs mount on /etc/network/run with symlink /etc/network/run -> /dev/shm. [ Oleksandr Shneyder ] * Improvements for upstream version (1.0.1.3): - x2gosmartcardrules: support for SCM SCR331-LC1 SmartCard Reader. -- Mike Gabriel Wed, 12 Oct 2011 12:16:59 +0200 x2gothinclient (1.0.1.2-0~x2go1) unstable; urgency=low * restructured x2gothinclientmanagement package * x2gothinclientmanagement depends on debootstrap * x2gothinclientmanagement recommends chroot server packages (NFSd, TFTPd, DHCPd) * moves x2gothinclient_settings to /etc/x2go * adds man pages * renames x2gothinclient_bash to x2gothinclient_shell * introduces TC_SHELL var (and others) in x2goclient_settings * uses pulseaudio instead of artsd * mount point for devices is /media (x2gocdmanager, x2gousbmount) * still non-functional: thinshutdown, CD manager, USB mounts -- Mike Gabriel Tue, 03 May 2011 12:56:45 +0200 x2gothinclient (1.0.1.2-0~x2go0) unstable; urgency=low * changed version numbering scheme * renamed package to x2gothinclient -- Mike Gabriel Thu, 21 Apr 2011 00:20:07 +0200 x2gothinclient (1.0.1-2) unstable; urgency=low [Oleksandr Shneyder] * changed: in /etc/init.d/ramdrive group users instead staff [Mike Gabriel] * the name of this package has changed with 1.0.1.2 so this log entry's package name had to be manipulated... -- Oleksandr Shneyder Mon, 08 Dec 2008 15:28:29 +0100 x2gothinclient-1.5.0.1/chroot/init/x2gothinclient-chroot.init0000644000000000000000000000215313570107075021074 0ustar #!/bin/sh ### BEGIN INIT INFO # Provides: x2gothinclient-chroot # Required-Start: $local_fs # Required-Stop: # Default-Start: S # Default-Stop: # X-Start-Before: nfs-common alsa-utils # Short-Description: # Description: Prepare X2Go TCE tmpfs directories for usage ### END INIT INFO set -e . /lib/lsb/init-functions # pre-init X2Go Thin Client through init script... if [ -d /usr/share/doc/x2gothinclient-displaymanager ]; then test -x /etc/x2go/x2gothinclient_init && . /etc/x2go/x2gothinclient_init fi case "$1" in start|"") # prep tmpfs subfolders for nfs-common mkdir -p /var/lib/nfs/rpc_pipefs mkdir -p /var/lib/nfs/sm mkdir -p /var/lib/nfs/sm.bak chown statd:nogroup /var/lib/nfs/rpc_pipefs chown statd:nogroup /var/lib/nfs/sm chown statd:nogroup /var/lib/nfs/sm.bak exit 0 ;; restart|reload|force-reload|status) echo "Error: argument '$1' not supported" >&2 exit 3 ;; stop) # No-op ;; *) echo "Usage: x2gothinclient-chroot start" >&2 exit 3 ;; esac x2gothinclient-1.5.0.1/chroot/patchsets/alsa-utils.wheezy/alsa-utils0000755000000000000000000001234313570107075022403 0ustar #!/bin/sh # # alsa-utils initscript # ### BEGIN INIT INFO # Provides: alsa-utils # Required-Start: $local_fs $remote_fs # Required-Stop: $remote_fs # Default-Start: S # Default-Stop: 0 1 6 # Short-Description: Restore and store ALSA driver settings # Description: This script stores and restores mixer levels on # shutdown and bootup.On sysv-rc systems: to # disable storing of mixer levels on shutdown, # remove /etc/rc[06].d/K50alsa-utils. To disable # restoring of mixer levels on bootup, rename the # "S50alsa-utils" symbolic link in /etc/rcS.d/ to # "K50alsa-utils". ### END INIT INFO # Don't use set -e; check exit status instead # Exit silently if package is no longer installed [ -x /usr/sbin/alsactl ] || exit 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MYNAME=/etc/init.d/alsa-utils export ALSACTLHOME=/var/run/alsa [ -d "$ALSACTLHOME" ] || mkdir -p "$ALSACTLHOME" . /lib/lsb/init-functions . /usr/share/alsa/utils.sh # $1 EXITSTATUS # [$2 MESSAGE] log_action_end_msg_and_exit() { log_action_end_msg "$1" ${2:+"$2"} exit $1 } # $1 PROGRAM executable() { # If which is not available then we must be running before # /usr is mounted on a system that has which in /usr/bin/. # Conclude that $1 is not executable. [ -x /bin/which ] || [ -x /usr/bin/which ] || return 1 which "$1" >/dev/null 2>&1 } executable amixer || { echo "${MYNAME}: Error: No amixer program available." >&2 ; exit 1 ; } # $1 | "all" restore_levels() { [ -f /var/lib/alsa/asound.state ] || return 1 CARD="$1" [ "$1" = all ] && CARD="" # Assume that if alsactl prints a message on stderr # then it failed somehow. This works around the fact # that alsactl doesn't return nonzero status when it # can't restore settings for the card if MSG="$(alsactl -E HOME="$ALSACTLHOME" restore $CARD 2>&1 >/dev/null)" && [ ! "$MSG" ] ; then return 0 else # Retry with the "force" option. This restores more levels # but it results in much longer error messages. alsactl -F restore $CARD >/dev/null 2>&1 log_action_cont_msg "warning: 'alsactl -E HOME="$ALSACTLHOME" restore${CARD:+ $CARD}' failed with error message '$MSG'" return 1 fi } # $1 | "all" store_levels() { CARD="$1" [ "$1" = all ] && CARD="" if MSG="$(alsactl -E HOME="$ALSACTLHOME" store $CARD 2>&1)" ; then sleep 1 return 0 else log_action_cont_msg "warning: 'alsactl store${CARD:+ $CARD}' failed with error message '$MSG'" return 1 fi } # $1 mute_and_zero_levels_on_card() { CARDOPT="-c $1" for CTL in \ Master \ PCM \ Synth \ CD \ Line \ Mic \ "PCM,1" \ Wave \ Music \ AC97 \ "Master Digital" \ DAC \ "DAC,0" \ "DAC,1" \ Headphone \ Speaker \ Playback do mute_and_zero_level "$CTL" done # for CTL in \ # "Audigy Analog/Digital Output Jack" \ # "SB Live Analog/Digital Output Jack" # do # switch_control "$CTL" off # done return 0 } # $1 | "all" mute_and_zero_levels() { TTZML_RETURNSTATUS=0 case "$1" in all) for CARD in $(echo_card_indices) ; do mute_and_zero_levels_on_card "$CARD" || TTZML_RETURNSTATUS=1 done ;; *) mute_and_zero_levels_on_card "$1" || TTZML_RETURNSTATUS=1 ;; esac return $TTZML_RETURNSTATUS } # $1 | "all" card_OK() { [ "$1" ] || bugout if [ "$1" = all ] ; then [ -d /proc/asound ] return $? else [ -d "/proc/asound/card$1" ] || [ -d "/proc/asound/$1" ] return $? fi } # If a card identifier is provided in $2 then regard it as an error # if that card is not present; otherwise don't regard it as an error. case "$1" in start) EXITSTATUS=0 TARGET_CARD="$2" case "$TARGET_CARD" in ""|all) TARGET_CARD=all ; log_action_begin_msg "Setting up ALSA" ;; *) log_action_begin_msg "Setting up ALSA card ${TARGET_CARD}" ;; esac card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; echo $? ; )" "none loaded" preinit_levels "$TARGET_CARD" || EXITSTATUS=1 if ! restore_levels "$TARGET_CARD" ; then sanify_levels "$TARGET_CARD" || EXITSTATUS=1 restore_levels "$TARGET_CARD" >/dev/null 2>&1 || : fi log_action_end_msg_and_exit "$EXITSTATUS" ;; stop) EXITSTATUS=0 TARGET_CARD="$2" case "$TARGET_CARD" in ""|all) TARGET_CARD=all ; log_action_begin_msg "Shutting down ALSA" ;; *) log_action_begin_msg "Shutting down ALSA card ${TARGET_CARD}" ;; esac card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; echo $? ; )" "none loaded" store_levels "$TARGET_CARD" || EXITSTATUS=1 #mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1 log_action_end_msg_and_exit "$EXITSTATUS" ;; restart|force-reload) EXITSTATUS=0 $0 stop || EXITSTATUS=1 $0 start || EXITSTATUS=1 exit $EXITSTATUS ;; reset) TARGET_CARD="$2" case "$TARGET_CARD" in ""|all) TARGET_CARD=all ; log_action_begin_msg "Resetting ALSA" ;; *) log_action_begin_msg "Resetting ALSA card ${TARGET_CARD}" ;; esac card_OK "$TARGET_CARD" || log_action_end_msg_and_exit "$( [ ! "$2" ] ; echo $? ; )" "none loaded" preinit_levels "$TARGET_CARD" sanify_levels "$TARGET_CARD" log_action_end_msg_and_exit "$?" ;; *) echo "Usage: $MYNAME {start [CARD]|stop [CARD]|restart [CARD]|reset [CARD]}" >&2 exit 3 ;; esac x2gothinclient-1.5.0.1/chroot/patchsets/alsa-utils.wheezy/utils.sh0000644000000000000000000001122613570107075022072 0ustar # Shell snippet. bugout() { echo "${MYNAME}: Programming error" >&2 ; exit 123 ; } echo_card_indices() { if [ -f /proc/asound/cards ] ; then sed -n -e's/^[[:space:]]*\([0-7]\)[[:space:]].*/\1/p' /proc/asound/cards fi } filter_amixer_output() { sed \ -e '/Unable to find simple control/d' \ -e '/Unknown playback setup/d' \ -e '/^$/d' } # The following functions try to set many controls. # No card has all the controls and so some of the attempts are bound to fail. # Because of this, the functions can't return useful status values. # $1 # $2 # $CARDOPT unmute_and_set_level() { { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout HOME=$ALSACTLHOME amixer $CARDOPT -q set "$1" "$2" unmute 2>&1 | filter_amixer_output || : return 0 } # $1 # $CARDOPT mute_and_zero_level() { { [ "$1" ] && [ "$CARDOPT" ] ; } || bugout HOME=$ALSACTLHOME amixer $CARDOPT -q set "$1" "0%" mute 2>&1 | filter_amixer_output || : return 0 } # $1 # $2 "on" | "off" # $CARDOPT switch_control() { { [ "$2" ] && [ "$CARDOPT" ] ; } || bugout HOME=$ALSACTLHOME amixer $CARDOPT -q set "$1" "$2" 2>&1 | filter_amixer_output || : return 0 } # $1 sanify_levels_on_card() { CARDOPT="-c $1" unmute_and_set_level "Master" "80%" unmute_and_set_level "Master Mono" "80%" # See Bug#406047 unmute_and_set_level "Master Digital" "80%" # E.g., cs4237B unmute_and_set_level "Playback" "80%" unmute_and_set_level "Headphone" "70%" unmute_and_set_level "PCM" "80%" unmute_and_set_level "PCM,1" "80%" # E.g., ess1969 unmute_and_set_level "DAC" "80%" # E.g., envy24, cs46xx unmute_and_set_level "DAC,0" "80%" # E.g., envy24 unmute_and_set_level "DAC,1" "80%" # E.g., envy24 unmute_and_set_level "Synth" "80%" unmute_and_set_level "CD" "80%" mute_and_zero_level "Mic" mute_and_zero_level "IEC958" # Ubuntu #19648 # Intel P4P800-MX (Ubuntu bug #5813) switch_control "Master Playback Switch" on switch_control "Master Surround" on # Trident/YMFPCI/emu10k1: unmute_and_set_level "Wave" "80%" unmute_and_set_level "Music" "80%" unmute_and_set_level "AC97" "80%" # DRC: unmute_and_set_level "Dynamic Range Compression" "80%" # Required for HDA Intel (hda-intel): unmute_and_set_level "Front" "80%" unmute_and_set_level "Master Front" "80%" # Required for SB Live 7.1/24-bit (ca0106): unmute_and_set_level "Analog Front" "80%" # Required at least for Via 823x hardware on DFI K8M800-MLVF Motherboard with kernels 2.6.10-3/4 (see ubuntu #7286): switch_control "IEC958 Capture Monitor" off # Required for hardware allowing toggles for AC97 through IEC958, # valid values are 0, 1, 2, 3. Needs to be set to 0 for PCM1. unmute_and_set_level "IEC958 Playback AC97-SPSA" "0" # Required for newer Via hardware (see Ubuntu #31784) unmute_and_set_level "VIA DXS,0" "80%" unmute_and_set_level "VIA DXS,1" "80%" unmute_and_set_level "VIA DXS,2" "80%" unmute_and_set_level "VIA DXS,3" "80%" # Required on some notebooks with ICH4: switch_control "Headphone Jack Sense" off switch_control "Line Jack Sense" off # Some machines need one or more of these to be on; # others need one or more of these to be off: # # switch_control "External Amplifier" on # switch_control "Audigy Analog/Digital Output Jack" on # switch_control "SB Live Analog/Digital Output Jack" on # D1984 -- Thinkpad T61/X61 switch_control "Speaker" on switch_control "Headphone" on # HDA-Intel w/ "Digital" capture mixer (See Ubuntu #193823) unmute_and_set_level "Digital" "80%" # On MacBookPro5,3 and later models (See Bug#597791) unmute_and_set_level "Front Speaker" "80%" # On MacBook5,2 models (See Bug#602973) unmute_and_set_level "LFE" "80%" # On Intel 82801H (See Bug#603550) unmute_and_set_level "Speaker" "80%" return 0 } # $1 | "all" sanify_levels() { TTSDML_RETURNSTATUS=0 case "$1" in all) for CARD in $(echo_card_indices) ; do sanify_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 done ;; *) sanify_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 ;; esac return $TTSDML_RETURNSTATUS } # $1 preinit_levels_on_card() { CARDOPT="-c $1" # Silly dance to activate internal speakers by default on PowerMac # Snapper and Tumbler id=$(cat /proc/asound/card$1/id 2>/dev/null) if [ "$id" = "Snapper" -o "$id" = "Tumbler" ]; then switch_control "Auto Mute" off switch_control "PC Speaker" off switch_control "Auto Mute" on fi } # $1 | "all" preinit_levels() { TTSDML_RETURNSTATUS=0 case "$1" in all) for CARD in $(echo_card_indices) ; do preinit_levels_on_card "$CARD" || TTSDML_RETURNSTATUS=1 done ;; *) preinit_levels_on_card "$1" || TTSDML_RETURNSTATUS=1 ;; esac return $TTSDML_RETURNSTATUS } x2gothinclient-1.5.0.1/common/etc/freerdp/known_hosts0000644000000000000000000000011013570107075017471 0ustar # put FreeRDP's known host into this file... (this is for FreeRDP 1.1.x)x2gothinclient-1.5.0.1/common/etc/freerdp/known_hosts20000644000000000000000000000010613570107075017560 0ustar # put FreeRDP's known host into this file... (this is for FreeRDP 2.x)x2gothinclient-1.5.0.1/common/lib/x2gothinclient_init0000755000000000000000000000162513570107075017464 0ustar #!/bin/bash # Copyright (C) 2007-2019 X2Go Project - https://wiki.x2go.org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # Copyright (C) 2011-2019 Mike Gabriel set -e run-parts /etc/x2go/x2gothinclient_init.d/ exit 0 x2gothinclient-1.5.0.1/COPYING0000644000000000000000000004325413570107075012553 0ustar GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. x2gothinclient-1.5.0.1/displaymanager/init/x2gothinclient-displaymanager.init0000644000000000000000000000673013570107075024305 0ustar #!/bin/sh # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. ### BEGIN INIT INFO # Provides: x2gothinclient-displaymanager # Required-Start: $remote_fs $syslog # Required-Stop: $remote_fs $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: Start and stop the x2go thinclient daemon ### END INIT INFO set -e # use system's locale settings for the X2Go Client in TCE mode if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi . /lib/lsb/init-functions PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin export HOSTNAME DAEMON=/usr/sbin/x2gothinclientd NAME=x2gothinclient DESC="X2Go Thinclient Display Manager" test -x $DAEMON || exit 0 if [ ! -x /etc/x2go/x2gothinclient_init ] || [ ! -x /etc/x2go/x2gothinclient-displaymanager_start ]; then echo "X2Go Thin Client system will not start as it is not configured, yet." echo "See https://wiki.x2go.org/doku.php/wiki:advanced:tce:install" exit 0 fi # To start x2gothinclient even if it is not the default display manager, change # HEED_DEFAULT_DISPLAY_MANAGER to "false." HEED_DEFAULT_DISPLAY_MANAGER=${HEED_DEFAULT_DISPLAY_MANAGER:-true} DEFAULT_DISPLAY_MANAGER_FILE=/etc/X11/default-display-manager case "$1" in start) CONFIGURED_DAEMON="$(basename $(cat $DEFAULT_DISPLAY_MANAGER_FILE 2> /dev/null))" if grep -wqs text /proc/cmdline; then log_warning_msg "Not starting X2Go Client in TCE mode; found 'text' in kernel commandline." elif [ -e "$DEFAULT_DISPLAY_MANAGER_FILE" ] && \ [ "$HEED_DEFAULT_DISPLAY_MANAGER" = "true" ] && \ [ "$CONFIGURED_DAEMON" != "x2gothinclientd" ] ; then log_action_msg "Not starting X2Go Client in TCE mode; it is not configured as default display manager" else log_daemon_msg "Starting $DESC" "x2gothinclientd" start-stop-daemon --start --quiet --pidfile /run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS log_end_msg $? fi ;; status) if [ -e /run/$NAME.pid ]; then log_daemon_msg "Status of $DESC" "x2gothinclientd" start-stop-daemon --oknodo --status --quiet --pidfile /run/$NAME.pid log_end_msg $? fi ;; stop) if [ -e /run/$NAME.pid ]; then log_daemon_msg "Stopping $DESC" "x2gothinclientd" start-stop-daemon --oknodo --stop --quiet --retry 10 --pidfile /run/$NAME.pid log_end_msg $? fi ;; force-reload) # check wether $DAEMON is running. If so, restart start-stop-daemon --stop --test --quiet --pidfile /run/$NAME.pid && $0 restart || exit 0 ;; restart) $0 stop sleep 1 $0 start ;; *) N=/etc/init.d/$NAME echo "Usage: $N {start|stop|restart|force-reload}" >&2 exit 1 ;; esac exit 0 x2gothinclient-1.5.0.1/displaymanager/init/x2gothinclient-displaymanager.service0000644000000000000000000000050513570107075024774 0ustar [Unit] Description=X2Go TCE Display Manager Documentation=man:x2gothinclientd(8) [Service] Type=forking ExecStartPre=/bin/sh -c '[ "$(cat /etc/X11/default-display-manager 2>/dev/null)" = "/usr/sbin/x2gothinclientd" ]' ExecStart=/usr/sbin/x2gothinclientd PIDFile=/run/x2gothinclient.pid [Install] WantedBy=multi-user.target x2gothinclient-1.5.0.1/displaymanager/man/x2gothinclientd.80000644000000000000000000000120713570107075020461 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclientd 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclientd \- Session Control Daemon running on X2Go Thin Clients. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclientd\fR .SH DESCRIPTION \fBx2gothinclientd\fR is a session control daemon that runs on X2Go thin clients. .PP .SH OPTIONS \fBx2gothinclientd\fR has no known options. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/displaymanager/sbin/x2gothinclientd0000755000000000000000000001417213570107075020503 0ustar #!/usr/bin/perl # Copyright (C) 2007-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. use strict; use File::Path::Expand; use IPC::Open3; sub catch_term { system ("killall --user x2gothinclient --wait x2goclient"); system ("killall --wait Xorg"); system ("killall --user x2gothinclient --wait pulseaudio"); system ("killall --user x2gothinclient --wait dbus-daemon"); system ("killall --user x2gothinclient --wait dbus-launch"); unlink("/var/run/x2gothinclient.pid"); exit; } sub check_x { my $x=`ps ax | grep X`; if ( $x=~m/Xorg/ ) { return 1; } return 0; } sub check_pulse { my $pulse=`ps ax | grep pulse`; if ( $pulse=~m/pulseaudio/) { return 1; } return 0; } sub check_client { my $client=`ps ax | grep x2goc`; if ( $client=~m/lient/) { return 1; } return 0; } # make sure the .halt file is not present when we start this script system("rm -f ~x2gothinclient/.halt"); # pre-load the thinclient initialization script system("su x2gothinclient -c \". /etc/x2go/x2gothinclient_init\""); # fork to background, check if forked state is ok... my $pid = fork(); if (not defined $pid) { print "resources not avilable.\n"; } elsif ($pid != 0) { open (F,">/var/run/x2gothinclient.pid"); print F "$pid\n"; close(F); } elsif ($pid == 0 ) { # silence this daemon script completely... close(STDOUT); close(STDERR); $SIG{TERM}=\&catch_term; while(sleep 1) { # test if shutdown button on X2Go Client was clicked if (-e expand_filename("~x2gothinclient/.halt")) { # when used with plymouth, make sure we stay on the correct terminal system("killall Xorg"); system("shutdown -h now"); system("chvt 7"); } # test if XServer is running, if not launch it... if ( check_x() ==0 ) { system("/usr/bin/Xorg -br &"); # wait for X-Server to come up sleep(3); # Align displays next to each other in order of appearance in xrandr, unless touch # devices are detected - in that case, clone displays so that touchable area and display # stay aligned. This fix has been introduced for a certain make of wacom touch-sensitive # displays. If you have a touch-sensitive device that isn't affected by this, or that # is negatively affected by this fix, please let us know so we can add a better detection. # The fix is bypassed if a mouse device is detected. # Note that you can manually override the behavior by passing a kernel parameter # xinerama=above|below|same-as|left-of|right-of to override the autodetection. # check if a xinerama kernel parameter is set my $xrandrcmdtainted = `cat /proc/cmdline | tr ' ' '\n' | awk -F '=' '\$1 == "xinerama" { print \$2 }'`; my $xrandrcmd; if ($xrandrcmdtainted =~ /(^above$|^below$|^same-as$|^left-of$|^right-of$)/) { # if the parameter value matches one value of the defined set, use that $xrandrcmd = $1; } else { # else default to "left-of", which was our standard behavior in previous versions $xrandrcmd = "left-of"; } # find out how many touch devices we have my $touchdevicescount = `DISPLAY=:0 LANG=C xsetwacom --list devices | wc -l`; # find out how many mouse devices we have my $micecount = `find /dev/input -maxdepth 1 -name "mouse*" | wc -l`; # declare two variables for the upcoming loop my $this_display; my $next_display; # loop through the following code block for all connected display devices foreach (`DISPLAY=:0 LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1`) { # assign a value to $next_display and remove newline from it chomp ($next_display = $_); # $this_display won't be defined until the second time the loop is executed, which is a # neat way of running xrandr only if there are at least two connected display devices if (defined($this_display)) { if (($touchdevicescount > 0) && ($micecount < 1) && ($xrandrcmdtainted eq "")) { # we have a touch device and no mice, and no xinerama parameter was set, # so switch to clone view to make the touch device usable `DISPLAY=:0 /usr/bin/xrandr --output $next_display --same-as $this_display`; } else { # else use whatever is in $xrandrcmd (which is either our default of "left-of", # or a valid xinerama kernel parameter value) `DISPLAY=:0 /usr/bin/xrandr --output $next_display --$xrandrcmd $this_display`; } } # now set $this_display -> every subsequent iteration of the loop will now enter the code block # above where (defined($this_display)) is the conditional $this_display = $next_display; } # set screen background to X2Go default blue on all detected screens `DISPLAY=:0 xsetroot -solid "#246ed8"`; } # test if pulseaudio is running, if not launch it... if ( !check_pulse() ) { system("su - x2gothinclient -c \"DISPLAY=:0 pulseaudio -D " . "-L 'module-native-protocol-tcp port=4713' " . "--exit-idle-time=65535\""); } # test if x2goclient is running, if not launch it... if ( !check_client() ) { open (F,">/tmp/startwrap"); print F "#!/bin/bash set +e . /etc/X11/Xsession.d/20dbus_xdg-runtime . /etc/X11/Xsession.d/75dbus_dbus-launch . /etc/X11/Xsession.d/90gpg-agent . /etc/X11/Xsession.d/95dbus_update-activation-env set -e\n"; close (F); qx(cat /etc/x2go/x2gothinclient-displaymanager_start >> /tmp/startwrap); chmod(0755, "/tmp/startwrap"); qx(su - x2gothinclient -c \"export DISPLAY=:0; /tmp/startwrap 1>/dev/null 2>/dev/null\"); } } } x2gothinclient-1.5.0.1/management/etc/x2gothinclient_settings0000644000000000000000000000641513570107075021211 0ustar # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # name of this instance of the X2Go TCE (appears during thinclient boot process) TC_PRETTY_NAME="X2Go TCE" # Adapt to your system!!! This path fits for Debian systems. Or provide the version manually. TC_VERSION=`cat /usr/share/x2go/versions/VERSION.x2gothinclient-management` # select the TCE flavour (classical: "displaymanager", minimal MATE desktop shell: "minidesktop") TC_FLAVOUR="displaymanager" # base path for X2Go thin client files TC_BASE="/opt/x2gothinclient" # path to X2Go thin client chroot TC_CHROOT="$TC_BASE/chroot" # path to the X2Go thin client configuration TC_CONFIG="$TC_BASE/etc" # shell to use when maintaining X2Go thin client chroot manually TC_SHELL="bash" # Debian package mirror to use... TC_DEBMIRROR_URL="http://ftp.debian.org/debian" # Distro codename to use... TC_DISTRO_CODENAME="stretch" # or use older Debian ... #TC_DISTRO_CODENAME="jessie" # Default architecture is "amd64" TC_ARCH="amd64" #TC_ARCH="i386" # Retrieve X2Go packages from this URL TC_X2GO_DEBURL="deb http://packages.x2go.org/debian $TC_DISTRO_CODENAME extras main" # Use a http/ftp proxy during debootstrap (leave empty if direct connections to http/ftp are allowed) #TC_HTTP_PROXY="http://webcache.intern:3128" #TC_HTTPS_PROXY="http://webcache.intern:3128" #TC_FTP_PROXY="http://webcache.intern:3128" TC_HTTP_PROXY="" TC_HTTPS_PROXY="" TC_FTP_PROXY="" # module blacklist (used during X2Go TCE creation) TC_MODULE_BLACKLIST="pcspkr" # tftp boot environment (PXE/syslinux files delivered via tftpd) TC_TFTP_BOOT="/srv/tftp" # install non-interactively... uncomment it if needed... #TC_NONINTERACTIVE=yes echo echo "X2Go Thin Client Environment:" echo "=============================" echo "The X2Go Thin Client Environment is using the following" echo "settings:" echo echo "TC_PRETTY_NAME=$TC_PRETTY_NAME" echo "TC_VERSION=$TC_VERSION" echo "TC_FLAVOUR=$TC_FLAVOUR" echo "TC_BASE=$TC_BASE" echo "TC_CONFIG=$TC_CONFIG" echo "TC_CHROOT=$TC_CHROOT" echo "TC_SHELL=$TC_SHELL" echo "TC_DISTRO_CODENAME=$TC_DISTRO_CODENAME" echo "TC_ARCH=$TC_ARCH" echo "TC_DEBMIRROR_URL=$TC_DEBMIRROR_URL" echo "TC_X2GO_DEBURL=$TC_X2GO_DEBURL" echo "TC_HTTP_PROXY=$TC_HTTP_PROXY" echo "TC_HTTPS_PROXY=$TC_HTTPS_PROXY" echo "TC_FTP_PROXY=$TC_FTP_PROXY" echo "TC_MODULE_BLACKLIST=$TC_MODULE_BLACKLIST" echo "TC_TFTP_BOOT=$TC_TFTP_BOOT" echo echo "Edit /etc/x2go/x2gothinclient_settings to change this." echo x2gothinclient-1.5.0.1/management/man/x2gothinclient_cleanup.80000644000000000000000000000152113570107075021137 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclient_cleanup 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclient_cleanup \- Removes the X2Go Thin Client environment from the X2Go PXE server. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclient_cleanup\fR .SH DESCRIPTION This helper script removes the complete X2Go TCE from your system. The script will ask you to confirm the removal action. Use with care!!! .PP .SH OPTIONS \fBx2gothinclient_cleanup\fR has no known options. .PP .SH FILES /etc/x2go/x2gothinclient_settings Configuration file for x2gothinclient_* scripts. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/management/man/x2gothinclient_create.80000644000000000000000000000202213570107075020750 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclient_create 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclient_create \- Creates X2Go Thin Client chroot Environment. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclient_create\fR .SH DESCRIPTION This helper script creates a bootable X2Go thin client system in a chroot environment. .PP \fBNOTE:\fR Use this script for building your own X2Go TCE. Run this script on your X2Go TCE PXE/Etherboot server (as in your DHCP server's ''next-server'' option). .PP We highly recommend using a separate server (or virtual machine) for providing chroot environments. .PP .SH OPTIONS \fBx2gothinclient_create\fR has no known options. .PP .SH FILES /etc/x2go/x2gothinclient_settings Configuration file for x2gothinclient_* scripts. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/management/man/x2gothinclient_preptftpboot.80000644000000000000000000000433413570107075022245 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclient_preptftpboot 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclient_preptftpboot \- Prepare PXE/Syslinux Boot Environment (delivered via tftpd) on X2Go PXE Server. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclient_preptftpboot\fR .SH DESCRIPTION This helper script prepares X2Go's PXE/Syslinux boot environment. As X2Go PXE server you can either use your X2Go server itself or a dedicated machine or VM that merely serves as PXE boot server. .PP Please run the \fBx2gothinclient_create\fR helper script first before you run this script. .PP This script can only be called if the PXE boot dir (default: /srv/tftp) does not already contain any other PXE/Syslinux boot environment. .SH MANUAL STEPS AFTER SCRIPT HAS RUN At the end of \fBx2gothinclient_preptftpboot\fR 2-3 manual steps are still needed (as displayed by the script itself when run)... The $TC_* variables mentioned in the text below have to be obtained from \fI/etc/x2go/x2gothinclient_settings\fR. .PP 1. Make sure your DHCP server's configuration points to: .PP next-server ; filename '/pxelinux.0'; .PP 2. Export the X2Go Thin Client chroot environment via NFSv3: .PP * Add this line to /etc/exports... (in one line): .PP $TC_CHROOT\ \\ \ \ \ \ \ \ \ \ /(ro,async,no_root_squash,no_subtree_check) .PP * ... and then restart your NFS server with: .PP /etc/init.d/nfs-kernel-server restart .PP 3. Customize PXE/Syslinux files in $TC_TFTP_BOOT/ (optional): .PP * customize PXE boot menu, take a look at .PP $TC_TFTP_BOOT/default.cfg .PP and proceed from there on... * use your own boot loader background image: 640x480px, 16bit colour depth, file: $TC_TFTP_BOOT/x2go-tce.png .SH OPTIONS \fBx2gothinclient_pretftpboot\fR has no known options. .PP .SH FILES /etc/x2go/x2gothinclient_settings Configuration file for x2gothinclient_* scripts. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/management/man/x2gothinclient_shell.80000644000000000000000000000155113570107075020622 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclient_shell 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclient_shell \- Opens a shell within the X2Go Thin Client chroot Environment. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclient_shell\fR .SH DESCRIPTION This helper script opens a shell within the X2Go thin client chroot environment. .PP \fBNOTE:\fR Use this script to perform maintenance work within your X2Go thin client chroot. .PP .SH OPTIONS \fBx2gothinclient_shell\fR has no known options. .PP .SH FILES /etc/x2go/x2gothinclient_settings Configuration file for x2gothinclient_* scripts. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/management/man/x2gothinclient_update.80000644000000000000000000000235113570107075020774 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclient_update 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclient_update \- Updates the X2Go Thin Client configuration. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclient_update\fR .SH DESCRIPTION This helper script updates the configuration of an X2Go thin client chroot environment (x2goclient startup, non-LDAP session profiles). .PP .SH OPTIONS \fBx2gothinclient_update\fR has no known options. .PP .SH FILES /etc/x2go/x2gothinclient_settings Configuration file for x2gothinclient_* scripts. /usr/share/x2go/tce/x2gothinclient_init Script that prepares tmpfs filespace on X2Go thin client startup. /usr/share/x2go/tce/x2gothinclient-_start Script that launches and configures x2goclient in display manager or mini-desktop mode (where for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/management/man/x2gothinclient_upgrade.80000644000000000000000000000150013570107075021134 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gothinclient_upgrade 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gothinclient_upgrade \- Upgrade the X2Go Thin Client's software. .SH SYNOPSIS 'nh .fi .ad l \fBx2gothinclient_upgrade\fR .SH DESCRIPTION This helper script performs a package upgrade within the X2Go thin client chroot. Use this script to update/upgrade your X2Go thin client's software. .PP .SH OPTIONS \fBx2gothinclient_upgrade\fR has no known options. .PP .SH FILES /etc/x2go/x2gothinclient_settings Configuration file for x2gothinclient_* scripts. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/management/README0000644000000000000000000000125513570107075014507 0ustar x2gothinclient_create ===================== Create a new x2gothinclient chroot image Check x2gothinclient_settings before doing so. x2gothinclient_shell ==================== Start a $SHELL in the thinclient chroot. x2gothinclient_settings ======================= This is where the thinclient setting can be made. x2gothinclient_update ===================== Update the configuration. See files x2gothinclient_upgrade ====================== Do apt-get upgrade in the chroot. files ===== Files needed to adjust the runtime system. /etc/x2go/x2gothinclient_init /etc/x2go/x2gothinclient-_start /etc/x2go/x2gothinclient_sessions /etc/x2go/x2goclient-background.svg x2gothinclient-1.5.0.1/management/README.hostname0000644000000000000000000000166113570107075016325 0ustar Accept X2GO thin client hostname from DHCP/DNS server ------------------------------------------------------ Inside the TCE chroot you find an /etc/hostname file. With some DHCP/DNS setups the hostname gets set during PXE boot and if /etc/hostname is missing, the hostname will be kept as is. If you want to use that feature: $ x2gothinclient_shell (chroot)$ rm -f /etc/hostname (chroot)$ exit Generic Linux networks (isc-dhcp-server, bind): ----------------------------------------------- ToDo. Anyone can give good information on how to setup the DHCP/DNS services to make that work? Debian Edu ---------- In Debian Edu networks you can remove /etc/hostname inside th chroot and then the hostname gets set during PXE boot. Windows DHCP server ------------------- By default, the Windows DHCP server does not provide a hostname via PXE boot. So, in this case you should keep /etc/hostname. light+love, Mike Gabriel, 20120913 x2gothinclient-1.5.0.1/management/sbin/x2gothinclient_cleanup0000755000000000000000000000510513570107075021156 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. set -e if echo $0 | egrep "^./bin/.*$" >/dev/null; then ETCDIR="etc/" elif echo $0 | egrep "^./x2gothinclient_.*$" >/dev/null; then ETCDIR="../etc" else ETCDIR=/etc/x2go fi source $ETCDIR/x2gothinclient_settings TC_BASE="${TC_BASE:-/opt/x2gothinclient}" TC_CHROOT="${TC_CHROOT:-$TC_BASE/chroot}" TC_CONFIG="${TC_CONFIG:-$TC_BASE/etc}" TC_TFTP_BOOT="${TC_TFTP_BOOT:-/srv/tftp}" [ "x$USER" == "xroot" ] || { echo "ERROR: X2Go Thin Client management scripts have to run" echo "as super-user root." exit -2 } echo "X2Go TCE cleanup..." echo "-------------------" echo "Hit to purge all X2Go TCE related files (chroot," echo "TCE config, PXE boot env)..." echo echo "Alternatively, hit STRG-C to cancel the operation now!!!" read # make sure, all chroot-internal mountpoints are gone... for mountpoint in proc dev/pts sys; do while true; do cat /proc/mounts | grep "$TC_CHROOT/$mountpoint" >/dev/null && umount -l "$TC_CHROOT/$mountpoint" || break done done # CHROOT + TCE config test -e "$TC_CHROOT" && { echo "Removing $TC_CHROOT..." rm -Rf "${TC_CHROOT}" } || { echo "WARNING: X2Go Thin Client chroot does not exist" echo "at $TC_CHROOT. No cleanup necessary..." } test -e "$TC_CONFIG" && { echo "Removing $TC_CONFIG..." rm -Rf "${TC_CONFIG}" } || { echo "WARNING: X2Go Thin Client config does not exist" echo "at $TC_CONFIG. No cleanup necessary..." } ### PXE/Syslinux test -e "$TC_TFTP_BOOT/pxelinux.cfg" && { echo "Emptying $TC_TFTP_BOOT..." rm -Rf "${TC_TFTP_BOOT}"/* } || { echo "WARNING: X2Go PXE/Syslinux boot environment does not exist" echo "at $TC_TFTP_BOOT. No cleanup necessary..." } echo echo "X2Go TCE cleanup is DONE." echo x2gothinclient-1.5.0.1/management/sbin/x2gothinclient_create0000755000000000000000000003230313570107075020772 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. set -e empty_folder() { folder="$1" find "$folder" -type f | while read file; do rm "$file"; done find "$folder" -mindepth 1 -type d | sort -r | while read dir; do rmdir "$dir"; done } if echo $0 | egrep "^./bin/.*$" >/dev/null; then ETCDIR="etc/" SHAREDIR="share/" elif echo $0 | egrep "^./x2gothinclient_.*$" >/dev/null; then ETCDIR="../etc" SHAREDIR="../share/" else ETCDIR=/etc/x2go SHAREDIR="/usr/share/x2go/tce/" fi source "$ETCDIR/x2gothinclient_settings" TC_BASE="${TC_BASE:-/opt/x2gothinclient}" TC_CHROOT="${TC_CHROOT:-$TC_BASE/chroot}" TC_CONFIG="${TC_CONFIG:-$TC_BASE/etc}" TC_DISTRO_CODENAME="${TC_DISTRO_CODENAME:-stretch}" TC_DEBMIRROR_URL="${TC_DEBMIRROR_URL:-'http://ftp.debian.org/debian'}" TC_X2GO_DEBURL="${TC_X2GO_DEBURL:-'deb http://packages.x2go.org $TC_DISTRO_CODENAME main'}" TC_MODULE_BLACKLIST="${TC_MODULE_BLACKLIST:-'pcspkr'}" TC_NONINTERACTIVE="${TC_NONINTERACTIVE:-}" TC_FLAVOUR="${TC_FLAVOUR:-displaymanager}" if [ "$TC_ARCH" == "amd64" ] then ARCHSTR="" KERNEL_VERSION="amd64" fi if [ "$TC_ARCH" == "i386" ] then ARCHSTR="--arch i386" KERNEL_VERSION="686" fi if [ "x$TC_FLAVOUR" != "xminidesktop" ] && [ "x$TC_FLAVOUR" != "xdisplaymanager" ]; then TC_FLAVOUR="displaymanager" fi test -e "$TC_CHROOT" && { echo "ERROR: X2Go Thin Client chroot already exists at $TC_CHROOT." echo "Clear $TC_BASE/ and then run $(basename $0) again..." exit -1 } [ "x$USER" == "xroot" ] || { echo "ERROR: X2Go Thin Client management scripts have to run as super-user root." exit -2 } if [ "x$TC_DISTRO_CODENAME" = "xsqueeze" ] && [ "x$TC_FLAVOUR" = "xminidesktop" ]; then echo "The X2Go TCE with minimal MATE desktop is only available for TCEs based" echo "on Debian wheezy. Stopping now..." exit -3 fi if [ "x${TC_NONINTERACTIVE}" = "x" ]; then echo "Hit to continue with X2Go TCE chroot creation using" echo "the above TCE parameters..." echo echo "Alternatively, hit STRG-C to cancel the operation now!!!" read else echo "Non-interactive mode selected, will continue with the above settings" fi export LANG=C # prepare TC_CONFIG files mkdir -p "$TC_CONFIG/x2gothinclient_init.d" test -f "$TC_CONFIG/x2gothinclient-${TC_FLAVOUR}_start" || cp "$SHAREDIR/etc/x2gothinclient-${TC_FLAVOUR}_start" "$TC_CONFIG" test -f "$TC_CONFIG/x2gothinclient_sessions" || cp "$SHAREDIR/etc/x2gothinclient_sessions" "$TC_CONFIG" test -f "$TC_CONFIG/x2gothinclient-${TC_FLAVOUR}_background.svg" || cp "$SHAREDIR/etc/x2gothinclient-${TC_FLAVOUR}_background.svg" "$TC_CONFIG" ls "$SHAREDIR/etc/x2gothinclient_init.d" | while read init_part; do test -f "$TC_CONFIG/x2gothinclient_init.d/$init_part" || cp "$SHAREDIR/etc/x2gothinclient_init.d/$init_part" "$TC_CONFIG/x2gothinclient_init.d/" done mkdir -p "$TC_CONFIG/freerdp" if [ "x$TC_DISTRO_CODENAME" = "xstretch" ] || [ "x$TC_DISTRO_CODENAME" = "xjessie" ]; then # this is for FreeRDP v1.1.x (as found in Debian jessie and stretch) test -f "$TC_CONFIG/freerdp/known_hosts" || echo "# X2Go TCE: validate allowed RDP servers with their fingerprints through this file" > "$TC_CONFIG/freerdp/known_hosts" else # this is for FreeRDP v2.x (as found in buster and beyond), let's presume that this # "else" clause means: all distro versions more recent than stretch or jessie test -f "$TC_CONFIG/freerdp/known_hosts2" || echo "# X2Go TCE: validate allowed RDP servers with their fingerprints through this file" > "$TC_CONFIG/freerdp/known_hosts2" fi apt-get install debootstrap mkdir -p "$TC_CHROOT" # use a proxy server for APT (if any is configured) export http_proxy="$TC_HTTP_PROXY" export https_proxy="$TC_HTTPS_PROXY" export ftp_proxy="$TC_FTP_PROXY" debootstrap $ARCHSTR "$TC_DISTRO_CODENAME" "$TC_CHROOT/" "$TC_DEBMIRROR_URL" cp /etc/resolv.conf "$TC_CHROOT/etc/resolv.conf" if [ "$TC_DISTRO_CODENAME" = "squeeze" ]; then echo "auto lo" >> "$TC_CHROOT/etc/network/interfaces" echo "iface lo inet loopback" >> "$TC_CHROOT/etc/network/interfaces" fi echo "x2gothinclient" > "$TC_CHROOT/etc/hostname" echo "127.0.0.1 localhost" >> "$TC_CHROOT/etc/hosts" cat > $TC_CHROOT/etc/fstab <> "$TC_CHROOT/etc/fstab" <> "$TC_CHROOT/etc/apt/sources.list.d/backports.list" <> "$TC_CHROOT/etc/apt/sources.list.d/contrib.list" <> "$TC_CHROOT/etc/apt/sources.list.d/non-free.list" < "$TC_CHROOT/x2go_tce_install.sh" < /sbin/start-stop-daemon echo '#' >> /sbin/start-stop-daemon echo '# X2Go Wrapper to avoid running daemons while performing maintenance.' >> /sbin/start-stop-daemon echo '#' >> /sbin/start-stop-daemon echo >> /sbin/start-stop-daemon echo 'if [ "\$X2GO_HANDLE_DAEMONS" != "false" ]; then' >> /sbin/start-stop-daemon echo ' /sbin/start-stop-daemon.real "\$@"' >> /sbin/start-stop-daemon echo 'fi' >> /sbin/start-stop-daemon chmod +x /sbin/start-stop-daemon export X2GO_HANDLE_DAEMONS=false [ \$? -eq 0 ] && test -n "$TC_X2GO_DEBURL" && echo "$TC_X2GO_DEBURL" > /etc/apt/sources.list.d/x2go.list [ \$? -eq 0 ] && test -n "$TC_X2GO_DEBURL" && apt-get update [ \$? -eq 0 ] && test -n "$TC_X2GO_DEBURL" && apt-get install x2go-keyring -y # tweak mtab diversion [ \$? -eq 0 ] && rm -f /etc/mtab [ \$? -eq 0 ] && ln -sf /proc/mounts /etc/mtab [ \$? -eq 0 ] && apt-get update [ \$? -eq 0 ] && apt-get install $TC_SHELL -y [ \$? -eq 0 ] && apt-get install locales -y if [ \$? -eq 0 -a "x${TC_NONINTERACTIVE}" != "x" ]; then dpkg-reconfigure locales fi [ \$? -eq 0 ] && apt-get install linux-image-$KERNEL_VERSION -y [ \$? -eq 0 ] && test -h /vmlinuz && mv /vmlinuz /vmlinuz.$KERNEL_VERSION.tmp || true [ \$? -eq 0 ] && LINK_TARGET=\$(readlink /vmlinuz.$KERNEL_VERSION.tmp | sed 's@/boot@boot@') && ln -sf \$LINK_TARGET /vmlinuz.$KERNEL_VERSION && rm -f /vmlinuz.$KERNEL_VERSION.tmp [ \$? -eq 0 ] && test -h /initrd.img && mv /initrd.img /initrd.img.$KERNEL_VERSION.tmp || true [ \$? -eq 0 ] && LINK_TARGET=\$(readlink /initrd.img.$KERNEL_VERSION.tmp | sed 's@/boot@boot@') && ln -sf \$LINK_TARGET /initrd.img.$KERNEL_VERSION && rm -f /initrd.img.$KERNEL_VERSION.tmp [ \$? -eq 0 ] && apt-get install x2gothinclient-chroot x2gothinclient-${TC_FLAVOUR} -y # blacklist kernel modules [ \$? -eq 0 ] && echo && echo "# modules blacklisted on X2Go Thin Clients..." >> /etc/modprobe.d/blacklist.conf [ \$? -eq 0 ] && for mod in $TC_MODULE_BLACKLIST; do echo "blacklist \$mod" >> /etc/modprobe.d/blacklist.conf; done # boot from NFS (only relevant for Debian squeeze) [ \$? -eq 0 ] && sed -e 's/BOOT=local/BOOT=nfs/' -i /etc/initramfs-tools/initramfs.conf #build initramfs for nfs boot [ \$? -eq 0 ] && sed -e 's/MODULES=most/MODULES=netboot/' -i /etc/initramfs-tools/initramfs.conf [ \$? -eq 0 ] && rm -f /etc/udev/rules.d/*-persistent-*.rules [ \$? -eq 0 ] && if ! getent passwd x2gothinclient 1>/dev/null; then adduser --system --disabled-password --disabled-login --shell /bin/bash --group --home /var/lib/x2gothinclient x2gothinclient; fi [ \$? -eq 0 ] && adduser x2gothinclient audio [ \$? -eq 0 ] && adduser x2gothinclient pulse [ \$? -eq 0 ] && adduser pulse audio [ \$? -eq 0 ] && adduser x2gothinclient cdrom [ \$? -eq 0 ] && adduser x2gothinclient plugdev [ \$? -eq 0 ] && if ! getent group scard 1>/dev/null; then groupadd scard; fi [ \$? -eq 0 ] && adduser x2gothinclient scard [ \$? -eq 0 ] && passwd -l root [ \$? -eq 0 ] && sed -e 's/#ListenAddress ::/AddressFamily inet\nListenAddress 127.0.0.1/' -i /etc/ssh/sshd_config # tweak plymouth [ \$? -eq 0 ] && if [ "$TC_DISTRO_CODENAME" != "squeeze" ]; then echo "radeon" >> /etc/initramfs-tools/modules; echo "i915" >> /etc/initramfs-tools/modules; fi [ \$? -eq 0 ] && test -e /etc/os-release && sed -e 's/PRETTY_NAME=.*/PRETTY_NAME="$TC_PRETTY_NAME"/' -e 's/NAME=.*/NAME="$TC_PRETTY_NAME"/' -e 's/VERSION=.*/VERSION="$TC_VERSION"/' -e 's/VERSION_ID=.*/VERSION_ID="$TC_VERSION"/' -e 's@HOME_URL=.*@HOME_URL="https://wiki.x2go.org"@' -e 's@SUPPORT_URL=.*@SUPPORT_URL="https://wiki.x2go.org/"@' -e 's@BUG_REPORT_URL=.*@BUG_REPORT_URL="https://bugs.x2go.org"@' -i /etc/os-release || echo -e 'PRETTY_NAME="$TC_PRETTY_NAME"\nNAME="$TC_PRETTY_NAME"\n' > /etc/os-release [ \$? -eq 0 ] && if [ "$TC_DISTRO_CODENAME" == "squeeze" ]; then test -e /etc/modprobe.d/i915-kms.conf && sed -s 's/modeset=1/modeset=0/' -i /etc/modprobe.d/i915-kms.conf; fi [ \$? -eq 0 ] && if [ "$TC_DISTRO_CODENAME" == "squeeze" ]; then test -e /etc/modprobe.d/radeon-kms.conf && sed -s 's/modeset=1/modeset=0/' -i /etc/modprobe.d/radeon-kms.conf; fi # no serial line TTY on thin clients [ \$? -eq 0 ] && sed -e 's/^T0:23:respawn:/#T0:23:respawn:/' -i /etc/inittab # no need to clean up tmp directories, they are on RAM disks anyway... [ \$? -eq 0 ] && test -e /etc/init.d/checkroot-bootclean.sh && sed -e "s/clean_all/#clean_all/" -i /etc/init.d/checkroot-bootclean.sh || true ### ### apply patchsets if provided ### # we will use our own alsa-utils init script for Debian wheezy chroots (very similar to the version found in Debian jessie): work around Debian bug #729373. [ \$? -eq 0 ] && if [ "$TC_DISTRO_CODENAME" == "wheezy" ]; then cp /usr/share/x2go/tce/patchsets/alsa-utils.wheezy/alsa-utils /etc/init.d/; cp /usr/share/x2go/tce/patchsets/alsa-utils.wheezy/utils.sh /usr/share/alsa/; fi [ \$? -eq 0 ] && if [ "$TC_DISTRO_CODENAME" == "jessie" ]; then cp /usr/share/x2go/tce/patchsets/alsa-utils.wheezy/alsa-utils /etc/init.d/; cp /usr/share/x2go/tce/patchsets/alsa-utils.wheezy/utils.sh /usr/share/alsa/; fi # update all (mostly only one) initrd.img files [ \$? -eq 0 ] && update-initramfs -u -v -k all [ \$? -eq 0 ] && apt-get clean EOF chmod u+x "$TC_CHROOT/x2go_tce_install.sh" mkdir -p "$TC_CHROOT/"{proc,dev/pts,sys} mount -tproc proc "$TC_CHROOT/proc" || true mount -tsysfs sys "$TC_CHROOT/sys" || true mount -tdevpts devpts "$TC_CHROOT/dev/pts" || true chroot "$TC_CHROOT" /x2go_tce_install.sh for mountpoint in proc dev/pts sys; do while true; do cat /proc/mounts | grep "$TC_CHROOT/$mountpoint" >/dev/null && umount -l "$TC_CHROOT/$mountpoint" || break done done empty_folder "$TC_CHROOT/tmp" empty_folder "$TC_CHROOT/root" empty_folder "$TC_CHROOT/etc/udev/rules.d" empty_folder "$TC_CHROOT/var/log" empty_folder "$TC_CHROOT/var/lib/x2gothinclient" empty_folder "$TC_CHROOT/media" empty_folder "$TC_CHROOT/var/lib/nfs" empty_folder "$TC_CHROOT/var/lib/xkb" empty_folder "$TC_CHROOT/var/lib/dbus" empty_folder "$TC_CHROOT/var/lib/alsa" x2gothinclient_update echo "X2Go Thin Client creation has finished successfully." echo x2gothinclient-1.5.0.1/management/sbin/x2gothinclient_preptftpboot0000755000000000000000000000727513570107075022271 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. set -e if echo $0 | egrep "^./bin/.*$" >/dev/null; then ETCDIR="etc/" SHAREDIR="share/" elif echo $0 | egrep "^./x2gothinclient_.*$" >/dev/null; then ETCDIR="../etc" SHAREDIR="../share/" else ETCDIR=/etc/x2go SHAREDIR="/usr/share/x2go/tce" fi source $ETCDIR/x2gothinclient_settings TC_BASE="${TC_BASE:-/opt/x2gothinclient}" TC_CHROOT="${TC_CHROOT:-$TC_BASE/chroot}" TC_TFTP_FILES="${TC_TFTP_FILES:-$SHAREDIR/tftpboot}" TC_TFTP_BOOT="${TC_TFTP_BOOT:-/srv/tftp}" mkdir -p "$TC_TFTP_BOOT" test -e "$TC_TFTP_BOOT/pxelinux.cfg" && { echo "PXE boot files already found at $TC_TFTP_BOOT." echo "Clear $TC_TFTP_BOOT/ and then run $(basename $0) again..." exit -1 } [ "x$USER" == "xroot" ] || { echo "ERROR: X2Go Thin Client management scripts have to run" echo "as super-user root." exit -2 } echo "Preparing PXE boot configuration for X2Go TCE..." echo "------------------------------------------------" echo echo "Copying X2Go's TFTP (syslinux) template files..." cp -av "$TC_TFTP_FILES"/* "$TC_TFTP_BOOT" echo echo "Linking files for X2Go's TFTP (syslinux) boot environment..." cd "$TC_TFTP_BOOT" if [ "$TC_ARCH" == "amd64" ] then KERNEL_VERSION="amd64" fi if [ "$TC_ARCH" == "i386" ] then KERNEL_VERSION="686" fi # kernel image ln -sfv "$TC_CHROOT/vmlinuz.$KERNEL_VERSION" "$TC_TFTP_BOOT/vmlinuz" ln -sfv "$TC_CHROOT/initrd.img.$KERNEL_VERSION" "$TC_TFTP_BOOT/initrd.img" # memtest86+ ln -sfv "$TC_CHROOT/boot/memtest86+.bin" "$TC_TFTP_BOOT/memtest86+.bin" # syslinux components ln -sfv "/usr/lib/PXELINUX/pxelinux.0" "$TC_TFTP_BOOT/pxelinux.0" ln -sfv "/usr/lib/syslinux/modules/bios/vesamenu.c32" "$TC_TFTP_BOOT/vesamenu.c32" ln -sfv "/usr/lib/syslinux/modules/bios/ldlinux.c32" "$TC_TFTP_BOOT/" ln -sfv "/usr/lib/syslinux/modules/bios/libcom32.c32" "$TC_TFTP_BOOT/" ln -sfv "/usr/lib/syslinux/modules/bios/libutil.c32" "$TC_TFTP_BOOT/" cd - > /dev/null echo echo "DONE with X2Go PXE/Syslinux environment setup." echo "However, 2-3 manual steps are still needed..." echo echo "1. Make sure your DHCP server's configuration points to:" echo echo " next-server ;" echo " filename '/pxelinux.0';" echo echo "2. Export the X2Go Thin Client chroot environment via NFSv3:" echo echo " Add this line to /etc/exports..." echo " $TC_CHROOT /(ro,async,no_root_squash,no_subtree_check)" echo echo " ... and then restart your NFS server with:" echo " /etc/init.d/nfs-kernel-server restart" echo echo "3. Customize PXE/Syslinux files in $TC_TFTP_BOOT/ (optional):" echo echo " - customize PXE boot menu, take a look at $TC_TFTP_BOOT/default.cfg" echo " and proceed from there on..." echo " - use your own boot loader background image: 640x480px, 16bit colour depth," echo " file: $TC_TFTP_BOOT/x2go-tce.png" echo x2gothinclient-1.5.0.1/management/sbin/x2gothinclient_shell0000755000000000000000000001037513570107075020643 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. set -e if echo $0 | egrep "^./bin/.*$" >/dev/null; then ETCDIR="etc/" elif echo $0 | egrep "^./x2gothinclient_.*$" >/dev/null; then ETCDIR="../etc/" else ETCDIR=/etc/x2go/ fi source $ETCDIR/x2gothinclient_settings TC_SHELL="${TC_SHELL:-bash}" TC_CHROOT="${TC_CHROOT:-/opt/x2gothinclient}" test -e "$TC_CHROOT" || { echo "ERROR: X2Go Thin Client chroot does not exist at $TC_CHROOT." echo "Run x2gothinclient_create to create it..." exit -1 } [ "x$USER" == "xroot" ] || { echo "ERROR: X2Go Thin Client management scripts have to run" echo "as super-user root." exit -2 } cat > "$TC_CHROOT/x2go_tce_shell.sh" < /sbin/start-stop-daemon echo '#' >> /sbin/start-stop-daemon echo '# X2Go Wrapper to avoid running daemons while performing maintenance.' >> /sbin/start-stop-daemon echo '#' >> /sbin/start-stop-daemon echo >> /sbin/start-stop-daemon echo 'if [ "\$X2GO_HANDLE_DAEMONS" != "false" ]; then' >> /sbin/start-stop-daemon echo ' /sbin/start-stop-daemon.real "\$@"' >> /sbin/start-stop-daemon echo 'fi' >> /sbin/start-stop-daemon chmod a+x /sbin/start-stop-daemon fi export X2GO_HANDLE_DAEMONS=false export LANG=C mount /root ${*:-/bin/$TC_SHELL} cd / && umount -l /root echo echo "X2Go Thin Client Shell has exited." echo EOF chmod u+x "$TC_CHROOT/x2go_tce_shell.sh" mkdir -p "$TC_CHROOT/"{proc,dev/pts,sys} mount | grep "$TC_CHROOT/proc" >/dev/null || mount -tproc proc "$TC_CHROOT/proc" || true mount | grep "$TC_CHROOT/sys" >/dev/null || mount -tsysfs sys "$TC_CHROOT/sys" || true mount | grep "$TC_CHROOT/dev/pts" >/dev/null || mount -tdevpts devts "$TC_CHROOT/dev/pts" || true if [ -f "$TC_CHROOT/etc/resolv.conf" ] || [ -h "$TC_CHROOT/etc/resolv.conf" ]; then mv "$TC_CHROOT/etc/resolv.conf" "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" fi test -f /etc/resolv.conf && cp /etc/resolv.conf "$TC_CHROOT/etc/resolv.conf" chroot "$TC_CHROOT" /x2go_tce_shell.sh if [ -f "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" ] || [ -h "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" ]; then mv "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" "$TC_CHROOT/etc/resolv.conf" fi for mountpoint in proc dev/pts sys; do while true; do cat /proc/mounts | grep "$TC_CHROOT/$mountpoint" >/dev/null && umount -l "$TC_CHROOT/$mountpoint" || break done done x2gothinclient-1.5.0.1/management/sbin/x2gothinclient_update0000755000000000000000000000631613570107075021016 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. set -e if echo $0 | egrep "^./bin/.*$" >/dev/null; then ETCDIR="etc/" elif echo $0 | egrep "^./x2gothinclient_.*$" >/dev/null; then ETCDIR="../etc" else ETCDIR=/etc/x2go fi source $ETCDIR/x2gothinclient_settings TC_BASE="${TC_BASE:-/opt/x2gothinclient}" TC_CHROOT="${TC_CHROOT:-$TC_BASE/chroot}" TC_CONFIG="${TC_CONFIG:-$TC_BASE/etc}" test -e "$TC_CHROOT" || { echo "ERROR: X2Go Thin Client chroot does not exist at $TC_CHROOT." echo "Run x2gothinclient_create to create it..." exit -1 } test -e "$TC_CONFIG" || { echo "ERROR: No X2Go Thin Client configuration found" echo "at $TC_CONFIG. Please check..." exit -1 } [ "x$USER" == "xroot" ] || { echo "ERROR: X2Go Thin Client management scripts have to run" echo "as super-user root." exit -2 } mkdir -p "$TC_CHROOT/etc/x2go" echo "Installing X2Go TCE configuration into chroot environment..." echo "------------------------------------------------------------" mkdir -p "$TC_CHROOT/etc/x2go/" ls "$TC_CONFIG/x2gothinclient_init.d/" | while read init_part; do mkdir -p "$TC_CHROOT/etc/x2go/x2gothinclient_init.d/" if test -f "$TC_CONFIG/x2gothinclient_init.d/$init_part"; then cp -v "$TC_CONFIG/x2gothinclient_init.d/$init_part" "$TC_CHROOT/etc/x2go/x2gothinclient_init.d/" chmod a+rx "$TC_CHROOT/etc/x2go/x2gothinclient_init.d/$init_part" fi done if test -f "$TC_CONFIG/x2gothinclient-${TC_FLAVOUR}_start"; then cp -v "$TC_CONFIG/x2gothinclient-${TC_FLAVOUR}_start" "$TC_CHROOT/etc/x2go/x2gothinclient-${TC_FLAVOUR}_start" chmod a+rx "$TC_CHROOT/etc/x2go/x2gothinclient-${TC_FLAVOUR}_start" fi if test -f "$TC_CONFIG/x2gothinclient_sessions"; then cp -v "$TC_CONFIG/x2gothinclient_sessions" "$TC_CHROOT/etc/x2go/x2gothinclient_sessions" chmod a+rx "$TC_CHROOT/etc/x2go/x2gothinclient_sessions" fi if test -f "$TC_CONFIG/x2gothinclient-${TC_FLAVOUR}_background.svg"; then cp -v "$TC_CONFIG/x2gothinclient-${TC_FLAVOUR}_background.svg" "$TC_CHROOT/etc/x2go/x2gothinclient-${TC_FLAVOUR}_background.svg" ln -sf "/etc/x2go/x2gothinclient-${TC_FLAVOUR}_background.svg" "$TC_CHROOT/etc/x2go/x2gothinclient-background.svg" fi if test -f "$TC_CONFIG/freerdp/known_hosts" || test -f "$TC_CONFIG/freerdp/known_hosts2" ; then mkdir -p "$TC_CHROOT/etc/x2go/freerdp/" cp -v "$TC_CONFIG/freerdp/known_hosts*" "$TC_CHROOT/etc/x2go/freerdp/" fi echo x2gothinclient-1.5.0.1/management/sbin/x2gothinclient_upgrade0000755000000000000000000001072513570107075021162 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. set -e if echo $0 | egrep "^./bin/.*$" >/dev/null; then ETCDIR="etc/" elif echo $0 | egrep "^./x2gothinclient_.*$" >/dev/null; then ETCDIR="../etc" else ETCDIR=/etc/x2go fi source $ETCDIR/x2gothinclient_settings TC_CHROOT="${TC_CHROOT:-/opt/x2gothinclient}" test -e "$TC_CHROOT" || { echo "ERROR: X2Go Thin Client chroot does not exist at $TC_CHROOT." echo "Run x2gothinclient_create to create it..." exit -1 } [ "x$USER" == "xroot" ] || { echo "ERROR: X2Go Thin Client management scripts have to run" echo "as super-user root." exit -2 } cat > "$TC_CHROOT/x2go_tce_upgrade.sh" < /sbin/start-stop-daemon echo '#' >> /sbin/start-stop-daemon echo '# X2Go Wrapper to avoid running daemons while performing maintenance.' >> /sbin/start-stop-daemon echo '#' >> /sbin/start-stop-daemon echo >> /sbin/start-stop-daemon echo 'if [ "\$X2GO_HANDLE_DAEMONS" != "false" ]; then' >> /sbin/start-stop-daemon echo ' /sbin/start-stop-daemon.real "\$@"' >> /sbin/start-stop-daemon echo 'fi' >> /sbin/start-stop-daemon chmod a+x /sbin/start-stop-daemon fi export X2GO_HANDLE_DAEMONS=false export LANG=C mount /root [ \$? -eq 0 ] && apt-get update [ \$? -eq 0 ] && apt-get upgrade [ \$? -eq 0 ] && apt-get clean # check for kernel upgrades for symlink in /vmlinuz /vmlinuz.old /initrd.img /initrd.img.old; do if [ -h \$symlink ]; then symlink_target=\$(ls -l "\$symlink" | awk '{print \$11}') echo \$symlink_target | egrep ".*-486$" >/dev/null && mv \$symlink \${symlink/.old/}.486 echo \$symlink_target | egrep ".*-686$" >/dev/null && mv \$symlink \${symlink/.old/}.686 fi done # restore start-stop-daemon [ \$(stat --format '%s' /sbin/start-stop-daemon) -lt 200 ] && mv /sbin/start-stop-daemon.keep /sbin/start-stop-daemon cd / && umount -l /root echo echo "X2Go Thin Client Shell upgrade has finished." echo EOF chmod u+x "$TC_CHROOT/x2go_tce_upgrade.sh" mkdir -p "$TC_CHROOT/"{proc,dev/pts,sys} mount | grep "$TC_CHROOT/proc" >/dev/null || mount -tproc proc "$TC_CHROOT/proc" || true mount | grep "$TC_CHROOT/sys" >/dev/null || mount -tsysfs sys "$TC_CHROOT/sys" || true mount | grep "$TC_CHROOT/dev/pts" >/dev/null || mount -tdevpts devts "$TC_CHROOT/dev/pts" || true if [ -f "$TC_CHROOT/etc/resolv.conf" ] || [ -h "$TC_CHROOT/etc/resolv.conf" ]; then mv "$TC_CHROOT/etc/resolv.conf" "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" fi test -f /etc/resolv.conf && cp /etc/resolv.conf "$TC_CHROOT/etc/resolv.conf" chroot "$TC_CHROOT" /x2go_tce_upgrade.sh if [ -f "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" ] || [ -h "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" ]; then mv "$TC_CHROOT/etc/resolv.conf.disabled-by-x2go" "$TC_CHROOT/etc/resolv.conf" fi for mountpoint in proc dev/pts sys; do while true; do cat /proc/mounts | grep "$TC_CHROOT/$mountpoint" >/dev/null && umount -l "$TC_CHROOT/$mountpoint" || break done done x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient-displaymanager_background.svg0000644000000000000000000001420313570107075026360 0ustar image/svg+xml x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient-displaymanager_start0000755000000000000000000000402213570107075024601 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. /usr/bin/x2goclient --no-menu \ --maximize \ --link=lan \ --kbd-type=auto \ --set-kbd=1 \ --geometry=fullscreen \ --thinclient \ --haltbt \ --read-exports-from=~/export \ --background=/etc/x2go/x2gothinclient-background.svg \ --no-session-edit \ --session=X2Go.Example \ --add-to-known-hosts & #/usr/bin/x2goclient --no-menu \ # --maximize \ # --link=lan \ # --kbd-type=auto \ # --set-kbd=1 \ # --geometry=fullscreen \ # --thinclient \ # --haltbt \ # --read-exports-from=~/export \ # --background=/etc/x2go/x2goclient-background.svg \ # --broker-url=https://x2gobroker.intern:8080/plain/zeroconf \ # --broker-autologoff # --add-to-known-hosts & x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient_init.d/005_x2gothinclient-wipe-home0000755000000000000000000000226513570107075027057 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. if [ -z "$X2GO_HANDLE_DAEMON" ]; then if [ -d ~x2gothinclient ]; then find ~x2gothinclient -mindepth 1 -type f | egrep -v "(\.Xauthority|.dmrc)" | while read file; do rm -vf "$file" done find ~x2gothinclient -mindepth 1 -type d -delete fi fi x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient_init.d/010_x2gothinclient-fresh-home0000755000000000000000000000433113570107075027212 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. if [ -z "$X2GO_HANDLE_DAEMON" ]; then mkdir -p ~x2gothinclient mkdir -p ~x2gothinclient/.x2goclient if [ -e /etc/x2go/x2gothinclient_sessions ]; then cp /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2goclient/sessions fi if [ -e /etc/x2go/freerdp/known_hosts ]; then mkdir -p ~x2gothinclient/.freerdp cp /etc/x2go/freerdp/known_hosts ~x2gothinclient/.freerdp/known_hosts fi if [ -e /etc/x2go/freerdp/known_hosts2 ]; then mkdir -p ~x2gothinclient/.config/freerdp cp /etc/x2go/freerdp/known_hosts2 ~x2gothinclient/.config/freerdp/known_hosts2 fi if [ -e /etc/xdg/autostart/x2gothinclient-minidesktop.desktop ]; then mkdir -p ~x2gothinclient/Desktop cp /etc/xdg/autostart/x2gothinclient-minidesktop.desktop ~x2gothinclient/Desktop/ chmod 0700 ~x2gothinclient/Desktop/x2gothinclient-minidesktop.desktop fi mkdir -p ~x2gothinclient/.kde mkdir -p ~x2gothinclient/.kde/socket-`hostname` mkdir -p ~x2gothinclient/mounts mkdir -p ~x2gothinclient/.gnupg echo -e "pinentry-program /usr/bin/pinentry-x2go\nenable-ssh-support">~x2gothinclient/.gnupg/gpg-agent.conf mkdir -p ~x2gothinclient/export mkdir -p ~x2gothinclient/logins mkdir -p ~x2gothinclient/.ssh mkdir -p ~x2gothinclient/.x2go chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf chmod go-rwx ~x2gothinclient -Rf fi x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient_init.d/950_x2gothinclient-minidesktop0000755000000000000000000000205113570107075027515 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. if [ -d "/lib/live/config" ] || [ -e "/usr/share/doc/x2gothinclient-minidesktop" ]; then . /etc/X11/Xsession fi x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient-minidesktop_background.svg0000644000000000000000000001026313570107075025710 0ustar image/svg+xml x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient-minidesktop_start0000755000000000000000000000400713570107075024132 0ustar #!/bin/bash # Copyright (C) 2010-2019 by X2Go project, https://wiki.x2go.org # Oleksandr Shneyder # Moritz 'Morty' Struebe # Mike Gabriel # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # make sure pulseaudio can be reached via TCP from the X2Go Server side... /usr/bin/pactl 'load-module' 'module-native-protocol-tcp' 'auth-ip-acl=127.0.0.1;::1' /usr/lib/x2go/x2goclient --no-menu \ --maximize \ --link=lan \ --kbd-type=auto \ --set-kbd=1 \ --geometry=fullscreen \ --read-exports-from=~/export \ --no-session-edit \ --session=X2Go.Example \ --add-to-known-hosts #/usr/libx/x2go/x2goclient --no-menu \ # --maximize \ # --link=lan \ # --kbd-type=auto \ # --set-kbd=1 \ # --geometry=fullscreen \ # --read-exports-from=~/export \ # --broker-url=https://x2gobroker.intern:8080/plain/zeroconf \ # --broker-autologoff \ # --add-to-known-hosts x2gothinclient-1.5.0.1/management/share/etc/x2gothinclient_sessions0000644000000000000000000000207113570107075022313 0ustar [20100623163928371] defsndport = false useiconv = false iconvfrom = ISO8859-15 height = 768 export = speed = 4 fullscreen = true width = 1024 quality = 9 xdmcpserver = localhost soundtunnel = 1 rdpoptions = soundsystem = pulse print = 1 type = auto sndport = 4713 usekbd = true fstunnel = true applications = OFFICE, WWWBROWSER, MAILCLIENT, TERMINAL host = 192.168.0.254 link = ADSL user = key = startsoundsystem = false icon = sound = true rootless = false name = X2Go.EXAMPLE iconvto = UTF-8 rdpserver = useexports = true command = MATE dpi = 96 sshport = 22 setdpi = false pack = 16m-jpeg [20120607130604224872] height = 768 export = fullscreen = true useexports = 1 width = 1024 speed = 4 rdpoptions = soundsystem = pulse print = true type = auto sndport = 4713 usekbd = true host = rdpserver.your-intranet.local multidisp=false sound=false rootless=false name=DirectRDP.Example command=RDP dpi=96 published=false setdpi=false user= maxdim=false rdpclient=xfreerdpnew directrdpsettings=/d:YOUR-DOMAIN /sound:sys:pulse /cert-ignore rdpport=3389 directrdp=true x2gothinclient-1.5.0.1/management/share/tftpboot/default.cfg0000644000000000000000000000264613570107075020704 0ustar # # example for a main boot menu of an X2Go Thin Client # DEFAULT vesamenu.c32 PROMPT 0 MENU BACKGROUND x2go-splash.png MENU TITLE X2Go Thin Client Environment include local-boot.cfg include x2go-tce.cfg MENU SEPARATOR include memtest.cfg # menu settings MENU VSHIFT 3 MENU HSHIFT 18 MENU WIDTH 60 MENU MARGIN 10 MENU ROWS 12 MENU TABMSGROW 13 MENU CMDLINEROW 23 MENU ENDROW 12 MENU TIMEOUTROW 18 MENU COLOR border 30;44 #40ffffff #a0000000 std MENU COLOR title 1;36;44 #9033ccff #a0000000 std MENU COLOR sel 7;37;40 #e0000000 #20ffffff all MENU COLOR unsel 37;44 #50ffffff #a0000000 std MENU COLOR help 37;40 #c0ffffff #a0000000 std MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std MENU COLOR msg07 37;40 #90ffffff #a0000000 std MENU COLOR tabmsg 37;40 #e0ffffff #a0000000 std MENU COLOR disabled 37;44 #50ffffff #a0000000 std MENU COLOR hotkey 1;30;47 #ffff0000 #a0000000 std MENU COLOR hotsel 1;7;30;47 #ffff0000 #20ffffff all MENU COLOR scrollbar 30;47 #ffff0000 #00000000 std MENU COLOR cmdmark 1;36;47 #e0ff0000 #00000000 std MENU COLOR cmdline 30;47 #ff000000 #00000000 none # possible boot profiles for ONTIMEOUT: # localboot, x2go-tce # (... or any other profile you defined in your customized menu) ONTIMEOUT x2go-tce TIMEOUT 10 x2gothinclient-1.5.0.1/management/share/tftpboot/local-boot.cfg0000644000000000000000000000035013570107075021301 0ustar # English LABEL localboot MENU LABEL Boot from ^local harddrive MENU DEFAULT localboot 0 # German #LABEL localboot # MENU LABEL Von ^lokaler Festplatte starten # MENU DEFAULT # localboot 0 x2gothinclient-1.5.0.1/management/share/tftpboot/memtest.cfg0000644000000000000000000000013213570107075020722 0ustar LABEL memtest86plus MENU LABEL memtest86+ (run memory test) LINUX memtest86+.bin x2gothinclient-1.5.0.1/management/share/tftpboot/x2go-simple-splash.png0000644000000000000000000001033213570107075022732 0ustar PNG  IHDR5sRGBbKGD pHYs& StIME#";ZIDATxR#H#b02R |A JUvYd90H=Fjh n$чYj F>ޟn3x?ןX]] n@ @ҕh,# @ @ @@ @ @ @@ @ @ @ @ @ @ @= ]e_V1_ky[ƣQL'Iq\zӳ899i}7uV>Pֶ@hlVm7&"8;ۧiI(q&/&>N4A<9l^/,Ye~oM8;=8;=dR}nooK_n@(͛7RED`8]N^L iQùy pX^v݆߭@:+4u ZM[@؃&? ASV@ +`ֿ]c?@Sy)82_ xFZz^iz5 }ݎ}7&ٺ5͛]Lj/>p(om-Ol_:ǙNOk:*tY_ǰ@`W_n%Igٱu $Yu ~Agy{xEBg׿]Qٿc.;麓o|u;M](uZ QZpDuX@8*+dogPvG{[@xϵZc,|g@¾{-5s7oKFpVy){/]ie;ϑdu @ؗ*1@cu]ȠP#P¡::__ СV@j+5|LZPsYu ZZ@h? 4Lp<ETe_ n< 8L\W@QeW^Xv+R{L> PI)#FquuUjMM$拹@iʬEYv˯kmE7n\<@OWf,1~1޹m{ t%Y{[;;=AI=v-4[ ,Ww^V@osh+s@Bv @B}55Pku_rMz` VSֿOԔ/WefV@ D4o˕]#<"y_  嬀@(_ ʮQ/Wf Uz}Ki߿/[us\ׯJ?#˲R珑Sr^[q? DB-[~[y77n:}+?@@ @ @  @ @ @  @ @ @@ @ @ @@ @ @ @ @ @ @ @ @ @ @ @  @ @ @  @ @ @ @ @ @ @ @ @ @ @ t  @ @ @@ @ @ @@ @ @ @ @ @ @ @ @  @ @ @  @ @ @  @ @ @ @ @ @ @ @ @ @ @ @R?._^m /7_ED""wbe@ _>׿ kf{cIENDB`x2gothinclient-1.5.0.1/management/share/tftpboot/x2go-splash.png0000644000000000000000000004447213570107075021457 0ustar PNG  IHDR5sRGBbKGD pHYs B(xtIME7R _ IDATxYoؚy<h#;* S -a6RT`z@nhT [i@f$lQ} Sh#i@7rm46a-nm46"@XyEܶ}ڻ}嶺Onx_xal @q C$gnu3eM*Ws7c۸r[sqrY~ѭe=ܔeY[al# pDqKu˖T4mZg ڕA%I~ﻻmgG''z7g!EqM0L9w7&ẑB&Fa;ĩRIt+2D6!Tٴ=@L.}o1[bڈ2f!r#n6"O긋[[\`&<8j9ZqhQFCGz+[a U 2L2L@bb?k'qHr C-ו#Z\yHvvo5={P)ԋ}m:_twaAT*]i4roeEK%z@ؾNFf"N>} 3na{uA0`ggNw~vgli뺪Zc4x#6*# g_wTiff(k\~qk3.$LʖEt!,Hw Z ͒ W:>n6Ua 4 CKrɤlR>{knNjUgI&Z當ml[ܥŦ5a+mT2Injpz|dRl2\*oAF#n/.js~| uQk#Qa}]esnzO\dĨ8r\WMU7 C鴞_J`/,x7‡mԣ?0 ‚ߤ*bmd&3[sxg>:gǹUkH^;]2M=/t؆(m[VwmD|2>X^V!^S٢86{`VQ~< l0$? g8y{N]_NO>7mZL&I$nVf6Fvosv:}WyJmbEWh];Wg?7Kb 4kqj:jU ǹus6(o5M=X^]x_ [QviIbQ* qg Ð!=ۯvo4 \庪4cyfG =cg.|?|q=yKX9jlTպ}t!F]L'Z+v a&Shw: {І:tx&mt|}K+t>+\ŐXTʲdYGQlΈ+慟swq{psutNR)j50K@GRSR]R&yYu]k꺪9sx94\W͎炄mԾ-GqPֵM&w-UWL}Q٢6atWh 9H^SgŰ:ܣJ]]3%-R\^{(_e.FR5)/V.W -Sk{\`*SC~K[n6 MSR4,-KDBsm[ɤmҶ۫s\cZUqFR5kWo!Q!YeP٢86_f\0Fr5!7i+\W;J nz]_ 577y#lFei0إ<ԵMvLܞ4.ݮ]8D٬ګpVi_&oۗS޺CvU[f荺;ot;^xH_+5Jt:>Z}+9lojFڗZM%?te)gY*_}qtPk>x\iyíb }#﮺xqmTuKtZ"πA` t.Ev/%WUlJ*<ܗJEP7ߺVHXfϲaHf!Ā7Ck!l_ 2;~mwPýxhP6`pkuv̍f# -)E[#T*k_ʲFvbu6곭ښMWU`^ײmMIv'nW*|?>+W卼rC]!9Oa1'`$@` =C:rB1{ΩbʭqvZ %iZZ&#=%L~rǚ\R7!5}b[v6ҭ[:_j@8v[7iH#t]jZJ|]''o-UҲF~#( [>NGFKO`Yi&$qo{*s |~lz_h6qnߖYPzLe1ټ~#m|6zzHѲt;>` MSU VK ~`~~//UUQWx$z ]0 ->~s +UAV58k5QcTJ2XKB{-nz$0\F~Eآ7\m>?2o:Qu|]_#?\JFwn)a }4 5a4ZFGVYdZCx7 E1dǝ*Ts(2Iƛ Zs ͔d`DjU8vk5;-j&3ޛoHR}\}#(7 ڹDBF]ۭtBէz&#z}}CmA ) K67Y\ qճ;}ӯ,w_ ܹI>ئDB{L !p5vza=ahqW:n<Z ~ ^Ļ7}uujHЖm(I;I}8Ү;lz [! ]Ur@`A uϹwmk4TZ4,t8 01dܡC=B ac0M-=}O\ J0{ ?]-'@If=9yy6Z~T_.оy)CaȐ\-)/6 eMSyT.mhYJ@4M-%X-c;MX^+|CvutT'_9׷_M0 mٶ,$-۶>J]A졮۔측- G':z@a+m.4w~+: Pu$0dR҆a(o*JǼei4hYZ,JSz} ^'q1nWP@+Է[rak]\,e-|Ja)au$A&0ʅ@ec(k@` 0<|(G-IwL敳,e Cko4LN.tH-VhK .`W޳nkW~w$?tջv>n>7ԶܾƼr*lnrU0W'ǐG@Hi(iYg,:ʭrsLZDe u[ۇ\ 0l ,3V۵e -Vۨs[Eݽˈ` 'n5IUIIeUuu8:r]G{VK;VK_M5@Z-[-ꥍ۷2L.m `yzu4ﵠAlCҒV*n7J_iS٢6J ZxP_+<-Y áFJ_ꎣC]Кm+a a@<6Z{J{"w*;'Rpp]K_0 nV;s! C y]ׅͦVl{7G؊suQl#;ғ'*a 9cY\"1Ʌ/]tF왾\  ^Y盖BWeb_?k: CʅGJ-z#Fah=!Nj ^f+D]W]bnVah4`NQJآ8 =wvWWU+>L;N2hJS~uU{`F rjj) t#ۄ-lT7޾տr0Ywm]T[mߨj%(Z bw2F٥%߿E ^fa 2t9IwuunhU%~ _M&UM4ohiP0t`bfS˶=yǾ˳\N/^?#W~iq  :cTwtweG/knhu/Y ͍Ba5˫eı=WYkWTnJ}nh퉡kqTj9 -z#>İ,m|WbA c]{>/ ӹMnpqG|IacCŭ-.PΚAoMRn5IWUz FII׭\v][-e۫@*[Tg6A'? 6G A¸G+BiZY]KK"lp٬=ӗ NҰ@n2u ӿ\ǰտ>!P0yЎuǑ#r"I"lR-?_e@`beklw}^7B8%iN'W\7L"lPׯY'@,1dĪ lŀ߲8rz=Xޞ=l51&3Fŭ-ݽ˅ pVn[GlIepp?vunK9)P>$W9r [ƻwR)b%@ >e޸=B_8Zp9Twڅ&݈tƠTJ_?# Nh^Sd}_wwzQW}ӯٿ9]<_I^uuIǮ7I"lšܜ=`& 8^A&y:?_ny;';+* qt0dt x<nt>MFc8uor@pV+ՎwYy>_Q{MgIzProݣ~뒾LkO?8ZT>F^8t8K˼])/~`V~7m=_.Z7G*[T|RIKOj_;*=^~9&ZwU- 49{msepPw(飤_x/C3Rp?Z~ _v~s]8:pU [3ܴ7LS'ͅLHy5#䵿&!vy>?fs~ťnP:~kY7yꝍA tn__և?s $ܵ?ZGk^SԸyɮ:}$f}~PbEGP$= A#mc}Uwa2h _jjADV,lkuI ljȻ9~_w9n3Zu=L%imnbT/a@|նkkk "LMGqm~T5s4`g[Q٢HUBa tT2ja6껭T7ox vK[>:*i*[#>a+x=n%oe ~WQ]T7Y."mGwt2jSI_;یa6 V2[?(d\$oy-F /mFeE ?ض*[.6 IDAT<8} I_6im [-(F..B㇍Vdy#-ʶ2: Zǿymbpq=nhmj5_ #y]U1Gഘ*~iyc[+mtOwv] !l붵gB[su: -]g*nmq@DB a6qo{Tu3 [- (ӶN b aq_~2۷\H"Ǡ67Ġ@%fE vO*gFNe@<62 m{';tgYnD b [T Ē*U*i a$lc\},nmi W$l&F/_*u -@l6^v.u@P!lqV2ᅲarY@D\B -mB (z [ĥ۷5w.@8FF}q,~ @3R"lű$ix@a+mdڶnOIY:V?021 :V<(W H"lũJw\ tF/^(u -8H۷J\A$lFm֟$+:@a+mdg2F "AE؊Ye B an!? -5H/?`@ [TF?2P@DC a5#df"Y3 lQ}eg2,s@8m4R6^2 }@ [U|y[d[sw2=  su ϟx= @W/a+NǵSz~ lR}4LS[+s 3%wm߲mmR)y@`&VHB@lg2z9(a5mf@@G58@ (z [ܽ{!Eؚ6Z}Bŭ-u`H"lE^Rfas  [Yk#6^v.ǹ -,L֏?*p@B a5mHL\zAak(k[&H"lHe-E@ׅ@ak(/8 B a5kmTsG q@}C a5mJos@WAa+*p/_*   (#-ikJ%o p$l#Fei{%yo H$lz#W˶=@AB a@JV  - wPƻw -f]\7  [.m_[ӧ !E=d߿Ǐ9 !0Ja+L@@@V6 UAQ٢7ځ˭pN@C@B@lZFi`H"lE ۷, %lE5[ɤ6,4@0He lL NdR@*b;APLB؊n N   t#'lQ}v[RIk^n0@0l$lFU}! &[QmƆV?\-Vۨt>\ -VDhco<F [@`$!E؊P<21@pH"lE ۷@&!E؊Z02 P!E؊`w*8 a6,Kd>9 $ģ1ixNts i$lFLF[J8 @a+JǝdIa`H"S:ҥ۷*@0 H"ܽ{C a*ݹy 3 [-=y&)@0H"W?Wnu@~ [[ׁ%i e8OAA]!k#4wJs -q۴,}\s@w$l;qV2'xLj[%2Q`!8D:oeR B Y Ym}+Ӷ9GAAQ272,@Xw liTׯeA@z>Z}R2 O`!%!iV =!jښ<& [␴QqkKs^-hݽy  &hGT& [iғ'ʯq^ -Hʷ*y  L$ah#I+/^(y  L,Sn#0wJqNS -0M~d9  L:X6oZjZ߼qN  S~̹ L<K q4w."0 Hآ86@MC`!pC&x^VW9Ai@*[≶ah3e9AiYhb4R!0Hؚ62,Kk}';<EW/xmdڶ_V"BC:[TJoJ&9AP@xJZ{Zf"9 L;ējd.՗/e܊A@xmc``!E qVV7 ԃ a@<}-llh== T!E ߻[{ @XB a@<}]xP= !E ľO*9@@xBmd^R2B [ aYZ;B [J&5KƁ 1 [a>NFt[-IJ8@0@z ld/X2@S$lFy-=y9 &8<B [ 4nf !@1Çʯqa -{o| [wLG0 ()hZV_Jq E q[ɤ7G ET#jd>%\B [QfaAsavn_=SP|!f. í0H؊w n3 <.+D!f3 vT]Ą;ؖiZad0,8r u@Aޛb;ғ'@@n0# _T.f5G˶)# y48={8B؊~ NL; vT akfqnyY5@zdVKjUr糂*x]u5 UA–" ғ'I@n=$lE#[%uj5UVUS M`$i4(gF[ѩ>֔[]L`,jYv|f*q[>aJ ]{XrYNI y0M-=y"ӶyUvx7tJ7a%psYvt7h *4w.oX LޜcONԪcƱVacCޫ@F=\;<0] fyq8=UlHPqOB`ZjGG3۟q'R)-JÇ<H`z VըT'] V2Ǐ$t岪j^^{8ak!*y@H?LeoO;ՊqqkK9t@’]5ճ 4ta[<H ժYE6lhڶ>MF Zj:0?'5}ҥ j~|ׯ|Fx_[[J <:Nww#3s8Oh>aYD! jtwWCoQ?~-Ji}O@ժ*_qdEey/Vޞ،žݽ++MD A]Q7>M Rq@"tfc2g8 i4TΎ ]ƆR"o 3MUTV\z kq}!0[VKCըT ٖLt6o 3Fr-IN$U%5-III9IIe)U(fA!oݯr[ogUxσ߶}ѤeIs- A0x ctM}WN$PwHIҞԺ]^0r[g~,w^f"wyc=~3%"+m 1PeoO/_8=ޛkf~UB]I1 g%Ou$ ATu_/_.S i۲IcgTv$fkǜ}; dRRIi3 `kC}'q =7.O2-HZ@$`Ftӝcp8'I_fN%,߿'oL>DB^Ύ;;>3s nݢ+xqۏxcmK2 :AVSy{[r͙_>ΰ,ݻGr+mJe!$S@4+|ׯgAanmTY &;JF xLUON>VPNu9[[2m0\<3"@|KKoMёN>}R Nn[eV, T~Ɖ5\Q@?^C0 ]m+3?< =KpÊXlhr]֟8 ARW|f6SnߖaY4ITH'9@h> U;;r֍ܘBHEJŨOn?fJROu/]ZR2ag!&&3Fqy 3uU?>ǏjFyVAD`f%5٥Xf8Z:jnLFU44m$=hk[jq>kj:lEaܠmD:McF9%zzGCҚnߨZ仂Q.Qn!4$=V|\Br/ qTɧOjV nh**h(rnH缤G6g0Xcwr>@,u|-UBJn0M0P:^oiy]Hڐ7hbVY0Ɵ ^q8zٖiʭpC0f]*oSLy#FۗD3m&UP$+Tfq` =J4,ݯSyr]뿪Uc.@\%i[ވP['0`(U((=7w [6pjGGktGfu>e' I^\W#fRŢE[sO=9@n_4gDV+X!d1CI~hJ:?U~+)P(uT(pVq3dr]{5vp}kTJ٥%P6(]5NO]Z,+xF 󫫪mukU?>qf"CҮM =dpe0..J1ƪQ.塃ȂaN_twwlӽ R\F!I q xYCREފ`tfS'?<(ٙ C_!Iy{n_Ur++l{Va}]_i kUc9#OH27]y˹2lժtჲKKJ 0`"VznNՃ腯y}iI?%_8-?5}u3[:jT*.-y=m7 :*!UU/t#0凴 IǸ|&b~|fꪬdr"Yɤ2#BRLq4" FC?v|< 7Ѓxq:NwvTّ8}ۨa rVB/%qT?>→U n @iI0$>Ĕh5NOǺJH(=7/<Pn`ʛrG'>yӵq%oj)$]3IDAT;&ReoO v$C+TX-hQޠIʛ9Ypu* %oIHKz$opY^чjV9oC$Ykݖ4΢!b:6p[-F˪j($=ͯT~ׯu^ 3 @\n4sJ#?HupcÑNz@twGuoK·$}#Y$BF~rϟZgA&#\$^#j^'6=OROr͎7T$Ìg"TCb&UG/`4c<p@c,4:INuUB LP~ `zZzJ`G*D,'& NqLK@*B50˴5c/0ͯpfbppHܪ¨> S"uV:Wl4ts'-;#_+}NZ²qAC` jW N~h;ac_0ϯPx $b2' pK5zCǣC*8"iUB$WV^JH#*"ן!q&XpM^JH" 6^JȬf1k$J-I2򦄱U }YɤLF2 +0΃aT#ISҡ#?]e3-oj9IQB,)K*llȴ( ++Hi6gC\CG 郤9@~ \ V{P;A"&%m^$*I7}CIGIG҉> 暕j}C챇 xU_$ݞN$}t yݤyk&ʫU@կR,JZ A.9$oD:-˶C%He\!%iS^gƖUWu?[CaHZt^}ǹ9UeoOKA$)ɨQ.)%$͏%Jټa߻ ʶUAG3_%k]_$U$4f 2 ,p2~PU(̺g$UJ#*۩2 InRVY˷=-zS̠PNH^OC_R޳pF:euO+K~WI.x+&6Ls&WIyܑu[?r9z+[^onBǑP3x_zϾo u9_s@''s9%R D'i:Oꇵ/~P:_F^?wpunIIK1cAtu>PdAިAx:FguSW~mh1pڃCj~9ӯt* |]y#N+,6w*+{0%mhgVzd.wgK8~~ jvg g,!op˲{|͉>rQ^Fjހ aY2m[ uGv-e(|ރ`}L]zsM5eٹY4 &9#Pڒ|_WXԎdrARzX?tV]ם`Lټf"!ÜDi6լVBLf]ߌuhjjD\뺲$V*$òff  nf=hW 1ѬV: k6_%\uժeY X 'n=8SjH46T!,Z2 +u ʀCWG f @  ^H! `F/}IENDB`x2gothinclient-1.5.0.1/management/share/tftpboot/x2go-tce.cfg0000644000000000000000000000025113570107075020676 0ustar LABEL x2go-tce MENU LABEL X2Go ^Thin Client KERNEL vmlinuz APPEND initrd=initrd.img nfsroot=/opt/x2gothinclient/chroot boot=nfs ro quiet splash x2gothinclient-1.5.0.1/minidesktop/desktop/x2gothinclient-minidesktop.desktop0000644000000000000000000000056013570107075024370 0ustar [Desktop Entry] Version=1.0 Type=Application Name=X2Go Client Exec=/etc/x2go/x2gothinclient-minidesktop_start Icon=x2goclient StartupWMClass=x2goclient X-Window-Icon=x2goclient X-HildonDesk-ShowInToolbar=true X-Osso-Type=application/x-executable Terminal=false Categories=Qt;KDE;Network; Keywords=Terminal,Client,Remote,Desktop,Published,Applications,Session,Profile; x2gothinclient-1.5.0.1/minidesktop/desktop/x2gothinclient-x-www-browser.desktop0000644000000000000000000000047113570107075024615 0ustar [Desktop Entry] Name=Web Browser Name[pt_BR]=Navegador web Name[zh_TW]=瀏覽器 GenericName=X Web Browser GenericName[pt_BR]=Navegador web gráfico GenericName[zh_TW]=網頁瀏覽器 Exec=/usr/bin/x-www-browser %u Terminal=false Type=Application Categories=GTK;WebBrowser;Network Icon=web-browser NoDisplay=true x2gothinclient-1.5.0.1/minidesktop/etc/lightdm.conf0000644000000000000000000000062013570107075017106 0ustar # Launch lightdm in autologin mode to facilitate the startup of the # X2Go TCE minimal MATE desktop... [SeatDefaults] xserver-allow-tcp=false greeter-session=lightdm-greeter greeter-hide-users=true user-session=mate session-wrapper=/etc/x2go/x2gothinclient_init autologin-user=x2gothinclient autologin-user-timeout=0 pam-service=lightdm-autologin session-cleanup-script=/etc/lightdm/restart.lightdm x2gothinclient-1.5.0.1/minidesktop/etc/restart.lightdm0000755000000000000000000000013513570107075017651 0ustar #!/bin/sh trap "" SIGHUP SIGINT SIGTERM PATH=$PATH:/sbin:/usr/sbin service lightdm restart ././@LongLink0000644000000000000000000000016200000000000011602 Lustar rootrootx2gothinclient-1.5.0.1/minidesktop/ltsp/client/init/88-x2gothinclient-minidesktop_disable-ltsp-display-manager.shx2gothinclient-1.5.0.1/minidesktop/ltsp/client/init/88-x2gothinclient-minidesktop_disable-ltsp-displ0000644000000000000000000000242213570107075030462 0ustar # Copyright (C) 2019 X2Go Project - https://wiki.x2go.org # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. # # Copyright (C) 2019 Mike Gabriel # This file is not part of LTSP, https://ltsp.github.io, but extends it # On X2Go Mini Desktop Thin Clients, the display manager (LightDM) gets # configured via the x2gothinclient-minidesktop package and does not require # tweaking by LTSP. # In fact, the LTSP display manager tweaks break the way the X2Go TCE adapts # the LightDM configuration. So let's disable the display_manager_main() # function of LTSP, entirely. display_manager_main() { return 0 } x2gothinclient-1.5.0.1/minidesktop/mate-panel-layout/x2gothinclient-minidesktop.layout0000644000000000000000000000251113570107075026117 0ustar [Toplevel bottom] expand=true orientation=bottom size=24 [Object menu] object-type=menu toplevel-id=bottom position=0 locked=true [Object shutdown] object-type=action action-type=shutdown toplevel-id=bottom position=10 locked=true [Object logout] object-type=action action-type=logout toplevel-id=bottom position=20 locked=true [Object workspace-switcher] object-type=applet applet-iid=WnckletFactory::WorkspaceSwitcherApplet toplevel-id=bottom position=30 locked=true [Object show-desktop] object-type=applet applet-iid=WnckletFactory::ShowDesktopApplet toplevel-id=bottom position=40 locked=true [Object web-browser] object-type=launcher launcher-location=/usr/share/applications/x2gothinclient-x-www-browser.desktop toplevel-id=bottom position=50 locked=true [Object file-manager] object-type=launcher launcher-location=/usr/share/applications/caja.desktop toplevel-id=bottom position=60 locked=true [Object window-list] object-type=applet applet-iid=WnckletFactory::WindowListApplet toplevel-id=bottom position=70 locked=true [Object notification-area] object-type=applet applet-iid=NotificationAreaAppletFactory::NotificationArea toplevel-id=bottom position=10 panel-right-stick=true locked=true [Object clock] object-type=applet applet-iid=ClockAppletFactory::ClockApplet toplevel-id=bottom position=0 panel-right-stick=true locked=true x2gothinclient-1.5.0.1/minidesktop/schema-overrides/19_x2gothinclient-minidesktop.gschema.override0000644000000000000000000000047613570107075030252 0ustar [org.mate.panel] default-layout="x2gothinclient-minidesktop" [org.mate.interface] icon-theme='menta' gtk-theme='Menta' [org.mate.Marco.general] theme='Menta' [org.mate.caja.preferences] always-use-browser=true click-policy='single' [org.mate.media-handling] automount=false automount-open=false autorun-never=true x2gothinclient-1.5.0.1/README.howto0000644000000000000000000000032213570107075013524 0ustar X2Go Thin Client Environment ============================ A detailed installation description is available in the X2Go Wiki: https://wiki.x2go.org/doku.php/wiki:advanced:tce:install light+love, Mike Gabriel x2gothinclient-1.5.0.1/README.i18n0000644000000000000000000000622713570107075013155 0ustar Translating X2Go Thin Client ====================== Translating with gettext ------------------------ X2Go Thin Client uses gettext as translation service/mechanism (.po/.mo/.pot files). The translation files can be found in the /debian/po folder of this source project. The x2gothinclient X2Go component currently only requires translation for the DebConf templates (configuration screens of Debian/Ubuntu/ packages. A translation of upstream code is currently not necessary, but this may vary in the future. New team member --- new language for X2Go Thin Client ----------------------------------------------- If you are a new member in the x2go-i18n team, the first we say is: WELCOME!!! and THANKS!!! for the time you give to the X2Go project. And, if you are new to the team and language files for the language you want to feel responsible for do not yet exist, please subscribe to this mailing list first: https://lists.x2go.org/listinfo/x2go-i18n Once you are subscribed, send an email to x2go-i18n@lists.x2go.org that explains your willingness to translate this-and-that language. The developers will then provide a language file for you in the above mentioned /po folder. Git cloning ----------- Next thing to do is to obtained the latest sources from X2Go Git. $ # git needs to be installed, on Debian/Ubuntu this is $ sudo apt-get install git $ # then checkout the code $ git clone git://code.x2go.org/x2gothinclient.git In your current working directory there should now be a subfolder named ,,x2gothinclient''. Creating Your Language File --------------------------- First, Copy the debian/po/templates.pot file with a terminal. you do this by typing the following commands: 1. cd x2gothinclient/debian/po 2. cp templates.pot da.po (or whatever langauge you are going to work on). Now the file is ready for translating it into the language you are going to work on. Editing Your Language File -------------------------- The recommended tool for editing gettext translation files is ,,poedit'' $ sudo apt-get install poedit <--for Debian/Ubuntu Run poedit and configure it first (mostly personalizing, full name, email address, etc.). Now open your language file in /x2gothinclient/debian/po/.po and edit it with poedit. NOTE: Make sure you translate all boldly marked items: non-translated as well as fuzzy (i.e. inaccurate) items. Sending in the Translation File ------------------------------- When done, please send the complete translation file /x2gothinclient/debian/po/.po to x2go-i18n@lists.x2go.org and remove your working copy of X2Go Thin Client from your system (or read how to use Git and keep the folder). Next time... ------------ You will get informed on x2go-i18n if a translation update is necessary. So check your mails there regularly. For updating a translation, either keep the X2Go Thin Client source project folder and read more on Git by your self. Alternatively, just remove the folder (once you have sent in the translation file) and start with this documentation all over again. THANKS AGAIN FOR YOUR TIME!!! light+love, Mike Gabriel x2gothinclient-1.5.0.1/README.qemu0000644000000000000000000000314613570107075013342 0ustar Testing X2Go Thin Client Environment ==================================== ... with qemu. This HowTo has been inspired by Thomas Guettler. Thanks for your input. Do a complete installation of the X2Go TCE as described here: https://wiki.x2go.org/doku.php/wiki:advanced:tce:install Esp. make sure that you have run x2gothinclient_preptftpboot at the end. Note: for this test setup you do __not__ need a DHCP server. 1. Then add the below ACL to the chroot export in /etc/exports --- exports.orig2013-04-02 23:59:06.000000000 +0200 +++ exports.qemu2013-04-02 23:59:39.000000000 +0200 @@ -9,5 +9,5 @@ # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # -/opt/x2gothinclient/chroot (ro,async,no_root_squash,no_subtree_check) +/opt/x2gothinclient/chroot (ro,async,no_root_squash,no_subtree_check) 127.0.0.1(ro,async,no_root_squash,no_subtree_check,insecure) Of course, the place holder has to be filled in with a proper network/netmask value. For testing the X2Go TCE with qemu only, you can omit the part in the above NFS ACL completely. When done with /etc/exports, re-export all NFS exports with this command: $ sudo exportfs -ar 2. Launch the X2Go TCE in qemu (with normal user privileges): $ qemu-system-i386 -bootp tftp://10.0.2.2/pxelinux.0 -tftp /srv/tftp/ -serial vc 3. Looking around in the QEMU TCE instance while it is running: $ chroot /opt/x2gothinclient/chroot $ passwd -e root $ passwd root $ # set a root password Then use Ctrl-Alt-3 in the QEMU window and login as root on the (serial) terminal. light+love, Mike Gabriel x2gothinclient-1.5.0.1/smartcardrules/21-x2gognupgccid.rules0000644000000000000000000000110613570107075020600 0ustar # GPG SmartCard Reader Support # ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="4e6/e003/*", RUN+="/usr/lib/x2go/tce/x2gognupgccid" ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="4e6/5115/*", RUN+="/usr/lib/x2go/tce/x2gognupgccid" #SCM SCR331-LC1 SmartCard Reader ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="4e6/5116/*", RUN+="/usr/lib/x2go/tce/x2gognupgccid" #OMNIKEY ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="76b/3021/*", RUN+="/usr/lib/x2go/tce/x2gognupgccid" #CHERRY ACTION=="add", SUBSYSTEM=="usb", ENV{PRODUCT}=="46a/10/*", RUN+="/usr/lib/x2go/tce/x2gognupgccid" x2gothinclient-1.5.0.1/smartcardrules/man/x2gognupgccid.80000644000000000000000000000126713570107075020160 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gognupgccid 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gognupgccid \- udev Script handling GnuPG smart card readers on X2Go Thin Clients. .SH SYNOPSIS 'nh .fi .ad l x2gognupgccid .SH DESCRIPTION \fBx2gognupgccid\fR is a udev script that handles the usage of GnuPG smart card readers that are connected to X2Go Thin Clients. .PP .SH OPTIONS \fBx2gognupgccid\fR has no known options. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/smartcardrules/x2gognupgccid0000755000000000000000000000224713570107075017241 0ustar #!/bin/bash # # taken from libgphoto2 # # Sets up newly plugged in card reader so that only members of the # group can access it from user space. (Replace scard with the name # of the group you want to have access to the card reader.) GROUP=scard # Note that for this script to work, you'll need all of the following: # a) a line in the file /etc/hotplug/gnupg-ccid.usermap that corresponds # to the card reader you are using. # b) a group "scard" where all users allowed access to the # card reader are listed # c) a Linux kernel supporting hotplug and usbdevfs # d) the hotplug package (http://linux-hotplug.sourceforge.net/) # # In the usermap file, the first field "usb module" should be named # "gnupg-ccid" like this script. # set -e # Only do this if x2gothinclientd is default display manager # or if the package x2gothinclient-minidesktop is installed. # # Otherwise this makes no sense... if ps ax | grep x2gothinclient | grep thinclientd 1>/dev/null || [ -d "/usr/share/doc/x2gothinclient-minidesktop" ]; then DEV=`echo ${DEVICE} | sed 's/proc/dev/'` if [ "${ACTION}" = "add" ]; then sleep 2 chown :${GROUP} "${DEV}" chmod g+rw,o-rwx "${DEV}" fi fi exit 0 x2gothinclient-1.5.0.1/usbmount/61-x2gousbmount.rules0000644000000000000000000000057013570107075017342 0ustar # Rules for X2GO USB mount KERNEL=="sd*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/lib/x2go/tce/x2gousbmount" KERNEL=="ub*", SUBSYSTEM=="block", ACTION=="add", RUN+="/usr/lib/x2go/tce/x2gousbmount" KERNEL=="sd*", ACTION=="remove", RUN+="/usr/lib/x2go/tce/x2gousbmount" KERNEL=="ub*", ACTION=="remove", RUN+="/usr/lib/x2go/tce/x2gousbmount" x2gothinclient-1.5.0.1/usbmount/man/x2gousbmount.80000644000000000000000000000122613570107075016705 0ustar '\" -*- coding: utf-8 -*- .if \n(.g .ds T< \\FC .if \n(.g .ds T> \\F[\n[.fam]] .de URL \\$2 \(la\\$1\(ra\\$3 .. .if \n(.g .mso www.tmac .TH x2gousbmount 8 "Nov 2019" "Version 1.5.0.x" "X2Go Thin Client Environment" .SH NAME x2gousbmount \- udev Script handling USB Flash Drives on X2Go Thin Clients. .SH SYNOPSIS 'nh .fi .ad l \fBx2gousbmount\fR .SH DESCRIPTION \fBx2gousbmount\fR is a udev script that handles plugging of USB flash drives into X2Go thin clients. .PP .SH OPTIONS \fBx2gousbmount\fR has no known options. .PP .SH AUTHOR This manual has been written by Mike Gabriel for the X2Go project (https://www.x2go.org). x2gothinclient-1.5.0.1/usbmount/x2gousbmount0000755000000000000000000003111413570107075015766 0ustar #!/usr/bin/perl # Copyright (C) 2007-2019 by X2Go Project, https://wiki.x2go.org # Oleksandr Shneyder # X2Go is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # X2Go is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the # Free Software Foundation, Inc., # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. use strict; use File::Path::Expand; # comment out this "use" and the following two lines, and instead # uncomment the block below if you need to do early boot stage # debugging of the automounter, when rsyslogd isn't running yet use Sys::Syslog qw( :standard :macros ); openlog($0, 'cons,pid', 'user'); setlogmask(LOG_UPTO(LOG_NOTICE)); #open (B, ">> /var/log/usbdebug"); #sub syslog { # print B $_[0] . ': ' . $_[1] . "\n"; #} my $user; if ( -f "/etc/x2go/x2gothinclient-minidesktop_start" ) { # this is a minidesktop environment, which uses # username "x2gothinclient" regardless of whether # it runs on X2Go-TCE-Live or X2Go-TCE-NFS $user = 'x2gothinclient'; } elsif ( -d "/lib/live/config" ) { # this is X2Go-TCE-Live, but not with a minidesktop # (if it were, the first condition would have matched), # so we use Debian-Live's standard username "user" $user = 'user'; } else { # this is X2Go-TCE-NFS or something completely different, # so we'll play it safe and pick the username "x2gothinclient" # just like previous versions of this script did $user = 'x2gothinclient'; } # We need this as chown requires numeric uid/gid my ($login,$pass,$uid,$gid) = getpwnam($user); # Some last-ditch efforts to fulfill the prerequisites for File Sharing: # - This is stuff that should already have happened earlier in the boot process. # - Also, if a directory already exists, we silently assume that ownership and # permissions are correct. This is so that users that deliberately set # different ownership/permission values don't have their settings silently # overwritten. unless ( -d expand_filename("~$user/mounts")) { mkdir expand_filename("~$user/mounts"); chmod 0700, expand_filename("~$user/mounts"); chown $uid, $gid, expand_filename("~$user/mounts"); } unless ( -d expand_filename("~$user/export")) { mkdir expand_filename("~$user/export"); chmod 0700, expand_filename("~$user/export"); chown $uid, $gid, expand_filename("~$user/export"); } unless ( -d expand_filename("~$user/logins")) { mkdir expand_filename("~$user/logins"); chmod 0700, expand_filename("~$user/logins"); chown $uid, $gid, expand_filename("~$user/logins"); } sub check_x2gothinclientmode { my $ret = 0; # Check for x2gothinclientd first... my $x = `ps u -C x2gothinclientd`; if ($x =~ m/\W*x2gothinclientd\W*/) { $ret = 1; } # And for x2goclient --thinclient if nothing was found. if (!$ret) { $x = `ps u -C x2goclient`; if ($x =~ m/\W*--thinclient\W*/) { $ret = 1; } } return $ret; } # TCE-NFS TCE-Live MMD-Live if ((check_x2gothinclientmode()) || (-x "/lib/live/config/2900-x2go-thinclientconfig") || (-x "/etc/x2go/x2gothinclient-minidesktop_start")) { syslog('notice', "some kind of thinclient mode detected"); open (F, ">> /var/log/usb"); my $dev = $ENV{'DEVNAME'}; my $model = $ENV{'ID_MODEL'}; my $vendor = $ENV{'ID_VENDOR'}; my $action = $ENV{'ACTION'}; my @ldev = split("/","$dev"); my $ldev = @ldev[@ldev-1]; # mntdir is not the directory where the mountpoint will be rooted, # but where tracking of mount states takes place my $mntdir; if ( -d expand_filename("~$user/mounts")) { $mntdir = expand_filename("~$user/mounts"); } elsif ( -d "/var/run" ) { $mntdir = "/var/run"; } elsif ( -d "/run" ) { $mntdir = "/run"; } else { die "No directory found that we could use as \$mntdir..." } my $name = "${vendor}_${model}"; $name =~ s/ //g; $name =~ s/\\//g; $name =~ s/\///g; print F "action: $action, device: $dev, model: $model ($ldev), total: $name\n"; mkdir("/media"); mkdir("/media/$name"); print F "$name\n"; if (`lsblk -ln -oRM $dev` =~ /0$/) { syslog('notice', "device is non-removable device, skipping"); exit 0; } if ( $action eq "add" ) { ### ### ACTION: mount device after it has been added to USB subsystem ### syslog('notice', "device add action called"); # prepare mount points mkdir("/media"); mkdir("/media/$name"); mkdir("/media/$name/$ldev"); # mount the USB device # sync is supported by all file systems # # uid is supported by vfat (via fat),ntfs,hfs,hpfs # # uni_xlate is supported by vfat and supposed to change "unhandled" # Unicode characters into escape sequences; otherwise, such # characters are replaced by a verbatim question mark, triggering # information loss. Very old versions of ntfs used to "support" this # option, but historic documents mention that it was broken and # removed some time in the Linux 2.4 days. # Character set handling under FAT is complicated to begin with. # Apparently, 8.3 short file names (which really are the low-level # and most compatible representation of file names) are always # encoded with a specific 8-bit codepage - importantly, multi-byte # encodings are not supported. This specific codepage can either be # the default one set in the Linux kernel or any other supported one # selected via the codepage=... mount option. # Long file names are stored in "Unicode format" according to the # kernel documentation, which seems to really be raw UCS-2, i.e., # the raw 2-byte-value of a code point. Consequently, only characters # in the Basic Multilingual Plane (BMP) can be used in long file # names and each file is restricted to a character length of at most # 255, with the additional restriction of at most 256 characters per # path. This "encoding" could be problematic since code points # outside of the BMP are being used more and more nowadays, but most # users should still be fine. # Typically, systems are not using the UCS-2, but a different # encoding like UTF-8 or UTF-16. These encodings can handle the full # Unicode block, also code points after the BMP. Hence, the kernel # has to perform some kind of conversion from UCS-2 to the desired # encoding, which again can either be the default one set in the # kernel or any other supported one set through the iocharset=... # mount option. # At that point, things get tricky. (V)FAT is typically a case- # insensitive file system, which means that lower- and uppercase # versions of a character should be handled as the same character. # The Linux kernel developers do not want to store a lower- to # uppercase mapping for the full Unicode set of characters, though, # for space and performance reasons. Hence, file systems mounted via # iocharset=utf8 will be completely case-sensitive. To work around # that problem, another option called 'utf8' exists, which can be # used in conjunction with an 8-bit encoding iocharset option. # Apparently, with such a setup the kernel returns UTF-8-encoded # data, but internal name mangling operations are carried out in the # given iocharset encoding. Such a scenario is most useful when # setting the iocharset parameter to an encoding for which lower- # and uppercase pairs are defined properly. # Enabling uni_xlate disables utf8 and is only useful when using # an iocharset encoding not covering the UCS-2 range. We do not want # to use this. # # we must not trigger on iso9660 and udf, or else hybrid USB media # would only cause a mount of the iso9660 raw device, # blocking the mount of individual partitions # real optical media ->x2gocdmanager/x2gothinclient-cdmanager package if (system("mount -tntfs $dev /media/$name/$ldev -o uid=$user,sync") == 0) { syslog('notice', "USB device $name ($ldev) successfully mounted (ntfs detected)"); # if mounted, inform x2goclient about it... system("touch $mntdir/$ldev.mounted"); open (D, ">", expand_filename("~$user/export/$name.$ldev")); print D "export=/media/$name/$ldev\n"; close (D); } elsif (system("mount -tvfat $dev /media/$name/$ldev -o uid=$user,sync,utf8") == 0) { syslog('notice', "USB device $name ($ldev) successfully mounted (vfat detected)"); # if mounted, inform x2goclient about it... system("touch $mntdir/$ldev.mounted"); open (D, ">", expand_filename("~$user/export/$name.$ldev")); print D "export=/media/$name/$ldev\n"; close (D); } elsif (system("mount -t hfs $dev /media/$name/$ldev -o uid=$user,sync") == 0) { syslog('notice', "USB device $name ($ldev) successfully mounted (hfs detected)"); # if mounted, inform x2goclient about it... system("touch $mntdir/$ldev.mounted"); open (D, ">", expand_filename("~$user/export/$name.$ldev")); print D "export=/media/$name/$ldev\n"; close (D); } elsif (system("mount -t hpfs $dev /media/$name/$ldev -o uid=$user,sync") == 0) { syslog('notice', "USB device $name ($ldev) successfully mounted (hpfs detected)"); # if mounted, inform x2goclient about it... system("touch $mntdir/$ldev.mounted"); open (D, ">", expand_filename("~$user/export/$name.$ldev")); print D "export=/media/$name/$ldev\n"; close (D); } elsif (system("fuseext2 $dev /media/$name/$ldev -o ro,allow_other") == 0) { syslog('notice', "USB device $name ($ldev) successfully mounted readonly (ext*fs detected)"); # if mounted, inform x2goclient about it... system("touch $mntdir/$ldev.mounted"); open (D, ">", expand_filename("~$user/export/$name.$ldev")); print D "export=/media/$name/$ldev\n"; close (D); } else { # the mount failed, let's assume that the device is encrypted... my $enc=`ls -1 $mntdir | grep .encrypted`; if ($enc eq "") { # use cryptsetup to decrypt the device... system("/sbin/cryptsetup --key-file /etc/keys/keystick.key luksOpen $dev keystick"); # mount the ,,decrypted'' USB device via devmapper... if (system("mount /dev/mapper/keystick /media/$name/$ldev") == 0) { # inform x2goclient about this... system("touch $mntdir/$ldev.encrypted"); system("chown -R $user /media/$name/$ldev/dsa.key"); open (D, ">", expand_filename("~$user/logins/$name.$ldev")); print D "login=/media/$name/$ldev\n"; close (D); print F "encrypted mount successful ($ldev)\n"; } else { # on mount failures release the decrypted device again system("/sbin/cryptsetup luksClose keystick"); print F "mount failed ($ldev)\n"; } } else { print F "cryptodisk already present\n"; } } if (-e "/media/$name/$ldev") { print F "detected mountpoint '/media/$name/$ldev'\n"; print F "running '/sbin/blkid -o value -s LABEL $dev'\n"; my $label = `/sbin/blkid -o value -s LABEL $dev`; chomp($label); if ($label) { print F "symlinking '/media/$name/$ldev' and '/media/$name/$label'\n"; unlink "/media/$name/$label" if ( -l "/media/$name/$label" ); symlink("/media/$name/$ldev", "/media/$name/$label"); open (D, ">>", expand_filename("~$user/export/$name.$ldev")); print D "export=/media/$name/$label\n"; close (D); } } } elsif ($action eq "remove") { ### ### ACTION: unmount device after it has been removed from the USB subsystem ### syslog('notice', "device remove action called"); # we rely on our own mount logistics here... if ( -e "$mntdir/$ldev.mounted" ) { # inform x2goclient that the device has been removed system ("umount -ff /media/$name/$ldev"); unlink ("$mntdir/$ldev.mounted"); open (D, ">", expand_filename("~$user/export/$name.$ldev.unexport")); open (I, "<", expand_filename("~$user/export/$name.$ldev")); while () { $_ =~ s/^export=/unexport=/i; print D $_; } close (I); close (D); syslog('notice', "USB device $name ($ldev) successfully unmounted"); } elsif ( -e "$mntdir/$ldev.encrypted" ) { # inform x2goclient that the device has been removed # release the encrypted device mapping unlink ("$mntdir/$ldev.encrypted"); open ( D, ">", expand_filename("~$user/logins/$name.$ldev.unexport")); print D "logout=/media/$name/$ldev\n"; system("umount /media/$name/$ldev"); system("/sbin/cryptsetup luksClose keystick"); close (D); } } close (F); } else { syslog('notice', "not in any thinclient mode, exiting"); } x2gothinclient-1.5.0.1/VERSION0000644000000000000000000000001013570107075012547 0ustar 1.5.0.1