Bug 2561331 - Launching flatpak from a script disables input to terminal
Summary: Launching flatpak from a script disables input to terminal
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: flatpak
Version: 44
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: David King
QA Contact: Fedora Extras Quality Assurance
URL: https://discussion.fedoraproject.org/...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2026-10-26 22:19 UTC by Nick
Modified: 2026-10-29 08:21 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2026-10-29 08:21:33 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nick 2026-10-26 22:19:26 UTC
I launch a flatpak io.mpv.Mpv through a script. A simple reproducer of this is a script like this:

#!/bin/sh
flatpak run io.mpv.Mpv

Until recently, this worked fine. When I last did a `rpm-ostree upgrade` (from 44.20260815.0 to 44.20261023.0) the bug I'm describing was introduced (and I'm sure it's independent from the flatpak version, as rolling back with rpm-ostree fixes the issue).

The issue is that launching mpv this way disables all input to the terminal window that launched it (foot, in my case; I'm running Atomic Sway). This means that if it's an audio file, there is no effective way to pause or seek, or anything else. Also when the file finishes playing it appears to hang; the only way to stop it is to `kill` the launching script. Launching it directly by typing `flatpak run io.mpv.Mpv myfile.mp3` into the terminal it works fine.

I don't know what component causes this, but my guess is flatpak, as neither foot nor bash had any updates between the broken and working builds (as derived with `rpm-ostree db diff`), but flatpak did get updated (1.18.1-1.fc44 -> 1.18.4-1.fc44). Lots of other packages got updated too, though, so it could be something else.

I'm happy to help debug this however I can. Note that in the forum post I made about this (https://discussion.fedoraproject.org/t/odd-behaviour-launching-mpv-flatpak-from-a-shell-script/206033/10) someone else there was able to reproduce it.

Reproducible: Always

Steps to Reproduce:
1. Create a simple script like this `printf '#!/bin/sh\nflatpak run io.mpv.Mpv\n` > mpv`.
2. Play a music file using this script, for example: `sh mpv http://bigrradio.cdnstream1.com/5171_128`
3. Press space in the terminal
Actual Results:
Playback does not pause

Expected Results:
Playback pauses

Comment 1 Nick 2026-10-29 08:21:33 UTC
I was helped in the Fedora forums <https://discussion.fedoraproject.org/t/odd-behaviour-launching-mpv-flatpak-from-a-shell-script/206033/17> to find a perfectly fine workaround, which is to add `exec` in front of the `flatpak run ...` command, from a script. Given that it looks like this change in behaviour is a side-effect of addressing security concerns, and the workaround is not problematic at all, I'll close this bug.


Note You need to log in before you can comment on or make changes to this bug.