homehowtokbslinksaboutcontactprojectsmusic

Index > My Projects > Linux Kiosk

CCP Kiosk Setup - Lubuntu 24 LTS

Table of contents

  1. Base System Setup
  2. Rename NIC & Disable IPv6 and splash
  3. Configure WiFi
  4. Configure Autologin
  5. Disable Crash Reporting
  6. Disable Screen Lock
  7. Image Management

Base System Setup

Rename NIC & Disable IPv6 and splash

Rename NIC
sed -i s,GRUB_CMDLINE_LINUX='""',GRUB_CMDLINE_LINUX='"net.ifnames=0 biosdevname=0"',g /etc/default/grub
Disable IPv6 & splash
sed -i s,'GRUB_CMDLINE_LINUX_DEFAULT="splash"','GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1"',g /etc/default/grub
Update grub config
sudo update-grub
or
grub-mkconfig -o /boot/grub/grub.cfg
Reboot system to make sure
reboot

Configure Autologin

  1. Lubuntu
    cat << eot > /etc/sddm.conf
    [Autologin]
    Relogin=false
    User=kiosk
    Session=Lubuntu
    # Xfce session
    Session=xfce
    eot
    
    Reference
  2. LightDM
    cat << eot > /etc/lightdm/lightdm.conf
    [SeatDefaults]
    autologin-user=kiosk
    autologin-user-timeout=0
    user-session=xfce
    eot
    
  3. Start xfce4 manually
    cat << eot >> /home/kiosk/.profile
    
    # Start GUI
    if [ $(tty) == "/dev/tty1" ]
    then
            exec /usr/bin/startxfce4
    fi
    eot
    

Configure WiFi

cat << eot > /etc/netplan/wifi.yaml
network:
  version: 2
  wifis:
    wifi0:
      match:
        name: "wlan0"
      dhcp4: true
      access-points:
        "WAP01":
          auth:
            key-management: "psk"
            password: "xxxxx"
          networkmanager:
            passthrough:
              ipv6.method: "disabled"
              #connection.permissions: "user:kiosk:;"
eot

Configure panel layout and items

  1. Backup default configuration
    mv /etc/xdg/xfce4/panel/default.xml /etc/xdg/xfce4/panel/default.xml.orig
    
  2. Create custom panel layout configuration xml file
    nano /etc/xdg/xfce4/panel/default.xml
    
    Paste the following content and save the file
    
    
  3. Create default desktop layout configuration xml file
    nano /etc/xdg/xfce4/xfconf/xfce-perchannel-xml/xfce4-desktop.xml
    
    Paste the following content and save the file
    
    
Set the default background
cp /usr/share/backgrounds/greybird.svg /usr/share/backgrounds/xfce/xfce-shapes.svg

Image Management

Save image
  1. Partclone.dd without compression
    partclone.dd -N -d -s /dev/sda -O /mnt/test.img
    
  2. Partclone.dd with compression [0-9]
    mkfifo /tmp/pigz1
    pigz -p $cores -8 < /tmp/pigz1 > /mnt/test.img & partclone.dd -N -d -s /dev/sda -O /tmp/pigz1
    
Restore image
  1. Partclone.dd without compression
    partclone.dd -N -d -s /mnt/test.img -o /dev/sda
    
  2. Partclone.dd with compression
    gunzip -d -c < /mnt/test.img | partclone.dd -N -d -o /dev/sda
    

Disable Crash Reporting

sed -i s,'enabled=1','enabled=0',g /etc/default/apport

Disable Screen Lock

sed -i s,'Exec=light-locker','#Exec=light-locker',g /etc/xdg/autostart/light-locker.desktop