Make help
and fish_config
work on Chrome OS
#7789
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When
fish
is running in the Chrome OS Linux VM (Crostini), bothhelp
andfish_config
currently open a "file not found"page. That is because on Crostini,
BROWSER
is usually set togarcon-url-handler
, which opens URLs in the host OS Chromebrowser. That browser lacks access to the Linux file system.
This PR fixes these commands.
help
now opens the URL on www.fishshell.com.fish_config
now opens the URL for theserver it starts. Previously, it opened a local file that redirects to the same URL.
In the case of
help
, the situation could be improved further by starting a web server to serve help. I don't know of another way to access/share/fish
from outside the VM without user intervention, and I think that might be a part of the securitymodel for the Crostini VM.
It's hard to write a test for this. I checked that
help math
,python2 webconfig.py
, andpython3 webconfig.py
work on mymachine running in Crostini.
I also rearranged the imports a little to group them together. It's in a separate commit, let me know if you prefer that I not do that.
Another alternative is to look much harder for a browser installed in the Linux VM. By default, none are installed, I think. I do think a Linux browser should be used if the user has installed it and put it into
BROWSER
, though.TODOs: