class Launchy::Detect::NixDesktopEnvironment - launchy-2.4.3 Documentation

# class Launchy::Detect::NixDesktopEnvironment

Detect the current desktop environment for *nix machines Currently this is Linux centric. The detection is based upon the detection used by xdg-open from portland.freedesktop.org/

### Public Class Methods

browsers() click to toggle source

    # File lib/launchy/detect/nix_desktop_environment.rb, line 25
    def self.browsers
      [ browser, fallback_browsers ].flatten
    end

detect() click to toggle source

Detect the current *nix desktop environment

If the current dekstop environment be detected, the return NixDekstopEnvironment::Unknown

    # File lib/launchy/detect/nix_desktop_environment.rb, line 15
    def self.detect
      found = find_child( :is_current_desktop_environment? )
      Launchy.log("Current Desktop environment not found. #{Launchy.bug_report_message}") unless found
      return found
    end

fallback_browsers() click to toggle source

    # File lib/launchy/detect/nix_desktop_environment.rb, line 21
    def self.fallback_browsers
      %w[ firefox iceweasel seamonkey opera mozilla netscape galeon ].map { |x| ::Launchy::Argv.new( x ) }
    end