Opening unityhub:// URLs with Unity Hub on Linux

Hi!

The download archives contain UnityHub URLs that us Linux users apparently have to use in order to install older Linux versions.

When I click on the links (leading to, i.e., unityhub://5.6.7f1/e80cc3114ac1), nothing happens.

I tried registering a custom protocol handler like this:

gconftool-2 -s /desktop/gnome/url-handlers/foo/command ‘/opt/UnityHub/UnityHub.AppImage %s’ --type String
gconftool-2 -s /desktop/gnome/url-handlers/foo/enabled --type Boolean true

I added a property called network.protocol-handler.expose.unityhub to my Firefox configuration, but it still complains “The address wasn’t understood”

I called UnityHub.AppImage with different variations of the URL:

./UnityHub.AppImage unityhub://5.6.7f1/e80cc3114ac1
./UnityHub.AppImage 5.6.7f1/e80cc3114ac1
./UnityHub.AppImage e80cc3114ac1

But this only brings UnityHub into the foreground.

./UnityHub.AppImage unityhub://5.6.7f1/e80cc3114ac1
That does work to start a unity hub link download, however, it looks like it’s not available for linux for download. You’ll need a direct download link from support.

3 Likes

Using this post as reference xdg - Create a custom URL Protocol Handler - Unix & Linux Stack Exchange, I was able to get it working by adding a file called ~/.local/share/applications/unityhub-handler.desktop with contents

[Desktop Entry]
Type=Application
Name=UnityHub Handler
Exec=~/Unity/UnityHub.AppImage %u
StartupNotify=false
MimeType=x-scheme-handler/unityhub;

(adjust the Exec line for wherever you’ve installed UnityHub), then running xdg-mime default unityhub-handler.desktop x-scheme-handler/unityhub.

6 Likes

just to add to this for flatpak installs you would use this command in terminal
flatpak run com.unity.UnityHub unityhub://2020.3.7f1/dd97f2c94397

xdg-mime default unityhub-handler.desktop x-scheme-handler/unityhub

Thank you very much !!