
{"id":46635,"date":"2024-05-24T09:52:36","date_gmt":"2024-05-24T09:52:36","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=46635"},"modified":"2025-12-18T15:49:04","modified_gmt":"2025-12-18T15:49:04","slug":"set-up-google-drive-ubuntu-2404","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2024\/05\/set-up-google-drive-ubuntu-2404\/","title":{"rendered":"Set up Google Drive for Local Folder Sync in Ubuntu 24.04"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-46636\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo-700x700.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>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.<\/p>\n<p>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&#8217;s also a graphical app can do the job easily!<\/p>\n<p><!--more--><\/p>\n<h3>Option 1: For GNOME, KDE Plasma, Cinnamon<\/h3>\n<p>Ubuntu with GNOME Desktop, KUbuntu (and Ubuntu Studio) with Plamsa, and Ubuntu Cinnamon have built in option to do the job.<\/p>\n<p>For the 3 desktop environments, simply launch <b>Settings<\/b> (or <b>System Settings<\/b>), then navigate to <b>Online Accounts<\/b> in the left.<\/p>\n<p>Next click Google (<i>KDE needs to first click &#8220;Add New Account&#8221; in bottom right<\/i>) and then &#8220;Sign in&#8221;. Finally, in either pop-up dialog or web browser tab, login your Google Email account and grant permission to access from your Ubuntu Desktop.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-online-account-googledrive.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46637\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-online-account-googledrive-700x493.webp\" alt=\"\" width=\"610\" height=\"430\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-online-account-googledrive-700x493.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-online-account-googledrive-300x211.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-online-account-googledrive-768x540.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-online-account-googledrive.webp 1036w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>When done, open up a File Manager window, and you&#8217;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.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-nautilus.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46639\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-nautilus-700x450.webp\" alt=\"\" width=\"610\" height=\"392\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-nautilus-700x450.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-nautilus-300x193.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-nautilus-768x494.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/google-drive-nautilus.webp 1080w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>And, you can click your account in the &#8220;Online Account&#8221; 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.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-configure-googleaccounts.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46638\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-configure-googleaccounts-700x547.webp\" alt=\"\" width=\"610\" height=\"477\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-configure-googleaccounts-700x547.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-configure-googleaccounts-300x234.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-configure-googleaccounts-768x600.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gnome-configure-googleaccounts.webp 1041w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3>Option 2: For all desktop environments<\/h3>\n<p><b>UPDATE Dec-2025: Celeste discontinued. So I updated this option by using RClone.<\/b><\/p>\n<p><a href=\"https:\/\/github.com\/rclone\/rclone\" target=\"_blank\" rel=\"noopener\">RClone<\/a> is a popular free open-source program to sync files\/folders between local and cloud services. It supports Google Drive and many other providers, including Dropbox, iCloud Drive, MEGA, Onedrive, and more!<\/p>\n<h4>Step 1: Install RClone<\/h4>\n<p>The software is available in Ubuntu universe repository since 18.04.<\/p>\n<p><b>To install it<\/b>, simply open terminal (Ctrl+Alt+T) and run command:<\/p>\n<pre>sudo apt install rclone<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50236\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/apt-rclone-700x383.webp\" alt=\"\" width=\"610\" height=\"334\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/apt-rclone-700x383.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/apt-rclone-300x164.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/apt-rclone.webp 706w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/p>\n<p>If you would like to get the latest version, then download and install the <code>.deb<\/code> package from <a href=\"https:\/\/github.com\/rclone\/rclone\/releases\" target=\"_blank\" rel=\"noopener\">RClone Github releases<\/a> page.<\/p>\n<h4>Step 2: Connect to your Google Drive<\/h4>\n<p>RClone is a command line tool, which however provides a web UI since version 1.49.<\/p>\n<p><b>To launch the web UI<\/b>, open terminal and run command:<\/p>\n<pre>rclone rcd --rc-web-gui<\/pre>\n<p>It will start the web UI server, listening on 127.0.0.1:5572, and open it automatically with your default web-browser.<\/p>\n<p><b>Next<\/b>, go to &#8220;Configs&#8221; in left pane of the web page, and click create new remote:<\/p>\n<ul>\n<li>Input whatever name as you want.<\/li>\n<li>Select &#8220;Google Drive&#8221; service.<\/li>\n<li><em>Leave all others blank<\/em> in next pages, or input your own Application Client ID and configure advanced options if you want.<\/li>\n<\/ul>\n<p>In my case, I created a config named <b>Ubuntuhandbook<\/b>, which will be used in next steps.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50237\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote-700x416.webp\" alt=\"\" width=\"610\" height=\"363\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote-700x416.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote-300x178.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote-768x457.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote-1320x785.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-newremote.webp 1386w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h4>Step 3: Map your Google Drive into local folder<\/h4>\n<p><b>(Mount temporarily)<\/b>: Also in the web UI, navigate to &#8220;Mounts&#8221; and click &#8220;Create new mount&#8221;.<\/p>\n<p>Next, you may click choose the remote name &#8220;Ubuntuhandbook&#8221; in my case, then click Open, and input the PATH to the local folder to map to. Here:<\/p>\n<ul>\n<li><code>Ubuntuhandbook<\/code> is the remote config name created in last step.<\/li>\n<li><code>\/home\/ji\/GoogleDrive<\/code> is the local folder (replace ji with your username) in my Ubuntu. Create first if it does not exist!<\/li>\n<\/ul>\n<p>Then, configure mount options as you want, though default options are usually OK. Finally scroll down and click &#8220;Create&#8221; button to mount.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50238\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount-700x509.webp\" alt=\"\" width=\"610\" height=\"444\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount-700x509.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount-300x218.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount-768x559.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount-1320x960.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/rclone-mount.webp 1386w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>If everything goes well, you should be able to access your Google Drive files from that local folder in file manager.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50239\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced-700x421.webp\" alt=\"\" width=\"610\" height=\"367\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced-700x421.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced-300x180.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced-768x462.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced-1320x794.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/gogledrive-synced.webp 1405w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p><b>Auto Mount Google Drive at Login<\/b><\/p>\n<p>As mentioned, mount with the web UI only works temporarily. It will un-mount automatically once you stop the web-server (the <code>rclone rcd --rc-web-gui<\/code> command).<\/p>\n<p><b>To auto-mount Google Drive at login<\/b>, do following steps to create an auto-start app:<\/p>\n<ul>\n<li>Open file manager, and navigate to Home -&gt; .config (press Ctrl+H to view\/hide) -&gt; autostart.<\/li>\n<li>Create a new file in that folder, and name to <code>xxx.desktop<\/code>.<\/li>\n<li>Click open that file with text editor.<\/li>\n<li>Finally, add following content and save:\n<pre>[Desktop Entry]\r\nType=Application\r\nExec=sh -c \"sleep 15; mkdir -p $HOME\/GoogleDrive; rclone mount Ubuntuhandbook: $HOME\/GoogleDrive --config=$HOME\/.config\/rclone\/rclone.conf\"\r\nTerminal=false\r\nName=RClone Mount\r\nComment=Mount Google Drive through RClone<\/pre>\n<\/li>\n<\/ul>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/automount-rclone.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-50240\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/automount-rclone-700x454.webp\" alt=\"\" width=\"610\" height=\"396\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/automount-rclone-700x454.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/automount-rclone-300x194.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/automount-rclone-768x498.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/automount-rclone.webp 1159w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>Here, you need to replace the following commands accordingly:<\/p>\n<pre>sleep 15; mkdir -p $HOME\/GoogleDrive; rclone mount Ubuntuhandbook: $HOME\/GoogleDrive --config=$HOME\/.config\/rclone\/rclone.conf<\/pre>\n<ul>\n<li><code>sleep 15<\/code> &#8211; add 15 seconds delay.<\/li>\n<li><code>mkdir -p $HOME\/GoogleDrive<\/code> &#8211; create &#8216;GoogleDrive&#8217; folder in user home if NOT exist.<\/li>\n<li><code>Ubuntuhandbook:<\/code> the root of remote name (replace with yours). For sub-folder, e.g, 123, use <code>Ubuntuhandbook:123<\/code>.<\/li>\n<li><code>$HOME\/.config\/rclone\/rclone.conf<\/code> &#8211; auto-created when you set up the remote config via web UI.<\/li>\n<\/ul>\n<p>And, it&#8217;s better to run the command to see if it works before saving the <code>.desktop<\/code> file.<\/p>\n<h3>Disconnect Google Drive<\/h3>\n<p>Even after removed Google Account from &#8220;Online Account&#8221; or uninstalled Celeste, the apps (clients) still are connected in the server side.<\/p>\n<p>For security reason, you may visit Google Drive settings web page (<a href=\"https:\/\/drive.google.com\/drive\/settings\" target=\"_blank\" rel=\"noopener\">https:\/\/drive.google.com\/drive\/settings<\/a>), navigate to &#8220;Manage apps&#8221;, then dis-connect GNOME and\/or Celeste from the app list.<\/p>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/disconnect-drive.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-46644\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/disconnect-drive-700x267.webp\" alt=\"\" width=\"610\" height=\"233\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/disconnect-drive-700x267.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/disconnect-drive-300x114.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/disconnect-drive-768x293.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/05\/disconnect-drive.webp 1125w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<h3>In Addition<\/h3>\n<p>As far as I know, there&#8217;s also a free open-source project called <a href=\"https:\/\/github.com\/astrada\/google-drive-ocamlfuse\" target=\"_blank\" rel=\"noopener\">google-drive-ocamlfuse<\/a>, which can also mount Google Drive in Linux Desktop. However, the authentication process so far is NOT friendly for beginners.<\/p>","protected":false},"excerpt":{"rendered":"<p>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&#8217;s also a graphical [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":46636,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[681,1070],"class_list":["post-46635","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","tag-cloud-file-sync","tag-file-sharing"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/46635","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=46635"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/46635\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/46636"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=46635"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=46635"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=46635"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}