雖然很久沒用box.com的服務了, 不過既然老婆大人問起, 就來寫一下這解法吧

box.com是一個像Dropbox一樣的網路磁碟, 不過它目標客戶跟Dropbox不同, 是比較傾向企業用戶, 可以讓用戶很簡單的分享檔案, 存取box.com除了一般使用Web介面的方式外, 還有其他的方式, 像是透過它的REST API, 另外還有一種就是透過WebDav, 如果要寫程式去存取它, 一般可以用這兩種方式, 用REST稍微複雜一點, 還要搞定OAuth2的部分, 但透過WebDav的話就簡單多了, 可以掛載成為你作業系統底下的目錄, 當本地檔案來處理

安裝davfs2

首先, 你會需要的是davfs2, 在Ubuntu下用apt-get安裝:

sudo apt-get install davfs2

設定帳號密碼

修改/etc/davfs2/secrets, 加入

https://dav.box.com/dav box.com帳號 密碼

掛載

執行底下指令掛載

sudo mkdir /mnt/box.com
sudo -t davfs https://dav.box.com/dav /mnt/box.com

成功之後,就會在/mnt/box.com底下看到你的檔案了(包含人家分享給你協作的檔案根目錄), 之後當本地端檔案存取即可, 設定好auto mount即可在開機後掛載

兩台電腦沒兩台螢幕還挺不方便的, 用ssh連到另一台Linux用command line的缺點是一些X11 apps都沒辦法用, 不過好像ssh也不是只有文字可用

ssh -X my_host

用上面的方式就可以用X11 forwarding的模式連到Linux的那台, 這時候執行任何一個X11程式, 視窗就會在你的電腦顯示而非遠端那台Linux, 舉個例, 我從mac mini連到一台遠端的Linux執行banshee, 這就是mac mini上得到的結果(這screenshot有兩個視窗, 上頭是banshee run on X11, 下頭是terminal, 用ssh -X連到Linux並執行banshee):

_2012-01-29_1

“男人”(man)的說明是這樣寫的:

-X      Enables X11 forwarding.  This can also be specified on a per-host basis in a configuration file.

             X11 forwarding should be enabled with caution.  Users with the ability to bypass file permissions on the remote host (for the user’s X authorization database) can access the local X11 display through the forwarded connection.  An attacker may then be able to perform activities such as keystroke monitoring.

             For this reason, X11 forwarding is subjected to X11 SECURITY extension restrictions by default.  Please refer to the ssh -Y option and the ForwardX11Trusted directive in ssh_config(5) for more information.