89luca89 / 89luca89/distrobox

[Discussion] Potential footgun by allowing Distrobox applications to write to host XDG_DATA_ and XDG_CONFIG_HOME directories by default, especially with apps that install into $HOME

オープン
#1,067 コメント 0 件 リアクション 2 件 担当者 0 名 GitHub で見る
question
主要言語
Go
スター
13k
フォーク
541
平均マージ
20時間 47分
マージ済み PR(30日)
4

説明

Distrobox allows running arbitrary distributions on containers and run their apps seamlessly with the host. The default behavior is to use the host's $HOME in containers. This is usually fine. But there's several issues with this approach which can lead to subtle unpredictable behavior in some edge cases.

- The unpredictability can arise from different package versions between host and container reading and writing to user config, causing unpredictable behavior and failures.

- Some applications are installed under the local user, and one may want to use Distrobox to segment them and avoid cluttering host's .local, and still have access to their .bashrc and ssh keys, or w/e. But by using --home, the seamless integration is not so seamless anymore.

I'm sure we'd like to keep $HOME set to host $HOME, but for apps to keep to their own container as probably intended. There's no middle ground between using --home and not using --home. This can be achieved by leveraging the XDG environment variables.

The solution given to me was to just use --env to pass them directly. This is tedious. I instead proposed a flag to automate this and fill in that middle ground. Any solution should not disrupt the prevailing use case of Distrobox but should nevertheless at least guarantee (to the best of its abilities) a clean configuration environment if needed, while still integrating with the host.

After an unreasonably heated discussion in the Matrix chat, I want to at least open discussion about this problem a little more publicly.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。