User Tools

Site Tools


doc:howto:tce

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
doc:howto:tce [2022/12/02 13:00]
stefanbaur [Configuring the Build] Updated notice
doc:howto:tce [2024/01/26 19:49] (current)
stefanbaur [Client Branding/Theming using SVGs] added before and after images
Line 61: Line 61:
 # Select ONE of the following git reposities # Select ONE of the following git reposities
 # this one loosely corresponds to "stable" # this one loosely corresponds to "stable"
-#export LBX2GO_CONFIG='git://code.x2go.org/live-build-x2go.git::feature/openbox-magic-pixel-workaround-buster' +#export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/openbox-magic-pixel-workaround-buster' 
-#export LBX2GO_CONFIG='git://code.x2go.org/live-build-x2go.git::feature/mate-minidesktop-buster' +#export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/mate-minidesktop-buster' 
-export LBX2GO_CONFIG='git://code.x2go.org/live-build-x2go.git::feature/openbox-magic-pixel-workaround-bullseye' +export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/openbox-magic-pixel-workaround-bullseye' 
-#export LBX2GO_CONFIG='git://code.x2go.org/live-build-x2go.git::feature/mate-minidesktop-bullseye' +#export LBX2GO_CONFIG='https://gitlab.x2go.org/x2go/live-build-x2go.git::feature/mate-minidesktop-bullseye' 
-# this one loosely corresponds to "heuler" +#export LBX2GO_CONFIG='https://github.com/bauritcs/live-build-x2go.git::feature/openbox-magic-pixel-workaround-bookworm
-#export LBX2GO_CONFIG='https://github.com/LinuxHaus/live-build-x2go::feature/openbox-magic-pixel-workaround-buster+#export LBX2GO_CONFIG='https://github.com/bauritcs/live-build-x2go.git::feature/mate-minidesktop-bookworm
-#export LBX2GO_CONFIG='https://github.com/LinuxHaus/live-build-x2go::feature/openbox-mate-minidesktop-buster+NOTES: 1) https://github.com/bauritcs loosely corresponds to "heuler" 
-#export LBX2GO_CONFIG='https://github.com/LinuxHaus/live-build-x2go::feature/openbox-magic-pixel-workaround-bullseye' +       2) Minidesktop builds are work in progress and not production-ready. Cont(r)act us if you need them; feel free to submit patches
-#export LBX2GO_CONFIG='https://github.com/LinuxHaus/live-build-x2go::feature/openbox-mate-minidesktop-bullseye' +       3) Add "-stretch" to the end of the LBX2GO_CONFIG string to create a stretch build, 
-NOTE: Add "-stretch" to the end of the LBX2GO_CONFIG string to create a stretch build, +          add "-buster" to the end of the LBX2GO_CONFIG string to create a buster build, 
-      add "-buster" to the end of the LBX2GO_CONFIG string to create a buster build, +          add "-bullseye" to the end of the LBX2GO_CONFIG string to create a bullseye build 
-      add "-bullseye" to the end of the LBX2GO_CONFIG string to create a bullseye build+#           add "-bookworm" to the end of the LBX2GO_CONFIG string to create a bookworm build (will be in gitlab repo $SOON - use github.com/bauritcs for now)
  
 # 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 114: Line 114:
     export LBX2GO_DEBVERSION="bullseye"     export LBX2GO_DEBVERSION="bullseye"
     export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"     export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
 +elif [ -z "${LBX2GO_CONFIG##*-bookworm}" ] ; then
 +    export LBX2GO_DEBVERSION="bookworm"
 +    export LBX2GO_BOOTAPPEND_LIVE+=" net.ifnames=0 biosdevname=0"
 +    export LBX2GO_ARCHIVE_AREAS="non-free-firmware "
 else else
     export LBX2GO_DEBVERSION="jessie"     export LBX2GO_DEBVERSION="jessie"
Line 183: Line 187:
 fi fi
  
-export LBX2GO_ARCHIVE_AREAS="main contrib non-free"+export LBX2GO_ARCHIVE_AREAS="main contrib non-free $LBX2GO_ARCHIVE_AREAS"
  
 # This is for minidesktop builds and currently only adds firefox-esr language packs # This is for minidesktop builds and currently only adds firefox-esr language packs
Line 231: Line 235:
 # might have worked - use live-build from Buster or newer and things will work): # might have worked - use live-build from Buster or newer and things will work):
 #export LBX2GO_IMAGETYPE='hdd' #export LBX2GO_IMAGETYPE='hdd'
-## DEBUG FIXME+## This might be required for hdd builds, especially for (u)efi
 #export LBX2GO_BOOTLOADER="syslinux grub-pc grub-efi" #export LBX2GO_BOOTLOADER="syslinux grub-pc grub-efi"
 # to create a tar file only (seems to be broken in older live-build versions - Buster works): # to create a tar file only (seems to be broken in older live-build versions - Buster works):
Line 251: Line 255:
  
 ==== 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?bug=1136|Bug #1136]] is still unresolved. +To add patches that aren't part of any package yet, you can use the directory ./patchfor patches that should be added to all versions, and ./patch-minidesktopfor patches that should only be added to the MATE-MiniDesktop Edition.
-Save this script in the directory where you want to save your builds and run it before calling the buildscript.+
  
 +You will need to create a directory structure like <code>./patch/includes.chroot/etc/</code> to create/overwrite a file in <code>/etc/</code> within the live environment.
 +
 +e.g. to override <code>/etc/x2go/x2gothinclient-minidesktop_start</code> with a custom version, run <code>mkdir -p ./patch-minidesktop/includes.chroot/etc/x2go/</code> and save the following file as <code>./patch-minidesktop/includes.chroot/etc/x2go/x2gothinclient-minidesktop_start</code>
 <code> <code>
 #!/bin/bash #!/bin/bash
-mkdir -p ./patch/includes.chroot/usr/lib/x2go/tce/ 
-wget -O ./patch/includes.chroot/usr/lib/x2go/tce/x2gousbmount 'https://code.x2go.org/gitweb?p=x2gothinclient.git;a=blob_plain;f=usbmount/x2gousbmount;hb=c6106bd12ca0278b8706e87813ff782c0bbb6132'   
-chmod 755 ./patch/includes.chroot/usr/lib/x2go/tce/x2gousbmount 
-</code> 
  
 +# Copyright (C) 2010-2024 by X2Go project, https://wiki.x2go.org
 +#       Oleksandr Shneyder <o.shneyder@phoca-gmbh.de>
 +#       Moritz 'Morty' Struebe <Moritz.Struebe@informatik.uni-erlangen.de>
 +#       Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
 +#       Stefan Baur <X2Go-ML-1@baur-itcs.de>
 +#
 +# 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...
 +if ! /usr/bin/pactl list modules | grep -A1 'module-native-protocol-tcp' | grep -q 'auth-ip-acl=127.0.0.1;::1' ; then
 +        /usr/bin/pactl 'load-module' 'module-native-protocol-tcp' 'auth-ip-acl=127.0.0.1;::1'
 +fi
 +
 +# make sure we don't start before sessions and settings files exist - avoids race conditions
 +while ! [ -e ~x2gothinclient/.x2goclient/sessions ] ; do
 +        sleep 1;
 +done
 +
 +while ! [ -e ~x2gothinclient/.x2goclient/settings ]; do
 +        sleep 1
 +done
 +
 +[ -s /etc/x2go/x2gothinclient_bg.svg ] && X2GO_BG='--background="/etc/x2go/x2gothinclient_bg.svg'
 +[ -s /etc/x2go/x2gothinclient_branding.svg ] && X2GO_BRAND='--branding="/etc/x2go/x2gothinclient_branding.svg'
 +
 +
 +/usr/lib/x2go/x2goclient --no-menu \
 +                         $X2GO_BG \
 +                         $X2GO_BRAND \
 +                         --kbd-type=auto \
 +                         --set-kbd=1 \
 +                         --tray-icon \
 +                         --read-exports-from=~/export \
 +                         --no-session-edit \
 +                         --add-to-known-hosts \
 +                         &
 +
 +</code>
 ==== Starting the Build ==== ==== Starting the Build ====
 In the directory where you want to save your builds, save the following file as x2go-tce-build, and run it (e.g. via //sudo bash ./x2go-tce-build//): In the directory where you want to save your builds, save the following file as x2go-tce-build, and run it (e.g. via //sudo bash ./x2go-tce-build//):
Line 272: Line 325:
 LBX2GO_TIMESTAMP=$(date +"%Y%m%d%H%M%S") LBX2GO_TIMESTAMP=$(date +"%Y%m%d%H%M%S")
  
 +# Log all output to a logfile in /tmp
 exec > >(tee "/tmp/$LBX2GO_TIMESTAMP.log") 2>&1 exec > >(tee "/tmp/$LBX2GO_TIMESTAMP.log") 2>&1
  
Line 278: Line 332:
  
 if [ -z "$LBX2GO_ARCH" ] || if [ -z "$LBX2GO_ARCH" ] ||
-        ( echo "$LBX2GO_ARCH" | grep -q "arm" && [ -z "$LBX2GO_ARCH_MODEL" ] ) ||+ ( echo "$LBX2GO_ARCH" | grep -q "arm" && [ -z "$LBX2GO_ARCH_MODEL" ] ) || 
    [ -z "$LBX2GO_SPACE" ] ||    [ -z "$LBX2GO_SPACE" ] ||
    [ -z "$LBX2GO_CONFIG" ] ||    [ -z "$LBX2GO_CONFIG" ] ||
Line 348: Line 402:
     if echo $LBX2GO_ARCH | grep -q "arm" ; then     if echo $LBX2GO_ARCH | grep -q "arm" ; then
  
-        # firmware for wifi + # bullseye and newer do not need this 
-        echo "firmware-brcm80211/buster-backports" >>config/package-lists/raspi.list.chroot+    if [ "${LBX2GO_DEBVERSION}" = "buster" ]; then  
 + # firmware for wifi  
 + echo "firmware-brcm80211/buster-backports" >>config/package-lists/raspi.list.chroot 
 + fi
  
-        if [ "$LBX2GO_ARCH_MODEL" = "Pi3" ] ; then + if [ "$LBX2GO_ARCH_MODEL" = "Pi3" ] ; then 
-                # modules required for Raspberry Pi 3 LAN + # modules required for Raspberry Pi 3 LAN 
-                echo "crc16" >> config/includes.chroot/etc/initramfs-tools/modules + echo "crc16" >> config/includes.chroot/etc/initramfs-tools/modules 
-                echo "mii" >> config/includes.chroot/etc/initramfs-tools/modules + echo "mii" >> config/includes.chroot/etc/initramfs-tools/modules 
-                echo "smsc95xx" >> config/includes.chroot/etc/initramfs-tools/modules + echo "smsc95xx" >> config/includes.chroot/etc/initramfs-tools/modules 
-                echo "usbcore" >> config/includes.chroot/etc/initramfs-tools/modules + echo "usbcore" >> config/includes.chroot/etc/initramfs-tools/modules 
-                echo "usbnet" >> config/includes.chroot/etc/initramfs-tools/modules + echo "usbnet" >> config/includes.chroot/etc/initramfs-tools/modules 
-                echo "fake-hwclock" >>config/package-lists/raspi.list.chroot + echo "fake-hwclock" >>config/package-lists/raspi.list.chroot 
-                echo "usbutils" >>config/package-lists/raspi.list.chroot+ echo "usbutils" >>config/package-lists/raspi.list.chroot
  
-                # firmware for basic raspi functions - required for boot on Pi3 + # firmware for basic raspi functions - required for boot on Pi3 
-                echo "raspi3-firmware/buster" >>config/package-lists/raspi.list.chroot + echo "raspi3-firmware/buster" >>config/package-lists/raspi.list.chroot 
-                # standard linux kernel - for Pi3 + # standard linux kernel - for Pi3 
-                echo "linux-image-arm64/buster" >>config/package-lists/raspi.list.chroot+ echo "linux-image-arm64/buster" >>config/package-lists/raspi.list.chroot
  
-        elif [ "$LBX2GO_ARCH_MODEL" = "Pi4" ] ; then + elif [ "$LBX2GO_ARCH_MODEL" = "Pi4" ] ; then 
-                # firmware for basic raspi functions - required for boot on Pi4 + # bullseye and newer do not need this 
-                echo "raspi3-firmware/buster-backports" >>config/package-lists/raspi.list.chroot + if [ "${LBX2GO_DEBVERSION}" = "buster" ]; then 
-                echo "raspi-firmware/buster-backports" >>config/package-lists/raspi.list.chroot + # firmware for basic raspi functions - required for boot on Pi4 
- + echo "raspi3-firmware/buster-backports" >>config/package-lists/raspi.list.chroot 
-                # newer linux kernel - required for pi4/pi400 + echo "raspi-firmware/buster-backports" >>config/package-lists/raspi.list.chroot
-                echo "linux-image-arm64/buster-backports" >>config/package-lists/raspi.list.chroot +
- +
-        else +
-                echo "WARNING: ARM Platform selected, but unknown model: '$LBX2GO_ARCH_MODEL'. Assuming no additional packages/patches are required." +
-        fi+
  
 + # newer linux kernel - required for pi4/pi400
 + echo "linux-image-arm64/buster-backports" >>config/package-lists/raspi.list.chroot
 + fi
 + else
 + echo "WARNING: ARM Platform selected, but unknown model: '$LBX2GO_ARCH_MODEL'. Assuming no additional packages/patches are required."
 + fi
     fi     fi
 + 
  
     # This is for minidesktop builds only     # This is for minidesktop builds only
Line 411: Line 469:
         # at files not being downloaded, disable these three entries.         # at files not being downloaded, disable these three entries.
         export https_proxy=$LB_APT_HTTP_PROXY         export https_proxy=$LB_APT_HTTP_PROXY
-        export http_proxy=$LB_APT_HTTP_PROXY+ export http_proxy=$LB_APT_HTTP_PROXY
         export ftp_proxy=$LB_APT_FTP_PROXY         export ftp_proxy=$LB_APT_FTP_PROXY
     fi     fi
Line 417: Line 475:
     # This is part of our experimental ARM support     # 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 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+    # It makes some necessary changes, and also tries to speed up squashfs creation when it 
     # detects a crossbuild environment.     # detects a crossbuild environment.
     if echo $LBX2GO_ARCH | grep -q 'arm'; then     if echo $LBX2GO_ARCH | grep -q 'arm'; then
Line 426: Line 484:
         sed -e 's/^.*fuseext.*$//g' -e 's/^.*freerdp-nightly.*$//g' -e 's/^.*x2gothinclient.*$//g' -i ./config/package-lists/*         sed -e 's/^.*fuseext.*$//g' -e 's/^.*freerdp-nightly.*$//g' -e 's/^.*x2gothinclient.*$//g' -i ./config/package-lists/*
  
-        # This command removes the X2Go repository from the directory where additional + # This command removes the X2Go repository from the directory where additional 
-        # archives are stored.  Currently needed as the X2Go repository offers no arm64+        # archives are stored.  Currently needed as the X2Go repository offers no arm64 
         # packages, but Debian Buster does - so that's what we're falling back to.         # packages, but Debian Buster does - so that's what we're falling back to.
         echo "WARNING: Removing all references to the X2Go repository from the build."         echo "WARNING: Removing all references to the X2Go repository from the build."
         rm ./config/archives/*x2go*         rm ./config/archives/*x2go*
  
-        # The following is a hack to reduce squashfs creation time in a crossbuild environment. + # 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 + # We're replacing mksquashfs in the changeroot with a wrapper script that drops the  
-        # original mksquashfs call into a file.+ # original mksquashfs call into a file.
  
-        if (uname -r | grep -q 'i.86' || uname -r | grep -q 'amd64') ; then + if (uname -r | grep -q 'i.86' || uname -r | grep -q 'amd64') ; then 
-                # We need to do this as a background task, waiting for the mksquashfs executable to + # 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 + # appear in the changeroot; as the changeroot will only be created later on, once 
-                # lb build is called.+ # 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, while on the host, we can use all the 
 + # native, raw CPU power and cores available to us.
  
-                The other background task waits until the command file has been createdthen + To make sure we don't have any lingering processes in the backgroundwe're passing 
-                it applies some necessary patches to it, and starts the mksquashfs command natively + our own PID along to the background tasks, and tell them to terminate if our PID 
-                on the build host, rather than in the changeroot environment. + disappears while they're still in their waiting/looping state.
-                # This is because in the changeroot, we'd be running the ARM mksquashfs in a qemu +
-                # software emulation of the ARM architecture, while on the host, we can use all the +
-                # 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 + MASTERPID=$$
-                # our own PID along to the background tasks, and tell them to terminate if our PID +
-                # disappears while they're still in their waiting/looping state.+
  
-                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 ./chroot/usr/bin/mksquashfs ]; do 
 + ps $MASTERPID >/dev/null || exit 1 
 + sleep 1 
 +     done 
 +     # make sure we don't overwrite the real executable if it has already been 
 +     # moved out of the way 
 +     if ! [ -x ./chroot/usr/bin/mksquashfs.real ]; then 
 + cp ./chroot/usr/bin/mksquashfs ./chroot/usr/bin/mksquashfs.real 
 +     fi 
 +    echo '#!/bin/bash' >./chroot/usr/bin/mksquashfs 
 +    # log the name we've been called with and all parameters into this file 
 +    echo 'echo "$$@" >/tmp/filesystem.squashfs.temp' >>./chroot/usr/bin/mksquashfs 
 +    # once the native mksquashfs is complete, we will remove this file 
 +    echo 'while [ -f /tmp/filesystem.squashfs.temp ]; do' >>./chroot/usr/bin/mksquashfs 
 +    echo '        sleep 1' >>./chroot/usr/bin/mksquashfs 
 +    echo 'done' >>./chroot/usr/bin/mksquashfs 
 +    # so let's wait until it has been removed before deleting ourselves ... 
 +    echo 'rm /usr/bin/mksquashfs' >>./chroot/usr/bin/mksquashfs 
 +    # ... and moving the real executable back into its place 
 +    echo 'mv /usr/bin/mksquashfs.real /usr/bin/mksquashfs' >>./chroot/usr/bin/mksquashfs 
 +    chmod 755 ./chroot/usr/bin/mksquashfs 
 + ) &
  
-                Replace mksquashfs in chroot with script + start the native mksquashfs after patching the parameters 
-                # (script will undo this upon completion) +
-                +     # wait until the trigger file has been created or until our parent process dies 
-                    # wait until the chroot has been populated or until our parent process dies +     while ! [ -./chroot/tmp/filesystem.squashfs.temp ]; do 
-                    while ! [ -./chroot/usr/bin/mksquashfs ]; do + ps $MASTERPID >/dev/null || exit 1 
-                        ps $MASTERPID >/dev/null || exit 1 + sleep 1 
-                        sleep 1 +     done 
-                    done +     using any of the available filters (x86, arm, armthumb) for the  
-                    make sure we don't overwrite the real executable if it has already been +     -Xbcj command results in an unusable squashfs on arm, so we drop the  
-                    moved out of the way +     # parameter completely if it's there. 
-                    if ! [ -x ./chroot/usr/bin/mksquashfs.real ]; then +     # also, all absolute paths (detected by beginning with " /") need to be 
-                        cp ./chroot/usr/bin/mksquashfs ./chroot/usr/bin/mksquashfs.real +     # prefixed with "./chroot" so the mksquashfs outside the chroot knows where 
-                    fi +     # to look for the corresponding paths/files
-                   echo '#!/bin/bash>./chroot/usr/bin/mksquashfs +     sed -e 's-Xbcj x86/g-e 's# /# ./chroot/#g-i \ 
-                   log the name we've been called with and all parameters into this file + ./chroot/tmp/filesystem.squashfs.temp 
-                   echo 'echo "$0 $@" >/tmp/filesystem.squashfs.temp' >>./chroot/usr/bin/mksquashfs +     #needs switch from e.g. /bin/mksquashfs to $(which mksquashfs) 
-                   once the native mksquashfs is complete, we will remove this file +     sed -e "s#^.*mksquashfs#$(which mksquashfs)#g" -i \ 
-                   echo 'while [ -/tmp/filesystem.squashfs.temp ]; do' >>./chroot/usr/bin/mksquashfs + ./chroot/tmp/filesystem.squashfs.temp 
-                   echo '        sleep 1' >>./chroot/usr/bin/mksquashfs +     now let'make this executable 
-                   echo 'done' >>./chroot/usr/bin/mksquashfs +     chmod 755 ./chroot/tmp/filesystem.squashfs.temp
-                   so let'wait until it has been removed before deleting ourselves ... +
-                   echo 'rm /usr/bin/mksquashfs' >>./chroot/usr/bin/mksquashfs +
-                   # ... and moving the real executable back into its place +
-                   echo 'mv /usr/bin/mksquashfs.real /usr/bin/mksquashfs' >>./chroot/usr/bin/mksquashfs +
-                   chmod 755 ./chroot/usr/bin/mksquashfs +
-                ) &+
  
-                # start the native mksquashfs after patching the parameters +     # we also need to add some more excludes because they shouldn't end up 
-                ( +     # in the squashfs - no idea why we don't need them while inside the chroot ... 
-                    # wait until the trigger file has been created or until our parent process dies +     echo 'proc/*' >>./chroot/excludes 
-                    while ! [ -f ./chroot/tmp/filesystem.squashfs.temp ]; do +     echo 'sys/*' >>./chroot/excludes 
-                        ps $MASTERPID >/dev/null || exit 1 +     echo 'dev/pts/*' >>/.chroot.excludes 
-                        sleep 1 +     # now let's execute the script and, if it terminates without an error, 
-                    done +     # we'll move the newly created squashfs into the chroot where the chrooted 
-                    # using any of the available filters (x86, arm, armthumb) for the +     # mksquashfs command would have created it; if that worked as well, we'll 
-                    # -Xbcj command results in an unusable squashfs on arm, so we drop the +     # remove the script file so our dummy mksquashfs inside the chroot knows 
-                    # parameter completely if it's there. +     # it's time to terminate itself. 
-                    # also, all absolute paths (detected by beginning with " /") need to be +     ./chroot/tmp/filesystem.squashfs.temp && \ 
-                    # prefixed with "./chroot" so the mksquashfs outside the chroot knows where +     mv ./filesystem.squashfs ./chroot/ && \ 
-                    # to look for the corresponding paths/files. +     rm ./chroot/tmp/filesystem.squashfs.temp 
-                    sed -e 's/ -Xbcj x86/ /g' -e 's# /# ./chroot/#g' -i \ + ) & 
-                        ./chroot/tmp/filesystem.squashfs.temp + fi
-                    #needs switch from e.g. /bin/mksquashfs to $(which mksquashfs) +
-                    sed -e "s#^.*mksquashfs#$(which mksquashfs)#g" -i \ +
-                        ./chroot/tmp/filesystem.squashfs.temp +
-                    # now let's make this executable +
-                    chmod 755 ./chroot/tmp/filesystem.squashfs.temp +
- +
-                    # we also need to add some more excludes because they shouldn't end up +
-                    # in the squashfs - no idea why we don't need them while inside the chroot ... +
-                    echo 'proc/*' >>./chroot/excludes +
-                    echo 'sys/*' >>./chroot/excludes +
-                    echo 'dev/pts/*' >>/.chroot.excludes +
-                    # 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. +
-                    ./chroot/tmp/filesystem.squashfs.temp && \ +
-                    mv ./filesystem.squashfs ./chroot/ && \ +
-                    rm ./chroot/tmp/filesystem.squashfs.temp +
-                ) & +
-        fi+
     fi     fi
  
Line 532: Line 590:
         # This is part of our experimental ARM support         # This is part of our experimental ARM support
         if [ "$LBX2GO_IMAGETYPE" = "hdd" ] && echo $LBX2GO_ARCH | grep -q "arm" ; then         if [ "$LBX2GO_IMAGETYPE" = "hdd" ] && echo $LBX2GO_ARCH | grep -q "arm" ; then
-                # after the build, let's determine the name of our image file ... + # after the build, let's determine the name of our image file ... 
-                IMAGEFILE="./x2go-tce-live-image-$(echo $LBX2GO_ARCH | awk '{print $2}').img"+ IMAGEFILE="./x2go-tce-live-image-$(echo $LBX2GO_ARCH | awk '{print $2}').img"
  
-                # ... and change the partition type to reflect the file system actually in use for partition 1 + # ... and change the partition type to reflect the file system actually in use for partition 1 
-                # ("b" is FAT32) + # ("b" is FAT32) 
-                sfdisk --part-type $IMAGEFILE 1 b+ 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. + # 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+ 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 + # 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+ losetup -o 1048576 $FREELOOP $IMAGEFILE
  
-                # now let's mount it + # now let's mount it 
-                mkdir -p ./tempmount + mkdir -p ./tempmount 
-                mount $FREELOOP ./tempmount+ mount $FREELOOP ./tempmount
  
-                # purge this dir, so we have enough space; we'll return to fill it later + # purge this dir, so we have enough space; we'll return to fill it later 
-                rm ./tempmount/live/*+ rm ./tempmount/live/*
  
-                # first, we copy the contents of the boot/firmware/ folder to the root directory, because that is where these files are needed + # first, we copy the contents of the boot/firmware/ folder to the root directory, because that is where these files are needed 
-                # see if inplace helps against out of space errors + # see if inplace helps against out of space errors 
-                rsync -aP --inplace ./chroot/boot/firmware/* ./tempmount+ rsync -aP --inplace ./chroot/boot/firmware/* ./tempmount
  
-                mkdir -p ./tempmount/live/ + mkdir -p ./tempmount/live/ 
-                rsync -aP ./binary/live/*.squashfs ./tempmount/live/+ rsync -aP ./binary/live/*.squashfs ./tempmount/live/
  
-                # next, we replace the "root=" parameter with the parameters needed for live-booting + # next, we replace the "root=" parameter with the parameters needed for live-booting 
-                sed -e 's#root=/dev/mmcblk0p2 #'"$LBX2GO_BOOTAPPEND_LIVE"' #' -i ./tempmount/cmdline.txt+ sed -e 's#root=/dev/mmcblk0p2 #'"$LBX2GO_BOOTAPPEND_LIVE"' #' -i ./tempmount/cmdline.txt
  
-                # here comes the cleanup part + # here comes the cleanup part 
-                sync + sync 
-                umount $FREELOOP + umount $FREELOOP 
-                losetup -d $FREELOOP + losetup -d $FREELOOP 
-                rmdir ./tempmount + rmdir ./tempmount 
-        fi+ fi
  
         if [ "$LBX2GO_IMAGETYPE" = "netboot" ] ; then         if [ "$LBX2GO_IMAGETYPE" = "netboot" ] ; then
Line 989: Line 1047:
   * ''throttle=n|n:n:n:n:n'' - Will throttle down- and upload speed (''throttle=n'') or set throttling limits as follows: download:upload:smoothingtime:smoothinglength:latency. Defaults for up- and download are 10 (KiloBytes/s), 3.0 (seconds, using decimals is permitted) smoothingtime, 20 (KiloBytes), 0 (ms). for a detailed description of these parameters, see "man trickle". You can use the first 1, 2, 3, 4 or all 5 parameters. To set down- and/or upload speed to unlimited, use the letter "u" instead of a numeric value.   * ''throttle=n|n:n:n:n:n'' - Will throttle down- and upload speed (''throttle=n'') or set throttling limits as follows: download:upload:smoothingtime:smoothinglength:latency. Defaults for up- and download are 10 (KiloBytes/s), 3.0 (seconds, using decimals is permitted) smoothingtime, 20 (KiloBytes), 0 (ms). for a detailed description of these parameters, see "man trickle". You can use the first 1, 2, 3, 4 or all 5 parameters. To set down- and/or upload speed to unlimited, use the letter "u" instead of a numeric value.
   * ''timezone=TIMEZONE'' - can be used to define a timezone other than UTC, e.g. 'Europe/Berlin'. This especially makes sense for MATE-MiniDesktop, but is nice to have in regular TCE-Live as well, because the timestamp of the log messages will show the local time instead of UTC. This is a standard parameter of live-boot, and not specific to X2Go.   * ''timezone=TIMEZONE'' - can be used to define a timezone other than UTC, e.g. 'Europe/Berlin'. This especially makes sense for MATE-MiniDesktop, but is nice to have in regular TCE-Live as well, because the timestamp of the log messages will show the local time instead of UTC. This is a standard parameter of live-boot, and not specific to X2Go.
 +  * ''windowwidth=[n-nnn]'' - this is only available in MiniDesktop mode. It allows you to set the width of the X2GoClient login window (which gets moved and resized to the right side of your screen during session startup) to any value between 0 and 100. Note that widths smaller than 30 are not recommended and may cause further resizing once the session starts.
   * ''x3270servers="host[:port][|host[:port]...]"'' - this is only available in MiniDesktop mode. It allows you to specify one or more hosts (with optional ports) for x3270 terminal emulation sessions that will be created as desktop shortcuts on the thinclient. For a default 3270 connection, the port is 23 (telnet) and does not need to be specified. For an SSL-encrypted connection (recommended), the port is 992. Hosts may be IP addresses or DNS names, and need to be separated with a ''|''. (feature available via github repo, soon via x2go repo too)   * ''x3270servers="host[:port][|host[:port]...]"'' - this is only available in MiniDesktop mode. It allows you to specify one or more hosts (with optional ports) for x3270 terminal emulation sessions that will be created as desktop shortcuts on the thinclient. For a default 3270 connection, the port is 23 (telnet) and does not need to be specified. For an SSL-encrypted connection (recommended), the port is 992. Hosts may be IP addresses or DNS names, and need to be separated with a ''|''. (feature available via github repo, soon via x2go repo too)
   * ''x5250servers="host[:port][|host[:port]...]"'' - this is only available in MiniDesktop mode. It allows you to specify one or more hosts (with optional ports) for x5250 terminal emulation sessions that will be created as desktop shortcuts on the thinclient. For a default 5250 connection, the port is 23 (telnet) and does not need to be specified. For an SSL-encrypted connection (recommended), the port is 992. Hosts may be IP addresses or DNS names, and need to be separated with a ''|''. 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. If you need native 5250 support, say, with a commercial, closed-source 5250 terminal emulator, please leave a message on the X2Go-User Mailing List and we'll tell you if and how you can integrate that into your build. (feature available via github repo, soon via x2go repo too)   * ''x5250servers="host[:port][|host[:port]...]"'' - this is only available in MiniDesktop mode. It allows you to specify one or more hosts (with optional ports) for x5250 terminal emulation sessions that will be created as desktop shortcuts on the thinclient. For a default 5250 connection, the port is 23 (telnet) and does not need to be specified. For an SSL-encrypted connection (recommended), the port is 992. Hosts may be IP addresses or DNS names, and need to be separated with a ''|''. 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. If you need native 5250 support, say, with a commercial, closed-source 5250 terminal emulator, please leave a message on the X2Go-User Mailing List and we'll tell you if and how you can integrate that into your build. (feature available via github repo, soon via x2go repo too)
Line 1006: Line 1065:
   * ''updateurl=rsync|https|http|ftp://your-http-server-ip-or-dns-here/path-to-update-files'' - Will allow you to update an image in the background when using local storage instead of PXE. Download task will start at a randomized interval to avoid unintentional dDOSing of the update server/network infrastructure. The updater will even work when using NTFS for local storage, but only if the //toram// boot option is used. Regardless of NTFS or not, the updater requires three directories: ''/boot/X2Go-live1, /boot/X2Go-live2, /boot/X2Go-live-download''. **Attention: Whoever manages to spoof the server name can deploy rogue images to your ThinClients.**  Even though it is slower, using an HTTPS web server is the safer way of doing this. Be sure that your web server delivers a last-modified header for all files.    * ''updateurl=rsync|https|http|ftp://your-http-server-ip-or-dns-here/path-to-update-files'' - Will allow you to update an image in the background when using local storage instead of PXE. Download task will start at a randomized interval to avoid unintentional dDOSing of the update server/network infrastructure. The updater will even work when using NTFS for local storage, but only if the //toram// boot option is used. Regardless of NTFS or not, the updater requires three directories: ''/boot/X2Go-live1, /boot/X2Go-live2, /boot/X2Go-live-download''. **Attention: Whoever manages to spoof the server name can deploy rogue images to your ThinClients.**  Even though it is slower, using an HTTPS web server is the safer way of doing this. Be sure that your web server delivers a last-modified header for all files. 
  
 +===== Client Branding/Theming using SVGs =====
 +It is possible to make X2Go-TCE-Live match your Corporate Design/Corporate Identity, using the "background" and "branding" parameters.
 +This is actually a feature of X2GoClient itself, so it will also work on //fat client// installations, and even on Windows and macOS.
 +
 +{{:wiki:advanced:x2goclientdefaultbranding.png?400|Before ...}} {{:wiki:advanced:x2goclientbranding.png?400| ... and after.}}
 +
 +You can find a more detailed explanation in the [[wiki:advanced:branding-theming|corresponding X2Go Wiki page]].
 ===== Querying X2Go-TCE version info =====  ===== Querying X2Go-TCE version info ===== 
 images built using the https://github.com/LinuxHaus/live-build-x2go::feature/openbox repository/branch after 2017-07-27 10:50 UTC will create a file ''/var/run/x2go-timestamps''. images built using the https://github.com/LinuxHaus/live-build-x2go::feature/openbox repository/branch after 2017-07-27 10:50 UTC will create a file ''/var/run/x2go-timestamps''.
doc/howto/tce.1669986038.txt.gz · Last modified: 2022/12/02 13:00 by stefanbaur