[Error] xdg-open doesn't work, opening browser link fails
- 主要語言
- Go
- 星號
- 13k
- 分支
- 541
- 平均合併
- 20 小時 47 分鐘
- 30 天內合併 PR
- 4
描述
**Describe the bug**
Apps trying to open link in browser fail.
**To Reproduce**
Run `xdg-open https://unity.com` in container.
It doesn't work (nothing happens).
The same command works fine on host.
Also, I was trying to make it work using `distrobox-host-exec`, but it seems to not work for me at all.
From examples `distrobox-host-exec --help`
running `distrobox-host-exec podman ps -a` shows nothing (no output) in container,
while on host `podman ps -a` works fine and gives the list of running containers.
To fully reproduce, create a new container and install Unity Hub:
```sh
distrobox create --name unity-box --image ubuntu:24.04
distrobox enter unity-box
cd
sudo apt update
sudo apt upgrade
sudo apt install libasound2t64 # it's needed for Unity Hub
# Unity Hub
wget -qO - https://hub.unity3d.com/linux/keys/public | gpg --dearmor | sudo tee /usr/share/keyrings/Unity_Technologies_ApS.gpg > /dev/null
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/Unity_Technologies_ApS.gpg] https://hub.unity3d.com/linux/repos/deb stable main" > /etc/apt/sources.list.d/unityhub.list'
sudo apt update
sudo apt install unityhub
unityhub
```
It should open a window Unity Hub with buttons/links that you can click and see that they don't work
(nothing happens when you click them).
**Expected behavior**
I'm expecting to be able to log in using links from container's apps (like Unity Hub).
**Logs**
Cannot find any related logs to this issue in podman, verbose on `xdg-open` doesn't produce any additional output
**Desktop (please complete the following information):**
- Are you using podman, docker or lilipod?
podman
- Which version or podman, docker or lilipod?
podman 4.9.3
- Which version of distrobox?
1.7.0
- Which host distribution?
Ubuntu 24.04
- How did you install distrobox?
`sudo apt install distrobox`
**Additional context**
N/A
貢獻指南
研究方向
這個 issue 是關於 xdg-open 和 distrobox-host-exec 在容器內無法運作的問題。先檢查 distrobox 如何處理主機指令的執行,可能需要查看 distrobox-host-exec 腳本。檢查它與主機桌面環境及 xdg-open 的整合。按照描述在測試容器中重現這個 bug,然後追蹤執行流程,查看失敗發生在哪裡。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- bash, docker, linux, shell, ubuntu
- 領域
- cli, developer-experience, tooling
- Issue 類型
- 缺陷
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 活躍度
- 冷清
- 描述清晰度
- 描述清楚
- 新手友好度
- 55/100