From 70674325ba95293ba48d5e48f2515a648a8c1f7a Mon Sep 17 00:00:00 2001 From: KuleRucket <737724+KuleRucket@users.noreply.github.com> Date: Wed, 29 Mar 2023 00:51:10 +0200 Subject: [PATCH] Fix system tray Open Sunshine (#1095) Co-authored-by: KuleRucket Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> --- src/system_tray.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/system_tray.cpp b/src/system_tray.cpp index 57175bd0..4b10acff 100644 --- a/src/system_tray.cpp +++ b/src/system_tray.cpp @@ -49,9 +49,11 @@ namespace system_tray { // this isn't ideal as it briefly shows a command window // but start a command built into cmd, not an executable std::string cmd = R"(cmd /C "start )" + url + R"(")"; - #else // if unix + #elif defined(__linux__) || defined(linux) || defined(__linux) // set working dir to user home directory working_dir = boost::filesystem::path(std::getenv("HOME")); + std::string cmd = R"(xdg-open ")" + url + R"(")"; + #elif defined(__APPLE__) || defined(__MACH__) std::string cmd = R"(open ")" + url + R"(")"; #endif