You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// For Linux we check first if the DISPLAY is set.
646
+
if (!gSystem->Getenv("DISPLAY")) {
647
+
// The user will have a warning and the URL in the terminal.
648
+
Warning("OpenInBrowser", "The $DISPLAY is not set! Please manually open (e.g. Ctrl-click) %s\n", url.Data());
649
+
return;
650
+
}
651
+
// Command for opening a browser in Linux. Since the DISPLAY is set, it will open the browser.
645
652
TString cLinux("xdg-open ");
646
-
// For Linux we check if the DISPLAY is set.
647
-
if (gSystem->Getenv("DISPLAY")) {
648
-
// If the DISPLAY is set it will open the browser.
649
-
cLinux.Append(url);
650
-
gSystem->Exec(cLinux);
651
-
} else {
652
-
// Else the user will have a warning and the URL in the terminal.
653
-
Warning("OpenInBrowser", "The $DISPLAY is not set! Please open (e.g. Ctrl-click) %s\n", url.Data());
653
+
cLinux.Append(url);
654
+
auto res = gSystem->Exec(cLinux);
655
+
#endif
656
+
if (res != EXIT_SUCCESS) {
657
+
Warning("OpenInBrowser", "Could not automatically open web browser (e.g. due to missing X11)! Please manually open (e.g. Ctrl-click) %s\n", url.Data());
654
658
return;
655
659
}
656
-
#endif
657
660
Info("OpenInBrowser", "A new tab should have opened in your browser.");
0 commit comments