Silverblue: .desktop file for container application not working

So, I have installed vscode inside toolbox-container, since flatpak version can’t access libraries installed inside toolbox-container.

And I followed Alex’s youtube tutorial on launching toolbox application from shell.

But it only works when ‘Terminal=true’,
when ‘Terminal=false’ nothing happens, I don’t know what’s happening.

Can you help me solve this problem?

Here’s code.desktop

[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=/usr/bin/toolbox run /usr/bin/code
Terminal=true
Icon=com.visualstudio.code
Type=Application
StartupNotify=false
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;

Okay Solved,
I copied /usr/bin/toolbox to ~/.bin and renamed
I just removed “–interactive” and “–tty” option used by toolbox in run command

basically

# start container, cause podman exec doesn't start container
podman start "$toolbox_container"
# run program
podman exec --user "$USER" $set_environment "$toolbox_container"  "$program"
# where "$set_environment" are environment parameter generated by toolbox 
# "$toolbox_container" is container name
# and "$program" is application name

# example
podman exec --env=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus \
            --env=DESKTOP_SESSION=gnome \
            --env=DISPLAY=:0  \
            --env=WAYLAND_DISPLAY=wayland-0 \
            --user "$USER" \
            fedora-toolbox-30
            code

# above is example, there are many parameters, 
# but these parameters were enough to launch

Have you had to do anything thing else to get vscode to launch? I get the following error when trying to open within the toolbox shell:

/usr/share/code/bin/../code: error while loading shared libraries: 
libX11-xcb.so.1: cannot open shared object file: No such file or directory

Other GUI apps work but codes doesn’t for me.

Also as a side, does gpg signing work for SCM when opening from within a toolbox?

Try

sudo dnf instal libX11-xcb

I did get similar error for some shared libraries.

Thanks, that got it working!

EDIT:
Hint to anyone else. Install the package “dejavu-sans-fonts” for the toolbox diamond in the terminal and “google-droid-sans-fonts” as it is the default UI font and it takes up less room than DejaVu.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.