I have LibreOffice Writer and OpenOffice Calc installed on my OpenSuSE system. This is arguably not ideal, but before I fully switch to one or the other, I noticed some strange behaviour when calling oocalc file.ods
from the command line.
user@host:~> ooffice -calc
Warning: -calc is deprecated. Use --calc instead.
user@host:~> oocalc
Warning: -calc is deprecated. Use --calc instead.
user@host:~> which oocalc
/usr/bin/oocalc
user@host:~> readlink -f `which oocalc`
/opt/openoffice4/program/scalc
user@host:~> /usr/bin/oocalc
Warning: -calc is deprecated. Use --calc instead.
user@host:~> ls -lth /usr/bin/oo*
lrwxrwxrwx 1 root root 30 Jan 30 17:32 /usr/bin/oocalc -> /opt/openoffice4/program/scalc
-rwxr-xr-x 2 root root 55 Dec 19 18:06 /usr/bin/ooffice
-rwxr-xr-x 2 root root 66 Dec 19 18:06 /usr/bin/oofromtemplate
-rwxr-xr-x 2 root root 60 Dec 19 18:06 /usr/bin/ooweb
-rwxr-xr-x 2 root root 63 Dec 19 18:06 /usr/bin/oowriter
user@host:~> readlink -f `which oocalc`
/opt/openoffice4/program/scalc
user@host:~> /opt/openoffice4/program/scalc
The last of the above commands runs OpenOffice Calc as expected. When oocalc
or ooffice -calc
is executed it prints the deprecation warning and then actually opens LibreOffice writer, as its spreadsheet counterpart isn't installed. My question, though, is how is it possible for oocalc
to resolve correctly to the symbolic link but not follow it, and execute ooffice -calc
instead?
EDIT: The contents of /opt/openoffice4/program/scalc
are as follows:
cmd=$(cd `dirname $0` && pwd)/soffice
exec "$cmd" -calc "$@"
Aucun commentaire:
Enregistrer un commentaire