Skip to content

Debian 13 installation

1. OS Installation

  1. Select the language.

  1. Select the location.

  1. Configure the keyboard language.

  1. Select the interface with Internet access, which is Default. The order of the interfaces matches the order configured in IsardVDI.

  1. If you have a domain name, enter it.

  1. Enter the superuser password.

  1. Enter the full name of the user to create.

  1. Enter the username.

  1. Enter the user's password.

  1. Select the location according to the time zone.

  1. To simplify the process, choose guided partitioning of the entire disk.

  1. Choose the disk to partition.

  1. If needed, define a different partitioning. Otherwise, finish the process.

  1. Confirm the changes and continue.

  1. If needed, insert another installation media.

  1. Enter the country of the Debian mirror.

  1. Choose the Debian mirror. If no other is needed, select the default one.

  1. Enter the HTTP proxy server, if there is one. Otherwise, leave it blank.

  1. Answer whether you want to take part in the package usage survey.

  1. Choose the programs to install. The default options can be kept.

  1. Confirm the installation of the GRUB bootloader.

  1. Enter the disk where it will be installed.

  1. Once the installation is complete, shut down the desktop, edit it to change Boot to Hard Disk and remove the ISO from the media, and start it again.

  1. Once restarted, the Debian 13 desktop is shown.

2. Isard (admin role)

Modify desktop XML

To optimize disk performance, add the following <driver> to the <disk> element of the XML. The desktop's Default video is QXL with 64 MB of VRAM.

<driver name="qemu" type="qcow2" cache="unsafe" discard="unmap"/>

3. Initial Configuration (Terminal)

Privileges and packages

$ su -
$ visudo 
# Add this to the end of the file
isard   ALL=(ALL:ALL)   ALL
$ sudo apt update
$ sudo apt upgrade -y
$ sudo apt install vim net-tools htop curl wget spice-vdagent qemu-guest-agent lxde x11-xserver-utils gawk x11-utils

System adjustments

Modify fstab

$ sudo vim /etc/fstab
# Add "noatime,discard" to the ext4 partitions
UUID=xxxxx-xxxxx-xxxxxx /  ext4  defaults,noatime,discard,errors=remount-ro 0  1

Swap and logs

# Reduir swappiness
$ sudo sysctl vm.swappiness=1

# Limit log storage
$ sudo vim /etc/systemd/journald.conf
SystemMaxUse=20M
SystemKeepFree=4G

4. QXL driver optimization

To reduce SPICE traffic and improve redraw performance, configure the QXL driver:

$ sudo vim /etc/X11/xorg.conf.d/20-qxl.conf

Content

Section "Device"
    Identifier  "QXL"
    Driver      "qxl"
    Option      "DeferredFops"        "on"
    Option      "EnableSurfaces"      "on"
    Option      "EnableImageCache"    "on"
    Option      "EnableFallbackCache" "on"
EndSection

5. Desktop configuration and automatic login

Configure the system to start the LXDE (X.org) session directly:

File /var/lib/AccountsService/users/isard:

[User]
Session=LXDE
XSession=LXDE

File /etc/gdm3/daemon.conf:

[daemon]
WaylandEnable=false
AutomaticLoginEnable=True
AutomaticLogin=isard

6. Automatic resizing with SPICE

By default, LXDE does not react to the SPICE hotplug event. A script that listens to RandR events forces the resizing:

Create the /usr/local/bin/spice-autoresize script

$ sudo vim /usr/local/bin/spice-autoresize

Content

#!/bin/sh
set -u
while :; do
    OUT=$(xrandr 2>/dev/null | awk '/ connected/ {print $1; exit}')
    [ -n "${OUT:-}" ] && break
    sleep 1
done
xrandr --output "$OUT" --auto 2>/dev/null || true
xev -root -event randr 2>/dev/null | while IFS= read -r line; do
    case "$line" in
        *RRScreenChangeNotify*|*OutputChange*|*CrtcChange*)
            xrandr --output "$OUT" --auto 2>/dev/null || true
            ;;
    esac
done

Allowed

$ sudo chmod +x /usr/local/bin/spice-autoresize

Configure LXDE autostart

$ mkdir -p ~/.config/lxsession/LXDE/
$ vim ~/.config/lxsession/LXDE/autostart

Content

@lxpanel --profile LXDE
@pcmanfm --desktop --profile LXDE
@xscreensaver -no-splash
@/usr/local/bin/spice-autoresize
@lxterminal

7. Final customization

GRUB (Fast Boot)

Set the wait time to 2 seconds:

$ sudo vim /etc/default/grub
# Canviar GRUB_TIMEOUT=2
$ sudo update-grub

Space Cleanup

$ sudo fstrim -a -v 

Verification after reboot

# Verify that the resize script is active
pgrep -af spice-autoresize