01-Linux_Common_System_Customization

Linux System Login Credentials

Ubuntu Username/Password: kickpi/kickpi ROOT Password: root


Change Default Login User

For Serial Port Login: Modify /lib/systemd/system/serial-getty@.service.d/override.conf


Enable ROOT Login for Desktop Environment

  1. Modify /etc/lightdm/lightdm.conf.d/22-autologin.conf:

[Seat:*]
autologin-user=root  # Change to root
autologin-user-timeout=0
user-session=xfce
  1. Modify /etc/lightdm/users.conf:

[UserList]
minimum-uid=0  # Allow UID=0 (root) to log in
hidden-users=nobody nobody4 noaccess
hidden-shells=/bin/false /usr/sbin/nologin /sbin/nologin

Backup eMMC System to New SD Card (System Backup)

Steps:

  1. Insert a high-speed SD card (Class 10 recommended).

  2. Format the SD card:

    mkfs.ext4 /dev/mmcblk1
  3. Clone the system:

    dd if=/dev/mmcblk0 of=/dev/mmcblk1 bs=4M

Notes:

  • To disable auto-burn service:

    sudo systemctl disable kickpi.service
  • Fix UUID conflicts by modifying /etc/fstab or deleting the file before cloning.


Backup SD Card System

  1. Mount the USB drive:

    sudo mkdir -p /mnt/usb
    sudo mount /dev/sda1 /mnt/usb
  2. Run the packaging script:

    sudo ./ff_export_rootfs /mnt/usb/ -t ext4

    Output format: Ubuntu22.04.5LTS_ztl_ext4_202411131114.img

  3. Mount the image for modification:

    sudo mkdir test_rootfs/
    sudo mount ./Ubuntu22.04.5LTS_ztl_ext4_202411131114.img ./test_rootfs/

Set Auto-Start Commands

  • Add commands to /etc/rc.local.

  • Or create service files in /etc/systemd/system/.


Configure WiFi Hotspot (AP Mode)

  1. Check AP mode support:

    iw list | grep AP
  2. Install dependencies:

    sudo apt-get install util-linux hostapd dnsmasq iptables iproute2 haveged
  3. Create a virtual interface:

    sudo iw dev wlan0 interface add wlo2 type __ap
    sudo ip link set dev wlo2 address 22:33:44:55:66:00
  4. Use create_ap tool:

    git clone https://github.com/oblique/create_ap
    cd create_ap
    sudo make install
    sudo create_ap -c 11 wlo2 wlan0 MyHotspot 88888888

Connect to WiFi and Obtain IP

  1. Configure /etc/wpa_supplicant.conf:

    network={
        ssid="YourWiFiSSID"
        psk="YourPassword"
        key_mgmt=WPA-PSK
    }
  2. Connect:

    wpa_supplicant -D nl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B
    dhclient wlan0

VNC Remote Desktop Login

  1. Start VNC server:

    vncserver
  2. Modify ~/.vnc/xstartup:

    unset SESSION_MANAGER
    unset DBUS_SESSION_BUS_ADDRESS
    startxfce4 &
  3. Restart VNC:

    vncserver -geometry 1920x1080
  4. Connect using RealVNC Viewer:


Install Packages from Ubuntu Repository

Example for installing GCC:

wget http://ports.ubuntu.com/pool/main/g/gcc-9/gcc-9_9.3.0-10ubuntu2_arm64.deb
sudo dpkg -i *.deb

Search for packages at: Ubuntu Packages


Troubleshooting

Issue: Desktop sound settings crash. Fix:

sudo ln -s pavucontrol pavucontrol-qt
05f3817bf038d6f1f138a290c0496e68

Last updated