Opening docx files from RStudio on Linux

Hello everybody out there using RStudio,

It's a pleasure to write scientific texts involving statistics and graphs with RMarkdown in RStudio, which has become my favorite application for this purpose.

When clicking on a .docx file in the browser in the corner to the bottom right of RStudio, this file would be opened with Word (Microsoft) on Windows.
When doing the same on Linux (Ubuntu 18.04), nothing is happening (although I have LibreOffice installed as the operating system's default application for opening files with the extension .docx.

Is there a way to tell RStudio to start LibreOffice Writer for opening .docx files?

You need to set the Libre as the default application for Ubuntu to open docx files. Search google for ubuntu file association for howtos

That was actually my first idea and I ensured that Libreoffice is the default application for *.docx files. Nonetheless, nothing is happening when I click onto these files. (Opening *.pdf files works very well.)

1 Like

You're right. Didn't work for me either. I tried to find something in the source code, but my Java has rusted shut. My guess is that RStudio just won't do it, but I'll try to get confirmation.

I happen to be on a mac with a recent build. Are the two of you having the same issue on Ubuntu + LibreOffice setups?

If you are, we'd love to get an issue filed so folks can replicate the issue and start diagnosing it.

The IDE team will likely need your system information,

Typical system info needed for IDE issues

#### System Information:
- RStudio Edition: (Desktop or Server)
- RStudio Version: 
- OS Version: 
- R Version: 

#### Also:
<!-- Depending on your issue, the following may be useful /-->
<!-- If a section isn't relevant or you can't collect it just delete that section below /-->
- RStudio diagnostics report: <!--see /-->
- Your `sessionInfo()`:
- RStudio crash report: <!-- /-->
- RStudio application log files: <!-- /-->

@ EconomiCurtis
where are the rstudio crash report and log files?

Just to muddy the waters, I just tried this on my Linux Mint 21 (vanessa), which is based on Ubuntu 22, and the docx file does open in LibreOffice.

1 Like

Of course, you bet,

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.