Skip to content

Commit 84335b0

Browse files
committed
🔨 refactor: restore file biglinux-install-setup.sh
1 parent 051b072 commit 84335b0

2 files changed

Lines changed: 19 additions & 133 deletions

File tree

‎biglinux-livecd/usr/bin/biglinux-install-setup.sh‎

Lines changed: 18 additions & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,10 @@
33
# Script Name: biglinux-install-setup.sh
44
# Description: BigLinux Post-Installation Configuration
55
# Called by Calamares grubcfg-fix module after installation.
6-
# Configures GRUB, display manager session, and migrates live
7-
# session settings (theme, desktop, JamesDSP, display profile).
6+
# Configures GRUB, SDDM session, and migrates live session
7+
# settings (theme, desktop, JamesDSP, display profile).
88
# Package: biglinux-livecd
99
#
10-
# Supported Desktop Environments:
11-
# - KDE Plasma (SDDM)
12-
# - GNOME (GDM)
13-
# - Cinnamon (LightDM)
14-
# - XFCE (LightDM)
15-
#
1610
# Usage: biglinux-install-setup.sh <root_mount_point>
1711
#===============================================================================
1812

@@ -27,28 +21,9 @@ fi
2721

2822
# Define paths relative to root mount point
2923
GRUB_FILE="$ROOT_MOUNT/etc/default/grub"
24+
SDDM_STATE="$ROOT_MOUNT/var/lib/sddm/state.conf"
3025
CONFIG_DIR="$ROOT_MOUNT/etc/big-default-config"
3126

32-
#-------------------------------------------------------------------------------
33-
# Detect Desktop Environment
34-
#-------------------------------------------------------------------------------
35-
detect_desktop_environment() {
36-
if [[ -e "$ROOT_MOUNT/usr/bin/startplasma-x11" ]] || [[ -e "$ROOT_MOUNT/usr/share/xsessions/plasma.desktop" ]]; then
37-
echo "plasma"
38-
elif [[ -e "$ROOT_MOUNT/usr/bin/gnome-session" ]] || [[ -e "$ROOT_MOUNT/usr/bin/startgnome-community" ]]; then
39-
echo "gnome"
40-
elif [[ -e "$ROOT_MOUNT/usr/bin/cinnamon-session" ]] || [[ -e "$ROOT_MOUNT/usr/bin/startcinnamon-community" ]]; then
41-
echo "cinnamon"
42-
elif [[ -e "$ROOT_MOUNT/usr/bin/startxfce4" ]] || [[ -e "$ROOT_MOUNT/usr/bin/startxfce-community" ]]; then
43-
echo "xfce"
44-
else
45-
echo "unknown"
46-
fi
47-
}
48-
49-
DESKTOP_ENV=$(detect_desktop_environment)
50-
echo "Detected desktop environment: $DESKTOP_ENV"
51-
5227
#-------------------------------------------------------------------------------
5328
# Configure GRUB Bootloader
5429
#-------------------------------------------------------------------------------
@@ -79,121 +54,32 @@ if [[ -f "$GRUB_FILE" ]]; then
7954
fi
8055

8156
#-------------------------------------------------------------------------------
82-
# Configure Display Manager Session
83-
# Sets the default session based on desktop environment and session type
57+
# Configure SDDM Session (Wayland vs X11)
8458
#-------------------------------------------------------------------------------
85-
configure_display_manager_session() {
86-
local is_wayland=false
87-
grep -q wayland /proc/cmdline && is_wayland=true
88-
89-
case "$DESKTOP_ENV" in
90-
plasma)
91-
# KDE Plasma uses SDDM
92-
local sddm_state="$ROOT_MOUNT/var/lib/sddm/state.conf"
93-
mkdir -p "$(dirname "$sddm_state")"
94-
if $is_wayland; then
95-
echo "[Last]
96-
Session=/usr/share/wayland-sessions/plasmawayland.desktop" > "$sddm_state"
97-
else
98-
echo "[Last]
99-
Session=/usr/share/xsessions/plasma.desktop" > "$sddm_state"
100-
fi
101-
echo "Configured SDDM for Plasma ($($is_wayland && echo 'Wayland' || echo 'X11'))"
102-
;;
103-
104-
gnome)
105-
# GNOME uses GDM
106-
local gdm_custom="$ROOT_MOUNT/etc/gdm/custom.conf"
107-
mkdir -p "$(dirname "$gdm_custom")"
108-
if $is_wayland; then
109-
# Enable Wayland for GDM
110-
cat > "$gdm_custom" << 'EOF'
111-
[daemon]
112-
WaylandEnable=true
113-
DefaultSession=gnome.desktop
114-
115-
[security]
116-
117-
[xdmcp]
118-
119-
[chooser]
120-
121-
[debug]
122-
EOF
123-
else
124-
# Force X11 for GDM
125-
cat > "$gdm_custom" << 'EOF'
126-
[daemon]
127-
WaylandEnable=false
128-
DefaultSession=gnome-xorg.desktop
129-
130-
[security]
131-
132-
[xdmcp]
133-
134-
[chooser]
135-
136-
[debug]
137-
EOF
138-
fi
139-
echo "Configured GDM for GNOME ($($is_wayland && echo 'Wayland' || echo 'X11'))"
140-
;;
141-
142-
cinnamon)
143-
# Cinnamon uses LightDM (X11 only)
144-
local lightdm_conf="$ROOT_MOUNT/etc/lightdm/lightdm.conf.d/50-biglinux.conf"
145-
mkdir -p "$(dirname "$lightdm_conf")"
146-
cat > "$lightdm_conf" << 'EOF'
147-
[Seat:*]
148-
user-session=cinnamon
149-
EOF
150-
echo "Configured LightDM for Cinnamon"
151-
;;
152-
153-
xfce)
154-
# XFCE uses LightDM (X11 only)
155-
local lightdm_conf="$ROOT_MOUNT/etc/lightdm/lightdm.conf.d/50-biglinux.conf"
156-
mkdir -p "$(dirname "$lightdm_conf")"
157-
cat > "$lightdm_conf" << 'EOF'
158-
[Seat:*]
159-
user-session=xfce
160-
EOF
161-
echo "Configured LightDM for XFCE"
162-
;;
163-
164-
*)
165-
echo "Warning: Unknown desktop environment, skipping display manager configuration"
166-
;;
167-
esac
168-
}
169-
170-
configure_display_manager_session
59+
mkdir -p "$(dirname "$SDDM_STATE")"
60+
if grep -q wayland /proc/cmdline; then
61+
echo "[Last]
62+
Session=/usr/share/wayland-sessions/plasmawayland.desktop" > "$SDDM_STATE"
63+
else
64+
echo "[Last]
65+
Session=/usr/share/xsessions/plasma.desktop" > "$SDDM_STATE"
66+
fi
17167

17268
#-------------------------------------------------------------------------------
17369
# Migrate Live Session Configuration to Installed System
17470
#-------------------------------------------------------------------------------
17571
mkdir -p "$CONFIG_DIR"
17672

177-
# KDE Plasma specific configs
178-
if [[ "$DESKTOP_ENV" == "plasma" ]]; then
179-
# Copy theme config if exists (KDE themes like Breeze, etc)
180-
[[ -f "/tmp/big_desktop_theme" ]] && cp -f "/tmp/big_desktop_theme" "$CONFIG_DIR/theme"
73+
# Copy theme config if exists
74+
[[ -f "/tmp/big_desktop_theme" ]] && cp -f "/tmp/big_desktop_theme" "$CONFIG_DIR/theme"
18175

182-
# Copy desktop layout config if exists (KDE panel layouts)
183-
[[ -f "/tmp/big_desktop_changed" ]] && cp -f "/tmp/big_desktop_changed" "$CONFIG_DIR/desktop"
184-
fi
185-
186-
# GNOME/Cinnamon/XFCE specific configs (simplified theme: light/dark)
187-
if [[ "$DESKTOP_ENV" == "gnome" ]] || [[ "$DESKTOP_ENV" == "cinnamon" ]] || [[ "$DESKTOP_ENV" == "xfce" ]]; then
188-
# Copy simple theme selection (light/dark)
189-
[[ -f "/tmp/big_simple_theme" ]] && cp -f "/tmp/big_simple_theme" "$CONFIG_DIR/simple-theme"
190-
fi
76+
# Copy desktop config if exists
77+
[[ -f "/tmp/big_desktop_changed" ]] && cp -f "/tmp/big_desktop_changed" "$CONFIG_DIR/desktop"
19178

192-
# Common configs for all desktop environments
19379
# Copy JamesDSP flag if exists
19480
[[ -f "/tmp/big_enable_jamesdsp" ]] && cp -f "/tmp/big_enable_jamesdsp" "$CONFIG_DIR/jamesdsp"
19581

196-
# Copy display profile/ICC flag if exists
82+
# Copy display profile flag if exists
19783
[[ -f "/tmp/big_improve_display" ]] && cp -f "/tmp/big_improve_display" "$CONFIG_DIR/display-profile"
19884

199-
echo "BigLinux installation setup completed successfully for $DESKTOP_ENV"
85+
echo "BigLinux installation setup completed successfully"

‎biglinux-livecd/usr/share/biglinux/calamares/src/utils/constants.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# Application Information
1010
APP_NAME = "BigLinux Calamares Config"
1111
APP_ID = "com.biglinux.calamares-config"
12-
APP_VERSION = "1.0.1"
12+
APP_VERSION = "1.0.2"
1313

1414
# Paths and Directories
1515
BASE_DIR = Path(__file__).parent.parent.parent

0 commit comments

Comments
 (0)