You are not logged in.

#1 2012-04-28 15:38:02

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Midnight Commander file associations

Hello!

I set (in the file of associations):

default/.odt
  Open=openoffice.org3 %f

Then restart mc and hit Enter on ODT file, nothing happens. Where is a mistake?

Offline

#2 2012-04-28 15:50:12

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: Midnight Commander file associations

Use something like this instead:

regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
   Open=(libreoffice %f &)

:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#3 2012-04-28 17:03:42

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Midnight Commander file associations

Get an error:

/tmp/mc-alex/mcextadg1id: line 2: ooffice: command not found

I can start openoffice.org3 with no file just from CLI though. Maybe this has something to do with $PATH?

Offline

#4 2012-04-28 17:07:50

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: Midnight Commander file associations

Are you using OpenOffice or LibreOffice? I'm using those lines with neither of them (with o3totxt instead) and everything is just fine. I believe when you change your launch command from 'ooffice' to 'loffice' (that's an alias in the official package) you should get what's expected.


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#5 2012-04-28 17:15:15

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Midnight Commander file associations

I believe when you change your launch command from 'ooffice' to 'loffice'

It's OpenOffice and normally I start it with "openoffice.org3". "ooffice" and "loffice" make no change to mc.

Offline

#6 2012-04-28 17:23:43

bohoomil
Banned
Registered: 2010-09-04
Posts: 2,377
Website

Re: Midnight Commander file associations

OK, the last try: have you put the command in brackets, like this

Open=(openoffice.org3 %f &)

I doubt the problem has anything to do with $PATH, as if it had, you weren't able to launch OO from the command line...


:: Registered Linux User No. 223384

:: github
:: infinality-bundle+fonts: good looking fonts made easy

Offline

#7 2012-04-28 19:54:10

Mr. Alex
Member
Registered: 2010-08-26
Posts: 623

Re: Midnight Commander file associations

$ cat ~/.config/mc/mc.ext | tail -n 4

regex/\.(odt|ott|sxw|stw|ods|ots|sxc|stc|odp|otp|sxi|sti|odg|otg|sxd|std|odb|odf|sxm|odm|sxg)$
  Open=(openoffice.org3 %f &)

Offline

Board footer

Powered by FluxBB