Skip to content

Commit f736f3b

Browse files
authored
feature: respect $BROWSER env in linux (#1672)
1 parent 29dfecd commit f736f3b

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Native/Linux.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ public string FindTerminal(Models.ShellOrTerminal shell)
6767

6868
public void OpenBrowser(string url)
6969
{
70-
Process.Start("xdg-open", url.Quoted());
70+
var browser = Environment.GetEnvironmentVariable("BROWSER");
71+
if (string.IsNullOrEmpty(browser))
72+
browser = "xdg-open";
73+
Process.Start(browser, url.Quoted());
7174
}
7275

7376
public void OpenInFileManager(string path, bool select)

0 commit comments

Comments
 (0)