You are not logged in.

#1 2010-11-04 17:27:25

bunburya
Member
From: Dublin, Ireland
Registered: 2010-09-06
Posts: 64

LibreOffice can't open files with spaces in the name

Hi, so I recently installed LibreOffice (from extra) over go-OO. I know the site says it's not for production use but I have heard good things about the stability of the current version so I decided to see if it was in a usable state. In general things are going great, but I do have the problem mentioned in the thread title. The program has trouble parsing the spaces, and instead I am trying to open each space-delimited section of the filename as a separate file. Trying to open "My File.odt", for example, will simply return two error messages, one about "path/to/current/directory/My" not existing, and another about "path/to/current/directory/File.odt" not existing. I can't seem to get around this behaviour and, surprisingly, I can't find anything on it by Googling.

I know that LO is in beta and this may just be a bug that is being worked on, but since I can only find one reference to it on the net I thought that maybe others were not having this problem or had found a way around it.  Can anyone provide any insight? Cheers!

Offline

#2 2010-11-04 17:36:09

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: LibreOffice can't open files with spaces in the name

I don't know much (well, anything for that matter) about LibreOffice. tongue However, I can ask this...
Are you attempting to open the file via the command line or from inside of the actual program?

Offline

#3 2010-11-04 17:41:56

bunburya
Member
From: Dublin, Ireland
Registered: 2010-09-06
Posts: 64

Re: LibreOffice can't open files with spaces in the name

Thanks for replying. I was trying to open from the command line, and by simply clicking on the document's icon (which is much the same thing I think?), and tried escaping the spaces but to no avail. Having tried to open the file from within LO, that does seem to work. I still wonder what is causing the problem though, and how I might get it to work from the command line.

Offline

#4 2010-11-04 17:45:36

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: LibreOffice can't open files with spaces in the name

libreoffice "test test test.odt"

  works here

Offline

#5 2010-11-04 17:51:21

bunburya
Member
From: Dublin, Ireland
Registered: 2010-09-06
Posts: 64

Re: LibreOffice can't open files with spaces in the name

hokasch wrote:

libreoffice "test test test.odt"

  works here

Very interesting, as the same command fails here. Thanks for trying it out.

EDIT: For extra info (though you might have guessed), other applications do not have this problem, so gedit "text text text.txt" works fine.

Last edited by bunburya (2010-11-04 17:55:40)

Offline

#6 2010-11-04 18:10:42

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: LibreOffice can't open files with spaces in the name

Odd. Sorry, no idea really.
Do you have the latest libreoffice from extra?

pacman -Ss libreoffice
extra/libreoffice 3.2.99.2-2 [installed]
    a productivity suite that is compatible with other major office suites

Offline

#7 2010-11-04 18:30:40

bunburya
Member
From: Dublin, Ireland
Registered: 2010-09-06
Posts: 64

Re: LibreOffice can't open files with spaces in the name

hokasch wrote:

Odd. Sorry, no idea really.
Do you have the latest libreoffice from extra?

pacman -Ss libreoffice
extra/libreoffice 3.2.99.2-2 [installed]
    a productivity suite that is compatible with other major office suites

Yup that's the one. Very odd isn't it! Thanks though. I might drop by the LO irc and see if they know what's going on.

Offline

#8 2010-11-04 19:02:07

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: LibreOffice can't open files with spaces in the name

http://chakra-project.org/bbs/viewtopic.php?id=3263
Someone else experiencing this issue I see. wink

Offline

#9 2010-11-04 19:14:19

hokasch
Member
Registered: 2007-09-23
Posts: 1,461

Re: LibreOffice can't open files with spaces in the name

actually, here is another one:
https://bbs.archlinux.org/viewtopic.php?pid=691803

edit: lol, upon actually reading it, not very helpful in your case I guess.. but you could "cat /usr/bin/libreoffice" to double-check.

Last edited by hokasch (2010-11-04 19:16:40)

Offline

#10 2010-11-04 21:55:58

bubblewrap456
Member
Registered: 2010-10-19
Posts: 64

Re: LibreOffice can't open files with spaces in the name

n/a

Last edited by bubblewrap456 (2014-10-27 11:13:07)

Offline

#11 2010-11-04 22:26:42

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: LibreOffice can't open files with spaces in the name

I have just installed libreoffice and having the same issue. However I am able to open such files in Writer Open file dialog.

Offline

#12 2010-11-05 00:34:10

celticmusicguy
Member
From: Zuni, VA, USA
Registered: 2008-07-24
Posts: 24

Re: LibreOffice can't open files with spaces in the name

I've noticed the same problem since switching over to LibreOffice. There appears to be something going on in the /usr/lib/ooo-3.3/program/soffice file that's causing this problem - if you replace it with the equivalent file from OpenOffice (/usr/lib/openoffice/program/soffice) then it seems to fix this problem, although I'm not sure why. And, of course, that may break something else I don't know about.

A bug report for this has been filed: https://bugs.archlinux.org/task/21425

Perhaps someone more knowledgeable than me can dig into this and come up with a better or more complete answer.


Solutions nearly always come from the direction you least expect, which means there's no point trying to look in that direction because it won't be coming from there.
-Douglas Adams

Offline

#13 2010-11-05 04:19:47

vimex
Member
Registered: 2009-12-20
Posts: 13

Re: LibreOffice can't open files with spaces in the name

comment these lines in /usr/lib/ooo-3.3/program/soffice
the $* has some problem, but I do not know how to correct this...

# Setup our app as oosplash, but try to avoid executing pagein,
# and other expensive environment setup pieces wherever possible
# for a second started office
#if [ "$sd_binary" = "soffice.bin" -a -x "$sd_prog/oosplash.bin" ] && [ "$no_oosplash" != "y" ] ; then
#    sd_binary="oosplash.bin"

#    export QSTART_CHECK_ONLY=1
#    if "$sd_prog/$sd_binary" $*; then
#   exit 0
#    fi
#    unset QSTART_CHECK_ONLY
#fi

Offline

#14 2010-11-05 05:39:20

bunburya
Member
From: Dublin, Ireland
Registered: 2010-09-06
Posts: 64

Re: LibreOffice can't open files with spaces in the name

vimex wrote:

comment these lines in /usr/lib/ooo-3.3/program/soffice
the $* has some problem, but I do not know how to correct this...

# Setup our app as oosplash, but try to avoid executing pagein,
# and other expensive environment setup pieces wherever possible
# for a second started office
#if [ "$sd_binary" = "soffice.bin" -a -x "$sd_prog/oosplash.bin" ] && [ "$no_oosplash" != "y" ] ; then
#    sd_binary="oosplash.bin"

#    export QSTART_CHECK_ONLY=1
#    if "$sd_prog/$sd_binary" $*; then
#   exit 0
#    fi
#    unset QSTART_CHECK_ONLY
#fi

I noticed that commenting out that code allows LibreOffice to open spaced filenames, but seems to slightly increase startup time.

I tried replacing $* with "$*", and opening from the command line seems to work even for files with spaced names, with the faster startup time too. The only problem is that now LO does not work at all by clicking; only from command line.

Offline

#15 2010-11-05 09:11:09

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: LibreOffice can't open files with spaces in the name

After commenting out these lines, from nautilus I am able to open files with spaces in the name/path.

Offline

#16 2010-11-11 16:47:16

AugustePop
Member
Registered: 2010-04-27
Posts: 95

Re: LibreOffice can't open files with spaces in the name

i think replacing $* with "$@" is more appropriate. in this way, we solve the space issue and retain the ability to open multiple files.

Offline

#17 2010-11-11 16:52:30

siriusb
Member
From: Hungary
Registered: 2010-01-01
Posts: 422

Re: LibreOffice can't open files with spaces in the name

AugustePop,
Thank you, it seems it works.

Offline

#18 2010-11-12 23:46:34

Cosmin
Member
Registered: 2008-10-06
Posts: 248

Re: LibreOffice can't open files with spaces in the name

AugustePop wrote:

i think replacing $* with "$@" is more appropriate. in this way, we solve the space issue and retain the ability to open multiple files.

Thanks big_smile

Offline

#19 2010-11-13 00:22:50

celticmusicguy
Member
From: Zuni, VA, USA
Registered: 2008-07-24
Posts: 24

Re: LibreOffice can't open files with spaces in the name

Works here as well...confirmed on two separate Arch installations. Headed over to update the bug report on this issue now....


Solutions nearly always come from the direction you least expect, which means there's no point trying to look in that direction because it won't be coming from there.
-Douglas Adams

Offline

Board footer

Powered by FluxBB