[Bug]: Difference between bottles-cli run and launching from the GUI
Describe the bug
My launched application behaves differently depending on whether it's started from the bottles GUI or with bottles-cli.
I'm trying to setup media keys for foobar2000, running in a bottle. I encountered two different issues, not sure whether they are connected.
When starting from the GUI, and I execute flatpak run --command=bottles-cli com.usebottles.bottles run --args-replace -p Foobar2000 -b "Foobar2000" --args "/playpause", playback starts (as expected), but the Bottles window closes. Further invocations of playpause work as expected - playback pauses or starts.
When starting from a terminal with flatpak run --command=bottles-cli com.usebottles.bottles run --args-replace -p Foobar2000 -b "Foobar2000", the application opens fine. But when running flatpak run --command=bottles-cli com.usebottles.bottles run --args-replace -p Foobar2000 -b "Foobar2000" --args "/playpause", playback starts for ~half a second, then the application closes.
This is problematic, since this is how the desktop file works.
Using shell instead of run, e.g. flatpak run --command=bottles-cli com.usebottles.bottles shell --input "c:\\\Program\\ Files\\\foobar2000\\\foobar2000.exe /playpause" -b "Foobar2000" behaves exactly the same.
To Reproduce
For the Bottles window closing:
- Create a new bottle and install foobar2000 in it, and add it as a program
- Start bottles with
flatpak run com.usebottles.bottles - In the bottle, start foobar2000
- Run
flatpak run --command=bottles-cli com.usebottles.bottles run --args-replace -p Foobar2000 -b "Foobar2000" --args "/playpause"
For the foobar2000 window closing:
- Create a new bottle and install foobar2000 in it, and add it as a program
- Start foobar2000 with
flatpak run --command=bottles-cli com.usebottles.bottles run --args-replace -p Foobar2000 -b "Foobar2000" - Run
flatpak run --command=bottles-cli com.usebottles.bottles run --args-replace -p Foobar2000 -b "Foobar2000" --args "/playpause"
Package
Flatpak from Flathub
Distribution
Debian 12.5
Debugging Information
Official Package: true
Version: '51.10'
DE/WM: openboxguix
Display:
X.org: true
X.org (port): :0.0
Wayland: false
Graphics:
vendors:
amd:
vendor: amd
envs:
DRI_PRIME: '1'
icd: /usr/lib/x86_64-linux-gnu/GL/vulkan/icd.d/radeon_icd.x86_64.json:/usr/lib/i386-linux-gnu/GL/vulkan/icd.d/radeon_icd.i686.json
prime:
integrated: null
discrete: null
Kernel:
Type: Linux
Version: 6.1.0-17-amd64
Disk:
Total: 16375246848
Free: 16375083008
RAM:
MemTotal: 30.5GiB
MemAvailable: 2.8GiB
Bottles_envs: null
Troubleshooting Logs
flatpak run com.usebottles.bottles
(process:2): Gtk-WARNING **: 16:08:25.948: Locale not supported by C library.
Using the fallback 'C' locale.
16:08:26 (INFO) Bottles Started!
(bottles:2): Gtk-WARNING **: 16:08:26.290: AdwViewSwitcher 0x563e8bc15160 (viewswitcher) reported min height -6, but sizes must be >= 0
16:08:26 (INFO) Performing Bottles checks…
16:08:26 (INFO) Dxvks found:
- dxvk-2.3
16:08:26 (INFO) Vkd3ds found:
- vkd3d-proton-2.11
- vkd3d-proton-2.11.1
16:08:26 (INFO) Nvapis found:
- dxvk-nvapi-v0.6.4
16:08:26 (INFO) Latencyflexs found:
- latencyflex-v0.1.1
16:08:26 (INFO) Runners found:
- soda-8.0-2
- caffe-8.21
- wine-ge-proton8-25
- ge-proton8-27
- ge-proton8-25
- sys-wine-8.0.2
16:08:26 (INFO) Bottles found:
- Battle.net
- Foobar2000
16:08:26 (INFO) Catalog installers loaded
16:08:26 (INFO) Catalog dependencies loaded
16:08:26 (INFO) Catalog components loaded
16:08:38 (INFO) Launching an executable…
16:08:38 (INFO) Using EasyAntiCheat runtime
16:08:38 (INFO) Using BattlEye runtime
Additional context
Running flatpak with -vv shows no suspicious entries, there is no output after bottles is started.