兩台電腦沒兩台螢幕還挺不方便的, 用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.

 

 

上次那篇真有白痴到了, 開個userdir還自己手動改config, mac嘛, 總有GUI的, 這次發現不能ssh連入本來也想手動改, 後來發現, 開啟sshd的方法跟設定userdir其實都一樣在系統設定內:

_2011-08-04_9

設定就在"共享"內:

_2011-08-04_9

網頁共享是"userdir"的設定, 遠端登入是sshd

最近去美國出差回來買了一台Mac mini server, 買來當然要物盡其用囉, 架個server, web也自然免不了的

剛試著要使用user dir (也就是 http://my_domain/~julianshen) 發現行不通, 看起來它是使用Apache 2.2.19, 所以看了一下httpd.conf, 原來是沒enable, 因此試著打開它, 不過發現它似乎沒有做好的GUI setting可以讓你很簡單打開, 還是得修改些東西:

  1. 它的"Include /private/etc/apache2/extra/httpd-userdir.conf"其實是躲在"<IfDefine WEBSHARING_ON>“這段內, default似乎沒定義這個值
  2. ”/private/etc/apache2/extra/httpd-userdir.conf"定義的userdir是"Sites"
  3. Http daemon的啟動config在: /System/Library/LaunchDaemons/org.apache.httpd.plist

因此只要

  1. 在 “/System/Library/LaunchDaemons/org.apache.httpd.plist”(<array></array>內)加入
    <string>-D</string>
    <string>WEBSERVICE_ON</string>
  2. 把你的html/php檔案放到你的家目錄(比如說/Users/julianshen)的Sites目錄下, chmod 755

OK, 這樣就大功告成, 可以用 http://my_domain/~julianshen 連上了…

剛看了一下Mac App Store上的排名:

從前幾名看來, Productivity 分類是最熱門的, 所以這表示大部分的Mac都是拿來工作的? 不過其實Game也不少啦 :P

昨天Mac的App store終於出來了, 這個東西還真是邪惡…不過, 也多了讓我們找好軟體的地方, 昨天抓了Evernote for Mac, 感覺還真好用

整個畫面很乾淨, 簡單, 不難上手

其中有幾個不錯的功能, 比如說可以從iSight拍照新增Note, 或是擷取screenshot來新增記事, 或是由剪貼簿貼入(如下)

加上所有的寫好的東西都是備份在網路上, 所以在其他裝置上也可以存取一樣的內容, 真的是很便利