On Aug 12, 2007, at 3:53 AM, Sebastian Hungerecker wrote: > > According to the documentation on the homepage: > APP_LIST = { :windows => %w[ firefox iexplore ], :darwin => %w > [ open ], > :nix => %w[ firefox ], :unknown => [], } > So on OSX it uses the default browser and on any other system > firefox, if > installed, or IE or nothing. I have to say, I find that somewhat > suboptimal. > Certainly it's possible to detect the default browser on Windows, > KDE and > GNOME, too, right? (Although, of course, it's still possible that > someone > has neither KDE or GNOME installed or that he has both and is > running neither, > which would make it hard to choose which default browser to use on > *nix). > but no patch? ;-) i think it's pretty simple on *nix launchy_browser = ENV['LAUNCHY_BROWSER'] autocmds = %w[ htmlview ] ### and which ever others exist for kde, etc realcmds = %w[ firefox mozilla ] ### and some others cmds = [ launchy_browser, autocmds, realcmds ].flatten.map{|cmd| "( #{ cmd } >/dev/null 2>&1 )"} cmd = cmds.join ' || ' system cmd you could do some detection crap, but simply having a preferred list of 'commands that find browsers' followed by a reasonable list of browsers is going to work on 99% of *nix boxes. for everyone else they can set an env var and all will be well. any unix user that can't manage to set environment vars to make non-standard setups work does deserve to surf the web anyhow ;-) cheers. a @ http://drawohara.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama