Search code examples
cygwingnomegnome-terminal

URL Handler for gnome applications in cygwin?


I've set up a windows machine with Cygwin/X and have a terminal running in that environment. The "click on things that look like links" feature works well, but GNOME fires a popup saying it does not know how to open the http url scheme.

I've found many references to xdg mime types, .desktop files/application files, and got as far as having:

$ xdg-mime query default x-scheme-handler/http
emarcotte-http.desktop

$ cat /usr/share/applications/emarcotte-http.desktop
[Desktop Entry]
Type=Application
Name=Browser Handler!
Exec=~emarcotte/browser.sh %u
StartupNotify=false
MimeType=x-scheme-handler/http;x-scheme-handler/https;

$ cat ~/browser.sh 
EXE="/cygdrive/c/Program Files/Mozilla Firefox/firefox.exe"
"$EXE" "$*"

But I still get the popup saying that there's no registered handler.

Has anyone figured out a secret trick to enable the GNOME url handlers in cygwin?


Solution

  • Turns out you can't use ~ in the Exec. Setting the full path the browser opens right up.