Skip to content

Cannot open files in Flatpak sandbox's private /tmp #1744

@aleixpol

Description

@aleixpol

Operating System

Arch Linux

XDG Desktop Portal version

1.20

XDG Desktop Portal version (Other)

No response

Desktop Environment

Plasma

Desktop Environment (Other)

No response

Expected Behavior

Given:

flatpak run --command=bash org.freedesktop.Sdk//24.08 
$ echo "banana" > /tmp/myfile.text
$ xdg-open /tmp/myfile.text 

(note here I tried to make a simplest common example, this comes from the debugging from another tool. Also same behaviour happens when using QDesktopServices::openUrl, which has a similar functionality to xdg-open)

I'd expect the file to get open, much like if I do the xdg-open on something in /usr or /app or a host path.

The file is indeed available on the host:

$ ls /run/user/1000/.flatpak/org.freedesktop.Sdk/tmp/
myfile.text

Current Behavior

The portal silently rejects the process, only leaving this debug line.

(/usr/lib/xdg-desktop-portal:156325): xdg-desktop-portal-DEBUG: 03:45:39.777: Rejecting open request: stat /tmp/myfile.text: No such file or directory

Steps to Reproduce

As explained in the expected behaviour

Anything else we should know?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions