xdg-open and Solaris.

98 vues
Accéder directement au premier message non lu

Dr. David Kirkby

non lue,
10 nov. 2009, 13:02:2010/11/2009
à sage-...@googlegroups.com
I've created a binary distribution of 4.2 on my old SPARC with Solaris 03/2005.

I then moved that to a newer/faster SPARC running Solaris 10 update 7 (05/2009),
opened the notebook up, and tried to access it from another computer.

ie.

* Build binary on Solaris 10 03/2005 (SPARC)
* Run the binary on Solaris 10 05/2009 (SPARC)
* Use Firefox on OpenSolaris (x86) to view the notebook.

It is creating an error message:

/opt/kirkby/sage-4.2-Solaris-10-SPARC-sun4u-SunOS/local/bin/sage-native-execute:
xdg-open: not found

Is 'xdg-open' supposed to be included in Sage anywhere, or is the user expected
to have it on their machine?

The file certainly does not exist anywhere on Solaris 10 03/2005 and I do not
think on the later version either. I note Wolfram Research ship that file with
Mathematica, so I assume they do not expect to find it on Solaris.

'xdg-open' *does* however exist as /usr/bin/xdg-open on OpenSolaris on x86.
Looking at the script I see:

#!/usr/bin/bash
#---------------------------------------------
# xdg-open
#
# Utility script to open a URL in the registered default application.
#
# Refer to the usage() function below for usage.
#
# Copyright 2006, Kevin Krammer <kevin....@gmx.at>
# Copyright 2006, Jeremy White <jwh...@codeweavers.com>
#
# LICENSE:
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,

If this file is hidden in one of the .spkg files, it does not get copied to
$SAGE_ROOT/local/bin.

So unless I am mistaken, the 'xdg-open' script needs to be added to the Sage
distribution. It is only 10 KB in size.

Dave


Dave

Gonzalo Tornaria

non lue,
10 nov. 2009, 13:36:1710/11/2009
à sage-...@googlegroups.com
On Tue, Nov 10, 2009 at 4:02 PM, Dr. David Kirkby
<david....@onetel.net> wrote:
> /opt/kirkby/sage-4.2-Solaris-10-SPARC-sun4u-SunOS/local/bin/sage-native-execute:
> xdg-open: not found
>
> Is 'xdg-open' supposed to be included in Sage anywhere, or is the user expected
> to have it on their machine?

Check out

http://portland.freedesktop.org/wiki/

Gonzalo

Dr. David Kirkby

non lue,
10 nov. 2009, 18:24:2510/11/2009
à sage-...@googlegroups.com

Thank you.

That clearly has the source. Are you of the opinion that this should be added to
Sage, like myself?

If so, any ideas where best to put it?

Reading the docs, it says these scrips should go on the end of the path, so if
system versions exists (as they seem to be on most platforms), they are used
instead of the versions in that package. That means creating a new directory,
something like

SAGE_ROOT/local/bin-end

putting those scrips there, and putting that on the end of the path, after

SAGE_ROOT/local/bin

It appears one needs to add all the scripts, as xdg-open depends on another
script, so one can't simply use just xdg-open.


I'm not sure how William feels about adding another package in spkg/standard. I
get the feeling he is not keen, but I'm not sure how to avoid this one, as some
of the scripts assumed in Sage do not exist on Solaris 10.

Dave

Mike Hansen

non lue,
10 nov. 2009, 22:05:1010/11/2009
à sage-...@googlegroups.com
On Wed, Nov 11, 2009 at 6:24 AM, Dr. David Kirkby
<david....@onetel.net> wrote:
> That clearly has the source. Are you of the opinion that this should be added to
> Sage, like myself?

If this isn't standard on Solaris, another options is to just use
something that is (assuming such a thing exists). I'm pretty sure
that the only place where xdg-open is used is in sage.misc.viewer,
which has code to determine what command to use. For example, on OS
X, it uses a wrapper around the "open" command, and on Cygwin, it uses
some Windows-specific code to open up files.

--Mike

William Stein

non lue,
10 nov. 2009, 22:07:1810/11/2009
à sage-...@googlegroups.com

+1 -- Mike's response is *precisely* what I was going to say.

William

Dr. David Kirkby

non lue,
11 nov. 2009, 06:58:2011/11/2009
à sage-...@googlegroups.com
Mike Hansen wrote:
> On Wed, Nov 11, 2009 at 6:24 AM, Dr. David Kirkby
> <david....@onetel.net> wrote:
>> That clearly has the source. Are you of the opinion that this should be added to
>> Sage, like myself?
>
> If this isn't standard on Solaris,

It is not on Solaris 10 at least (SPARC only testes). It is on OpenSolaris (aka
Solaris 11).

> another options is to just use
> something that is (assuming such a thing exists). I'm pretty sure
> that the only place where xdg-open is used is in sage.misc.viewer,
> which has code to determine what command to use. For example, on OS
> X, it uses a wrapper around the "open" command, and on Cygwin, it uses
> some Windows-specific code to open up files.
>
> --Mike

This is the man-page on it.

http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html

I'll look later at seeing we can work around it.

dave

Répondre à tous
Répondre à l'auteur
Transférer
0 nouveau message