Thread overview | |||||
---|---|---|---|---|---|
|
March 28, 2013 Re: gdmd -man fails perhaps due to out-of-date commands? | ||||
---|---|---|---|---|
| ||||
Attachments:
| On 28 March 2013 13:35, Joseph Rushton Wakeling < joseph.wakeling@webdrake.net> wrote: > Calling gdmd -man is supposed to open the default browser and load the user documentation. However, on my system (Ubuntu 13.04, Unity interface) the command fails with the errors: > > Use of uninitialized value $ENV{"KDE_FULL_SESSION"} in string eq at > /opt/gdc/bin/gdmd line 289. > Can't exec "gnome-open": No such file or directory at /opt/gdc/bin/gdmd > line 297. > > I'm not familiar with perl so can't readily debug, but it obviously > relates to > the following function: > > sub browse($) { > my ($url) = @_; > my @cmd; > > 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 ($ENV{KDE_FULL_SESSION} eq 'true') { > @cmd = qw(kfmclient exec); > } elsif ($ENV{GNOME_DESKTOP_SESSION_ID} ne '') { > @cmd = 'gnome-open'; > } else { > errorExit "Sorry, I do not know how to start your browser.\nManual > URL: > $url" > } > push @cmd, $url; > system @cmd; > print "Opening documentation page."; > exit 0; > } > > ... and looks likely to be down to out-of-date or buggy calls to > environment > variables. The closest I was able to find searching online were these > issues in > xgamer: > https://code.google.com/p/xgamer/issues/detail?id=8 > https://code.google.com/p/xgamer/issues/detail?id=9 > > ... but it's not obvious what the fix referred to was. > > There's no gnome-open on my system (or available in repos) so I presume > this is > an old GNOME 2 command that's been removed? > > $ echo $GNOME_DESKTOP_SESSION_ID GNOME_DESKTOP_SESSION_ID=this-is-deprecated $ which gnome-open /usr/bin/gnome-open Guess the detection method is deprecated, but the open command still exists... -- Iain Buclaw *(p < e ? p++ : p) = (c & 0x0f) + '0'; |
March 28, 2013 Re: gdmd -man fails perhaps due to out-of-date commands? | ||||
---|---|---|---|---|
| ||||
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.) |
March 28, 2013 Re: gdmd -man fails perhaps due to out-of-date commands? | ||||
---|---|---|---|---|
| ||||
Attachments:
| On 28 March 2013 17:29, Joseph Rushton Wakeling < joseph.wakeling@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'; |
Copyright © 1999-2021 by the D Language Foundation