I am writing a document database using perlTk. Upon double clicking the selected file on my GUI I use xdg-open to use the default application to open the file. I am having some issues opening .odt files (openoffice I think) xdg-open Add_new_user.odt returns the error

gvfs-open: file:///misc/croc_common/computing/notes/Add_new_user.odt: error launching application: Failed to execute child process "openoffice.org3" (No such file or directory)

The command openoffice.org (no 3) on my system will open libreoffice.

When I enter xdg-mime query filetype Add_new_user.odt on the command line I get the following message which I do not understand application/vnd.oasis.opendocument.text

How do I fix this issue? I am using redhat 6.4


Try to re-assign default application for application/vnd.oasis.opendocument.text :

xdg-mime default libreoffice-writer.desktop "application/vnd.oasis.opendocument.text"
  • I get the error xdg-mime: malformed argument 'libreoffice', expected *.desktop. When I add .desktop the error changes to /usr/bin/xdg-mime: line 531: kde-config: command not found; mkdir: cannot create directory ': No such file or directory; /usr/bin/xdg-mime: line 542: /profilerc.new: Permission denied` - I'm using gnome. Prefixing sudo to the command also does not help – moadeep Mar 27 '13 at 11:21
  • It's weird. Try simply to change default file inside your gnome file manager. Or see explainations here – GHugo Mar 27 '13 at 11:55
  • 1
    @ both: There is no such file as libreoffice.desktop on any platform. The launcher is called libreoffice-writer.desktop so setting that as default for .odt files via gvfs-mime set or xdg-mime default should work. – don_crissti Mar 27 '13 at 12:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.