CrunchBang (#!) 採用 Openbox 視窗管理器,選單由 ~/.config/openbox/menu.xml 控制。若不慎損毀或誤刪導致選單空白,可從系統骨架目錄 /etc/skel/.config/openbox/ 還原預設配置。
# 1. 備份現有 (若有)
cp ~/.config/openbox/menu.xml ~/.config/openbox/menu.xml.bak.$(date +%s)
# 2. 從 skeleton 還原預設
cp /etc/skel/.config/openbox/menu.xml ~/.config/openbox/menu.xml
# 3. 重載 Openbox 使生效
openbox --restart
/etc/skel/ 存放新用戶建立時會複製的預設配置檔 (skeleton)。~/.config/openbox/menu.xml,openbox --restart 會重新解析該檔而不登出。rc.xml (鍵盤綁定)、autostart (自動啟動) 等檔案。還原後可編輯 menu.xml 加入常用應用程式:
修改後同樣執行 openbox --reconfigure 或 --restart 生效。
# 將 ~/.config/openbox/ 納入 Git 版控
cd ~/.config/openbox
git init && git add . && git commit -m "Initial Openbox config"
# 之後每次修改 commit,隨時可回滾
一行指令即可從系統骨架還原 Openbox 預設選單,讓 CrunchBang 桌面瞬間恢復整潔。