Tuesday, May 28, 2013

Associating LibreOffice files on Debian Linux

I like a minimalist style. I use Xfce. How do I double-click a LibreOffice Writer file or an OpenOffice.org file and open it in LibreOffice? This is about something called file association, e.g. a .pdf file is opened in an application capable of displaying .pdf files.

Do these things in Terminal:

$ nano /home/nameOfUser/.local/share/applications/mimeapps.list



# remove these lines
# containing application/vnd.oasis.opendocument.text
application/vnd.oasis.opendocument.text=userapp-soffice-P8K0XW.desktop;userapp-soffice-5TTYXW.desktop;

application/vnd.oasis.opendocument.text=userapp-soffice-5TTYXW.desktop

Hold down Ctrl and press x to save the file.

$ update-desktop-database ~/.local/share/applications

Do these things in File Manager:

Open File Manager. Then, right-click a .odt file (a file with .odt at the end of the file name) and select Properties
-> Open With: Other Application
-> Use a custom command

/opt/libreoffice3.6/program/soffice --nologo -o %f

# or

/opt/libreoffice4.0/program/soffice --nologo -o %f

Reference:
http://xfce.10915.n7.nabble.com/How-to-remove-items-from-the-quot-Open-With-quot-menu-in-thunar-td17562.html


No comments: