89luca89 / 89luca89/distrobox

[Error] xdg-open doesn't work, opening browser link fails

Aberta
#1,752 21 comentários 0 reações 0 responsáveis Ver no GitHub
bug wait-on-user
Linguagem predominante
Go
Estrelas
13k
Forks
541
Merge médio
20h 47min
PRs com merge (30d)
4

Descrição

**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

Guia de contribuição

Abrir o guia de contribuição

Direção de pesquisa

A issue trata do fato de que xdg-open e distrobox-host-exec não funcionam dentro de um contêiner. Comece examinando como o distrobox lida com a execução de comandos do host, provavelmente no script distrobox-host-exec. Verifique a integração com o ambiente de desktop do host e o xdg-open. Reproduza o bug em um contêiner de teste conforme descrito e, em seguida, rastreie o fluxo de execução para ver onde a falha ocorre.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Stack de tecnologia
bash, docker, linux, shell, ubuntu
Domínio
cli, developer-experience, tooling
Tipo de issue
Bug
Dificuldade
3/5
Tempo estimado
1-2 dias
Status de atividade
Pouca atividade
Clareza
Claramente especificada
Facilidade para iniciantes
55/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.