Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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

xdg-mime default libreoffice-writer.desktop "application/vnd.oasis.opendocument.text"
share|improve this answer
    
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

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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