fsquillace / junest

The lightweight Arch Linux based distro that runs, without root privileges, on top of any other Linux distro.
GNU General Public License v3.0
2.1k stars 110 forks source link

Issue using GNOME Boxes in proot mode with a different $HOME directory #337

Closed ivan-hc closed 10 months ago

ivan-hc commented 1 year ago

Hi, I successfully built an AppImage (or ArchImage) of GNOME Boxes using JuNest.

The script I use to run it is this

#!/bin/sh
HERE="$(dirname "$(readlink -f $0)")"
export UNION_PRELOAD=$HERE
export JUNEST_HOME=$HERE/.junest
export PATH=$HERE/.local/share/junest/bin/:$PATH
export HOME="/home/$(echo $USER)"
mkdir -p $HOME/.cache
$HERE/.local/share/junest/bin/junest proot -n -b "--bind=/home --bind=/home/$(echo $USER) --bind=/media --bind=/mnt --bind=/opt --bind=/usr/lib/locale --bind=/etc/fonts" -- gnome-boxes "$@"

What works

Once downloaded and without additional configurations, by running it you are able to download/install operating systems and those from any ISO you stored, without problems.

What does not works

Custom $HOME directories, if you set, for example

HOME=/home/$USER/any/path

or any other path as a custom $HOME directory, GNOME Boxes crashes, or sometime starts but crashes if you download a system.

Steps to reproduce the issue

Open a terminal adn always in the same session:

  1. Create a temporary directory "tmp" we will set as $HOME, then install JuNest and gnome-boxes before (only the following commands, don't close the terminal to have always ./tmp as a custom $HOME, we will use it at point 2), as follow...
    mkdir tmp
    cd tmp
    APP=gnome-boxes
    DEPENDENCES="xdg-desktop-portal-xapp xapp"
    BASICSTUFF="binutils gzip"
    HOME="$(dirname "$(readlink -f $0)")" 
    git clone https://github.com/fsquillace/junest.git ~/.local/share/junest
    ./.local/share/junest/bin/junest setup
    ./.local/share/junest/bin/junest -- sudo pacman -Syy
    ./.local/share/junest/bin/junest -- sudo pacman --noconfirm -Syu
    ./.local/share/junest/bin/junest -- yay -Syy
    ./.local/share/junest/bin/junest -- yay --noconfirm -S gnu-free-fonts $(echo "$BASICSTUFF $COMPILERS $DEPENDENCES $APP")
  2. Run gnome-boxes in proot mode...
    ./.local/share/junest/bin/junest proot -n -- gnome-boxes

    eventually add flags in "junest -b", these are my defaults

    ./.local/share/junest/bin/junest proot -n -b "--bind=/home --bind=/home/$(echo $USER) --bind=/media --bind=/mnt --bind=/opt --bind=/usr/lib/locale --bind=/etc/fonts" -- gnome-boxes

How can I solve this?