On 28 March 2013 17:29, Joseph Rushton Wakeling < joseph.wakel...@webdrake.net> wrote:
> On 03/28/2013 06:06 PM, Iain Buclaw wrote: > > $ echo $GNOME_DESKTOP_SESSION_ID > > GNOME_DESKTOP_SESSION_ID=this-is-deprecated > > Yup, same on my system (actually it just prints this-is-deprecated). > > > $ which gnome-open > > /usr/bin/gnome-open > > > > Guess the detection method is deprecated, but the open command still > exists... > > Not on my system -- there's no /usr/bin/gnome-open and calling which > gnome-open > results in no output. (I'm using Ubuntu 13.04 as said before.) > > Well, you could follow the other methods of determining desktop and cycle through the typical linux commands found: eg: ---- if ($^O =~ m/MSWin32/i) { @cmd = qw(cmd /c start); } elsif ($^O =~ m/darwin/i && -x '/usr/bin/open') { # MacOS X vs. just Darwin @cmd = 'open'; } elsif (-x '/usr/bin/kfmclient') { @cmd = qw(kfmclient exec); } elsif (-x '/usr/bin/gnome-open') { @cmd = 'gnome-open'; } elsif (-x '/usr/bin/gvfs-open) { @cmd = 'gvfs-open'; } elsif (-x '/usr/bin/xdg-open') { @cmd = 'xdg-open'; } else { errorExit "Sorry, I do not know how to start your browser.\nManual URL: $url" } ---- Regards -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0';