# The name of the meta-package Name: lxqt-desktop Version: 2.2.0 Release: 1%{?dist} Summary: A lightweight and modular LXQt desktop environment for headless servers License: MIT BuildArch: noarch # This package depends on all the components you've built # and the VNC server, as well as other essential applications. Requires: lxqt-session >= 2.2.0 Requires: lxqt-panel >= 2.2.2 Requires: lxqt-config >= 2.2.0 Requires: lxqt-runner >= 2.2.0 Requires: lxqt-globalkeys >= 2.2.0 Requires: lxqt-notificationd >= 2.2.0 Requires: lxqt-about >= 2.2.0 Requires: lxqt-themes >= 2.2.0 Requires: lxqt-qtplugin >= 2.2.0 Requires: lxqt-policykit >= 2.2.0 Requires: lxqt-sudo >= 2.2.0 Requires: lxqt-archiver >= 1.2.0 Requires: lxqt-admin >= 2.2.0 Requires: lxqt-openssh-askpass >= 2.2.0 Requires: xdg-desktop-portal-lxqt >= 1.2.0 Requires: pcmanfm-qt >= 2.2.0 Requires: qterminal >= 2.2.1 Requires: qtermwidget >= 2.2.0 Requires: lximage-qt >= 2.2.0 Requires: screengrab >= 2.2.0 Requires: featherpad >= 1.2.0 Requires: openbox >= 3.6.1 Requires: obconf-qt >= 0.16.5 Requires: xrdb Requires: tigervnc-server Requires: firefox Requires: vim-X11 Requires: adwaita-icon-theme Group: System Environment/Desktop URL: https://lxqt.org %description This package provides the core LXQt desktop environment and essential applications for a complete, VNC-accessible graphical user experience on a headless server. It acts as a meta-package to pull in all necessary components. %files %post # Create a ~/.vnc/xstartup file for ec2-user to launch LXQt session. # This assumes the ec2-user exists. if [ -d "/home/ec2-user" ]; then VNC_DIR="/home/ec2-user/.vnc" XSTARTUP_FILE="$VNC_DIR/xstartup" XRESOURCES_FILE="/home/ec2-user/.Xresources" # Ensure the .vnc directory and .Xresources exist. mkdir -p "$VNC_DIR" touch "$XRESOURCES_FILE" # Write a default .Xresources content for better scaling and fonts. cat > "$XRESOURCES_FILE" << EOF ! Default DPI for high-resolution displays Xft.dpi: 96 ! Enable font antialiasing Xft.antialias: 1 ! Enable font hinting Xft.autohint: 1 ! Subpixel rendering Xft.lcdfilter: lcddefault EOF # Create the xstartup file with LXQt session details. # We add DBus setup to ensure proper functionality of modern applications. cat > "$XSTARTUP_FILE" << EOF #!/bin/sh export XDG_SESSION_TYPE=x11 export XDG_CURRENT_DESKTOP=LXQt export DESKTOP_SESSION=LXQt exec startlxqt EOF # Make the file executable and set ownership. chmod +x "$XSTARTUP_FILE" chown -R ec2-user:ec2-user "/home/ec2-user/.vnc" "/home/ec2-user/.Xresources" fi