gdmd -man fails perhaps due to out-of-date commands?

Iain Buclaw ibuclaw at ubuntu.com
Thu Mar 28 10:06:04 PDT 2013


On 28 March 2013 13:35, Joseph Rushton Wakeling <
joseph.wakeling at 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';
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20130328/c1a134d4/attachment.html>


More information about the D.gnu mailing list