chamesle

chamesle.org: the site of Chamesle, a small Linux distribution
git clone https://github.com/tortr-rs/chamesle
Log | Files | Refs | README

commit 6551da7de01e742220573e5155dead059296bdde
parent 03926a206bd13146f254e9032bf1bc0f1f65762b
Author: torter <koubbamohamedrayan@gmail.com>
Date:   Wed, 21 Oct 2026 22:21:43 +0000

live session can install things, windows support checks for space first, mate handles really gone

Diffstat:
Mbuild.sh | 3+++
Moverlay/usr/lib/live-installer/installer.py | 2+-
Mtools/pkg/chamesle-mate/files/etc/skel/.config/gtk-3.0/gtk.css | 2+-
Mtools/pkg/chamesle-wine/files/usr/bin/chamesle-exe | 15++++++++++++++-
4 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/build.sh b/build.sh @@ -92,6 +92,9 @@ echo "=== [3/5] THE LIVE USER" "$IN" "$ROOT" /usr/bin/passwd -d live "$IN" "$ROOT" /usr/bin/passwd -l root echo 'live ALL=(ALL:ALL) NOPASSWD: ALL' > "$ROOT/etc/sudoers.d/live"; chmod 440 "$ROOT/etc/sudoers.d/live" +# same for the password prompts of the store, drivers and updates: live has no password to type +mkdir -p "$ROOT/etc/polkit-1/rules.d" +printf 'polkit.addRule(function(action, subject) {\n if (subject.user == "live") return polkit.Result.YES;\n});\n' > "$ROOT/etc/polkit-1/rules.d/49-live.rules" SESSION=$(sed -n 's/^session=//p' "$HERE/editions/$EDITION/edition" 2>/dev/null || echo "$EDITION") printf '# the live session only (the installer removes this file)\n[Seat:*]\nautologin-user=live\nautologin-session=%s\n' "$SESSION" \ > "$ROOT/etc/lightdm/lightdm.conf.d/90-live.conf" diff --git a/overlay/usr/lib/live-installer/installer.py b/overlay/usr/lib/live-installer/installer.py @@ -218,7 +218,7 @@ class InstallerEngine: # remove what only the live session has print(" --> Removing live configuration") self.update_progress(20, False, False, _("Removing live configuration (packages)")) - for path in ("/etc/sudoers.d/live", "/etc/lightdm/lightdm.conf.d/90-live.conf", + for path in ("/etc/sudoers.d/live", "/etc/polkit-1/rules.d/49-live.rules", "/etc/lightdm/lightdm.conf.d/90-live.conf", "/usr/share/applications/chamesle-install.desktop", "/usr/bin/chamesle-install", "/usr/bin/live-installer", "/usr/lib/live-installer", "/usr/share/live-installer", "/usr/share/icons/live-installer-progress-dot-on.png", diff --git a/tools/pkg/chamesle-mate/files/etc/skel/.config/gtk-3.0/gtk.css b/tools/pkg/chamesle-mate/files/etc/skel/.config/gtk-3.0/gtk.css @@ -1,4 +1,4 @@ /* no grab handles on the panel's window list and tray, the panel is locked anyway */ MatePanelAppletFrameDBus { - -gtk-icon-source: none; + background-image: none; } diff --git a/tools/pkg/chamesle-wine/files/usr/bin/chamesle-exe b/tools/pkg/chamesle-wine/files/usr/bin/chamesle-exe @@ -4,9 +4,21 @@ f=$1 title="Windows program" [ -n "$f" ] || { echo "usage: chamesle-exe FILE.exe" >&2; exit 1; } +# free space in MB where it all goes; the live session keeps everything in memory and runs out fast +room() { df -Pm "$1" | awk 'NR == 2 { print $4 }'; } +no_room() { + if [ "$(id -un)" = live ]; then + zenity --error --title="$title" --text="Windows programs need about 3 GB of space, and this live session doesn't have that much memory to spare.\n\nInstall Chamesle first, then open the program again." + else + zenity --error --title="$title" --text="Windows programs need about $1 GB of free space. Make some room and try again." + fi + exit 1 +} + if ! command -v wine >/dev/null; then + [ "$(room /usr)" -ge 3200 ] || no_room 3 zenity --question --title="$title" --icon=application-x-ms-dos-executable --ok-label=Install --cancel-label=Cancel \ - --text="To open <b>$(basename "$f" | sed 's/&/\&amp;/g; s/</\&lt;/g')</b>, Chamesle needs Windows support (Wine). It's about 400 MB.\n\nInstall it now?" || exit 0 + --text="To open <b>$(basename "$f" | sed 's/&/\&amp;/g; s/</\&lt;/g')</b>, Chamesle needs Windows support (Wine).\n\nIt's a 650 MB download and takes about 3 GB on disk.\n\nInstall it now?" || exit 0 # the subshell keeps the pipe open, so the progress window stays up until apk is done (pkexec /usr/libexec/chamesle-store-helper add wine wine-mono wine-gecko dxvk >/dev/null 2>&1; echo 100) | zenity --progress --pulsate --auto-close --no-cancel --title="$title" --text="Installing Windows support..." @@ -41,6 +53,7 @@ setup() { } if [ ! -f "$WINEPREFIX/system.reg" ]; then + [ "$(room "$HOME")" -ge 1200 ] || no_room 1 (setup >/dev/null 2>&1; echo 100) | zenity --progress --pulsate --auto-close --no-cancel --title="$title" \ --text="Setting up Windows support. This only happens once..."