🧭 **[SOLUTION] Access Your OneDrive Files from Zorin OS 18 Using Nautilus (No Extra Software Needed)**

Can you please explain this further?

in the meantime, rather than clicking on something designed to trigger the browser itself, try opening the browser first and typing in the URL.

Found this:

1. The "Default Reset" Trick

Sometimes the system thinks a browser is set, but the configuration file is empty.

  1. Open Settings (from the Zorin Menu).
  2. Go to Default Applications on the left.
  3. Next to Web, click the dropdown. Even if your browser is already selected, click a different one (like "Web" or "Firefox"), wait a second, and then select your preferred browser again.
  4. This force-writes the configuration to the mimeapps.list file.
2 Likes

Thank you for your reply. The problem was resolved after I followed your advice and also reinstalled GNOME Online Accounts (sudo apt install gnome-online-accounts). Then I restarted, and now it works.

Thank you very much for your help—I really appreciate it. :+1:

1 Like

Great. :slight_smile: Welcome to Zorin and welcome to the forum.

1 Like

If I use Nautilus for OneDrive is there an add-on to get offline access? I need offline files on my laptop, since I may not always be connected to an Internet connection.

Hello Steven:

Nautilus "no extra software" is fine as far as it goes, but is really not that much better than internet only access.
There is an excellent software client for synchronizing files. Are you on 18? If so, see directions below for installing. I generated these using an AI, but have read them over and they should be fine. This is how I installed it on my system.

Zorin OS 18 is based on Ubuntu 24.04 LTS. You must use the repository for that specific Ubuntu version to ensure the abraunegg client functions correctly and receives updates.

1. To add the Repository

Run these commands in your terminal to add the OpenSUSE Build Service (OBS) repository for Ubuntu 24.04:

Add the repository signing key (it is all one line)

wget -qO - https://download.opensuse.org/repositories/home:/abraunegg/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /usr/share/keyrings/onedrive.gpg > /dev/null

Add the repository to your sources (also all one line)

echo 'deb [signed-by=/usr/share/keyrings/onedrive.gpg] https://download.opensuse.org/repositories/home:/abraunegg/xUbuntu_24.04/ /' | sudo tee /etc/apt/sources.list.d/onedrive.list

Update package lists

sudo apt update

2. Install the Client

sudo apt install onedrive

3. Authorization

After installation, authorize the client to access your account:

  1. Run the command: onedrive
  2. The terminal will output a URL. Copy that url link.
  3. Paste it into your browser, log in to Microsoft, and grant the necessary permissions.
  4. You will be redirected to a blank page: copy the entire URL from the browser's address bar.
  5. Paste that URL back into the terminal and press Enter.

4. Running the Service

To sync files in the background, enable and start the systemd service:

systemctl --user enable onedrive
systemctl --user start onedrive

To verify the status of the service at any time, use:

systemctl --user status onedrive

If you need to change your configuration (e.g., to sync only specific folders), edit the configuration file located at ~/.config/onedrive/config. Any changes made there require a restart of the service (systemctl --user restart onedrive).

Your system will then auto-start onedrive when you start the computer and synchronize files in the background.

1 Like

Hey @wsmather , thanks for the guide, but I could not authorize onedrive and make it work.

Current behavior

I received the error below when pasting back the url into the terminal (used ctrl+shift+v, double checked and the string is 100% the same as in browser):

ERROR: Microsoft OneDrive API returned an error with the following message:
Error Message: HTTP request returned status code 400 ()
Error Reason: AADSTS70000: The provided value for the 'code' parameter is not valid. Trace ID: 4286d7ce-48a5-4a2c-b149-6e1a72e30500 Correlation ID: a2ad7bbf-dc29-47d5-ab87-01f000c5cd10 Timestamp: 2026-05-06 18:06:55Z

Application has not been successfully authorised. Please check your URI response entry and try again.

also when running systemctl --user status onedrive, i get

× onedrive.service - OneDrive Free Client
Loaded: loaded (/usr/lib/systemd/user/onedrive.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Wed 2026-05-06 14:49:16 -03; 18min ago
Duration: 844ms
Docs: GitHub - abraunegg/onedrive: OneDrive Client for Linux · GitHub
Process: 30884 ExecStart=/usr/bin/onedrive --monitor (code=exited, status=3)
Main PID: 30884 (code=exited, status=3)
CPU: 156ms

mai 06 14:49:16 Galdx-Nitro onedrive[30884]: WARNING: Your onedrive client version is now obsolete and unsupported. Please up>
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Current Application Version: 2.4.25
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Version Available: 2.5.10
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Configuring Global Azure AD Endpoints
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Authorize this app visiting:
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Sign in to your account>
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Enter the response uri: Invalid response uri entered
mai 06 14:49:16 Galdx-Nitro onedrive[30884]: Could not initialize the OneDrive API
mai 06 14:49:16 Galdx-Nitro systemd[1704]: onedrive.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED
mai 06 14:49:16 Galdx-Nitro systemd[1704]: onedrive.service: Failed with result 'exit-code'.

Additional Context

Before trying your method, I had linked my onedrive family account successfully with the native integration in Zorin OS 18.1 Core. I logged out and then followed your tutorial.

Desired behavior

My end goal is to transition from win11 to linux and for that I need to ensure that some apps that rely on 2-sync with onedrive work perfectly, e.g. obsidian.

My obsidian vault is in my onedrive account, but i tested the native integration in zorin and it took forever to load my data and plugins from onedrive).

This was the reason I tried your approach. Could you please advise on how to solve this issue, so that it can work?

Thanks in advance!

Hey Galdx, welcome!

I can't advise you on your Obsidian situation, but I can try to help with the abraunegg app authorization.

I ran the error message, and it is most likely that the link was not copied correctly the first time. (Happened to me the first time I tried it.)

Here's some next steps (generated with help if AI Gemini. )


The error message AADSTS70000: The provided value for the 'code' parameter is not valid confirms exactly what we suspected: the authentication link between your Linux machine and Microsoft has broken.

This specific error occurs when the authorization code (the URL you paste into the terminal) is either expired, has already been used, or was copied incorrectly.


Why this happened

When you authenticate the onedrive client, the process follows the OAuth 2.0 flow. Microsoft gives you a temporary "authorization code" via a URL. That code is only valid for a very short window (usually 5–10 minutes) and can only be used once.

How to Fix It (The Clean Slate Method)

Since the current "code" is invalid, you need to trigger a fresh login request. Follow these steps exactly:

  1. Stop any hanging processes: systemctl --user stop onedrive
  2. Trigger a new authentication login: Run this command to force the client to ask for a new link: onedrive --reauth
  3. The "The Copy-Paste" Critical Step:
  • The terminal will print a long URL. Right-click and copy it.
  • Paste it into your web browser and log in to your Microsoft account.
  • After logging in, your browser will go to a blank white page.
  • Copy the URL of that blank page from the browser's address bar.
  • Go back to your terminal, paste that URL, and hit Enter.
  1. Test the Sync: Before turning the background service back on, make sure it works manually: onedrive --synchronize
  2. Restart the background monitor: If the sync finishes without errors, restart the service: systemctl --user start onedrive

Troubleshooting the Copy-Paste

If you do this and get the same error again, check for these two common pitfalls:

  • Browser Extensions: Sometimes "Privacy" or "URL Cleaning" extensions strip parameters from the URL before you can copy it. Try using an Incognito/Private window.
  • Accidental Double-Paste: Ensure you aren't accidentally pasting the URL twice or including a space at the end when pasting into the terminal.

Did the onedrive --reauth command allow you to reach the blank page successfully?

i followed this tutorial here and noticed the url changed for steps 1.1 and 1.2:

new command:

wget -qO - https://download.opensuse.org/repositories/**home:/npreining:/**debian-ubuntu-onedrive/xUbuntu_24.04/Release.key | gpg --dearmor | sudo tee /usr/share/keyrings/obs-onedrive.gpg > /dev/null

after that i followed your info from steps 2, but it recommends appending --sync or --monitor to proceed. i proceeded with onedrive --monitor, as it seems wiser per this source: onedrive/docs/known-issues.md at master · abraunegg/onedrive · GitHub )

but i could not proceed, as it hangs "fetching files" forever.

then i used your "how to fix" flow and now it authorized.
instead of onedrive --synchronize , i used onedrive --sync ; because "--synchronize" was deprecated

i suspect that it was something related with the first auth that i logged in native zorin that broke the auth afterwards.

end of story

i was able to make onedrive to synchronize, but i stopped it when i saw that i would need more space than what i have in ssd for my cloud access.

my goal was to have a function similar to the one we have on windows, where you can use files offline, but from time to time you can clear cache and free storage in the device (without restricting per folder the sync).

so, i could not accomplish that, unfortunately, but thanks for the assistance!

1 Like

just adding to this topic, below you'll find a tutorial to reproduce the configuration i did locally for my future reference and also to try to help other people like me, that:

    1. DO NOT want to download every single file again by using Nautilus Onedrive Native Integration.
    1. DO NOT want to download all data from onedrive to the pc using abraunegg onedrive client with command onedrive --sync.
    1. DO want to have offline cache functionality similar to the one that is native to windows.

Context

Before this configuration, I was using nautilus native onedrive integration. It downloaded all data for obsidian at first boot (~2min) and then it downloaded again every new file i open when navigating within obsidian (painfully slow, unusable).

Now with rclone configured, it downloads the files once at boot, keeps data in cache and loads instantly when navigating within obsidian or within onedrive folder in nautilus.

Tutorial

1. Install & Initial Cleanup

Ensure the necessary tools are installed and any "ghost" folders are removed.

Install rclone and the FUSE driver

sudo apt update && sudo apt install rclone fuse3 -y

Clear any zombie processes and force unmount just in case

pkill -9 rclone
fusermount -u ~/OneDrive

Remove the folder entirely

rm -rf ~/OneDrive

Create new folder fresh

mkdir ~/OneDrive

2. Configure the Connection (rclone config)

Run rclone config and follow these exact choices for a seamless setup:

    1. n) New remote -> Name it onedrive.
    1. Storage Type: Select Microsoft OneDrive (usually number 31 or 32).
    1. Client ID/Secret: Leave blank (Press Enter twice).
    1. Region: Choose 1 (Global).
    1. Edit advanced config? Type n.
    1. Use auto config? Type y. (A browser will open; log in and click Accept).
    1. Choose drive type: Choose 1 (OneDrive Personal or Business).
  • This is the crucial part: It will ask you to choose the drive type.

    • If it is a work/school account, it will give you a list of "Drives found." Make sure you pick the one that says "OneDrive" and not a random "Document Library" or "SharePoint Site" unless that's specifically what you need.
    1. Confirmation: It will show a drive ID. Press y to confirm.
    1. Final Save: Press y again to save the "onedrive" remote.
    1. q) Quit the config.

3. Verify the Connection

Before mounting, test that rclone can "see" your files:

rclone lsd onedrive:

If you see your folders listed, the configuration is perfect.

4. To run in background

This is the specific command optimized for 10GB disk limit, file age of 7 days (168h) and mobile sync. Change numbers according to your reality.

Run this to mount your drive. It protects your disk space and handles mobile updates.

bash

rclone mount onedrive: ~/OneDrive \
  --vfs-cache-mode full \
  --vfs-cache-max-size 10G \
  --vfs-cache-max-age 168h \
  --vfs-fast-fingerprint \
 --dir-cache-time 15s \
 --poll-interval 10s \
  --daemon

5. Automatic Startup (Out-of-the-Box)

To make OneDrive appear automatically every time you turn on your laptop:

    1. Open Startup Applications from your GNOME menu.
    1. Click Add.
    1. Name: OneDrive On-Demand
    1. Command: (Paste as one line, replacing <user_name> with your actual Linux username):

bash

rclone mount onedrive: /home/<user_name>/OneDrive -vfs-cache-mode full   --vfs-cache-max-size 10G   --vfs-cache-max-age 168h   --vfs-fast-fingerprint   --dir-cache-time 15s   --poll-interval 10s   --daemon

Troubleshooting Cheat Sheet

  • "Directory already mounted": Run fusermount -u ~/OneDrive.
  • "Mountpoint does not exist": Run mkdir -p ~/OneDrive.
  • Check cache size: Run du -sh ~/.cache/rclone to see exactly how much of your 10GB is being used.

Reference Guide for Flags

  • Name "onedrive": The mount command looks for a config section specifically with this name.
  • --vfs-cache-max-size 10G: Your local disk safety net.
  • --vfs-cache-max-age 168h: Keeps common files offline for 7 days.
  • --vfs-fast-fingerprint: Instantly syncs changes made on your phone/mobile device.
  • --dir-cache-time 15s: This reduces the "memory" of your folder structure from 5 minutes to just 15 seconds.
  • --poll-interval 10s: This tells rclone to "ask" OneDrive for a list of recent changes every 10 seconds.*
  • --daemon: Runs rclone in the background.

Well done sir!

1 Like