====== OneDrive on Mint 22 ======
Source: https://linuxhint.com/install-and-use-onedrive-on-linux-mint/
https://github.com/abraunegg/onedrive/blob/master/docs/ubuntu-package-install.md#distribution-ubuntu-2404
The OneDrive version in the Ubuntu universe repository is version 2.4.25 - do not use, it does not work on Mint 22! Use the repo instead (current version 2.5.6).
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
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/obs-onedrive.gpg] https://download.opensuse.org/repositories/home:/npreining:/debian-ubuntu-onedrive/xUbuntu_24.04/ ./" | sudo tee /etc/apt/sources.list.d/onedrive.list
sudo apt-get update
sudo apt install --no-install-recommends --no-install-suggests onedrive
Furthermore, old curl 8.5.0 is in the upstream repos which contains bugs interfering with onedrive. Manual upgrade to 8.20.0 via removing and building it locally can be found here:
https://github.com/abraunegg/onedrive/discussions/2997
essentially this script:
#!/bin/bash
# Upgrade curl to v8.20.0
sudo apt-get install -y nghttp2 libnghttp2-dev libssl-dev libpsl-dev zlib1g-dev libbrotli-dev libzstd-dev build-essential pkg-config wget xz-utils ca-certificates
# Remove distro curl binary so /usr/local/bin/curl is the active curl
sudo apt-get remove -y curl || true
# Remove any previous manual /usr/local curl install
sudo rm -f /usr/local/bin/curl
sudo rm -f /usr/local/bin/curl-config
sudo rm -f /usr/local/lib/libcurl.so
sudo rm -f /usr/local/lib/libcurl.so.*
sudo rm -f /usr/local/lib/libcurl.a
sudo rm -f /usr/local/lib/libcurl.la
sudo rm -f /usr/local/lib/pkgconfig/libcurl.pc
sudo rm -rf /usr/local/include/curl
wget https://curl.se/download/curl-8.20.0.tar.xz
tar -xvf curl-8.20.0.tar.xz
rm curl-8.20.0.tar.xz
cd curl-8.20.0
./configure --prefix=/usr/local --with-openssl --with-nghttp2 --with-libpsl --with-zlib --with-brotli --with-zstd --enable-versioned-symbols --disable-static
make
sudo make install
sudo ldconfig
cd ..
rm -r curl-8.20.0
curl --version
ldd "$(which curl)" | grep libcurl || true
curl-config --version
First run:
onedrive
Then open the displayed url in a browser, authenticate, copy the url of blank page into console
Test:
onedrive --synchronize --verbose --dry-run
Sync manually:
onedrive --synchronize
Install Service:
systemctl status --user onedrive
systemctl --user enable onedrive
systemctl --user start onedrive
systemctl status --user onedrive
If reauth is required:
onedrive --reauth
Then open the displayed url in a browser, authenticate, copy the url of blank page into console