public function get_identifier_base_name()
 {
     $identifier = basename($this->identifier);
     if (($s = strrpos($identifier, '-')) !== false) {
         $post_dash = substr($identifier, $s + 1);
         // If the version is attached, remove it
         if (pts_strings::is_version($post_dash)) {
             $identifier = substr($identifier, 0, $s);
         }
     }
     return $identifier;
 }
 public static function sw_display_server()
 {
     $display_servers = array();
     if (phodevi::is_windows()) {
         // TODO: determine what to do for Windows support
     } else {
         if (pts_client::is_process_running('weston')) {
             $info = 'Wayland Weston';
             $vinfo = trim(shell_exec('weston --version 2>&1'));
             if (pts_strings::last_in_string($vinfo) && pts_strings::is_version(pts_strings::last_in_string($vinfo))) {
                 $info .= ' ' . pts_strings::last_in_string($vinfo);
             }
             array_push($display_servers, $info);
         }
         if (pts_client::is_process_running('unity-system-compositor')) {
             $unity_system_comp = trim(str_replace('unity-system-compositor', null, shell_exec('unity-system-compositor --version 2>&1')));
             if (pts_strings::is_version($unity_system_comp)) {
                 array_push($display_servers, 'Unity-System-Compositor ' . $unity_system_comp);
             }
         }
         if (($x_bin = is_executable('/usr/libexec/Xorg.bin') ? '/usr/libexec/Xorg.bin' : false) || ($x_bin = pts_client::executable_in_path('Xorg')) || ($x_bin = pts_client::executable_in_path('X'))) {
             // Find graphics subsystem version
             $info = shell_exec($x_bin . ' ' . (phodevi::is_solaris() ? ':0' : '') . ' -version 2>&1');
             $pos = ($p = strrpos($info, 'Release Date')) !== false ? $p : strrpos($info, 'Build Date');
             $info = trim(substr($info, 0, $pos));
             if ($pos === false || getenv('DISPLAY') == false) {
                 $info = null;
             } else {
                 if (($pos = strrpos($info, '(')) === false) {
                     $info = trim(substr($info, strrpos($info, ' ')));
                 } else {
                     $info = trim(substr($info, strrpos($info, 'Server') + 6));
                 }
             }
             if ($info != null) {
                 array_push($display_servers, 'X Server ' . $info);
             }
         }
         if (pts_client::is_process_running('surfaceflinger')) {
             array_push($display_servers, 'SurfaceFlinger');
         }
         if (pts_client::is_process_running('gnome-shell-wayland')) {
             array_push($display_servers, 'GNOME Shell Wayland');
         }
     }
     return implode(' + ', $display_servers);
 }