- Disable UVC (default via HDX RealTime Webcam Video Compression)
sed -i s,'DENY: class=0e # UVC (default via HDX RealTime Webcam Video Compression)','#DENY: class=0e # UVC (default via HDX RealTime Webcam Video Compression)',g /opt/Citrix/ICAClient/usb.conf
- Hide menu bar
sed -i s,'ConnectionBar=*','ConnectionBar=0',g /opt/Citrix/ICAClient/config/All_Regions.ini
Double check the above to be ConnectionBar=0 as it might instert ConnectionBar=0*
- Configure start-up modes Enable desktop appliances mode
sed -i s,'DeferredUpdateMode = True','DeferredUpdateMode = True\nDesktopApplianceMode = True',g /opt/Citrix/ICAClient/config/module.ini
- Enable audio input
sed -i s,'CDMAllowed=On','CDMAllowed=On\nEnableAudioInput=True',g /opt/Citrix/ICAClient/config/wfclient.template
- Allow audio input
sed -i s,'CDMAllowed=On','CDMAllowed=On\nAllowAudioInput=True',g /opt/Citrix/ICAClient/config/wfclient.template
- Allow remote flash: Optional
sed -i s,'CDMAllowed=On','CDMAllowed=On\nHDXFlashUseFlashRemoting=Always',g /opt/Citrix/ICAClient/config/wfclient.template
Now you have desktop environment and citrix workspace installed so let do a cleanu and compress the system again
- Install package needed to create core image
apt install debootstrap
- Create base file system [64 bit]
ctx=/ctx; debootstrap --arch amd64 focal $ctx
- Delete existing timezone and locals setting from base system and copy the timezone, locals from local system to base system
rm $ctx/etc/{timezone,localtime}; cp /etc/{timezone,localtime} $ctx/etc
- Create modules directory and copy intended kernel to it
mkdir -pv $ctx/lib/modules; cp -r /lib/modules/$(uname -r) $ctx/lib/modules/
- Copy the repository links and set the hostname
cp /etc/apt/sources.list $ctx/etc/apt; echo "localhost" > $ctx/etc/hostname
- Login to base system (chroot)
chroot $ctx
- Configure timezone and local time
locale-gen en_US.UTF-8; update-locale LANG=en_US.UTF-8; dpkg-reconfigure -u tzdata
- Patch the base system
apt update; apt upgrade -y
- Install base packages
apt install nano xterm ssh dmidecode wget dnsutils -y
- Disable IPv6
Add the following as kernel argument
ipv6.disable=1
- Create init script (very important) and make it executable
cat << eot > /init
#!/bin/sh
mkdir -p /dev/{,pts,ptmx}
# Mount file system in ram.
mount -a
init=/sbin/init
exec \${init}
eot
chmod a+x /init
- Create rule to change nic name to eth0
cat << eot > /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x11ab:0x4363 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*",
ATTR{address}=="00:00:00:00:00:00",ATTR{dev_id}=="0x0", ATTR{type}=="1",
KERNEL=="eth*", NAME="eth0"
eot
- Configure the base system for dhcp
cat << eot > /etc/netplan/config.yaml
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: true
eot
- Clear caches
apt-get autoremove; apt-get autoclean; apt-get clean; rm /var/lib/apt/lists/*
- Remove some unnecessary files/folders and remove wireless drivers from kernel (optional)
rm -r /usr/share/GeoIP ; rm -r /usr/share/man ; rm -r /usr/share/doc
rm -r /lib/modules/$(uname -r)/kernel/net/wireless; rm -r /lib/modules/$(uname -r)/kernel/drivers/net/wireless
- Configure autologin for root account
sed -i s,"^ExecStart=-/sbin/agetty.*","ExecStart=-/sbin/agetty -a root --noclear %I $TERM",g /etc/systemd/system/getty.target.wants/getty\@tty1.service
Verify the auto login
grep "ExecStart" /etc/systemd/system/getty.target.wants/getty\@tty1.service | grep root
- Setup password for root (optional)
passwd
Logout from base system (chrooted)
exit
- Compress the base system (.gz)
cd $ctx; find . -print0 | sudo cpio --null -ov --format=newc | gzip -9 > ~/ctxboot_$(date +%Y%m%d-%H%M).gz
- Compress the base system (.xz)
cd $ctx; find . -print0 | sudo cpio --null -ov --format=newc > ~/ctxboot_$(date +%Y%m%d-%H%M); xz -zvf -T0 -9 -C crc32 ~/ctxboot_$(date +%Y%m%d-%H%M)
- Congrats ! Your base file system is compressed and ready
Go up