LoginSignup
93
98

More than 3 years have passed since last update.

【俺メモ】Linuxmint(Ubuntu可)でMicrosoft Onedriveを利用する

Last updated at Posted at 2015-06-23

Windowsなら、MS純正のOnedriveアプリがあるけど、
Linuxにはないんかと、探したらあったやん。
んなわけで、やってみた。
これで、いちいちブラウザ起動しなくても同期とれるで。

サイトはこちら
onedrive-d - GitHub

作ってくれた人に感謝やわ。

(2020/1/13追記)今はこちら
https://github.com/xybu/onedrive-d-old
https://github.com/xybu/onedrived-dev

前準備

必要なものはこれね

  • Git:GitHubからCloneするときに必要やで。
  • Onedriveアカウント:もちろん利用するためのアカウントや。

インストール

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

Ondriveアプリ設定

以下のコマンドで設定開始
$ onedrive-pref

認証設定

①認証設定するかと聞かれるのでYを入力してターンっとする
(STEP 1/4) Do you want to authorize sign in with your OneDrive account? [Y/n] y

②認証用のアドレスが生成されるのでコピペでブラウザに貼り付け
The callback URL is the URL where the sign-in page finally goes blank.
Please visit the sign-in URL in your browser:
https://login.live.com/oauth20_authorize.srf?display=touch&locale=en&client_id=****************&response_type=code&scope=wl.skydrive+wl.skydrive_update+wl.offline_access&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf

③上の長いアドレスをコピーしておく。

④ブラウザでアカウントを入力
③のアドレスに移動するとアカウントの入力画面が出てくるので、入力する。
入力後、真っ白な画面が表示されるので、この画面のアドレスをコピーしておく。

⑤ターミナルにもどりアドレスを貼り付け

Please paste the callback URL:
https://login.live.com/oauth20_desktop.srf?code=**********

貼り付け後、ターンっとする。

onedrive-d has been successfully authorized.
とでればOK。

Onedrive同期するパスを設定

①設定をするか聞かれるのでYを入力
(STEP 2/4) Do you want to specify path to local OneDrive repository? [Y/n] y

②パスの指定
Please enter the abs path to sync with your OneDrive
デフォルトは/home/[username]/OneDrive
変更がなければターンっすればOKや。

数値、回数設定

①設定をするか聞かれるのでYを入力。
(STEP 3/4) Do you want to change the numeric settings? [Y/n] y

②ネットワークエラー時のリトライ回数
How many seconds to wait for before retrying a network failure (current: 10)?
デフォのままでええやろ。

③ブロック単位でのアップロードに変更するファイルサイズ
Files larger than what size (in MiB) will be uploaded blocks by blocks? (current: 4.0)?
これもデフォでええかな。

④ファイルアップロード時のブロックサイズ
When a file is uploaded blocks by blocks, what is the block size (in KiB)? (current: 512.0)?
これもデフォのままでええやろ。

無視リストを作成

①設定するか聞かれるが、特に思いつかなかったのでNを入力
(STEP 4/4) Do you want to edit the ignore list file? [Y/n] n
Skipped. You can manually edit "/home/[username]/.onedrive/ignore_v2.ini" at your convenience.

起動

インストール確認
$ onedrive-d --help

起動
$ onedrive-d start

終了
$ onedrive-d stop

再起動
$ onedrive-d restart

ステータス確認
$ onedrive-d status

93
98
5

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
93
98