Commit 078ed71
committed
linuxsessionmgr: make browser detection more robust
Now that we know how to launch a browser via $BROWSER (if set), we
should adjust our `IsWebBrowserAvailable` check for Linux.
In both WSL and non-WSL (native Linux) environments we immediately
return true when $BROWSER is set. VSCode remote tunnels set the $BROWSER
variable to a script that redirects requests back to the client's
browser, for example.
In non-WSL environments we also make our checks for a browser more
robust by checking for a 'shell execute' handler (like xdg-open).
Previously we just relied on a desktop session ($DISPLAY or
$WAYLAND_DISPLAY), which isn't accurate since in
BrowserUtils::OpenDefaultBrowser we require a shell execute handler (or
$BROWSER). The check and implementation are now aligned!
Signed-off-by: Matthew John Cheetham <mjcheetham@outlook.com>1 parent 3701a50 commit 078ed71
1 file changed
Lines changed: 14 additions & 9 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
24 | 36 | | |
25 | 37 | | |
26 | 38 | | |
27 | 39 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
55 | 61 | | |
56 | 62 | | |
57 | 63 | | |
58 | | - | |
| 64 | + | |
59 | 65 | | |
60 | 66 | | |
61 | | - | |
62 | | - | |
| 67 | + | |
63 | 68 | | |
64 | 69 | | |
0 commit comments