This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:howto:tce [2019/03/19 16:54] stefanbaur [List of open ToDos/FIXMEs for this page] Removed issue that is now listed under fixed issues |
doc:howto:tce [2025/05/05 09:32] (current) stefanbaur [What options are available under FURTHER-OPTIONS-GO-HERE?] added liveboot_params description |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== X2Go-ThinClientEditon-Live (TCE-Live, formerly known as TCE-NG) ====== | ====== X2Go-ThinClientEditon-Live (TCE-Live, formerly known as TCE-NG) ====== | ||
<columns 75% -> | <columns 75% -> | ||
- | <note important> | ||
<note tip>If you are looking for installation instructions for the classic, NFS-filesystem-based X2Go-ThinClient, | <note tip>If you are looking for installation instructions for the classic, NFS-filesystem-based X2Go-ThinClient, | ||
Line 16: | Line 15: | ||
However, the huge advantage is that there no longer is a need for any high-availibility setup concerning NFS (nor HTTP/ | However, the huge advantage is that there no longer is a need for any high-availibility setup concerning NFS (nor HTTP/ | ||
- | Besides, making changes to/updating the classic, NFS-based TCE (henceforth referred to as TCE-Classic) with the entire filesystem, not just its compressed image, spread out over the NFS share was rather finicky - with the current TCE-Live, you build and deploy a new image every time you make a change, and you can test it on a single client without interrupting your production environment. | + | Besides, making changes to/updating the classic, NFS-based TCE (henceforth referred to as TCE-Classic) with the entire filesystem, not just its compressed image, spread out over the NFS share was rather finicky - with the current TCE-Live, you build and deploy a new image every time you make a change, and you can test it on a single client without interrupting your production environment. |
We've also received reports that TCE-Classic wouldn' | We've also received reports that TCE-Classic wouldn' | ||
- | Our TCE-Live works just fine with Jessie, | + | Our TCE-Live works just fine with Jessie, Stretch, and Buster as well. |
- | The one catch is that the live-build package in Debian/the Debian-Live project is currently looking for a new maintainer - so there is a slim chance that live-build might be removed from Debian Buster, especially if no new maintainer steps up and the live-build replacement that is currently in the works (called live-wrapper) contains all the required functionality of live-build by then. | + | |
===== ThinClient prerequisites for all TCE-Live variants ===== | ===== ThinClient prerequisites for all TCE-Live variants ===== | ||
* At least 1 GB of RAM //unless// you use non-NTFS local storage, in that case, 512MB or even 256MB might work - but would you really want to use a Client that has 4 Megabytes of free RAM (our test result with 256 MB RAM total) and no swapspace? | * At least 1 GB of RAM //unless// you use non-NTFS local storage, in that case, 512MB or even 256MB might work - but would you really want to use a Client that has 4 Megabytes of free RAM (our test result with 256 MB RAM total) and no swapspace? | ||
Line 29: | Line 27: | ||
* A graphics card and input devices (Keyboard, Mouse/ | * A graphics card and input devices (Keyboard, Mouse/ | ||
===== Build system prerequisites for all variants ===== | ===== Build system prerequisites for all variants ===== | ||
- | * You need a Debian | + | * You need a Debian |
+ | * If you try to build Debian Bookworm images on Debian Bullseye, you can only create netboot images, but no iso/ | ||
+ | * If you want to try to build Debian (Bookworm) images on Ubuntu, you will need to install the live-build, debootstrap and debian-archive-keyring packages from the Debian repo. | ||
* We suggest using a 64-Bit system, however, it is possible to use a 32-Bit system if you don't want to build a 64-Bit ThinClient image. | * We suggest using a 64-Bit system, however, it is possible to use a 32-Bit system if you don't want to build a 64-Bit ThinClient image. | ||
- | * We suggest leaving at least 4 GB of free disk space so the build won't abort due to insufficient disk space while packages are downloaded, unpacked and copied around. | + | * We suggest leaving at least 6 GB of free disk space so the build won't abort due to insufficient disk space while packages are downloaded, unpacked and copied around. |
- | * Make sure your package list is up to date by running: < | + | * Make sure your package list is up to date by running: < |
- | * Install the required | + | * Install the required |
+ | * If you want to speed up subsequent builds, install the recommended package(s) by running: < | ||
+ | * If you want to be able to cross-build across different architectures (e.g. building an ARM image on an Intel/AMD build host), install the optional package(s) by running: < | ||
===== Building your own X2Go-TCE Image ===== | ===== Building your own X2Go-TCE Image ===== | ||
==== Configuring the Build ==== | ==== Configuring the Build ==== | ||
- | <code> | + | Change to a directory where you want to save your builds, and save the following file as x2go-tce-config: |
- | #!/bin/bash | + | <file - x2go-tce-config> |
+ | # NOTE: This file gets sourced by the actual buildscript - so place it in the same directory as the buildscript or adjust the path in the buildscript. | ||
+ | |||
+ | # simple check for apt-cacher-ng being active - if | ||
+ | # we have a successful connect on port 3142, assume | ||
+ | # it's apt-cacher-ng and use it | ||
+ | # | ||
+ | if nc -z 127.0.0.1 3142 ; then | ||
+ | # bad idea with apt-cacher-ng, | ||
+ | # export https_proxy=http: | ||
+ | # export http_proxy=http:// | ||
+ | # export ftp_proxy=http:// | ||
+ | |||
+ | export LB_APT_FTP_PROXY=http:// | ||
+ | export LB_APT_HTTP_PROXY=http:// | ||
+ | fi | ||
+ | |||
+ | # set these to true to save source files | ||
+ | #export LB_SOURCE=" | ||
+ | #export LBX2GO_GETSRC=" | ||
# Select ONE of the following git reposities | # Select ONE of the following git reposities | ||
- | # this one loosely corresponds to " | + | #export LBX2GO_CONFIG=' |
- | export LBX2GO_CONFIG=' | + | export LBX2GO_CONFIG=' |
- | # this one loosely corresponds to " | + | #export LBX2GO_CONFIG=' |
- | #export LBX2GO_CONFIG=' | + | #export LBX2GO_CONFIG=' |
- | # NOTE: Add " | + | #export LBX2GO_CONFIG=' |
+ | #export LBX2GO_CONFIG=' | ||
+ | #export LBX2GO_CONFIG=' | ||
+ | # NOTES: 1) https:// | ||
+ | # 2) https:// | ||
+ | # 3) Minidesktop builds are work in progress and not production-ready. Cont(r)act us if you need them; feel free to submit patches. | ||
+ | # 4) Microdesktop builds are currently only available via https:// | ||
+ | # the Minidesktop builds. Feel free to try them out! | ||
+ | # 5) Add " | ||
+ | # add " | ||
+ | # add " | ||
+ | # add " | ||
# Select ONE of the following LBX2GO_ARCH lines and comment out the others | # Select ONE of the following LBX2GO_ARCH lines and comment out the others | ||
Line 51: | Line 84: | ||
export LBX2GO_ARCH=' | export LBX2GO_ARCH=' | ||
# 32-Bit, larger memory footprint, but faster performance on i686 and newer | # 32-Bit, larger memory footprint, but faster performance on i686 and newer | ||
- | # export LBX2GO_ARCH=' | + | #export LBX2GO_ARCH=' |
- | # 32-Bit, smallest memory footprint | + | # 32-Bit, smallest memory footprint |
# export LBX2GO_ARCH=' | # export LBX2GO_ARCH=' | ||
+ | # For ARM (Raspberry Pi): | ||
+ | #export LBX2GO_ARCH=' | ||
+ | #export LBX2GO_ARCH_MODEL=' | ||
+ | |||
+ | # If you want to use the stock ISO image as created by this script, add your boot parameters here | ||
+ | # Make sure to leave a trailing space at the end of your string(s)! | ||
+ | export LBX2GO_BOOTAPPEND_LIVE=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | |||
+ | if echo -e " | ||
+ | # if you use nottyautologin instead of noautologin, | ||
+ | # this would conflict with our setting for the account " | ||
+ | LBX2GO_BOOTAPPEND_LIVE+=' | ||
+ | export LBX2GO_BOOTAPPEND_LIVE | ||
+ | elif echo -e " | ||
+ | LBX2GO_BOOTAPPEND_LIVE+=' | ||
+ | export LBX2GO_BOOTAPPEND_LIVE | ||
+ | elif echo -e " | ||
+ | LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE | ||
+ | fi | ||
+ | |||
+ | # make Backports default to true | ||
+ | export LBX2GO_BACKPORTS=" | ||
- | # detect if the selected git repo is meant to build a stretch or jessie image | + | # detect if the selected git repo is meant to build a bookworm, bullseye, buster, |
if [ -z " | if [ -z " | ||
- | | + | |
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | elif [ -z " | ||
+ | export LBX2GO_DEBVERSION=" | ||
+ | export LBX2GO_BOOTAPPEND_LIVE+=" | ||
+ | export LBX2GO_ARCHIVE_AREAS=" | ||
+ | # disable Backports for Bookworm, as mate-minidesktop won't build with Backports enabled | ||
+ | export LBX2GO_BACKPORTS=" | ||
else | else | ||
- | | + | |
fi | fi | ||
# newer versions of live-build use the plural form of this parameter | # newer versions of live-build use the plural form of this parameter | ||
if $(LANG=C lb config --help | grep -q bootloaders) ; then | if $(LANG=C lb config --help | grep -q bootloaders) ; then | ||
- | | + | |
else | else | ||
- | | + | |
fi | fi | ||
# set boot loader type - leave this unchanged unless you really know what you're doing | # set boot loader type - leave this unchanged unless you really know what you're doing | ||
- | export LBX2GO_BOOTLOADER=" | + | if echo $LBX2GO_ARCH | awk ' |
+ | # This is part of our experimental ARM support | ||
+ | LBX2GO_BOOTLOADERPARAMNAME=" | ||
+ | LBX2GO_BOOTLOADER=" | ||
+ | else | ||
+ | | ||
+ | fi | ||
# These options are meant to reduce the image size. | # These options are meant to reduce the image size. | ||
# Feel free to adapt them after consulting "man lb_config" | # Feel free to adapt them after consulting "man lb_config" | ||
- | export LBX2GO_SPACE=' | + | # FIXME export LBX2GO_SPACE=' |
+ | export LBX2GO_SPACE=' | ||
| | ||
| | ||
Line 86: | Line 170: | ||
[ -f / | [ -f / | ||
export LBX2GO_MIRROR=" | export LBX2GO_MIRROR=" | ||
- | --mirror-chroot-security http:// | + | --mirror-chroot-security http:// |
- | --mirror-binary-security http:// | + | --mirror-binary-security http:// |
- | --parent-mirror-chroot-security http:// | + | --parent-mirror-chroot-security http:// |
- | --parent-mirror-binary-security http:// | + | --parent-mirror-binary-security http:// |
else | else | ||
export LBX2GO_UPDATES=" | export LBX2GO_UPDATES=" | ||
Line 95: | Line 179: | ||
# These are default values that should not require tuning | # These are default values that should not require tuning | ||
- | export LBX2GO_DEFAULTS=" | + | export LBX2GO_DEFAULTS=" |
--firmware-chroot true | --firmware-chroot true | ||
--initsystem sysvinit | --initsystem sysvinit | ||
Line 104: | Line 188: | ||
--distribution $LBX2GO_DEBVERSION" | --distribution $LBX2GO_DEBVERSION" | ||
+ | # This is part of our experimental ARM support | ||
+ | if echo $LBX2GO_ARCH | grep -q ' | ||
+ | export LBX2GO_DEFAULTS+=" | ||
+ | --bootstrap-qemu-static / | ||
+ | --apt-options \" | ||
+ | fi | ||
- | export | + | # This is part of our experimental ARM support |
+ | # This makes sure the resulting disk image is at least 1GB in size, even though our build currently requires way less. | ||
+ | # It's unlikely that anyone will need to boot from a smaller partition; but if we let live-build pick the minimum size automatically, | ||
+ | # we will not have enough space left to copy the firmware blobs into the right location. | ||
+ | if echo $LBX2GO_ARCH | grep -q ' | ||
+ | | ||
+ | --hdd-size 1024" | ||
+ | fi | ||
- | # This is for minidesktop builds and currently only adds firefox-esr language packs | + | export LBX2GO_ARCHIVE_AREAS=" |
- | #export LBX2GO_LANG=' | + | |
+ | # This is for micro- and minidesktop builds and currently only adds firefox-esr language packs | ||
+ | # use this for autodetection based on your lang= selection | ||
+ | export LBX2GO_LANG=$(echo " | ||
+ | # To override this and add several language packs at once, use something like: | ||
+ | # export LBX2GO_LANG=' | ||
+ | |||
+ | # Set the boot timeout for all syslinux/ | ||
+ | # Note that this is measured in 1/10 seconds! | ||
+ | # So for 1 second, set the value to 10, for 10 seconds, set it to 100. | ||
+ | # A value of 0 means "wait indefinitely", | ||
+ | # Leave it unset to use live-build' | ||
+ | #export LBX2GO_BOOT_TIMEOUT=' | ||
+ | export LBX2GO_BOOT_TIMEOUT=' | ||
# This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team | # This is to optimize squashfs size, based on a suggestion by intrigeri from the TAILS team | ||
# note that this will permanently change / | # note that this will permanently change / | ||
- | sed -i -e 's# | + | # |
+ | # | ||
+ | if dpkg --print-architecture | grep -q 'arm' || echo $LBX2GO_ARCH | grep -q ' | ||
+ | | ||
+ | if grep -q -- '-Xbcj x86 -b 1024K -Xdict-size 1024K' / | ||
+ | apt install --reinstall live-build | ||
+ | fi | ||
+ | # feel free to experiment with these options, but be prepared for subtle breakage | ||
+ | #export MKSQUASHFS_OPTIONS=' | ||
+ | #export MKSQUASHFS_OPTIONS=' | ||
+ | #export MKSQUASHFS_OPTIONS=' | ||
+ | export MKSQUASHFS_OPTIONS='' | ||
+ | else | ||
+ | export MKSQUASHFS_OPTIONS=' | ||
+ | fi | ||
# This removes documentation, | # This removes documentation, | ||
Line 121: | Line 245: | ||
# This patches the squashfs file into the initrd. Only parsed when image type " | # This patches the squashfs file into the initrd. Only parsed when image type " | ||
# Will require boot parameter live-media=/ | # Will require boot parameter live-media=/ | ||
- | # Both TFTP client and TFTP server must support file transfers >32MB for this to work, if you want to deploy this initrd via TFTP, | + | # Both TFTP client and TFTP server must support file transfers >32MB for this to work, if you want to deploy this initrd via TFTP, |
- | # so e.g. atftpd will not work - tftpd-hpa, | + | # so e.g. atftpd will not work - tftpd-hpa, |
# When using iPXE, you can use http instead of TFTP. | # When using iPXE, you can use http instead of TFTP. | ||
# This is especially helpful if you want to netboot via http and cannot use the server' | # This is especially helpful if you want to netboot via http and cannot use the server' | ||
- | export LBX2GO_NOSQUASHFS=" | + | #export LBX2GO_NOSQUASHFS=" |
# Select ONE of the following LBX2GO_IMAGETYPE lines and comment out the others | # Select ONE of the following LBX2GO_IMAGETYPE lines and comment out the others | ||
Line 134: | Line 258: | ||
# to create a netboot-image: | # to create a netboot-image: | ||
export LBX2GO_IMAGETYPE=' | export LBX2GO_IMAGETYPE=' | ||
- | # NOT RECOMMENDED: | + | # /!\ The options below are NOT RECOMMENDED |
- | # to create an image that can be written to a hard disk (always results | + | # to create an image that can be written to a hard disk (for older live-build versions, this always results |
- | # in a "build failed" | + | # in a "build failed" |
- | # export LBX2GO_IMAGETYPE=' | + | # and things will work): |
- | # to create a tar file only (seems to be broken in live-build): | + | #export LBX2GO_IMAGETYPE=' |
+ | ## This might be required for hdd builds, especially for (u)efi | ||
+ | #export LBX2GO_BOOTLOADER=" | ||
+ | # to create a tar file only (seems to be broken in older live-build | ||
# export LBX2GO_IMAGETYPE=' | # export LBX2GO_IMAGETYPE=' | ||
- | </code> | + | |
+ | # This is part of our experimental ARM support | ||
+ | if echo " | ||
+ | # enforce hdd image for arm at the moment (might need to support netboot later on too) | ||
+ | if ! [ " | ||
+ | echo " | ||
+ | export LBX2GO_IMAGETYPE=" | ||
+ | fi | ||
+ | fi | ||
+ | |||
+ | if [ " | ||
+ | export LBX2GO_DEFAULTS+=" | ||
+ | fi | ||
+ | |||
+ | </file> | ||
==== Live-Patching the Build ==== | ==== Live-Patching the Build ==== | ||
- | This patch is required if you need USB mount capability on the ThinClient while [[http://bugs.x2go.org/cgi-bin/bugreport.cgi? | + | To add patches that aren't part of any package yet, you can use the directory < |
- | < | + | You will need to create a directory structure like <code> |
+ | |||
+ | e.g. to override < | ||
+ | <file - x2gothinclient-minidesktop_start> | ||
#!/bin/bash | #!/bin/bash | ||
- | mkdir -p ./ | ||
- | wget -O ./ | ||
- | chmod 755 ./ | ||
- | </ | ||
+ | # Copyright (C) 2010-2024 by X2Go project, https:// | ||
+ | # | ||
+ | # | ||
+ | # 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. | ||
+ | # 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... | ||
+ | if ! / | ||
+ | / | ||
+ | fi | ||
+ | |||
+ | # make sure we don't start before sessions and settings files exist - avoids race conditions | ||
+ | while ! [ -e ~x2gothinclient/ | ||
+ | sleep 1; | ||
+ | done | ||
+ | |||
+ | while ! [ -e ~x2gothinclient/ | ||
+ | sleep 1 | ||
+ | done | ||
+ | |||
+ | [ -s / | ||
+ | [ -s / | ||
+ | |||
+ | |||
+ | / | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | & | ||
+ | |||
+ | </ | ||
==== Starting the Build ==== | ==== Starting the Build ==== | ||
- | Change to a directory where you want to save your builds, | + | In the directory where you want to save your builds, |
- | <code> | + | <file - x2go-tce-build> |
#!/bin/bash | #!/bin/bash | ||
+ | |||
+ | # read (source) the config file | ||
+ | . ./ | ||
+ | |||
# Create Timestamp | # Create Timestamp | ||
LBX2GO_TIMESTAMP=$(date +" | LBX2GO_TIMESTAMP=$(date +" | ||
+ | |||
+ | # Log all output to a logfile in /tmp | ||
+ | exec > >(tee "/ | ||
# Set Directory name | # Set Directory name | ||
- | LBX2GO_TCEDIR=./ | + | LBX2GO_TCEDIR="./ |
if [ -z " | if [ -z " | ||
+ | ( echo " | ||
[ -z " | [ -z " | ||
[ -z " | [ -z " | ||
Line 174: | Line 373: | ||
echo -e "One or more of the following variables is unset:" | echo -e "One or more of the following variables is unset:" | ||
echo -e " | echo -e " | ||
+ | echo " | ||
echo -e " | echo -e " | ||
echo -e " | echo -e " | ||
Line 190: | Line 390: | ||
cd $LBX2GO_TCEDIR | cd $LBX2GO_TCEDIR | ||
+ | X2GO_LBCONFIG_STRING=$(cat << | ||
lb config $LBX2GO_ARCH $LBX2GO_SPACE $LBX2GO_DEFAULTS \ | lb config $LBX2GO_ARCH $LBX2GO_SPACE $LBX2GO_DEFAULTS \ | ||
| | ||
- | | + | |
+ | | ||
+ | X2GOLBCONFIGSTRING | ||
+ | ) | ||
+ | # Our previous way of doing this had issues with newlines and multiple blanks. So we're now doing a bit | ||
+ | # of sanitizing, then we eval the variable. | ||
+ | X2GO_LBCONFIG_STRING=$(echo " | ||
+ | eval " | ||
# This will copy any patches we have prepared | # This will copy any patches we have prepared | ||
if [ -d " | if [ -d " | ||
cp -a ../patch/* config/ | cp -a ../patch/* config/ | ||
fi | fi | ||
+ | |||
+ | # This will copy any patches we have prepared for microdesktop | ||
+ | if [ -d " | ||
+ | cp -a ../ | ||
+ | fi | ||
+ | |||
+ | # This will copy any patches we have prepared for minidesktop | ||
+ | if [ -d " | ||
+ | cp -a ../ | ||
+ | fi | ||
+ | |||
+ | # This checks if a bootloader directory is present (e.g. because of a custom splash.svg) | ||
+ | # and adds all other files that might be missing (live-build won't add them automatically | ||
+ | # if the directory already exists) | ||
+ | if [ -d config/ | ||
+ | rsync -aPH --ignore-existing --exclude=" | ||
+ | fi | ||
+ | |||
+ | # When enabled, this silences the audible beep at syslinux/ | ||
+ | # Note that this is an accessibility feature for blind users, so use with care. | ||
+ | sed -e " | ||
+ | sed -e " | ||
+ | |||
+ | # this will set the boot timeout for all syslinux/ | ||
+ | if [ -n " | ||
+ | sed -e " | ||
+ | fi | ||
+ | |||
# This enables an i386-only package in the sources.list file when an i386 build is requested | # This enables an i386-only package in the sources.list file when an i386 build is requested | ||
- | if echo "$LBX2GO_ARCH" | + | if echo $LBX2GO_ARCH | grep -q -i " |
sed -i -e 's/# for i386 only #//' config/ | sed -i -e 's/# for i386 only #//' config/ | ||
fi | fi | ||
- | | + | |
- | if [ -f config/ | + | |
- | for LBX2GO_SINGLE_LANG in $(echo $LBX2GO_LANG | tr ';' | + | # It adds required arm64-only packages when an arm64 build is requested |
- | echo "LANG: ' | + | if echo $LBX2GO_ARCH | grep -q " |
- | sed -i -e 's/#firefox-esr-l10n-' | + | |
- | done | + | # bullseye and newer do not need this |
+ | if [ "${LBX2GO_DEBVERSION}" | ||
+ | | ||
+ | echo "firmware-brcm80211/buster-backports" | ||
fi | fi | ||
+ | |||
+ | if [ " | ||
+ | # modules required for Raspberry Pi 3 LAN | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | |||
+ | # firmware for basic raspi functions - required for boot on Pi3 | ||
+ | if [ " | ||
+ | echo " | ||
+ | # standard linux kernel - for Pi3 | ||
+ | echo " | ||
+ | fi | ||
+ | |||
+ | elif [ " | ||
+ | # bullseye and newer do not need this | ||
+ | if [ " | ||
+ | # firmware for basic raspi functions - required for boot on Pi4 | ||
+ | echo " | ||
+ | echo " | ||
+ | |||
+ | # newer linux kernel - required for pi4/pi400 | ||
+ | echo " | ||
+ | fi | ||
+ | else | ||
+ | echo " | ||
+ | fi | ||
+ | fi | ||
+ | |||
+ | # This is for micro- and minidesktop builds only | ||
+ | if [ -f config/ | ||
+ | if [ -n " | ||
+ | for LBX2GO_SINGLE_LANG in $(echo " | ||
+ | echo "LANG: ' | ||
+ | sed -i -e ' | ||
+ | if ! grep -v " | ||
+ | echo "LANG: ' | ||
+ | sed -i -e " | ||
+ | fi | ||
+ | done | ||
+ | else | ||
+ | rm config/ | ||
+ | fi | ||
+ | fi | ||
+ | |||
if [ " | if [ " | ||
echo '# | echo '# | ||
Line 218: | Line 507: | ||
chmod 755 ./ | chmod 755 ./ | ||
fi | fi | ||
+ | |||
+ | if [ -n " | ||
+ | echo " | ||
+ | echo " | ||
+ | echo " | ||
+ | # Here, we should have reached a point where it is safe to point all proxy variables | ||
+ | # at the apt-cacher-ng proxy. | ||
+ | # at files not being downloaded, disable these three entries. | ||
+ | export https_proxy=$LB_APT_HTTP_PROXY | ||
+ | export http_proxy=$LB_APT_HTTP_PROXY | ||
+ | export ftp_proxy=$LB_APT_FTP_PROXY | ||
+ | fi | ||
+ | |||
+ | # This is part of our experimental ARM support | ||
+ | # It is used when building for the ARM architecture (on Intel/AMD hardware and on ARM). | ||
+ | # It makes some necessary changes, and also tries to speed up squashfs creation when it | ||
+ | # detects a crossbuild environment. | ||
+ | if echo $LBX2GO_ARCH | grep -q ' | ||
+ | |||
+ | # This command removes all references to fuseext, freerdp-nightly, | ||
+ | # package list files. | ||
+ | echo " | ||
+ | sed -e ' | ||
+ | |||
+ | # This command removes the X2Go repository from the directory where additional | ||
+ | # archives are stored. | ||
+ | # packages, but Debian Buster does - so that's what we're falling back to. | ||
+ | echo " | ||
+ | rm ./ | ||
+ | |||
+ | # The following is a hack to reduce squashfs creation time in a crossbuild environment. | ||
+ | # We're replacing mksquashfs in the changeroot with a wrapper script that drops the | ||
+ | # original mksquashfs call into a file. | ||
+ | |||
+ | if (uname -m | grep -q ' | ||
+ | echo "INFO: using host-architecture mksquashfs from outside instead of the target-architecture one inside chroot." | ||
+ | # We need to do this as a background task, waiting for the mksquashfs executable to | ||
+ | # appear in the changeroot; as the changeroot will only be created later on, once | ||
+ | # lb build is called. | ||
+ | |||
+ | # The other background task waits until the command file has been created, then | ||
+ | # it applies some necessary patches to it, and starts the mksquashfs command natively | ||
+ | # on the build host, rather than in the changeroot environment. | ||
+ | # This is because in the changeroot, we'd be running the ARM mksquashfs in a qemu | ||
+ | # software emulation of the ARM architecture, | ||
+ | # native, raw CPU power and cores available to us. | ||
+ | |||
+ | # To make sure we don't have any lingering processes in the background, we're passing | ||
+ | # our own PID along to the background tasks, and tell them to terminate if our PID | ||
+ | # disappears while they' | ||
+ | |||
+ | MASTERPID=$$ | ||
+ | |||
+ | # Replace mksquashfs in chroot with script | ||
+ | # (script will undo this upon completion) | ||
+ | ( | ||
+ | # wait until the chroot has been populated or until our parent process dies | ||
+ | while ! [ -x ./ | ||
+ | ps $MASTERPID >/ | ||
+ | sleep 1 | ||
+ | done | ||
+ | # make sure we don't overwrite the real executable if it has already been | ||
+ | # moved out of the way | ||
+ | if ! [ -x ./ | ||
+ | cp ./ | ||
+ | fi | ||
+ | echo '# | ||
+ | # log the name we've been called with and all parameters into this file | ||
+ | echo 'echo "$0 $@" >/ | ||
+ | # once the native mksquashfs is complete, we will remove this file | ||
+ | echo 'while [ -f / | ||
+ | echo ' | ||
+ | echo ' | ||
+ | # so let's wait until it has been removed before deleting ourselves ... | ||
+ | echo 'rm / | ||
+ | # ... and moving the real executable back into its place | ||
+ | echo 'mv / | ||
+ | chmod 755 ./ | ||
+ | ) & | ||
+ | |||
+ | # start the native mksquashfs after patching the parameters | ||
+ | ( | ||
+ | # wait until the trigger file has been created or until our parent process dies | ||
+ | while ! [ -f ./ | ||
+ | ps $MASTERPID >/ | ||
+ | sleep 1 | ||
+ | done | ||
+ | # using any of the available filters (x86, arm, armthumb) for the | ||
+ | # -Xbcj command results in an unusable squashfs on arm, so we drop the | ||
+ | # parameter completely if it's there. | ||
+ | # also, all absolute paths (detected by beginning with " /") need to be | ||
+ | # prefixed with " | ||
+ | # to look for the corresponding paths/ | ||
+ | sed -e 's/ -Xbcj x86/ /g' -e 's# /# ./ | ||
+ | ./ | ||
+ | #needs switch from e.g. / | ||
+ | sed -e " | ||
+ | ./ | ||
+ | # if the mksquashfs command was missing, add it | ||
+ | grep -q mksquashfs ./ | ||
+ | sed -e "s#^ #$(which mksquashfs) #g" -i \ | ||
+ | ./ | ||
+ | # now let's make this executable | ||
+ | chmod 755 ./ | ||
+ | |||
+ | # we also need to add some more excludes because they shouldn' | ||
+ | # in the squashfs - no idea why we don't need them while inside the chroot ... | ||
+ | echo ' | ||
+ | echo ' | ||
+ | echo ' | ||
+ | # now let's execute the script and, if it terminates without an error, | ||
+ | # we'll move the newly created squashfs into the chroot where the chrooted | ||
+ | # mksquashfs command would have created it; if that worked as well, we'll | ||
+ | # remove the script file so our dummy mksquashfs inside the chroot knows | ||
+ | # it's time to terminate itself. | ||
+ | ./ | ||
+ | mv ./ | ||
+ | rm ./ | ||
+ | ) & | ||
+ | fi | ||
+ | fi | ||
+ | |||
if lb build ; then | if lb build ; then | ||
echo -e "Build is done: ' | echo -e "Build is done: ' | ||
+ | ln $(realpath ./ | ||
+ | ln $(realpath ./ | ||
ln ./ | ln ./ | ||
+ | |||
+ | if [ " | ||
+ | ln ./ | ||
+ | | ||
+ | fi | ||
+ | |||
+ | # This is part of our experimental ARM support | ||
+ | if [ " | ||
+ | # after the build, let's determine the name of our image file ... | ||
+ | IMAGEFILE=" | ||
+ | |||
+ | # ... and change the partition type to reflect the file system actually in use for partition 1 | ||
+ | # (" | ||
+ | sfdisk --part-type $IMAGEFILE 1 b | ||
+ | |||
+ | # next, we need to patch two things inside the image, so we need to set up a loop device for it. | ||
+ | FREELOOP=$(losetup -f) # note that this could become a TOCTOU issue if more than 1 process tries to use loop devices | ||
+ | |||
+ | # as the image is a full disk image containing a partition, we need to jump to the position where the first partition starts | ||
+ | losetup -o 1048576 $FREELOOP $IMAGEFILE | ||
+ | |||
+ | # now let's mount it | ||
+ | mkdir -p ./tempmount | ||
+ | mount $FREELOOP ./tempmount | ||
+ | |||
+ | # purge this dir, so we have enough space; we'll return to fill it later | ||
+ | rm ./ | ||
+ | |||
+ | # first, we copy the contents of the boot/ | ||
+ | # see if inplace helps against out of space errors | ||
+ | rsync -aP --inplace ./ | ||
+ | |||
+ | mkdir -p ./ | ||
+ | rsync -aP ./ | ||
+ | |||
+ | # next, we replace the " | ||
+ | sed -e ' | ||
+ | |||
+ | # here comes the cleanup part | ||
+ | sync | ||
+ | umount $FREELOOP | ||
+ | losetup -d $FREELOOP | ||
+ | rmdir ./tempmount | ||
+ | fi | ||
+ | |||
if [ " | if [ " | ||
- | ln ./ | ||
- | ln ./ | ||
if [ " | if [ " | ||
(cd binary; echo live$' | (cd binary; echo live$' | ||
- | cat ./ | + | cat ./ |
- | rm ./ | + | rm ./ |
+ | # keeping these doesn' | ||
+ | # rm ./ | ||
fi | fi | ||
fi | fi | ||
if [ " | if [ " | ||
- | ln ./ | ||
- | ln ./ | ||
genisoimage -o ./ | genisoimage -o ./ | ||
- | [ -e ./ | + | |
- | [ -e ./ | + | |
- | [ -e ./ | + | ./ |
- | | + | |
+ | | ||
+ | | ||
+ | | ||
mv ./ | mv ./ | ||
fi | fi | ||
Line 243: | Line 702: | ||
stat -c %Y ./ | stat -c %Y ./ | ||
touch -m -d @$(cat x2go-tce-timestamp) x2go-tce-timestamp | touch -m -d @$(cat x2go-tce-timestamp) x2go-tce-timestamp | ||
- | lb clean | + | |
- | rm -rf ./cache | + | if lb source debian ; |
+ | then | ||
+ | echo -e " | ||
+ | else | ||
+ | echo -e " | ||
+ | fi | ||
+ | | ||
+ | lb clean | ||
+ | | ||
+ | fi | ||
else | else | ||
- | # note that imagetype hdd always ends here, | ||
- | # due to a harmless error that can be safely ignored, but which sets the error code to != 0 | ||
echo -e "Build failed: ' | echo -e "Build failed: ' | ||
+ | if [ " | ||
+ | echo "Looks like you tried to build an hdd image." | ||
+ | echo "Older (pre-Debian-Buster) releases of live-build show a harmless error during" | ||
+ | echo "the build, that can be safely ignored - but will still get you a 'Build failed'" | ||
+ | echo " | ||
+ | echo "look at the content of your build directory - maybe your build was successful" | ||
+ | echo "after all, and this script was merely unable to detect it (computers are dumb)." | ||
+ | fi | ||
fi | fi | ||
cd .. | cd .. | ||
fi | fi | ||
- | </code> | + | </file> |
===== Netbooting ===== | ===== Netbooting ===== | ||
Line 325: | Line 799: | ||
=== Required unless using the X2Go Session Broker: Adding the x2go-tce.sessions session configuration file to your HTTP or FTP Server === | === Required unless using the X2Go Session Broker: Adding the x2go-tce.sessions session configuration file to your HTTP or FTP Server === | ||
Again, this is assuming you already have an existing, working HTTP or FTP server setup. | Again, this is assuming you already have an existing, working HTTP or FTP server setup. | ||
- | * run X2GoClient on any computer you like, and configure a session the same way it should appear on the ThinClient <note tip>when using a Windows client, run x2goclient.exe --portable, or it will store the session information in the registry, rather than in a " | + | * run X2GoClient on any computer you like, and configure a session the same way it should appear on the ThinClient |
+ | <note tip>when using a Windows client, run x2goclient.exe --portable, or it will store the session information in the registry, rather than in a " | ||
* locate the " | * locate the " | ||
* copy it to x2go-tce.sessions | * copy it to x2go-tce.sessions | ||
Line 402: | Line 878: | ||
* create a folder '' | * create a folder '' | ||
* install grub-legacy into it: | * install grub-legacy into it: | ||
- | * '' | + | * '' |
* '' | * '' | ||
* check, and, if required, edit the contents of '' | * check, and, if required, edit the contents of '' | ||
* if you had to make changes, re-run '' | * if you had to make changes, re-run '' | ||
- | * optional: '' | + | * optional: '' |
* create a boot loader configuration file using the following template: | * create a boot loader configuration file using the following template: | ||
<file - menu.lst> | <file - menu.lst> | ||
Line 437: | Line 913: | ||
=== Installing syslinux === | === Installing syslinux === | ||
- | * install syslinux and mbr: '' | + | * install syslinux and mbr: '' |
* run '' | * run '' | ||
* note that you have to mark / | * note that you have to mark / | ||
Line 489: | Line 965: | ||
@echo off | @echo off | ||
setlocal | setlocal | ||
- | set BCDEDIT=%SYSTEM%\bcdedit.exe | + | set BCDEDIT=%SYSTEMROOT%\system32\bcdedit.exe |
if not exist %BCDEDIT% exit 1 | if not exist %BCDEDIT% exit 1 | ||
for /f " | for /f " | ||
Line 599: | Line 1075: | ||
=== These are entirely optional === | === These are entirely optional === | ||
+ | * '' | ||
* '' | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
* '' | * '' | ||
- | | + | * The SVG must be in SVG1.1 or SVG1.2 tiny format, or things may break |
- | * '' | + | * Newer versions of X2Go-TCE-Live will check for the strings '' |
+ | * Newer versions of X2Go-TCE-Live also support '' | ||
+ | | ||
+ | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
+ | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
+ | * '' | ||
+ | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
Line 621: | Line 1109: | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | |
- | * '' | + | |
+ | * '' | ||
+ | * Note that x5250 support is currently not part of the standard image available via git, as there is no x5250 executable in Debian. You can try using x3270 instead, most modern IBM i (System i, iSeries, AS/400) systems support 3270-type connections as well. Note that you need to specify " | ||
+ | * For a full mapping of x3270 keys to x5250 keys, see [[https:// | ||
+ | * If you need native 5250 support, say, with a commercial, closed-source 5250 terminal emulator, | ||
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
* '' | * '' | ||
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
- | * '' | + | * '' |
=== These are only intended to be used with TCE images stored on local media === | === These are only intended to be used with TCE images stored on local media === | ||
* '' | * '' | ||
Line 638: | Line 1130: | ||
* '' | * '' | ||
+ | ===== Client Branding/ | ||
+ | It is possible to make X2Go-TCE-Live match your Corporate Design/ | ||
+ | This is actually a feature of X2GoClient itself, so it will also work on //fat client// installations, | ||
+ | Note that only **SVGs** are supported for these two parameters | ||
+ | |||
+ | {{: | ||
+ | |||
+ | You can find a more detailed explanation in the [[wiki: | ||
+ | |||
+ | For X2Go-TCE-Live-Openbox-MicroDesktop, | ||
===== Querying X2Go-TCE version info ===== | ===== Querying X2Go-TCE version info ===== | ||
- | images built using the https:// | + | X2Go-TCE-Live will create a file ''/ |
A command like < | A command like < | ||
Line 783: | Line 1285: | ||
Basically: | Basically: | ||
< | < | ||
- | apt-get install ipxe | + | apt install ipxe |
cd / | cd / | ||
mkdir -p {bios,uefi} | mkdir -p {bios,uefi} | ||
Line 870: | Line 1372: | ||
* / | * / | ||
* store the results somewhere under / | * store the results somewhere under / | ||
- | * turning it into a package would mean we could add dependencies as well, so the manual apt-get install would not be neccessary | + | * turning it into a package would mean we could add dependencies as well, so the manual apt install would not be neccessary |
* additional scripts could be added that work " | * additional scripts could be added that work " | ||
Line 963: | Line 1465: | ||
FIXME Scripts triggered by if-up should check if a new download is really necessary. | FIXME Scripts triggered by if-up should check if a new download is really necessary. | ||
- | FIXME Feature request: In TCE (not MMD), use < | + | ===== List of closed ToDos/ |
+ | * Feature request: In TCE (not MMD), use < | ||
while ! (grep " | while ! (grep " | ||
echo s >/ | echo s >/ | ||
Line 970: | Line 1473: | ||
echo o >/ | echo o >/ | ||
</ | </ | ||
- | ===== List of closed ToDos/ | + | |
* '' | * '' | ||
* It would be nice to have a boot parameter '' | * It would be nice to have a boot parameter '' |