Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
# macbook-setup/setup.sh
|
2026-03-10 06:07:28 +01:00
|
|
|
# Post-Install-Skript für Linux auf MacBook Pro
|
|
|
|
|
# Startet setup-base.sh und richtet setup-desktop.sh als Autostart ein
|
Split setup.sh in chroot-sicheren und Desktop-Teil
setup.sh rief bisher alles in einem Skript auf, was in der
Autoinstall-ISO (curtin in-target/chroot) teilweise fehlschlaegt:
xfconf-query, npm, oh-my-zsh, PrusaSlicer brauchen eine laufende
Desktop-Session.
Neuer Aufbau:
- setup-base.sh: Pakete, Configs, Locale, Services (laeuft in chroot)
- setup-desktop.sh: oh-my-zsh, Claude Code, PrusaSlicer, Dotfiles,
XFCE-Einstellungen (laeuft beim ersten Desktop-Login)
- setup.sh: Wrapper fuer Option A (manuelles curl | bash nach Install)
user-data ruft jetzt setup-base.sh in late-commands auf und richtet
einen XFCE-Autostart fuer setup-desktop.sh beim ersten Login ein.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:41:22 +01:00
|
|
|
#
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
# Verwendung: curl -fsSL https://git.motocamp.de/rene/macbook-setup/raw/branch/main/setup.sh | bash
|
|
|
|
|
|
Split setup.sh in chroot-sicheren und Desktop-Teil
setup.sh rief bisher alles in einem Skript auf, was in der
Autoinstall-ISO (curtin in-target/chroot) teilweise fehlschlaegt:
xfconf-query, npm, oh-my-zsh, PrusaSlicer brauchen eine laufende
Desktop-Session.
Neuer Aufbau:
- setup-base.sh: Pakete, Configs, Locale, Services (laeuft in chroot)
- setup-desktop.sh: oh-my-zsh, Claude Code, PrusaSlicer, Dotfiles,
XFCE-Einstellungen (laeuft beim ersten Desktop-Login)
- setup.sh: Wrapper fuer Option A (manuelles curl | bash nach Install)
user-data ruft jetzt setup-base.sh in late-commands auf und richtet
einen XFCE-Autostart fuer setup-desktop.sh beim ersten Login ein.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:41:22 +01:00
|
|
|
SETUP_RAW="https://git.motocamp.de/rene/macbook-setup/raw/branch/main"
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
|
|
|
|
|
# ── Farben ──────────────────────────────────────────────────────────────
|
|
|
|
|
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; NC='\033[0m'
|
|
|
|
|
ok() { echo -e "${GREEN}✓ $*${NC}"; }
|
2026-03-10 06:07:28 +01:00
|
|
|
warn() { echo -e "${YELLOW}⚠ $*${NC}"; }
|
|
|
|
|
fail() { echo -e "${RED}✗ $*${NC}"; exit 1; }
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
|
Split setup.sh in chroot-sicheren und Desktop-Teil
setup.sh rief bisher alles in einem Skript auf, was in der
Autoinstall-ISO (curtin in-target/chroot) teilweise fehlschlaegt:
xfconf-query, npm, oh-my-zsh, PrusaSlicer brauchen eine laufende
Desktop-Session.
Neuer Aufbau:
- setup-base.sh: Pakete, Configs, Locale, Services (laeuft in chroot)
- setup-desktop.sh: oh-my-zsh, Claude Code, PrusaSlicer, Dotfiles,
XFCE-Einstellungen (laeuft beim ersten Desktop-Login)
- setup.sh: Wrapper fuer Option A (manuelles curl | bash nach Install)
user-data ruft jetzt setup-base.sh in late-commands auf und richtet
einen XFCE-Autostart fuer setup-desktop.sh beim ersten Login ein.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:41:22 +01:00
|
|
|
# ── Root-Check ───────────────────────────────────────────────────────────
|
2026-03-10 06:07:28 +01:00
|
|
|
[[ $EUID -eq 0 ]] && fail "Nicht als root ausführen. sudo wird intern verwendet."
|
Split setup.sh in chroot-sicheren und Desktop-Teil
setup.sh rief bisher alles in einem Skript auf, was in der
Autoinstall-ISO (curtin in-target/chroot) teilweise fehlschlaegt:
xfconf-query, npm, oh-my-zsh, PrusaSlicer brauchen eine laufende
Desktop-Session.
Neuer Aufbau:
- setup-base.sh: Pakete, Configs, Locale, Services (laeuft in chroot)
- setup-desktop.sh: oh-my-zsh, Claude Code, PrusaSlicer, Dotfiles,
XFCE-Einstellungen (laeuft beim ersten Desktop-Login)
- setup.sh: Wrapper fuer Option A (manuelles curl | bash nach Install)
user-data ruft jetzt setup-base.sh in late-commands auf und richtet
einen XFCE-Autostart fuer setup-desktop.sh beim ersten Login ein.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:41:22 +01:00
|
|
|
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
# ── Modell ermitteln ─────────────────────────────────────────────────────
|
|
|
|
|
if [[ "$1" == "13" || "$1" == "16" ]]; then
|
|
|
|
|
MODEL="$1"
|
|
|
|
|
else
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Welches MacBook Pro?"
|
|
|
|
|
echo " 13 = MBP 13\" Late 2013"
|
2026-03-10 06:07:28 +01:00
|
|
|
echo " 16 = MBP 16\" Mid 2014 (Intel + AMD Radeon)"
|
2026-03-10 06:27:27 +01:00
|
|
|
read -rp "Modell [13/16]: " MODEL < /dev/tty
|
2026-03-10 06:07:28 +01:00
|
|
|
[[ "$MODEL" != "13" && "$MODEL" != "16" ]] && fail "Ungültiges Modell: $MODEL"
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "════════════════════════════════════════════"
|
2026-03-10 06:07:28 +01:00
|
|
|
echo " macbook-setup für MBP $MODEL\""
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
echo "════════════════════════════════════════════"
|
|
|
|
|
|
Split setup.sh in chroot-sicheren und Desktop-Teil
setup.sh rief bisher alles in einem Skript auf, was in der
Autoinstall-ISO (curtin in-target/chroot) teilweise fehlschlaegt:
xfconf-query, npm, oh-my-zsh, PrusaSlicer brauchen eine laufende
Desktop-Session.
Neuer Aufbau:
- setup-base.sh: Pakete, Configs, Locale, Services (laeuft in chroot)
- setup-desktop.sh: oh-my-zsh, Claude Code, PrusaSlicer, Dotfiles,
XFCE-Einstellungen (laeuft beim ersten Desktop-Login)
- setup.sh: Wrapper fuer Option A (manuelles curl | bash nach Install)
user-data ruft jetzt setup-base.sh in late-commands auf und richtet
einen XFCE-Autostart fuer setup-desktop.sh beim ersten Login ein.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 16:41:22 +01:00
|
|
|
# ── Phase 1: System-Setup (als root) ────────────────────────────────────
|
|
|
|
|
echo -e "\n>>> Phase 1: setup-base.sh (System)"
|
|
|
|
|
curl -fsSL "$SETUP_RAW/setup-base.sh" | sudo bash -s -- "$MODEL"
|
|
|
|
|
ok "Phase 1 abgeschlossen"
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
|
2026-03-10 06:07:28 +01:00
|
|
|
# ── Phase 2: Desktop-Setup als Autostart einrichten ──────────────────────
|
|
|
|
|
echo -e "\n>>> Phase 2: setup-desktop.sh wird als Autostart eingerichtet"
|
|
|
|
|
mkdir -p ~/.config/autostart
|
|
|
|
|
printf '[Desktop Entry]\nType=Application\nName=MacBook Setup Desktop\nExec=bash -c "curl -fsSL %s/setup-desktop.sh | bash 2>&1 | tee /tmp/setup-desktop.log"\nHidden=false\nX-GNOME-Autostart-enabled=true\n' "$SETUP_RAW" \
|
|
|
|
|
> ~/.config/autostart/macbook-setup-desktop.desktop
|
|
|
|
|
ok "Autostart für setup-desktop.sh eingerichtet"
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
|
echo "════════════════════════════════════════════"
|
2026-03-10 06:07:28 +01:00
|
|
|
echo -e " ${GREEN}Phase 1 abgeschlossen!${NC}"
|
Initial commit: Linux-Setup für MacBook Pro 13" und 16"
Vollautomatisches Post-Install-Setup für Ubuntu 24.04 auf MacBook Pro
Late 2013 (13") und Mid 2014 (16" mit Nvidia Optimus). Enthält:
- setup.sh: Komplettes Post-Install-Skript (Pakete, Xubuntu, Brave,
PrusaSlicer, oh-my-zsh, Claude Code, Dotfiles via Forgejo/Stow,
mbpfan, thermald, TLP, WireGuard, Lokalisierung DE)
- build-iso.sh: Ubuntu Autoinstall ISO für Ventoy erstellen
- user-data/meta-data: cloud-init Autoinstall-Konfiguration
- mbpfan-13.conf / mbpfan-16.conf: Modellspezifische Lüftersteuerung
- hid_apple.conf / keyboard: Deutsche Mac-Tastaturbelegung + Fn-Tasten
- blacklist-nvidia.conf: Optionaler Nvidia/nouveau-Blacklist
- temp-watch.sh: CPU-Temperaturüberwachung mit Desktop-Notification
Infrastruktur-Abhängigkeiten:
- Dotfiles: git.motocamp.de/rene/dotfiles.git (via GNU Stow)
- DiskStation 10.47.11.10 (SMTP, IMAP, Synology Drive)
- WireGuard-VPN 10.13.13.x ins Heimnetz 10.47.11.0/24
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 15:27:48 +01:00
|
|
|
echo "════════════════════════════════════════════"
|
|
|
|
|
echo ""
|
2026-03-10 06:07:28 +01:00
|
|
|
echo "Nächster Schritt:"
|
|
|
|
|
echo " sudo reboot"
|
|
|
|
|
echo ""
|
|
|
|
|
echo "Nach dem Reboot in XFCE einloggen —"
|
|
|
|
|
echo "setup-desktop.sh startet automatisch."
|