Skip to content

Installing CKAN on Steam Deck

Vincent Bénet edited this page Oct 24, 2022 · 17 revisions

The Steam Deck's operating system features an immutable root filesystem, meaning Mono can't be installed. To get around this, we can use Distrobox to create a container in which we can install Mono and CKAN.

Installing Distrobox

Open Konsole in desktop mode and run the following two commands:

curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix ~/.local
curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/extras/install-podman | sh -s -- --prefix ~/.local

Creating a container

In a new Konsole window, run distrobox create -i archlinux. When asked if you want to pull the image, press enter at the Y/n prompt and select the top option. This will create a new container running Arch Linux, which we can install Mono into without requiring write access to the Deck's root filesystem.

Enter your new container with distrobox enter archlinux.

Installing Mono

In the container, run sudo pacman -S mono to install Mono. Press enter at any y/n prompts. This will instalk Mono into the container.

Installing CKAN

Download the latest ckan.exe from GitHub Releases. Inside the container, run mono path/to/ckan.exe (replacing path/to/ckan.exe with the actual location of the file; this will usually be Downloads/ckan.exe if you just downloaded it). CKAN should open, and KSP should be auto-detected if it has been installed via Steam.

To run CKAN from outside the container, you can use distrobox enter archlinux -- mono path/to/ckan.exe.

To make it easier to launch CKAN, create a new text file called ckan.sh in the same folder as ckan.exe with the following contents:

#!/usr/bin/env sh
export PATH=/home/deck/.local/bin:$PATH  # Import distrobox utilities
export PATH=/home/deck/.local/podman/bin:$PATH  # Import distrobox utilities
xhost +si:localuser:$USER  # To run the graphical instance from distrobox
# rm -rf "/home/deck/.local/share/steam/steamapps/Kerbal Space Program/CKAN/registry.locked"  # Uncomment to run from gaming mod (Carreful to not run it twice!)
# distrobox enter archlinux -- sudo pacman -Syu  # Uncomment to keep your containers up to date
cd "/home/deck/.local/share/steam/steamapps/Kerbal Space Program"  # Change the path to your ckan.exe location
distrobox enter archlinux -- mono ckan.exe  # Run the CKAN application

Set this file as executable in its properties (right click), and open it to run CKAN. You can also add this file to Steam as a non-Steam game to access CKAN from Gaming Mode.

Keeping your container updated

It's a good idea to keep the packages in your container up to date; you can do this with distrobox enter archlinux -- sudo pacman -Syu.

Add it to steam librairy

Right click on ckan.sh and select Add to Steam. Then go in property of CKAN and check that target is "/home/deck/.local/share/steam/steamapps/Kerbal Space Program/ckan.sh".

Conclusion

There are some graphical issues from gaming mode so run CKAN from desktop mod insteed. You can also create a Desktop application that run the sh script.

Clone this wiki locally