diff options
author | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-26 22:35:49 -0500 |
---|---|---|
committer | Michael Larabel <michael@phx-laptop.(none)> | 2008-11-26 22:35:49 -0500 |
commit | df625db68e5cae752f431549ffccee6de276d341 (patch) | |
tree | 196730973674c261f90bfb305da5a8a0f87a305f | |
parent | 0c3f4a3168501cbfa20556ac71683a96d505076c (diff) | |
download | phoronix-test-suite-upstream-df625db68e5cae752f431549ffccee6de276d341.tar.gz phoronix-test-suite-upstream-df625db68e5cae752f431549ffccee6de276d341.tar.xz phoronix-test-suite-upstream-df625db68e5cae752f431549ffccee6de276d341.zip |
pts-core: Add support for Xfce 4.x detection to sw_desktop_environment()
-rw-r--r-- | pts-core/functions/pts-functions_system_software.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pts-core/functions/pts-functions_system_software.php b/pts-core/functions/pts-functions_system_software.php index 68b7a7d..1ba78bf 100644 --- a/pts-core/functions/pts-functions_system_software.php +++ b/pts-core/functions/pts-functions_system_software.php @@ -268,6 +268,19 @@ function sw_desktop_environment() } } + else if(pts_process_running_bool("xfce4-session")) + { + // Xfce 4.x + $desktop_environment = "Xfce"; + + $xfce_output = trim(shell_exec("xfce4-session --version 2>&1")); + + if(($open = strpos($xfce_output, "(")) > 0) + { + $xfce_output = substr($xfce_output, strpos($xfce_output, " ", $open)); + $desktop_version = substr($xfce_output, 0, strpos($xfce_output, ")")); + } + } if(!empty($desktop_environment)) { |