From edb9abc5463b0462cdf166cb0cf2694c886a785f Mon Sep 17 00:00:00 2001 From: Thomas Debesse Date: Tue, 11 Jul 2017 05:36:00 +0200 Subject: [PATCH] use xdg-open to open url on Linux --- radiant/url.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/radiant/url.cpp b/radiant/url.cpp index 3f46768c..aecfa1ac 100644 --- a/radiant/url.cpp +++ b/radiant/url.cpp @@ -35,11 +35,9 @@ bool open_url( const char* url ){ #if defined( __linux__ ) || defined( __FreeBSD__ ) #include bool open_url( const char* url ){ - // \todo FIXME: the way we open URLs on *nix should be improved. A script is good (see how I do on RTCW) - //Fedora 25: Help > Manual leads to "sh: firefox: command not found" error on terminal, while xdg-open http://some/url/ works just fine (and opens up the URL in the web browser) char command[2 * PATH_MAX]; snprintf( command, sizeof( command ), - "firefox -remote \"openURL(%s,new-window)\" || firefox \"%s\" &", url, url ); + "xdg-open \"%s\" &", url ); return system( command ) == 0; } #endif