Set up Google Drive for Local Folder Sync in Ubuntu 24.04

Last updated: May 26, 2024 — 1 Comment

This simple tutorial shows how to set up Google Drive, so you can access and sync files between the cloud and local folder in Ubuntu 24.04.

Ubuntu with default GNOME desktop has built-in option to map Google Drive onto local folder. For other desktop environments, such as MATE, XFCE, and Unity, there’s also a graphical app can do the job easily!

Option 1: For GNOME, KDE Plasma, Cinnamon

Ubuntu with GNOME Desktop, KUbuntu (and Ubuntu Studio) with Plamsa, and Ubuntu Cinnamon have built in option to do the job.

For the 3 desktop environments, simply launch Settings (or System Settings), then navigate to Online Accounts in the left.

Next click Google (KDE needs to first click “Add New Account” in bottom right) and then “Sign in”. Finally, in either pop-up dialog or web browser tab, login your Google Email account and grant permission to access from your Ubuntu Desktop.

When done, open up a File Manager window, and you’ll see your email in left pane. By clicking on it, allows you to access your Google Drive files in local folder. And, any files your created/pasted there will get synced into the cloud.

And, you can click your account in the “Online Account” setting page at any time. Where, you can either turn on/off access permission for Mail, Calendar, Contacts, and Files, or remove the Google Account to disable the feature.

Option 2: For all desktop environments

For other desktops without “Online Accounts”, as well as GNOME, Plasma, Cinnamon, there’s a cool graphical app “Celeste” that can help to set up Google Drive for Linux Desktop.

It’s a free open-source application that uses rclone as backend. Not only for syncing files with Google Drive, the app also supports Dropbox, Nextcloud, Owncloud, pCloud, Proton Drive, and WebDAV cloud services.

1. Install Celeste

Celeste is easy to install in Ubuntu through Snap package.

Simply launch App Center (or Ubuntu Software for 22.04 and earlier), then search & install ‘celeste’:

For choice, you may press Ctrl+Alt+T on keyboard to open up a terminal window and run command instead to install the package:

snap install celeste

For other Linux or those who prefer the Flatpak package, the app is also available to install through the Flathub repository. While, Ubuntu users can run the 2 commands below one by one to install the app as Flatpak:

  • First, enable Flatpak support:
    sudo apt install flatpak
  • Then, run command to install the app as Flatpak package:
    flatpak install https://dl.flathub.org/repo/appstream/com.hunterwittenborn.Celeste.flatpakref

    If the app icon is not visible in launcher, try log out and back in.

2. Set up Google Drive via Celeste

After installed the app, launch it from either start menu or Gnome overview depends on your desktop environment. When the app opens, do:

  • select “Google Drive” as Server Type.
  • then type a desired name.
  • Finally, click “Log in” button.

In the pop-up browser window, login your gmail account, grant access permission. If everything’s done successfully, you’ll see something look like “Success! All done. Please go back to rclone“.

After logged in, you’ll see the app window as the screenshot below shows you. There, select your server name in left, then click the “folder” icon in right.

In pop-up dialog, either choose a local folder (I created ‘Google Drive’ manually in my user home) and click “OK” to map all your Google Drive files onto that folder.  Or, under “Remote folder”, you may insert a sub-folder name, thus only sync that individual folder.

When done,  you should see the sync process under “Directories” in app window. Just open file manager and go to that local folder to verify file content!

Tips 1: For Snap package, while selecting “Local folder”, choose your username (in left) in pop-up dialog instead of “Home” for your user home directory.

Tips 2: Skip “The folder content could not be displayed – Operation was cancelled” error pop-up, which is probably a Snap permission issue. It just works in my case.

Tips 3: In app window, you may click the folder under “Directories”, and set to exclude any files you don’t want to sync. In my case, sync hidden files (filename with “.” at beginning) may cause errors.

Uninstall Celeste

If you don’t use the app anymore, launch it and click the folder (or folders you added) then delete it (or them).

Then, uninstall the app by either using App Center (Ubuntu Software) or running command in terminal:

sudo snap remove --purge celeste

If you installed it as Flatpak package, then use this command instead:

flatpak uninstall --delete-data com.hunterwittenborn.Celeste

Disconnect Google Drive

Even after removed Google Account from “Online Account” or uninstalled Celeste, the apps (clients) still are connected in the server side.

For security reason, you may visit Google Drive settings web page (https://drive.google.com/drive/settings), navigate to “Manage apps”, then dis-connect GNOME and/or Celeste from the app list.

In Addition

As far as I know, there’s also a free open-source project called google-drive-ocamlfuse, which can also mount Google Drive in Linux Desktop. However, the authentication process so far is NOT friendly for beginners.

Twitter

I'm a freelance blogger who started using Ubuntu in 2007 and wishes to share my experiences and some useful tips with Ubuntu beginners and lovers. Please comment to let me know if the tutorial is outdated! And, notify me if you find any typo/grammar/language mistakes. English is not my native language. Contact me via [email protected] Buy me a coffee: https://ko-fi.com/ubuntuhandbook1 |

One response to Set up Google Drive for Local Folder Sync in Ubuntu 24.04

  1. thanks, you are the only for this software!

Leave a Reply

Text formatting is available via select HTML.

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> 

*