Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DOSBox-X Flatpak not running games through Boxtron on the Steam Deck. #52

Open
TylerJaacks opened this issue Jan 1, 2023 · 3 comments

Comments

@TylerJaacks
Copy link

I can't manage to get Boxtron to open DOSBox-X and run games.

Here is my ~/.config/boxtron.conf

(deck@tylerj-steamdeck .config)$ cat boxtron.conf
[confgen]
# Set this value to 'true' if you want Boxtron to re-create DOSBox
# configuration on every run.
force = false

[midi]
# You can disable MIDI support here.
enable = true

# Select preferred software synthesiser here.
# Can be either 'timidity' or 'fluidsynth'
synthesiser = timidity

# You can name your preferred MIDI synthesiser here to override the one
# picked by default. If not found then software synthesiser will be
# started as a fallback.
#
# Value is treated as a regular expression using Python syntax, matched
# against the name of a MIDI client (case-insensitive); to list MIDI clients
# connected, use: $ aconnect -l
#
# For example, to match client named 'CASIO USB-MIDI', you can use
# value 'casio'.
#
# You can override this per-game with BOXTRON_USE_MIDI_SEQ environment variable.
#
# use_sequencer =

# Boxtron will look for a soundfont in following directories:
# /usr/share/soundfonts/
# /usr/share/sounds/sf2/
# /usr/local/share/soundfonts/
# /usr/local/share/sounds/sf2/
# ~/.local/share/sounds/sf2/  (or wherever XDG_DATA_HOME points)
# ~/.local/share/soundfonts/  (or wherever XDG_DATA_HOME points)
soundfont = FluidR3_GM.sf2

[dosbox]
# Available modes:
# - screen 0, screen 1, etc:
#   The game will use fullscreen on selected screen, without changing
#   the native resolution of your display.  Mouse will be locked to the screen.
#   Default is 'screen 0', which is your primary display.
#   You can override this selection per-game with BOXTRON_SCREEN environment
#   variable, e.g: 'BOXTRON_SCREEN=2 %command%'
# - desktop:
#   The whole desktop area will be used (all displays) with the game centred,
#   the native resolution of your displays will be preserved.
# - disabled:
#   Start DOSBox in windowed modeby default.
fullscreenmode = screen 0

# Pick the default scaler, that you want to use for all games.
# You can override selection per-game by changing option render.scaler in file
# boxtron_<appid>_<id>.conf in game's installation dir.
# Here's comparison of different scalers: https://www.dosbox.com/wiki/Scaler
scaler = normal3x

# Uncomment following line to specify a different DOSBox build:
# cmd = ~/projects/dosbox/src/dosbox
cmd = flatpak run --filesystem=%install_dir% com.dosbox_x.DOSBox-X
@denilsonsa
Copy link

None of the flatpak DOSBox versions can be executed anymore. They all fail with:

/usr/bin/flatpak: /home/deck/.local/share/Steam/ubuntu12_32/steam-runtime/pinned_libs_64/libcurl.so.4: version `CURL_OPENSSL_4' not found (required by /usr/lib/libappstream-glib.so.8)

This is likely related to ValveSoftware/steam-runtime#551

I've tried these:

cmd = /usr/bin/flatpak run --branch=stable --arch=x86_64 --filesystem=%install_dir% --command=dosbox com.dosbox.DOSBox
cmd = /usr/bin/flatpak run --branch=stable --arch=x86_64 --filesystem=%install_dir% --command=dosbox-x com.dosbox_x.DOSBox-X
cmd = /usr/bin/flatpak run --branch=stable --arch=x86_64 --filesystem=%install_dir% --command=dosbox io.github.dosbox-staging

And none of them work.


A desirable and easy-to-install solution to Steam Deck users would be to release BoxTron as a flatpak that handles all of these issues. But, not know how steam runtimes, boxtron, or flatpak works... This is more a wish than a real solution.

@denilsonsa
Copy link

denilsonsa commented Jan 26, 2023

I've managed to launch the game (on both desktop mode and game mode) using the following line in ~/.config/boxtron.conf:

cmd = /home/deck/dosbox.sh

And then I created a shell script at that location, with the following contents:

#!/bin/sh
echo "LD_LIBRARY_PATH was: $LD_LIBRARY_PATH"

# Choose one out of these three:

# Vanilla DOSBox. Seems to work.
#export LD_LIBRARY_PATH="/var/lib/flatpak/app/com.dosbox.DOSBox/current/active/files/lib:$LD_LIBRARY_PATH"
#exec /var/lib/flatpak/app/com.dosbox.DOSBox/current/active/files/bin/dosbox "$@"

# DOSBox-staging. For some reason, it refuses keyboard input.
#export LD_LIBRARY_PATH="/var/lib/flatpak/app/io.github.dosbox-staging/current/active/files/lib:$LD_LIBRARY_PATH"
#exec /var/lib/flatpak/app/io.github.dosbox-staging/current/active/files/bin/dosbox "$@"

# DOSBox-X. Also seems to work fine.
export LD_LIBRARY_PATH="/var/lib/flatpak/app/com.dosbox_x.DOSBox-X/current/active/files/lib:$LD_LIBRARY_PATH"
exec /var/lib/flatpak/app/com.dosbox_x.DOSBox-X/current/active/files/bin/dosbox-x "$@"

Please note that I'm abusing flatpak. I'm launching the binary directly, bypassing flatpak, and explicitly adding its own lib directory to $LD_LIBRARY_PATH. This may or may not be a good idea, I can't tell. Also, I couldn't see any difference between prepending or appending the directory to the path.

@TylerJaacks
Copy link
Author

@denilsonsa this fixed it for me. I agree that it is probably not good to bootstrap Flatpaks manually, but it works. I think there needs to be an issue for creating a flatpak version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants