I’m trying to open an URL in the default browser from my gnome shell extension, and am doing that with GLib.spawn_async
:
GLib.spawn_async(
null,
['/usr/bin/xdg-open', 'http://localhost:5666'],
null, 0, null
);
Is this the correct way?
I’m unsure because I have to specify the full path to xdg-open
, otherwise I get a spawn error (along the lines of “child process could not be executed: File or directory not found”)