Google Drive Integration in KDE Plasma

Probably you have older authorization - for new ones gdrive won’t work, because was removed because Google is Google (and bug link if someone want read) Remove app from https://myaccount.google.com and try again - it won’t work. Or create connection with new account.

But anyway fix for kio-drive is easy and simple (for someone who at least once touched Google Cloud), because you can override it with your own auth app and scope permissions:

  1. First go to https://console.cloud.google.com/apis and create OAuth client with gdrive permissions (and other if you need and want)
  2. Copy current config to user space:
mkdir -p ~/.local/share/accounts/providers
cp /usr/share/accounts/providers/kde/google.provider ~/.local/share/accounts/providers/google.provider
  1. Edit ~/.local/share/accounts/providers/google.provider, simply add gdrive scope 'https://www.googleapis.com/auth/drive' and replace ClientID and ClientSecret with those received from step 1.

Here is more detailed instruction how to do this :wink: How to make Google Drive work for you (for a while at least) - Tips and Tricks - KDE Discuss

3 Likes

Where is the GDrive directory? I am denied access to gdrive:/Google/ in Dolphin.

It’s not an actual directory. It’s a pseudo-filesystem.

It looks like a directory — or folder, if you will — from within dolphin, but in reality, it’s actually a protocol, rather than a directory, similar to mtp:, (s)ftp:, fish:, and the likes.

2 Likes

So using the guide at How to make Google Drive work for you (for a while at least) - Tips and Tricks - KDE Discuss I have access to GDrive at least… though not for public sharing just yet.

though I still can’t share from Spectacle’s share menu… maybe a project for another day.

2 Likes

I rarely use it, however I setup kio-gdrive possibly a year ago, and it still seems to be working as expected.

Just a few months ago I recall someone having some difficulty setting it up on their system, but it was more to do with the change in Google authentication policies.

Yes, there was indeed an issue with that due to Google changing its authentication policy, but this was longer than a few months ago. It was actually still during the lifetime of Plasma 5.

However, that issue was fixed by KDE upstream, and — at least for myself — it has always worked in Plasma 6.

One caveat, though: it does not support overwriting an existing file.

When you upload something to Google Drive via a browser and a file with the same name already exists in the target folder, then you get a popup asking you whether to overwrite the existing file or whether to keep it as an older version. With dolphin, it’ll always retain the previous version, and you don’t get any notification asking you whether you would want to replace the older copy.