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
Check out
http://portland.freedesktop.org/wiki/
Gonzalo
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
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
+1 -- Mike's response is *precisely* what I was going to say.
William
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