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
10.1k stars 417 forks source link

[ Improvement ] Themes and icons integration #15

Closed 89luca89 closed 2 years ago

89luca89 commented 2 years ago

Until version 1.0.2 there was a rudimental integration between host's custom themes and icons and the container using symlinks:

ln -s /run/host/usr/share/themes/* ~/.themes

same with icons

ln -s /run/host/usr/share/icons/* ~/.icons


This has been removed in version 1.0.3 as it is not a solution I like nor it is solid enough I would like to find a solution that is solid enough to not spit confusing errors when using multiple distroboxes and mix and matching different containers

Meister1593 commented 2 years ago

This works if application uses standard paths, but for some apps (like Webex) it's not the case It uses custom path for icon from inside container that cannot be resolved outside

[Desktop Entry]
Version=42.5.0.22187
Name=Webex  (on fedora-36)
Comment=Webex
Exec=/home/plyshka/.local/bin/distrobox-enter -n fedora-36 -- '  /opt/Webex/bin/CiscoCollabHost  %U'
Icon=/opt/Webex/bin/sparklogosmall.png
Terminal=false
Type=Application
Categories=Utility;Application;
MimeType=x-scheme-handler/webexteams
StartupWMClass=webex

Or some apps (like steam) don't even use paths and straight use name for icon (although it can be different name, steam flatpak for example takes icon from place like this: /home/plyshka/.local/share/flatpak/exports/share/icons/hicolor/16x16/apps/com.valvesoftware.Steam.png)

[Desktop Entry]
Name=Steam (Runtime)  (on arch)
Comment=Application for managing and playing games on Steam
Comment[pt_BR]=Aplicativo para jogar e gerenciar jogos no Steam
...
...
Comment[vi]=Ứng dụng để quản lý và chơi trò chơi trên Steam
Exec=/usr/bin/distrobox-enter -T -n arch -- "  /usr/bin/steam-runtime  %U"
Icon=steam
Terminal=false
Type=Application
Categories=Network;FileTransfer;Game;
MimeType=x-scheme-handler/steam;x-scheme-handler/steamlink;
Actions=Store;Community;Library;Servers;Screenshots;News;Settings;BigPicture;Friends;
PrefersNonDefaultGPU=true
X-KDE-RunOnDiscreteGpu=true
Meister1593 commented 2 years ago

Oops, gonna move this into separate issue