Skip to content

Instantly share code, notes, and snippets.

@Amm1rr
Last active October 15, 2026 05:41
Show Gist options
  • Select an option

  • Save Amm1rr/9fe79a845d0cee5f32b3999af1659752 to your computer and use it in GitHub Desktop.

Select an option

Save Amm1rr/9fe79a845d0cee5f32b3999af1659752 to your computer and use it in GitHub Desktop.
Fix Google Account and Drive Integration on KDE

Fix Google Account and Drive Integration on KDE

Easily resolve Google Account and Drive integration issues on KDE with this simple script.


Quick Fix

  1. Download the script:
    The script fix_kde_google_integration.sh is located alongside this README. Download it to your system.

  2. Run the script:

    chmod +x fix_kde_google_integration.sh
    ./fix_kde_google_integration.sh
  3. Restart the KDE service (Optional):

    kquitapp6 kded6

Done! Your Google Account and Drive integration should now work seamlessly.


๐Ÿ›  What It Fixes

  1. "This browser or app is not secure" error

    • Cause: The fake-user-agent.patch in the signon-ui package disrupts Googleโ€™s authentication.
  2. "This app is blocked" error

    • Occurs when accessing Google Drive due to misconfigurations in KDE's settings.

The script updates your KDE configuration files and resolves both issues automatically.


๐Ÿ“‹ Notes

  • Tested on Manjaro, Arch, KDE Neon, Fedora, and OpenSUSE.
  • Creates a backup of original files for safety.
  • Reapplication may be needed after KDE updates.

References

This fix is based on Bruno_Goncalves's contribution on the KDE Forum Discussion.

#!/bin/bash
# Script to fix Google Drive integration issue by updating the google.provider file in KDE 6
# Define file path
PROVIDER_FILE="/usr/share/accounts/providers/kde/google.provider"
# Backup the original file
if [ -f "$PROVIDER_FILE" ]; then
echo "Backing up the original file..."
sudo cp "$PROVIDER_FILE" "${PROVIDER_FILE}.backup"
echo "Backup created at ${PROVIDER_FILE}.backup"
else
echo "Error: google.provider file not found at $PROVIDER_FILE. Exiting."
exit 1
fi
# Write the updated configuration to the file
echo "Updating the google.provider file..."
sudo tee "$PROVIDER_FILE" >/dev/null <<EOL
<?xml version="1.0" encoding="UTF-8"?>
<provider id="google">
<name>Google</name>
<description>GNOME-ID, Google Drive and YouTube</description>
<icon>im-google</icon>
<translations>kaccounts-providers</translations>
<domains>.*google\.com</domains>
<template>
<group name="auth">
<setting name="method">oauth2</setting>
<setting name="mechanism">web_server</setting>
<group name="oauth2">
<group name="web_server">
<setting name="Host">accounts.google.com</setting>
<setting name="AuthPath">o/oauth2/auth?access_type=offline</setting>
<setting name="TokenPath">o/oauth2/token</setting>
<setting name="RedirectUri">http://localhost/oauth2callback</setting>
<setting name="ResponseType">code</setting>
<setting type="as" name="Scope">[
'https://www.googleapis.com/auth/userinfo.email',
'https://www.googleapis.com/auth/userinfo.profile',
'https://www.googleapis.com/auth/calendar',
'https://www.googleapis.com/auth/tasks',
'https://www.googleapis.com/auth/drive'
]</setting>
<setting type="as" name="AllowedSchemes">['https']</setting>
<setting name="ClientId">44438659992-7kgjeitenc16ssihbtdjbgguch7ju55s.apps.googleusercontent.com</setting>
<setting name="ClientSecret">-gMLuQyDiI0XrQS_vx_mhuYF</setting>
<setting type="b" name="ForceClientAuthViaRequestBody">true</setting>
</group>
</group>
</group>
</template>
</provider>
EOL
if [ $? -eq 0 ]; then
echo "google.provider file updated successfully."
else
echo "Error: Failed to update the google.provider file."
exit 1
fi
# Restart the system or relevant services to apply changes
echo "Restarting the account management service..."
kquitapp6 kded6
echo "Done. Please re-add your Google account to verify the fix."
@bmdd73-fr

Copy link
Copy Markdown

Hello,
I applied the fix in Debian 13, KDE plasma 6.3.6, and now it works.
The message error was "Download cancelled" when I tried to access to the network drive.
Thanks for your contribution.
B.D.

@Korwith

Korwith commented Dec 3, 2025

Copy link
Copy Markdown

This fix worked perfectly for me on Kubuntu 25.10.
Thank you so much.

@theG33K

theG33K commented Jan 7, 2026

Copy link
Copy Markdown

Worked for me, thank you so much for this!

@sandroninoe-hue

Copy link
Copy Markdown

Works perfect for Fedora 43.
Thank you so much.

@bcrisciotti-beep

Copy link
Copy Markdown

Great. this fixed gdrive access on opensuse 16, kde. thank you

@hgallegosj

Copy link
Copy Markdown

Neat! Works perfectly on Fedora 43. Thanks, I can access GD from Dolphin now

@acpessanha

Copy link
Copy Markdown

The ID was blocked by Google! This workaround doesn't work anymore! Jรก era, deu ruim!

@AndresReyesDev

Copy link
Copy Markdown

Thank you! Working perfect on Fedora 43

@MicheleGenchi

Copy link
Copy Markdown

don't work for me,
this is the error "Access denied to gdrive:/google21/Shared Drives."
I have also generated my clientid e clientsecret; but don't work item

I think to not have any solutions

@varijg

varijg commented May 1, 2026

Copy link
Copy Markdown

this looked promising for me on plasma(cachyos)

i applied it and readded my google account, it went from dolphin saying unable to access, to showing me all the files and shared drives, however i couldn't copy a single thing off the drive to my local system, it would download the entire file, stick for a few and then error asking me to retry. i ended up using rclone and manually configuring the shared drives i needed... same process opening browser and authorizing scope it was just a lot of tui config vs a nice gui experience like kde

@engix21

engix21 commented May 16, 2026

Copy link
Copy Markdown

it works on CachyOs. Thanks!

@MarutanF

Copy link
Copy Markdown

It works on Kubuntu 26.04. Thanks

@fernandezsidan

Copy link
Copy Markdown

It works on Fedora 44. Thanks!

@MosaAmran11

Copy link
Copy Markdown

It works on Fedora 44 KDE. Thanks a bunch!

@totfit

totfit commented Jun 20, 2026

Copy link
Copy Markdown

Wow, thanks for this. Worked perfectly with Debian 13 Plasma. It was frustrating prior.

@jensb

jensb commented Aug 14, 2026

Copy link
Copy Markdown

Unfortunately, not working any more on KDE Plasma 6.7.3 as of 2026-08-14.
Google replies with "This browser may not be secure" again, even after restarting KDE, when attempting to add a GDrive account.
Any ideas? ๐Ÿ™

@vbn-uevora

Copy link
Copy Markdown

I can confirm that it's working with KDE Plasma 6.7.4.

@theG33K

theG33K commented Aug 26, 2026

Copy link
Copy Markdown

I can confirm that it's working with KDE Plasma 6.7.4 as well.

@lorypelli

Copy link
Copy Markdown

it only lets me create folders and not files from the file manager

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment