Reputation: 181
So I've already solved this problem, but it was so frustrating I wanted to make sure there was a post about it for people in the future.
The issue comes from Chrome OS's browser, because it does not support links that open apps in linux, such as vscode://
. On linux systems, such as the ubuntu container used to install linux apps on Chrome OS, opening links is handled by xdg-open
, which starts the browser/associated programs.
On Chrome OS however, this doesn't happen. Because it is not linux, and does not rely on the linux filesystem, the normal system for registering alternate URL protocol handlers does not function. This means that vscode://
and other such links don't work.
Upvotes: 1
Views: 2441
Reputation: 63
I tried the method with simplenote on Lenovo Duet, but it did not work, it just kept on saying no URL handler. It might have been due to it being only available as an app image for arm64 architecture.
Anyways I solved it by installing another browser on Linux, Example:
sudo apt install firefox-esr
Browsers installed by this method are then made the default browser for links opened from linux, and also easily picks up the url-schemes since it also runs from the same partition.
Note: This is just a workaround as installing another browser kinda goes against the entire chome-os ideals but it always comes in handy while dealing with Linux apps.
Upvotes: 1
Reputation: 181
This is more of a workaround than a permanent solution, but will work:
xdg-open <url>
It may not be immediately clear on exactly how to use xdg-open
with your links, or even how to get links. I found this problem when logging into VSCode live share using microsoft. What you have to do is quite simple:
Network
or equivalentContinue
xdg open
""
quotation marks around it, because they often contain the &
character, which is significant in bash.It was a problem not well documented, because few people try to run VSCode on Chrome OS. The root of the problem, as I said, comes from the browser not being linked to anything else.
The heart of protocol handlers rests in this directory:
~
❯ ls ~/.local/share/applications/
mimeinfo.cache vsls-launcher.desktop
vsls-launcher.desktop
contains the data necessary for xdg-open
to launch vscode with vscode://
links.
My first hints came from this reddit thread, u/kgjv
's comment in particular: https://www.reddit.com/r/Crostini/comments/chizyk/crostini_how_to_make_linux_apps_open_links_in/
It says how xdg-open
will launch chrome from linux, so I did a little more digging and found ~/.local/share/applications/
to contain the configuration.
Any apps that support this will have their own .desktop
s, so you need only copy the link and launch it with xdg open
Upvotes: 2