diff --git a/src/arch/ArchHooks/ArchHooks_Unix.cpp b/src/arch/ArchHooks/ArchHooks_Unix.cpp index d3cd93840e..1374590f36 100644 --- a/src/arch/ArchHooks/ArchHooks_Unix.cpp +++ b/src/arch/ArchHooks/ArchHooks_Unix.cpp @@ -198,6 +198,13 @@ void ArchHooks_Unix::Init() #endif } +bool ArchHooks_Unix::GoToURL( RString sUrl ) +{ + RString command = "xdg-open " + sUrl; + int result = system( command.c_str() ); + return result != -1 && WEXITSTATUS( result ) == 0; +} + #ifndef _CS_GNU_LIBC_VERSION #define _CS_GNU_LIBC_VERSION 2 #endif diff --git a/src/arch/ArchHooks/ArchHooks_Unix.h b/src/arch/ArchHooks/ArchHooks_Unix.h index 4606f0948e..81c52ec522 100644 --- a/src/arch/ArchHooks/ArchHooks_Unix.h +++ b/src/arch/ArchHooks/ArchHooks_Unix.h @@ -15,6 +15,8 @@ public: void MountInitialFilesystems( const RString &sDirOfExecutable ); float GetDisplayAspectRatio() { return 4.0f/3; } + bool GoToURL( RString sUrl ); + static clockid_t GetClock(); };