89luca89 / distrobox

Use any linux distribution inside your terminal. Enable both backward and forward compatibility with software and freedom to use whatever distribution you’re more comfortable with. Mirror available at: https://gitlab.com/89luca89/distrobox
https://distrobox.it/
GNU General Public License v3.0
9.96k stars 410 forks source link

[Error] Distros are not recognized by shortcuts after created (Steam Deck) #1585

Closed victoraalm closed 1 week ago

victoraalm commented 1 week ago

Please, before opening a bug:

Describe the bug After faithfully following the installation steps on Steam Deck, the distro shortcuts, located at: "/home/deck/.local/share/applications/", cannot open the distros and terminal gives the following message: Error: inspecting object : no such container [my_distro] Create it now, out of image registry.fedoraproject.org/fedora-toolbox:39? [Y/n]: shortcut_error

However, if I list the distro, it is there and by manually typing distrobox [my_distro] enter, the distro is accessed normally, but the exported apps also do not open through the generated shortcuts and again, if I call the name of the app within the distro, it opens normally. distrobox_list_enter

To Reproduce Install distrobox in $HOME By installing distrobox in your $HOME directory, you can ensure that you have control over the version you're using, independent of SteamOS updates. This method prevents your modifications from being reverted when SteamOS is updated.

Note that it's essential to add this new version of distrobox to your PATH to ensure it's utilized over the SteamOS-provided version.

To install distrobox in the $HOME directory, run the following command: curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix $HOME/.local Update $PATH Add the text: export PATH=/home/deck/.local/bin:$PATH to the files: sudo nano /home/deck/.bashrc sudo nano /home/deck/.profile sudo nano /etc/profile

Create ~/.distroboxrc Create ~/.distroboxrc and add the text:

xhost +si:localuser:$USER >/dev/null
export PIPEWIRE_RUNTIME_DIR=/dev/null
export PATH=$PATH:$HOME/.local/bin

Install Podman To install podman, refer to the install guide:

Download the latest release of podman-launcher, and place it in your home and rename it to podman, this example will use /home/deck/.local/bin Make the podman binary executable: chmod +x /home/deck/.local/bin/podman Setup deck user uidmap: sudo touch /etc/subuid /etc/subgid sudo usermod --add-subuid 100000-165535 --add-subgid 100000-165535 deck

And podman is ready to use!

Creating the distro distrobox create --image docker.io/library/archlinux:latest --name rarch --root --init --volume /:/hostos

Make a desktop shortcut with this configs:

#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Rarch
GenericName=Terminal entering Rarch
Comment=Terminal entering Rarch
Categories=Distrobox;System;Utility
Exec=distrobox enter rarch --root
Icon=/home/deck/.local/share/icons/distrobox/arch.png
Keywords=distrobox;
NoDisplay=false
Terminal=true
TryExec=/home/deck/.local/bin/distrobox
Type=Application

Install and Export Google-Chrome git clone https://aur.archlinux.org/google-chrome.git cd google-chrome/ makepkg -si distrobox-export --app google-chrome Try to execute the shortcut and fail.

Expected behavior I expected the shortcuts to work, reducing dependence on using the terminal, making use more convenient.

Logs Nothing

Desktop (please complete the following information):

Follow this guide https://github.com/89luca89/distrobox/blob/main/docs/posts/steamdeck_guide.md

Additional context Nothing

victoraalm commented 1 week ago

@mirkobrombin Hello! Here is the problem I commented on telegram, if you can help me, I would appreciate it

Sunspark-007 commented 1 week ago

Arch Linux x86_64

This isn't your host distribution. You're using SteamOS 3.5 which is immutable by default.

Kernel 5.13 for 3.4, 6.1 for 3.5, 6.5 for 3.6.

victoraalm commented 1 week ago

In my case, I'm using SteamOS 3.5 @Sunspark-007

Sunspark-007 commented 1 week ago

@victoraalm 1.8 was released 4 hours ago, test it.. hopefully it works..

victoraalm commented 1 week ago

Hello guys, I'v solved after many factory resets and tests. Here is the solution:

Install Distrobox and Podman PERMANENT on Steam Deck >= 3.5

1 - Modify $PATH for binaries First, verify if ~/.bashrc contains the necessary $PATH modification. Open the file with: sudo nano ~/.bashrc Add the following line if it’s not already there: export PATH=/home/deck/.local/bin:$PATH

2 - Install and configure Distrobox To install Distrobox in the defined $PATH, use one of the following commands depending on whether you need the latest version (--next) or not: curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sudo sh -s -- --next --prefix ~/.local or curl -s https://raw.githubusercontent.com/89luca89/distrobox/main/install | sh -s -- --prefix $HOME/.local

After installing, create the file ~/.distroboxrc if it doesn't already exist. Open it with: sudo nano ~/.distroboxrc Add the following lines to configure Distrobox:

# Ensure the graphical apps can talk to the Xwayland session
xhost +si:localuser:$USER >/dev/null
# Force the use of pulseaudio inside the container
export PIPEWIRE_RUNTIME_DIR=/dev/null
# Needed to ensure distrobox can find the podman binary we previously downloaded
export PATH=/home/deck/.local/bin:$PATH
export PATH=$PATH:/home/deck/.local/bin

3 - Install and configure Podman To install Podman, download the latest version from the GitHub releases page: curl -L -o /home/deck/Downloads/podman-launcher-amd64 https://github.com/89luca89/podman-launcher/releases/download/v0.0.5/podman-launcher-amd64

Next, move and rename the Podman binary with ROOT permissions to the $PATH: sudo mv /home/deck/Downloads/podman-launcher-amd64 /home/deck/.local/bin/podman

Then, make Podman executable: chmod +x /home/deck/.local/bin/podman

Configure the deck user’s UID and GID mapping with the following commands: sudo touch /etc/subuid /etc/subgid sudo usermod --add-subuid 100000-165535 --add-subgid 100000-165535 deck

4 - Configure Distrobox Icon folder - (if you install distrobox with sudo) To ensure Distrobox can store its icons correctly, set the proper permissions on the/home/deck/.local/share/iconsfolder with: sudo chown deck:deck /home/deck/.local/share/icons

5 - Verify installations After the installation steps, verify that both Distrobox and Podman are properly installed and configured. Use the following commands: which distrobox which podman distrobox --version podman --version podman info

6 - Create and test distros - install pulseaudio within the distros You can now create and test containers with Distrobox. To create and test a ROOTLESS container, run: distrobox create --image docker.io/library/archlinux:latest --name arch For a ROOT container, use: distrobox create --image docker.io/library/archlinux:latest --name rarch --root

You can either remove the created distros later or keep them for regular use.