diff --git a/home/stormux/.xinitrc b/home/stormux/.xinitrc index 00a52de..1e6ffb7 100755 --- a/home/stormux/.xinitrc +++ b/home/stormux/.xinitrc @@ -302,6 +302,10 @@ case "$GAME" in "SoundRTS") run_native "SoundRTS" "soundrts.py" ;; + "Steam") + orca & + exec steam -bigpicture + ;; "Super Egg Hunt") run_wine "super egg hunt" "superegghunt.exe" ;; diff --git a/usr/local/bin/game_launcher.py b/usr/local/bin/game_launcher.py index b4eb624..fce2016 100755 --- a/usr/local/bin/game_launcher.py +++ b/usr/local/bin/game_launcher.py @@ -832,6 +832,10 @@ if __name__ == "__main__": menu.add_item("Emulators", "Dosbox", "GAME=Dosbox startx") menu.add_item("Emulators", "Game Console Menu", "/usr/local/bin/rom_launcher.py") menu.add_item("Emulators", "Retro Arch", "GAME='Retro Arch' startx") + + # Add Steam only on x86_64 + if platform.machine() == "x86_64": + menu.add_item("Emulators", "Steam", "GAME='Steam' startx") # Add MUD section menu.add_section("MUDs") @@ -911,9 +915,44 @@ if __name__ == "__main__": # Add system section menu.add_section("System") - # Add installer only on x86_64 + # Add installer only on x86_64 and when running from USB import platform - if platform.machine() == "x86_64": + import subprocess + import re + + def is_running_from_usb(): + try: + # Get the root device + result = subprocess.run(['findmnt', '-n', '-o', 'SOURCE', '/'], + capture_output=True, text=True) + if result.returncode != 0: + return False + + root_device = result.stdout.strip() + + # Extract device name without partition number + device_match = re.match(r'^(/dev/(?:sd[a-z]|nvme[0-9]n[0-9]|mmcblk[0-9]))', root_device) + if not device_match: + return False + + device_name = device_match.group(1) + + # Check if device is removable (USB/SD card) + try: + with open(f'/sys/block/{device_name.split("/")[-1]}/removable', 'r') as f: + removable = f.read().strip() + return removable == '1' + except: + # Fallback: check for STORMUX label (live USB indicator) + result = subprocess.run(['lsblk', '-no', 'NAME,LABEL'], + capture_output=True, text=True) + if result.returncode == 0: + return 'STORMUX' in result.stdout.upper() + return False + except: + return False + + if platform.machine() == "x86_64" and is_running_from_usb(): menu.add_item("System", "Install System to Hard Drive", "GAME='Install to Disk' /home/stormux/.clirc") menu.add_item("System", "Internet Configuration", "GAME=\"Network Configuration\" /home/stormux/.clirc") diff --git a/usr/local/bin/install_to_disk.sh b/usr/local/bin/install_to_disk.sh index adf5d0f..8b07a5f 100755 --- a/usr/local/bin/install_to_disk.sh +++ b/usr/local/bin/install_to_disk.sh @@ -178,6 +178,11 @@ if sudo mount "$TARGET_ROOT_PART" "$TEMP_MOUNT" 2>/dev/null; then # Remove any USB-specific markers sudo rm -f "$TEMP_MOUNT/home/stormux/.firstboot" 2>/dev/null || true + # Remove STORMUX label from filesystem to prevent false USB detection + if command -v tune2fs >/dev/null 2>&1; then + sudo tune2fs -L "" "$TARGET_ROOT_PART" 2>/dev/null || true + fi + # Update any USB-specific configurations if needed sudo umount "$TEMP_MOUNT"