Writing articles sometimes means a lot of research and note taking, so when your ideas are starting to get together and create a good informative article, you want to have all your hard work at your fingertips, no matter the device you use.
For writing articles I prefer to use the default Microsoft Word as it saves files in docx format and this means a better compatibility across devices. I also like to synchronize them with Google Drive to have the files on my phone, my laptop or even on my tablet. Lately I moved from Windows to Linux Mint as my daily driver so I had to find the best way to continue my workflow from Windows OS to Linux.
As I was being used to work with Microsoft Word and Google Drive app, when I started using the Linux ecosystem I knew I had an alternative to Microsoft Office and that was called LibreOffice. I also knew that Gnome Online Accounts App was an alternative to Google Drive App, but I never tested it before and I had no idea how it worked or even if it did.
After I set up and configured my Linux Mint, all was left for me to do, was to set up my workflow in a way that I could start working on a device and continue it on another one, like my phone, my tablet or event another Windows PC.
Configure LibreOffice to save docx files by default
When I saved the article, I noticed the default file format for Writer was .odt, the default LibreOffice format for text documents. I did a quick research on the internet and I found that you can change that in the settings and set LibreOffice Writer to save files in .docx (Microsoft Word file format) by default.
To do that you have to follow these steps:
- Access Tools form LibreOffice top menu and choose Options > Load/Save > General
- At Default File Format and ODF Settings look for Document type (second option) and choose Text document if it is not already selected by default as it should be
- At Always save as option, change ODF Text Document (*.odt) to Word 2007-365 (*.docx) as the file format and then click on the Apply button. This way LibreOffice will save al the new text documents as .docx from now on.
Configure Gnome Online Accounts to sync with Google Drive
Note: I have tried the following on 3 different Linux distributions but Linux Mint was the only distro that actually worked well with Gnome Online Accounts. The other two distros I tried were Ubuntu and MX Linux. On both of these the Gnome Online Accounts froze frequently or gave errors when opening the .docx files with Libre Office Writer.
To configure Gnome Online Accounts, first you have to open it. In Linux Mint it is called Online Accounts and you can open the app form the start menu where it is nested under the Preferences menu. To find it easily you can use the Search Menu function in Linux Mint and simply type Online Accounts in the Search Box from the Start Menu. Another way you can access Online Accounts in Linux Mint is through the System Settings that you can also access through the Start Menu in Linux Mint.
Once you open Online Accounts in Linux Mint, choose to add a Google Account. A pop up window will open and will ask you to login. Fill in your Google account email, click next and fill in your password. In the next step you must allow GNOME to access your Google account, so to do that scroll at the bottom and just click the Allow button. That’s it, the next windows asks you what services you want to use with your Google account, so if you are using only Google Drive then you should only check Files. For example, if you want to sync Calendar too, then you should check the Calendar service also.
To access your Google Drive account after you logged on Online Accounts, simply open the default file manager form Linux Mint, witch is Nemo by the way, but it is called Files in Linux Mint. You`ll notice in the left panel that there is a new mounted location and it has your google account name. Click on it and all your files from Google Drive will appear there.
Docx files are saved as archive on Google Drive
Now that we set up and accessed Google Drive on Linux Mint, all we have to do is to get to work and write some articles. Open LibreOffice Writer and start writing on your project. Easy, right? Well, no, not that easy, although the writing part is going well, the saving documents to Google Drive, is not what I expected.
Let me explain this so you can understand better what problem I encountered when I wanted to save a .docx file created with LibreOffice Writer in Google Drive using the Online Accouns. So after doing some writing on a new article, I wanted to save it directly to the new mounted Google Drive. I was able to save the document with the .docx extension but when I checked the file on Google Drive, it was actually saved as an archive although it had the .docx extension. On both my laptop and on the Google Drive in the web browser, the document was actually a archive not a text document. The workaround to this is to first create the .docx file on the Google Drive and later to edit it. How can you do that in Linux Mint you may ask? Well you can do that by the old fashion way like you used to create Word documents in Windows just by right clicking on your desktop on inside any folder and choosing New Word Document from the Context Menu.
How to add new options to the Create New Document from the context menu in Linux Mint
Creating new options for the Create New Document context menu in Linux Mint is easy. All you have to do is to create an empty document, save it in whatever format you need it and put it in the Templates folder that is located in the Home directory. It is as simple as that. So, if you need to create .docx files as I do, just open LibreOffice Writer, create a new document and save it in the Templates folder with the name New Word Document and with the .docx extension. Now when you perform a right click on your desktop or inside any folder, you’ll have the option to create a new docx document.
So, going back to where we started, to create docx documents in your mounted Google Drive account on Linux Mint, simply navigate to the Google Drive path and choose the folder where you want to create the new document. Right click inside that folder and choose Create New Document and from the extended menu choose New Word Document. Now that your document is created, it is no longer saved as an archive. Name the document just the way you want, open it with LibreOffice Writer and start writing your content.
Creating .docx documents this way in your Google Drive gives you the flexibility to continue your workflow from any device you want. If you left your Linux laptop at work but you are at home working on your Windows PC, you can continue your work on your articles as .docx files are fully compatible with Microsoft Word and even with LibreOffice Writer for Windows, in case you don’t have a Microsoft 365 subscription. Those types of documents are fully compatible with Google Docs, so you can edit them on your phone or even from your browser too.