How to install Homebrew package manager on Steam Deck
(See also installing Nix package manager: https://determinate.systems/posts/nix-on-the-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.
- Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
- Click the logo at the bottom left, go to System, then go to Konsole
- Set a password (needed for sudo access):
- Install Homebrew using the steps here: https://brew.sh/
Don't install any additional libraries from
brewyet. Also, do not append to
.bash_profileyet, otherwise it will break Steam.
- Add to
.bash_profilewith 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
- In Konsole's menu bar, go to Settings -> Manage Profile
- Press "New"
- Check "Default Profile"
- Set "Command" to
/bin/bash -l(that is a lowercase
l, not a number
- Click OK twice
- Add brew environment to current context:
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
- Install glibc (the important thing is headers).
This is needed in order to compile software.
brew install glibc
- Install GCC:
brew install gcc
Thanks for this, it was super helpful!
Is step 5 supposed to end with
>> .bash_profileso that the string gets appended to the file?