Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fr34k8/e894df04df42f3ec65d63ca6f9a3b2d8 to your computer and use it in GitHub Desktop.
Save fr34k8/e894df04df42f3ec65d63ca6f9a3b2d8 to your computer and use it in GitHub Desktop.

How to install Homebrew package manager on Steam Deck

You can install Homebrew (a package manager for macOS and Linux) without disabling the read-only partition with sudo steamos-readonly disable.
The package manager can be used alongside Flatpaks. Some software is only available on Flathub, and some software is only available on Homebrew.

  1. Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
  2. Click the logo at the bottom left, go to System, then go to Konsole
  3. Set a password (needed for sudo access):
    passwd
  4. Install Homebrew using the steps here: https://brew.sh/
    Don't install any additional libraries from pacman or brew yet. Also, do not append to .bash_profile yet, otherwise it will break Steam.
  5. Add to .bash_profile with a check to make sure it is running in Konsole:
    echo 'if [ $(basename $(printf "%s" "$(ps -p $(ps -p $$ -o ppid=) -o cmd=)" | cut --delimiter " " --fields 1)) = konsole ] ; then '$'\n''eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"'$'\n''fi'$'\n' >> ~/.bash_profile
  6. In Konsole's menu bar, go to Settings -> Manage Profile
  7. Press "New"
  8. Check "Default Profile"
  9. Set "Command" to /bin/bash -l
  10. Click OK twice
  11. Add brew environment to current context:
    eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
  12. Install glibc (the important thing is headers), without libraries and CRT startup. This is needed in order to compile software. We also bypass the minimum version check.
    curl -L https://raw.githubusercontent.com/Homebrew/homebrew-core/f46b316a63932bb75a863f7981a2149147591ff8/Formula/glibc.rb | sed -e 's/depends_on BrewedGlibcNotOlderRequirement//' > ./glibc.rb
    brew install ./glibc.rb
    brew unlink glibc
    find /home/linuxbrew/.linuxbrew/opt/glibc -iname \*.o -delete
    find /home/linuxbrew/.linuxbrew/opt/glibc -iname \*.a -delete
    find /home/linuxbrew/.linuxbrew/opt/glibc -iname \*.so -delete
    find /home/linuxbrew/.linuxbrew/opt/glibc/lib -iname \*.so.\* -delete
    brew link glibc
  13. Install GCC:
    brew install gcc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment