Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(WSL) Failing calls to xdg-open in do not trigger exception block #136

Closed
mattdsteele opened this issue Jun 2, 2020 · 2 comments · Fixed by #154
Closed

(WSL) Failing calls to xdg-open in do not trigger exception block #136

mattdsteele opened this issue Jun 2, 2020 · 2 comments · Fixed by #154

Comments

@mattdsteele
Copy link

mattdsteele commented Jun 2, 2020

This is tangentially related to #117

On Windows 10 I have a Linux subsystem running Debian 10.

On this instance, launchy detects xdg-open and tries to open the browser. using the tool.

An example small app:

require 'launchy'

redirect_url = 'https://www.google.com'
Launchy.open ( redirect_url ) do |exception|
  puts "Attempted to open #{redirect_url} and failed because #{exception}"
end

puts "Got through OK"

Results in these logs (with LAUNCH_DEBUG=true):

Logs
/mnt/c/Users/matt/code/strava-ruby-cli master*
❯ LAUNCHY_DEBUG=true ruby foo.rb
/var/lib/gems/2.5.0/gems/launchy-2.5.0/lib/launchy.rb:69: warning: Insecure world writable dir /home/matt/.vscode-server/bin in PATH, mode 040777
LAUNCHY_DEBUG: URI parsing pass 1 : https://www.google.com -> {:scheme=>"https", :user=>nil, :password=>nil, :host=>"www.google.com", :port=>nil, :path=>"", :query=>nil, :fragment=>nil}
LAUNCHY_DEBUG: Checking if class Launchy::Application::Browser is the one for handles?(https://www.google.com)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Windows is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Windows is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Darwin is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::HostOsFamily::Nix is the one for matches?(linux-gnu)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::RubyEngine::Mri is the one for is_current_engine?(ruby)}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Xfce is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/xprop
xprop:  unable to open display ''
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Xdg is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/xdg-open
LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/xdg-open
LAUNCHY_DEBUG: Launchy::Application : Unable to find `firefox' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `iceweasel' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `seamonkey' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `opera' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `mozilla' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `netscape' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `galeon' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `links' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `lynx' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application::Browser : possibility from app_list : xdg-open
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Kde is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Gnome is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Xfce is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/xprop
xprop:  unable to open display ''
LAUNCHY_DEBUG: Checking if class Launchy::Detect::NixDesktopEnvironment::Xdg is the one for is_current_desktop_environment?()}
LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/xdg-open
LAUNCHY_DEBUG: Launchy::Application : found executable /usr/bin/xdg-open
LAUNCHY_DEBUG: Launchy::Application : Unable to find `firefox' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `iceweasel' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `seamonkey' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `opera' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `mozilla' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `netscape' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `galeon' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `links' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application : Unable to find `lynx' in /home/matt/.vscode-server/bin/5763d909d5f12fe19f215cbfdd29a91c0fa9208a/bin, /usr/local/sbin, /usr/local/bin, /usr/sbin, /usr/bin, /sbin, /bin, /usr/games, /usr/local/games, /mnt/c/WINDOWS/system32, /mnt/c/WINDOWS, /mnt/c/WINDOWS/System32/Wbem, /mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/, /mnt/c/WINDOWS/System32/OpenSSH/, /mnt/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/Intel/Intel(R) Management Engine Components/DAL, /mnt/c/Program Files/dotnet/, /mnt/c/Program Files/Intel/WiFi/bin/, /mnt/c/Program Files/Common Files/Intel/WirelessCommon/, /mnt/c/Users/Matt/scoop/apps/nodejs/current/bin, /mnt/c/Users/Matt/scoop/apps/nodejs/current, /mnt/c/Users/Matt/go/bin, /mnt/c/Users/Matt/scoop/apps/openjdk/current/bin, /mnt/c/Users/Matt/scoop/apps/maven/current/bin, /mnt/c/Users/Matt/scoop/shims, /mnt/c/Users/Matt/AppData/Local/Microsoft/WindowsApps, /mnt/c/Users/Matt/AppData/Local/Programs/Microsoft VS Code/bin, /usr/local/go/bin, /usr/local/go/bin
LAUNCHY_DEBUG: Launchy::Application::Browser : Using browser value 'xdg-open'
LAUNCHY_DEBUG: wet_run: before exec in child process
LAUNCHY_DEBUG: commandline_normalized => xdg-open https://www.google.com
Got through OK

/mnt/c/Users/matt/code/strava-ruby-cli master*
❯ /usr/bin/xdg-open: 870: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 870: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 870: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 870: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 870: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 870: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'https://www.google.com'

It appears that the call to xdg-open is not triggering the exception block to run, but I'm not sure why.

Running the command xdg-open https://www.google.com directly has an exit code of 3, FWIW.

I'm currently using the workaround mentioned in the above ticket, by setting the BROWSER env variable, but I'd like to be able to trap these failures in a block. Any idea what might be going on?

@copiousfreetime
Copy link
Owner

Apologies for the very late reply - this appears to be a transitive item from xdg-open - the output there shows that xdg-open was failing to find a browser on which to open. Basically what happenned:

  • Launchy found xdg-open and handed off the url opening to it
  • xdg-open attempted to open the url - but it couldn't delegate to anything it new about so it exited.

Launchy is fire and forget on the browser that it opens unless in debug mode, in this case it fires off xdg-open and exits, launchy has exited before xdg-open has gotten to its own sub failure.

I'm not sure what the appropriate solution would be here, I am looking at the WSL things in a few other tickets to see if there's general solution that will be good.

@copiousfreetime
Copy link
Owner

@snuggs - take a look

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants