summaryrefslogtreecommitdiffstats
path: root/pts-core
diff options
context:
space:
mode:
authorMichael Larabel <michael@phx-laptop.(none)>2008-11-26 22:35:49 -0500
committerMichael Larabel <michael@phx-laptop.(none)>2008-11-26 22:35:49 -0500
commitdf625db68e5cae752f431549ffccee6de276d341 (patch)
tree196730973674c261f90bfb305da5a8a0f87a305f /pts-core
parent0c3f4a3168501cbfa20556ac71683a96d505076c (diff)
downloadphoronix-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()
Diffstat (limited to 'pts-core')
-rw-r--r--pts-core/functions/pts-functions_system_software.php13
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))
{