Skip to content

Conversation

@ProbstDJakob
Copy link

This adds the ability to export/run apps installed in the users home directory (~/.local/share/applications) if the home within the distrobox differs from the hosts home directory.

I did not update the tests as currently they only check if the dummy values are as expected, thus they are not testing any "production" code (as Morty would say: this sounds like asserting true with extra steps ^^). I would look more deeply into the tests if help would be appreciated, but that would be another PR.

@ProbstDJakob
Copy link
Author

The only interesting part is within the src/distrobox/mod.rs. The rest is formatting and could be dropped (except for adding the toml dependency).

@ranfdev
Copy link
Owner

ranfdev commented Nov 19, 2025

Thank you! I will merge these changes for the next version

@ProbstDJakob
Copy link
Author

Just ping me, if/as soon as I should resolve the conflicts.

@ranfdev
Copy link
Owner

ranfdev commented Nov 20, 2025

I've rebased to discard the formatting changes, so that I can review everything more easily.


fn into_map(self) -> BTreeMap<PathBuf, String> {
let mut desktop_files = self.system;
if env::home_dir() != Some(self.home_dir) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think when DistroShelf is running as a flatpak, env::home_dir is different than the $HOME of the host?

By running

flatpak enter com.ranfdev.DistroShelf /usr/bin/bash
bash-5.3$ echo $HOME

i get an empty output, so this check doesn't seem to work when running DistroShelf as flatpak

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should retrieve the $HOME value using flatpak-spawn to echo that env var from the host side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants