fix(Installer ─ Multi-Desktop): Fix Multi Desktop
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
[Unit]
|
||||
Description=FWS Installer (Calamares)
|
||||
After=graphical.target
|
||||
Description=Calamares Installer
|
||||
After=display-manager.service
|
||||
Requires=display-manager.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/bin/calamares
|
||||
Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=graphical.target
|
||||
WantedBy=graphical.target
|
||||
@@ -1,15 +0,0 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
. /usr/local/bin/fws-desktop-init-common
|
||||
|
||||
fws_install_packages mariadb mariadb-clients wine \
|
||||
qemu-base podman podman-compose git
|
||||
|
||||
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql \
|
||||
>/dev/null 2>&1 || true
|
||||
fws_enable_services mariadb.service podman.socket
|
||||
|
||||
printf 'kvm\nkvm_intel\nkvm_amd\n' > /etc/modules-load.d/kvm.conf
|
||||
|
||||
fws_disable_services lightdm.service sddm.service gdm.service
|
||||
@@ -15,21 +15,13 @@ fws_enable_services() {
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
fws_disable_services() {
|
||||
for service in "$@"; do
|
||||
systemctl disable "$service" >/dev/null 2>&1 || true
|
||||
done
|
||||
}
|
||||
|
||||
# Retire Xfce + LightDM présents dans le squashfs du live system.
|
||||
# Appelé par les scripts KDE / GNOME / Hyprland pour ne pas laisser
|
||||
# les sessions Xfce apparaître dans le sélecteur du DM.
|
||||
fws_remove_xfce() {
|
||||
pacman -Rns --noconfirm xfce4 xfce4-goodies \
|
||||
lightdm lightdm-gtk-greeter lightdm-gtk-greeter-settings \
|
||||
2>/dev/null || true
|
||||
}
|
||||
|
||||
fws_write_dmrc() {
|
||||
local user_name="$1"
|
||||
local session_name="$2"
|
||||
@@ -39,42 +31,26 @@ fws_write_dmrc() {
|
||||
fi
|
||||
}
|
||||
|
||||
# Configure SDDM : session par défaut uniquement, PAS d'autologin.
|
||||
# L'utilisateur devra entrer son mot de passe à chaque démarrage.
|
||||
fws_write_sddm_config() {
|
||||
local session_name="$1"
|
||||
|
||||
mkdir -p /etc/sddm.conf.d
|
||||
printf '[General]\nDefaultSession=%s.desktop\n\n[Theme]\nCurrent=\n' \
|
||||
"$session_name" \
|
||||
> /etc/sddm.conf.d/50-fws.conf
|
||||
}
|
||||
|
||||
# Configure LightDM : session par défaut uniquement, PAS d'autologin.
|
||||
fws_write_lightdm_config() {
|
||||
local session_name="$1"
|
||||
local user_name="$1"
|
||||
local session_name="$2"
|
||||
|
||||
if [ -z "$user_name" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
mkdir -p /etc/lightdm/lightdm.conf.d
|
||||
printf '[Seat:*]\nuser-session=%s\nallow-guest=false\n' \
|
||||
"$session_name" \
|
||||
> /etc/lightdm/lightdm.conf.d/50-fws.conf
|
||||
printf '[Seat:*]\nautologin-user=%s\nautologin-user-timeout=0\nuser-session=%s\nautologin-session=%s\ngreeter-hide-users=true\nallow-guest=false\n' "$user_name" "$session_name" "$session_name" > /etc/lightdm/lightdm.conf.d/50-fws.conf
|
||||
}
|
||||
|
||||
# Paquets installés par défaut sur tous les bureaux
|
||||
fws_install_base_apps() {
|
||||
fws_install_packages firefox libreoffice-fresh mariadb mariadb-clients wine
|
||||
fws_write_sddm_config() {
|
||||
local user_name="$1"
|
||||
local session_name="$2"
|
||||
|
||||
# MariaDB
|
||||
mariadb-install-db --user=mysql --basedir=/usr --datadir=/var/lib/mysql \
|
||||
>/dev/null 2>&1 || true
|
||||
fws_enable_services mariadb.service
|
||||
if [ -z "$user_name" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Dépendances WinBoat : KVM, Podman, Podman Compose
|
||||
fws_install_packages qemu-base podman podman-compose
|
||||
|
||||
# Charge les modules KVM au démarrage
|
||||
printf 'kvm\nkvm_intel\nkvm_amd\n' > /etc/modules-load.d/kvm.conf
|
||||
|
||||
# Active le socket Podman pour l'utilisateur root
|
||||
fws_enable_services podman.socket
|
||||
}
|
||||
mkdir -p /etc/sddm.conf.d
|
||||
printf '[Autologin]\nUser=%s\nSession=%s.desktop\nRelogin=false\n' "$user_name" "$session_name" > /etc/sddm.conf.d/50-fws.conf
|
||||
}
|
||||
@@ -5,9 +5,8 @@ set -euo pipefail
|
||||
|
||||
first_user="$(fws_first_user)"
|
||||
|
||||
fws_remove_xfce
|
||||
fws_install_base_apps
|
||||
fws_install_packages gnome gdm
|
||||
fws_disable_services lightdm.service sddm.service
|
||||
fws_enable_services gdm.service
|
||||
fws_write_dmrc "$first_user" gnome
|
||||
fws_install_packages gnome sddm
|
||||
fws_disable_services lightdm.service gdm.service
|
||||
fws_enable_services sddm.service
|
||||
fws_write_sddm_config "$first_user" gnome
|
||||
fws_write_dmrc "$first_user" gnome
|
||||
@@ -5,12 +5,8 @@ set -euo pipefail
|
||||
|
||||
first_user="$(fws_first_user)"
|
||||
|
||||
fws_remove_xfce
|
||||
fws_install_base_apps
|
||||
fws_install_packages hyprland xdg-desktop-portal-hyprland xdg-desktop-portal-gtk \
|
||||
waybar wofi kitty swaybg swayidle swaylock xorg-xwayland wl-clipboard \
|
||||
grim slurp qt5-wayland qt6-wayland sddm
|
||||
fws_install_packages hyprland xdg-desktop-portal-hyprland xdg-desktop-portal-gtk waybar wofi kitty swaybg swayidle swaylock xorg-xwayland wl-clipboard grim slurp qt5-wayland qt6-wayland sddm
|
||||
fws_disable_services lightdm.service gdm.service
|
||||
fws_enable_services sddm.service
|
||||
fws_write_sddm_config hyprland
|
||||
fws_write_dmrc "$first_user" hyprland
|
||||
fws_write_sddm_config "$first_user" hyprland
|
||||
fws_write_dmrc "$first_user" hyprland
|
||||
@@ -5,10 +5,8 @@ set -euo pipefail
|
||||
|
||||
first_user="$(fws_first_user)"
|
||||
|
||||
fws_remove_xfce
|
||||
fws_install_base_apps
|
||||
fws_install_packages plasma-meta konsole dolphin sddm
|
||||
fws_disable_services lightdm.service gdm.service
|
||||
fws_enable_services sddm.service
|
||||
fws_write_sddm_config plasma
|
||||
fws_write_dmrc "$first_user" plasma
|
||||
fws_write_sddm_config "$first_user" plasma
|
||||
fws_write_dmrc "$first_user" plasma
|
||||
@@ -5,10 +5,8 @@ set -euo pipefail
|
||||
|
||||
first_user="$(fws_first_user)"
|
||||
|
||||
# Xfce est déjà dans le squashfs — on s'assure juste qu'il est complet
|
||||
fws_install_base_apps
|
||||
fws_install_packages xfce4 xfce4-goodies lightdm lightdm-gtk-greeter
|
||||
fws_disable_services sddm.service gdm.service
|
||||
fws_enable_services lightdm.service
|
||||
fws_write_lightdm_config xfce
|
||||
fws_write_dmrc "$first_user" xfce
|
||||
fws_write_lightdm_config "$first_user" xfce
|
||||
fws_write_dmrc "$first_user" xfce
|
||||
@@ -93,16 +93,18 @@ xorg-xsetroot
|
||||
openbox
|
||||
ttf-dejavu
|
||||
|
||||
# --- Bureau FWS installé ---
|
||||
xfce4
|
||||
xfce4-goodies
|
||||
lightdm
|
||||
lightdm-gtk-greeter
|
||||
|
||||
# --- Calamares (fournis par fws-local) ---
|
||||
calamares
|
||||
kpmcore
|
||||
qt5-base
|
||||
qt5-svg
|
||||
qt6-base
|
||||
# Dépendances runtime du module packagechooser de Calamares
|
||||
kcoreaddons
|
||||
ki18n
|
||||
kwidgetsaddons
|
||||
|
||||
# --- Agents VM (pratique pour tester l'ISO) ---
|
||||
qemu-guest-agent
|
||||
|
||||
@@ -22,10 +22,4 @@ file_permissions=(
|
||||
["/usr/local/bin/choose-mirror"]="0:0:755"
|
||||
["/usr/local/bin/Installation_guide"]="0:0:755"
|
||||
["/usr/local/bin/livecd-sound"]="0:0:755"
|
||||
["/usr/local/bin/fws-desktop-init-common"]="0:0:755"
|
||||
["/usr/local/bin/fws-desktop-init-cli"]="0:0:755"
|
||||
["/usr/local/bin/fws-desktop-init-xfce"]="0:0:755"
|
||||
["/usr/local/bin/fws-desktop-init-kde"]="0:0:755"
|
||||
["/usr/local/bin/fws-desktop-init-gnome"]="0:0:755"
|
||||
["/usr/local/bin/fws-desktop-init-hyprland"]="0:0:755"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user