Closed vincentBenet closed 2 years ago
You'll find that when something "return[s] an error", that error tends to be pretty crucial to understanding the problem. Can you please share the error with us?
Yes, i have to connect here with my steam deck to copy paste the error, I will upload the two errors when i will have my steam deck with me... Sorry for the delay
While you're doing that, I'll note that I'm not aware of anyone having used CKAN on a Steam Deck before; I think someone asked if it was possible but then didn't try. So you're probably breaking new ground, and if you can figure out how to make it work, we can add your discoveries to the wiki for other Steam Deck users.
Running ckan.exe through mono installed in an Arch Linux distrobox container seems to work well
@vincentBenet, if you're able to share the error, please do, and then we can re-open this. There's nothing here for the CKAN team to work on until then.
Mono isn't installed on the Deck by default and it has an immutable root filesystem, so I'd suggest using distrobox (see https://www.gamingonlinux.com/2022/09/distrobox-can-open-up-the-steam-deck-to-a-whole-new-world/) to create a container with a working mono installation. CKAN work son my Deck using this.
@arthomnix, that's good to know. Would you be interested in writing up a wiki page with more detailed instructions for other Steam Deck users? I think the wiki is still locked down to non-team member edits, but I could change that if there was interest in a project like that. Or I could copy/paste from here into the wiki.
@HebaruSan updated, you can re open the issue
@vincentBenet, thanks, it looks like this is the key part:
/usr/lib/mono/msbuild/Current/bin/Microsoft.Common.CurrentVersion.targets(2218,5): error MSB3248: Parameter "AssemblyFiles" has invalid value "/usr/lib/mono/4.5-api/mscorlib.dll". Could not load file or assembly 'System.Reflection.Metadata, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. [/home/deck/Downloads/ckan/src/CKAN-1.31.0/Core/CKAN-core.csproj]
This seems to confirm what @arthomnix said, that you don't have Mono installed. That's not something the CKAN team can fix for you, so I don't think it would make sense to re-open this. Can you try @arthomnix's suggestion of using containers? Maybe we can combine both his observations and yours for some helpful Steam Deck wiki documentation.
Here's the existing documentation of which Mono packages you need in order to compile (i.e., all of them):
Until your system meets those requirements, I wouldn't expect it to be able to build CKAN.
Mono isn't installed on the Deck by default and it has an immutable root filesystem, so I'd suggest using distrobox (see https://www.gamingonlinux.com/2022/09/distrobox-can-open-up-the-steam-deck-to-a-whole-new-world/) to create a container with a working mono installation. CKAN work son my Deck using this.
Hi, thank you for that, can you publish here the commands to do once installed distrobox please?
How to install arch? I got an error when I try to install arch with distrobox...
@HebaruSan here's a draft article on installing CKAN with Distrobox, @vincentBenet you might want to try these instructions
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.
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
This will install Distrobox, as well as Podman, the container software that Distrobox is built on.
Then, open your /home/deck/.bashrc
file in a text editor such as KWrite and add the following lines at the end:
xhost +si:localuser:$USER
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.local/podman/bin:$PATH
The first line grants applications on Distrobox the required permissions to connect to the X server (and therefore open graphical windows). The last two lines add Distrobox and Podman to the PATH variable so we can actually run them.
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
.
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.
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/.local/bin:$PATH
export PATH=$HOME/.local/podman/bin:$PATH
xhost +si:localuser:$USER
distrobox enter archlinux -- mono ckan.exe
Set this file as executable in its properties, 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.
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
.
Thanks so much, those instructions look great and I've added them to the wiki!:
https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-Steam-Deck
For the "Installing CKAN" step, should the instructions include how to build CKAN from scratch with makepkg
, as on the Arch wiki? I'm not very familiar with Distrobox; if we provided a link to that wiki, would users be able to follow it?
For the "Installing CKAN" step, should the instructions include how to build CKAN from scratch with
makepkg
, as on the Arch wiki? I'm not very familiar with Distrobox; if we provided a link to that wiki, would users be able to follow it?
I don t think so because all is included inside the .exe file, i will test to install and tells you!
@arthomnix there is an AUR repo for distrobox, do you know if it is working ?
@arthomnix there is an AUR repo for distrobox, do you know if it is working ?
I would assume that if you can't install Mono with the usual Arch tools, then installing Distrobox that way would also fail.
Instructions are working. I have created a .desktop to just double click. Missing the instruction to convert the .sh file as an executable.
You can add it on steam creating the .desktop file:
TO UPLOAD...
Then in steam click on ADD A GAME > ADD A NON-STEAM GAME... > BROWSE > ckan.exe > ADD SELECTED PROGRAMS
You can restart the steam deck and launch CKAN from Gaming Mod now !!!
@HebaruSan add me to the wiki so I can make the tutorial. Thank you @arthomnix , all credit is yours!
I succes to run CKAN with protontricks but just the first time. Now it is not working...
@vincentBenet CKAN doesn't work in Proton, you need to add your ckan.sh file to Steam to run it in distrobox (you'll need to change the file type filter to all files to get it to show up)
Using the AUR on the Deck isn't recommended as you would have to make the root filesystem read-write, and anything you install to it would be overwritten by system updates (basically defeating the purpose of using Distrobox in the first place)
@vincentBenet CKAN doesn't work in Proton, you need to add your ckan.sh file to Steam to run it in distrobox (you'll need to change the file type filter to all files to get it to show up)
Yes, you are right. That what I have done. I had to add a rm command of CKAN lock file inside the .sh file and also I get some issues with spaces in paths. But it is working fine now. Anyway, running CKAN in Gaming mod has many graphical issues.
OK @arthomnix and @vincentBenet, I have turned on wiki editing for non team members, so you can update or add things as needed:
https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-Steam-Deck
Note that I might have to rescind this if we get random vandalism again (the reason it was locked down in the first place).
Using the AUR on the Deck isn't recommended as you would have to make the root filesystem read-write, and anything you install to it would be overwritten by system updates (basically defeating the purpose of using Distrobox in the first place)
Ok, I will use your method so! Thx! :)
gaming mode is designed for games, so you may run into issues when using non-game applications it may be helpful to use the window switcher (accessible from the steam button)
OK @arthomnix and @vincentBenet, I have turned on wiki editing for non team members, so you can update or add things as needed:
https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-Steam-Deck
Note that I might have to rescind this if we get random vandalism again (the reason it was locked down in the first place).
You should implement sphinx to get your documentation working with pull requests ;)
Ok, i will try to get this done soon so you can lock it after.
For the "Installing CKAN" step, should the instructions include how to build CKAN from scratch with
makepkg
, as on the Arch wiki? I'm not very familiar with Distrobox; if we provided a link to that wiki, would users be able to follow it?
Given that the Deck isn't targeted at Linux users, it's probably best to keep the instructions simple and not include extra stuff about compiling from source
@vincentBenet CKAN doesn't work in Proton, you need to add your ckan.sh file to Steam to run it in distrobox (you'll need to change the file type filter to all files to get it to show up)
Yes, you are right. That what I have done. I had to add a rm command of CKAN lock file inside the .sh file and also I get some issues with spaces in paths. But it is working fine now. Anyway, running CKAN in Gaming mod has many graphical issues.
Deleting the lockfile doesn't sound like the best idea, although maybe it's necessary given how steam closes apps in gaming mode
@vincentBenet please edit https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-Steam-Deck rather than adding a new wiki article
Here we go @arthomnix & @HebaruSan : https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-SteamOS-(Steam-deck)
@vincentBenet please edit https://github.com/KSP-CKAN/CKAN/wiki/Installing-CKAN-on-Steam-Deck rather than adding a new wiki article
Sorry for that, I will merge both
@vincentBenet those instructions seem specific to the Steam release of KSP, there also shouldn't be any reason why ckan.exe needs to be placed in the same folder as ksp
@vincentBenet those instructions seem specific to the Steam release of KSP, there also shouldn't be any reason why ckan.exe needs to be placed in the same folder as ksp
You are right but having simple instructions are simpler for non-linux users. I will add the comment that it can be anywhere else.
Might be easier just to leave it as is (i.e. tell people to leave it where they downloaded it), or tell them to put it in a folder like /home/deck/ckan
Hi @vincentBenet, a user on the KSP forum is reporting problems following the wiki. I won't be able to assist much, since I don't have this hardware or software setup. Would you be able to stop by and help?
Hi @HebaruSan , I have no problem on mine, I think he miss one or more steps in the process. But having CKAN in a flatpack is a good idea! (I don t know how to do it but i can search if you want...
Background
Have you made any manual changes to your GameData folder (i.e., not via CKAN)? No
Problem
Folowing the installation guide with Arch, it return an error with MSBuild. When I try to run ckan.exe using mono it also return an error
Steps to reproduce
Expected behavior Installation succes!
Error 1:
Error 2 :