Describe the bug
When creating a Distrobox container using DistroShelf, setting a custom home directory using the file picker causes the container initialization to fail.
The Flatpak document portal exposes a sandboxed virtual path (/run/user/1000/doc/...) instead of the true host path. The container runtime (crun) cannot stat this virtual directory, throwing an OCI permission denied error and crashing the startup sequence.
Steps to reproduce
-
Create a Distrobox container named test1 with standard settings (Base image: ubuntu:22.04, init enabled, default home directory). This works perfectly.
-
Create a second container named test2 with the exact same configuration, but toggle Custom Home Directory on.
-
Use the GUI file picker to select a folder inside the host's Documents directory.
-
The GUI maps the text path to something like /run/user/1000/doc/329d4b19/test2.
-
Attempt to start the test2 container.
Actual behavior / Logs
The container fails immediately with the following background log:
Error: unable to start container "89587a348a9818085889627442c68e126380967b13efbede55eefefa565d492c": crun: cannot stat /proc/self/fd/149: Permission denied: OCI permission denied
Proposed Enhancement: Expected Behavior for DistroShelf
To handle this smoothly, DistroShelf should actively check for these path restrictions and provide a native GUI error step rather than failing silently or printing raw runtime logs.
- Internal Application Logic (The Check)
- Pre-flight Path Check: When the user clicks "Create" or "Start", DistroShelf should inspect the string in the home directory field. If the path begins with /run/user/, it should flag it immediately as a virtual portal path.
- Runtime Fallback Check: If the string check is bypassed, DistroShelf should listen to stderr from the container runtime. If it catches strings containing crun: cannot stat or OCI permission denied, it should intercept the crash window.
- Proposed GUI Window Layout
When an invalid sandboxed path or an OCI permission failure is caught, DistroShelf should display an informative modal popup window:
Screenshots

Describe the bug
When creating a Distrobox container using DistroShelf, setting a custom home directory using the file picker causes the container initialization to fail.
The Flatpak document portal exposes a sandboxed virtual path (/run/user/1000/doc/...) instead of the true host path. The container runtime (crun) cannot stat this virtual directory, throwing an OCI permission denied error and crashing the startup sequence.
Steps to reproduce
Create a Distrobox container named test1 with standard settings (Base image: ubuntu:22.04, init enabled, default home directory). This works perfectly.
Create a second container named test2 with the exact same configuration, but toggle Custom Home Directory on.
Use the GUI file picker to select a folder inside the host's Documents directory.
The GUI maps the text path to something like /run/user/1000/doc/329d4b19/test2.
Attempt to start the test2 container.
Actual behavior / Logs
The container fails immediately with the following background log:
Error: unable to start container "89587a348a9818085889627442c68e126380967b13efbede55eefefa565d492c": crun: cannot stat
/proc/self/fd/149: Permission denied: OCI permission deniedProposed Enhancement: Expected Behavior for DistroShelf
To handle this smoothly, DistroShelf should actively check for these path restrictions and provide a native GUI error step rather than failing silently or printing raw runtime logs.
When an invalid sandboxed path or an OCI permission failure is caught, DistroShelf should display an informative modal popup window:
Screenshots