Ubuntu安装Onedrive

OnedriveBusiness   https://github.com/xybu/onedrived-dev/issues/1

Ubuntu安装微软Onedrive教程

2018年05月09日 12:10:38 skylark0924 阅读数:6680

Ubuntu安装Onedrive教程

系统信息:

  • 操作系统:Ubuntu 16.04

    本教程通过安装开源社区的onedrive-d,实现在linux操作系统中将本地文件同步到微软OneDrive云存储。 
    onedrive-d不仅支持Ubuntu/ Debian,同时也支持CentOS/ Fedora/ RHEL


第1步:废话不多说,直接从github下载安装

1.$ git clone https://github.com/xybu92/onedrive-d.git
2.$ cd onedrive-d
3.$ ./install.sh
  • 1
  • 2
  • 3

安装过程中,会自动安装必要的软件,例如pip3 等但是安装需要python-3,不过ubuntu都会自带的,所以无须担心。

第2步:安装后,你会看到这样的消息:

onedrive-d installed successfully.
Please run command `onedrive-pref` to set up the program.
  • 1
  • 2

根据提示,在终端输入onedrive-pref 进行初始化配置 ,如图 
 
在浏览器中打开终端中的链接,登录你的微软账号 
然后会看到: 

点击 。然后将跳转到的网址复制到终端。

onedrive-d has been successfully authorized.
  • 1

接着配置: 
 
至此,onedrive-d 配置完成。

第3步:帮助

$ onedrive-d --help
  • 1
Commands:start    Start the daemon.stop     Stop the daemon.restart  Stop then start the daemon.status   Get the status of the daemon.
  • 1
  • 2
  • 3
  • 4
  • 5

终端输入

$ onedrived start
  • 1

至此,你会在home文件夹下找到onedrive文件夹,里面已经同步了你的onedrive 文件。

OneDrive Sync for Linux (Ubuntu)

Garrett MillsFollow

Feb 23, 2018

So, a while back I decided to make the switch back to the Dark Side and moved all of my computers back to Windows 10 Pro from Ubuntu. My primary motivation for this was because I needed to use the Adobe Creative suite for project. After the project was completed, I just sort of stuck with Windows, largely out of complacency, but also because the Anniversary Update introduced a few really awesome features. The most useful of these was replacing the default Desktop/Documents/Pictures folders with OneDrive folders.

So, when I switched back to Ubuntu recently (mostly so I could use KDE Connect), I tried to find a OneDrive client that would do the same things. Unsurprisingly, no first-party client exists from our Microsoft overlords, and there is a stunning lack of third-party clients. However, thanks to a project called onedrive-d, I got it working. Here’s how.

(For the lazy among you, here’s an automatic script.)

Step 1: Install onedrived

onedrived is a third-party, CLI-based OneDrive client created by Xiangyu Bu. It provides basic OneDrive sync. Clean and simple.

Install git if you don’t have it:

sudo apt install git -y

Clone the onedrive-d files to a hidden folder:

git clone https://github.com/xybu/onedrived-dev.git ~/.odd

cd ~/.odd

Run the Installer:

sudo python3 ./setup.py install

Step 2: Install ngrok

ngrok is a 3rd-party platform for relaying webhook integration. onedrived uses ngrok to allow webhook requests from the OneDrive API to the onedrived client without requiring port-forwarding or similar.

Download ngrok from here and extract the ngrok file. Then, copy it to a path directory using the following command:

sudo mv ~/path/to/extracted/ngrok /usr/bin/ngrok

Step 3: Configure onedrived

After installing onedrived, you need to authorize it to access your Microsoft account. To do this, run the following command to configure onedrived interactively:

onedrived-pref account add

This command will launch an interactive wizard to help you configure onedrived. First, copy the given URL into your browser of choice and complete the Microsoft login and permissions. After you allow onedrived access, it will land you on a blank white page. Copy the URL of this page, paste it back into the interactive prompt.

Now, you need to select which virtual drive to use with onedrived. Set the virtual drive by running the following command:

onedrived-pref drive set

It will run you through some interactive setup questions. Leave the default directory path the same, tell it y to sync that directory, and leave the default ignore file.

Lastly, you can start the OneDrive daemon by running:

onedrived start

At this point, onedrived will begin syncing your OneDrive files with the local computer. This may take some time if you have a particularly large OneDrive. You can access the files by navigating to Home > OneDrive.

This, however, isn’t as seamless as Microsoft’s implementation. For that, we need to change the default folders that Nautilus uses. To do this, open the user’s directory configuration file using the following command:

gedit ~/.config/user-dirs.dirs

The user-dirs.dirs file tells GNOME/Nautilus which folders to use for the default Desktop/Documents/Pictures/etc. folders. Change the default paths to their respective OneDrive folders (make sure you’ve created the folders on your OneDrive) like so:

You can pick which folders you want to sync over OneDrive and which ones you want to use locally. In this case, I’ve chosen to sync my Desktop, Public, Documents, and Pictures folders.

Finally, run the following command to ensure your changes are preserved:

echo "enabled=false" > ~/.config/user-dirs.conf

Step 3: Enable the OneDrive Daemon on Login

The onedrive-d daemon doesn’t automatically start by itself, so to ensure that OneDrive starts syncing automatically when you log in, we need to tell GNOME to start it on login. Run the gnome-session-properties command to open GNOME’s configuration. Then, add a startup program to run the onedrived startcommand.

Finally, log out and log back in to restart Nautilus and from now on, GNOME and Nautilus should seamlessly sync with your OneDrive.

  • Ubuntu
  • Onedrive

Keyrings troubles #30

https://github.com/xybu/onedrived-dev/issues/30

Hi, for those who bang their head on this, here is what worked for me (after 2 hours of Googling):

# install keyrings.alt from git
pip3 install --user git+https://github.com/jaraco/keyrings.alt
# set a default password for your account
# the first password to enter is the system password
# then this is the keyring password (the one that will be asked by onedrive-d)
.local/bin/keyring set system <your_account>
# create your onedrive-d account
.local/bin/onedrived-pref account add
# follow the instruction for pasting the URL
# then provide the second password you gave to keyring
# you're done, pffffffffffffff

Edit: well, you're done except for issue #27

Ubuntu安装Onedrive相关推荐

  1. Centos安装onedrive

    参考Ubuntu安装Onedrive教程在Centos安装onedrive过程中出现一个问题,Error: setup script does not support your distro toke ...

  2. Ubuntu 18.04 安装 onedrive

    问题 在Ubuntu 18.04上安装Onedrive 问题背景 对于文档的同步,还是喜欢用Onedrive,主要因为Onedrive对文档的在线编辑支持很好. Onedrive初始免费容量5G,加上 ...

  3. ubuntu 安装GPU黑屏 修改GRUB_Ubuntu 18.04 安装笔记

    概述:Ubuntu 18.04 的安装配置笔记, :two_hearts:. 简介:基础使用环境的搭建,暂定目标为一篇文章解决大部分疑问. 协议:本文章使用 CC BY-NC-SA 4.0 协议(转载 ...

  4. Ubuntu使用OneDrive记录:更换账户或修改密码之后重新登

    Ubuntu使用OneDrive记录:更换账户或修改密码之后重新登 官方不提供ubuntu上的OneDrive,但是开放了接口,GitHub上有很多OneDrive开源解决方案,这里选择abraune ...

  5. Ubuntu安装MongoDB

    https://jingyan.baidu.com/article/e5c39bf5f5ddd539d76033a9.html Ubuntu安装MongoDB4.0: https://www.jian ...

  6. ubuntu安装OpenCV详细教程(建议收藏)

    记录一篇"如何安装ubuntu下C++接口的opencv"的文章.由于转载格式有问题,直接贴个链接:ubuntu安装opencv的正确方法 注意:本人根据此博客安装遇到的问题:2. ...

  7. Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/redis-server.

    此文首发于我的个人博客:Linux/ubuntu 安装 redis 4.0报错解决:redis-server.service: Can't open PID file /var/run/redis/r ...

  8. debian,ubuntu 安装mongodb 允许外网访问,修改端口,设置用户和密码

    使用apt安装mongodb: apt update && apt install mongodb 查看运行状态: systemctl status mongodb.service 结 ...

  9. ubuntu安装KVM

    ubuntu安装KVM 现在官网下载ubuntu镜像,桌面版或者服务端都可,这里以桌面端为例. 安装之前确保磁盘有足够大的空间(这很重要) 安装KVM sudo apt install qemu-kv ...

  10. 解决Ubuntu安装依赖问题

    解决Ubuntu安装依赖问题 解决Ubuntu安装依赖问题 最主要问题,修改的国内镜像源可能不是对应的ubuntu版本,大部人直接找了个镜像源就复制到source.list里面了,其实需要对应版本的, ...

最新文章

  1. 还记得那场关于“分布式锁”的经典论战吗?
  2. 什么是ATM(异步传输模式)?—Vecloud微云
  3. 区域显示触发_天涯明月刀手游五行藏珍天机奇遇怎么触发?五行藏珍天机奇遇攻略...
  4. wxWidgets:wxScrolled< T >类模板的用法
  5. 销售管理系统 java_用Java从零写一个B2C商城,看完不要再说自己没有实战经验了!...
  6. 源码包安装mysql5.6_源码包安装mysql5.6
  7. mysql总结 博客园_mysql 总结
  8. 使控件大小随窗口变化
  9. ORACLE之字符集修改(10g)
  10. BZOJ5249:[九省联考2018]IIIDX——题解
  11. 《穷爸爸富爸爸》读书笔记
  12. java客户端操作elasticsearch7.3.2版本
  13. GridView 栏位宽度自由拖动
  14. 【IDE】Intellij IDEA启动正常,但是任务栏不显示图标
  15. win7添加打印机失败
  16. 【Java课设】学生信息管理系统简易版(文件IO代替数据库)
  17. python模拟预测孩子身高代码_C语言 已知父母身高预测孩子身高程序 求帮找错
  18. css3学习以及移动端开发基本概念的思考
  19. 一叶知秋:“安全“的野指针、 static函数、成员函数、this 指针、gcc编译器、name mangling...
  20. 为什么青少年一定要学Python?

热门文章

  1. 读笔:《重来也不会好过现在》
  2. U盘提示''这张磁盘有写保护''修复工具
  3. iphone html复制粘贴,教大家如何在iPhone上复制内容快速粘贴到iPad上
  4. java导出文件放到压缩包里
  5. ifconfig命令和ip命令配置网络
  6. java md5 16位解密_Java md5加密解密数据
  7. bledner做MMD心得(二)
  8. 如何查询电脑最大可扩展内存
  9. 如何在linux下玩lol_英雄联盟新手教程 教你怎么玩lol
  10. IT大败局----第七章 企业并购的陷阱