miker.blog

Debian 12 LXQT Auto-Login Script

Here's a comprehensive script I use for quickly setting up Debian 12 virtual machines with the LXQT desktop environment and automatic login. I'll share the complete script first, then break down its functionality.

The Complete Script

Script Breakdown and Explanation

1. Initial Setup

These lines establish bash execution and set important safety flags:

2. Perl Installation

Ensures Perl is installed with default options for the script execution.

3. Perl Command Wrapper

This Perl wrapper provides:

4. System Update Commands

Updates the package list and upgrades all installed packages without prompts.

5. LXQT Installation

Installs:

6. Additional Software

Installs supplementary packages:

7. SDDM Auto-login Setup

Configures automatic login with SDDM display manager.

8. Display Manager Configuration

Sets SDDM as the default display manager.

9. Cleanup

Removes unnecessary packages and cleans package cache.

Usage Instructions

  1. Save the script to a file (e.g., debian-lxqt-setup.sh)

  2. Make it executable:

  1. Run with sudo:

The script will automatically install and configure everything, providing visual feedback during the process. After completion, you'll have a fully functional LXQT desktop environment with automatic login capability - perfect for VM environments!