顯示具有 Terminal 標籤的文章。 顯示所有文章
顯示具有 Terminal 標籤的文章。 顯示所有文章

2012-02-12

Mac OS X 10.7 Lion 該怎麼編輯被鎖定、鎖住的Hosts 檔案呢?讓我們來使用nano editior (文字編輯器)吧!



這篇真的是太多人問Seal 這個問題,才會想說花點時間寫一下的
不過如果你是Mac 的初心者,或者是對英文感到十分陌生的朋友,請不要輕易嘗試喔!後果請自負!Seal 不管喔!

最近Apple 推出了Mac OS X 10.7 Lion,先進的作業系統導入了Resume回複的功能,系統檔案的安全性也更加的提高了
所以像Hosts 這樣的系統檔案,自然而然就被保護的更好啦,以往的文字編輯器修改法已經無效,那我們該怎麼去修改它呢?

要達成這個目的,請先準備好下列條件

1. 一個具備系統管理權限的帳號(自己用的電腦通常應該都是)
2. 幫上面那一個帳號設定一組密碼!!

都準備好之後,請跟Seal 一起一步一步來設定吧!!!

1. 請打開你的終端機Terminal 視窗,如果不會的話,請參考以下這篇文章

MacBook One 調效手冊: 如何開啟Mac 的Terminal 終端機?

2. 輸入以下的指令來暫時取得Root 權限

sudo -s



接下來會出現要你輸入密碼Password 的畫面,請直接輸入你的使用者帳號的密碼(這時畫面不會出現任何反應,請別擔心)

3. 按Return 確認後,應該會出現向下列的畫面
bash-3.2# 就是表示我們開始使用root 權限囉!



4. 再來輸入以下的指令來使用nano editior (文字編輯器)去編輯我們的Hosts 文件檔案

nano /etc/hosts



5. 出現這個畫面,就表示你成功開啟Hosts 檔案囉!請用方向鍵來移動到你要編輯的區域



編輯過程中,你沒有辦法使用滑鼠去點要編輯哪裡喔!一切都要依靠方向鍵
如果要加入要阻檔的伺服器位置,可先按Command + c 把資料複製起來,再回到Terminal 終端機按Command + v 貼上即可,很簡單的!

6. 都編輯完了之後,我們就按下鍵盤上的Ctrl + x 來離開,這時Nano會問我們要不要覆寫掉舊的檔案
這時當然按下鍵盤的"y"來確定存檔啦!!



7. 再來則會問你,要不要存到同一個路徑或改路徑,我們不需要更改,直接按Return 確認即可



8. 這樣就大功告成啦!夠簡單了吧?



希望這篇有幫到一些剛開始使用Mac OS X 10.7 Lion 的新手,快去試試吧!




2012-02-09

找回Mac OS X 10.7 Lion 裡搭配Firefox的三指swipe 往上掃到頁面頂端Top、三指swipe往下掃到頁面底部End



為什麼會有這一篇呢?而且標題還定的這麼的長?
Seal 在以前用Mac 時,一直都很喜歡使用多點觸控的觸控板!很多不同的手勢搭配,讓Mac 變得超級好用
由其在FireFox 4 出來的時候(應該沒記錯吧?),FireFox 就開始支援各式各樣的手勢了

其中有兩個比較特殊的手勢是

1. 三指swipe 往上掃 = 跳到網頁的最頂端(有點像Windows 的Home 鍵)
2. 三指swipe 往下掃 = 跳到網頁的最底端(應該可以算是End 鍵囉)

如果你常逛Komica 糟糕島、Mobile 01、Palmislife 這些討論社群網站的話,這兩個手勢真的爆炸好用的!
不需要在那邊捲來捲去,拉來來去的!不想看的網頁就直接拉到最上面或最下面!這樣的手勢真的有夠順!

可是在Mac OS X 10.7 Lion 出來之後,由於大量的使用手勢,造成很多手勢突然被換掉或取消了
一開始預設的三指左右掃的換頁,也被預設為兩指了!雖然可以自己改回來三指,但是前面所提到的三指上下不見了!

那我們該怎麼找回這個超好用的手勢呢???

A. 如果你是使用MacBook/MacBook Pro/MacBook Air 筆電系列產品的話,請參考下列的步驟:

(P.S. 你會需要xcode 或者是其他可以編輯Plist 的程式喔!本篇以xcode 為範本)

1. 打開你的Terminal 終端機,如果不會的話,請參考以下這篇文章

MacBook One 調效手冊: 如何開啟Mac 的Terminal 終端機?

2. 在Terminal 終端機類輸入以下的指令來移動到ByHost 資料夾

cd ~/Library/Preferences/ByHost



3. 輸入"ls -lah" 來看看這個資料夾裡到底有哪些檔案?
然後請找到.GlobalPreferences開頭的Plist 檔案,檔名尾巴應該會是一堆系統產生的亂數



4. 輸入以下指令來透過xcode 打開剛剛找到的檔案!

open -a /Developer/Applications/Xcode.app "剛剛找到檔案的檔名"

(EX: open -a /Developer/Applications/Xcode.app ".GlobalPreferences.F5D91FD1-C3ED-51DB-A560-D0F01B0A298F.plist")



5. 當xcode 打開來的時候,就會像這個樣子,找到"com.apple.trackpad.threeFingerVertSwipeGesture"這一條,並把數質從0改成1,並關掉存檔



6. 重開機之後應該就可以正常使用三指上下掃囉!!!

B. 如果你是使用藍牙觸控板Magic Trackpad的話,請參考下列的步驟:

1. 打開你的Terminal 終端機,如果不會的話,請參考以下這篇文章

MacBook One 調效手冊: 如何開啟Mac 的Terminal 終端機?

2. 在Terminal 終端機類輸入以下的指令來移動到ByHost 資料夾

cd ~/Library/Preferences/



3. 輸入以下指令來透過xcode 打開藍牙觸控板的設定Plist檔案!

open -a /Developer/Applications/Xcode.app "com.apple.driver.AppleBluetoothMultitouch.trackpad.plist"



4. 當xcode 打開來的時候,就會像這個樣子,找到"com.apple.trackpad.threeFingerVertSwipeGesture"這一條,跟上面一樣數質從0改成1,並關掉存檔



5. 把藍牙觸控板關掉,再打開重連應該就可以直接使用囉~!

----------------------------------------------------------------------------------

這個三指Swipe 上下掃的功能打開後,除了FireFox 的功能回複之外,xcode 的切換功能也會回來喔!
如果你跟Seal 一樣有這樣的需求的話,快點一起來試試看吧!!!




2012-02-08

如何讓QuickTime 在開啟檔案時,自動撥放影片?Quicktime AutoPlay!!

Screen Shot 2012-02-08 at 1.00.33 PM

剛剛Seal 上班的地方的超活潑工讀生問了Seal 一個問題
在用QuickTime 打開影片的時候,可不可以不要按撥放就直接放影片呀?這樣好麻煩喔!

Seal 印象中,10.6 的時候只要到終端機Terminal 去下一行指令就可以做到這件事了
所以剛剛就試試看,沒想到10.7 Lion 也是OK 的,所以在這邊分享給大家

1. 打開你的Terminal 終端機,如果不會的話,請參考以下這篇文章

MacBook One 調效手冊: 如何開啟Mac 的Terminal 終端機?

2. 輸入以下的指令,並按Enter

defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1

Screen Shot 2012-02-08 at 1.01.23 PM

3. 開開看影片吧,應該一打開檔案就撥了喔!

那如果我想要還原怎麼辦?更簡單,把剛剛指令最後的1 改成0 就好囉!

defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 0

Screen Shot 2012-02-08 at 1.01.37 PM

夠簡單吧?快點跟Seal 一起來試試看吧!!




2011-07-01

在非中文的Mac OS X 10.6 Snow Leopard 系統下,指定程式使用中文來開啟!



不曉得你是不是也跟Seal 一樣,使用Mac 的時候在作業系統的部份
習慣用英文來當作系統語系,但是日常生活中確又要用到一大堆的中文資料!
像使用中文版本的Office 和英文版本的Office 來開啟同一個中文檔案,顯示出來的樣子就會有些不同

沒有設定好標準字型的文件,有些中文字還會變成亂碼!真的是十分的麻煩
而且這次台灣微軟的官方Office 2011 For Mac 真的亂好用的!Windows 幾乎可以不用打開了說!

那該如何解決這個問題呢?
Seal 曾經寫過一篇文章,

Snow Leopard 下,如何指定應用程式用不同於預設的語言來開啟? LanguagesService 1.0

裡面有提到,在10.5 Leopard 下
只要在應用程式上按右鍵,Get Info (中文環境是"簡介")
就會出現下面的畫面,Languages 裡可以選擇這個程式要使用什麼語言去執行



之前因為中文化版本的Office 還挺鳥的!所以偶爾才開開中文版本
所以LanguagesService 這個在開啟程式前選擇語言的小外掛還算好用

但是現在Seal想要文件檔案一打開,就用中文版本的Office 來開啟!這樣該怎麼做呢?

1. 打開你的終端機Terminal
不會開的話,請參考這篇文章

2. 輸入以下的指令

Microsoft Word 2011 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/Microsoft\ Office\ 2011/Microsoft\ Word.app ) AppleLanguages "(zh_TW, de)"

Microsoft Excel 2011 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/Microsoft\ Office\ 2011/Microsoft\ Excel.app ) AppleLanguages "(zh_TW, de)"

Microsoft PowerPoint 2011 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/Microsoft\ Office\ 2011/Microsoft\ PowerPoint.app ) AppleLanguages "(zh_TW, de)"

Microsoft OutLook 2011 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/Microsoft\ Office\ 2011/Microsoft\ Outlook.app ) AppleLanguages "(zh_TW, de)"

Apple Pages 09 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/iWork\ \'09/Pages.app ) AppleLanguages "(zh_TW, de)"

Apple Keynote 09 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/iWork\ \'09/Keynote.app ) AppleLanguages "(zh_TW, de)"

Apple Numbers 09 打這個

defaults write $(mdls -name kMDItemCFBundleIdentifier -raw /Applications/iWork\ \'09/Numbers.app ) AppleLanguages "(zh_TW, de)"

3. 按Enter 輸入確定後,以後程式就會直接以中文為預設值來開啟啦!就算直接開啟文件檔案也一樣喔!

如果你常玩Terminal,應該不難看出這條指令該怎麼用!快去試試吧!


2011-05-31

2011 年的MacBook Pro 系列只要一接上iPhone USB做網路共享internet thering就四國當機的話該怎麼辦?



Seal這邊已經處理了好多台2011 年MacBook Pro 接上iPhone 分享網路(個人熱點 Personal Hotspot)、同步會出現四國畫面當機的問題
因為新版本MacBook Pro 全系列已經改用64Bit Kernel 來開機,所以有時候使用者接上一般的設備也有可能出現當機的情況
目前大多人的解法是自己在開機時按住32 來用32位元開機,這樣好像有點太麻煩了

現在依Seal修下來的經驗來判斷,2011 年有部份機器的10.6.7 並沒有裝的很好,64位元Kernel 開機的確會造成很多32位元設備出問題

目前Seal這邊整理後的解法如下:

1. 再次安裝Apple官方提供的10.6.7 更新包(這個是MacBook Pro 2011 專用的喔!)

適用於 MacBook Pro(2011 年初)的 Mac OS X 10.6.7 更新
http://support.apple.com/kb/DL1368?viewlocale=zh_TW


2. 把系統開機Kernel 改成預設32位元開機

a. 請先為現有使用者建立密碼
b. 打開終端機 Terminal
c. 在Terminal 終端機裡面,先輸入

sudo -s

d. 這時系統會要求你輸入你帳戶的密碼,照Key 就對囉,然後輸入以下的指令

sudo systemsetup -setkernelbootarchitecture i386

e. 按return 後執行完,重開機後就改成32位元開機了
f. 重開完之後,請到"關於這台Mac" => "更多資訊" => "軟體",在裡面的"64 位元Kernel 和延伸功能" 出現"否" 的話就完成了

(如果要改回來變成64位元開機,請重複上述步驟,最後輸入 sudo systemsetup -setkernelbootarchitecture x86_64 就可以囉)

這些部份幫Seal解決了還算不少機器的問題,請各位參考!


2010-06-06

如何開啟Mac 的Terminal 終端機?



很簡單,到你的應用程式資料夾,裡面有一個工具程式,應該可以在裡面找到"終端機"

\應用程式\工具程式\終端機.app

如果你跟Seal 一樣用英文的介面

\Applications\Utilities\Terminal.app

就會是你要的東西



這樣還找不到的話,螢幕右上角的時間旁邊,有一個像放大鏡一樣的Spotlight 功能
點選一下,搜尋Terminal,找到Terminal 或是終端機打開來就可以囉

2010-05-10

非台版iPhone ,如何正確設定台灣大哥大的網路與MMS?



Seal 是用iPhone 3G 美國版,所以手機不管怎麼樣更新,都不會自動抓到台灣大哥大最新的ipcc 檔案
也就是說,都需要靠一些偏方來開啟3G網路共享、MMS 設定,但是自從用了威通卡之後
在切換威寶與台灣大哥大門號時,設定常常自己跑掉.. 於是還是靠官方的ipcc 檔案比較可靠

先下載台灣大哥大的ipcc 檔案,然後做以下的動作

首先打開Mac 裡面的Terminal 終端機

輸入

defaults write com.apple.iTunes carrier-testing -bool TRUE

然後回到iTunes,按住鍵盤的option,然後點選檢查更新(Check for update)的按鈕
選擇剛剛下載的檔案,開啟後就會看到iPhone 裡的TW Mobile 變成台灣大哥大囉,這樣就差不多完成啦

提示一下,最好在完成以上動作後,到"設定" => "一般" => "重置" => "重置網路設定"

把設定洗乾淨一點,就可以比較順利的使用啦

P.S. 官方的ipcc 預設的apn 是TWM,不過Seal 之前用的方案都是走Internet
所以Seal 把TaiwanMobile_tw.ipcc 的副檔名從ipcc 改成zip,解壓縮後會得到一個Payload 資料夾
打開來之後,裡面有個TaiwanMobile_tw.bundle 在上面按右鍵,點選顯示套件內容 Show Package Contents
用Plist 編輯器來編輯裡面的 carrier.plist,把第一個APN 改成Internet 就好囉
然後再把Payload 資料夾壓縮,檔名改回去 TaiwanMobile_tw.ipcc,照上面方式傳到iPhone 就ok 啦

2010-05-09

Kindle for Mac,Terminal VI 編輯器的使用



Seal 最近敗入了Kindle DX US 版,有些東西需要用usbNetwork 透過telnet 到Kindle
有些東西會用到Terminal 裡的VI 編輯器來修改一些系統檔案,這邊大概筆記一些VI 編輯器的用法

參考資料:鳥哥的 Linux 私房菜 - 第十章、vim 程式編輯器

這張圖還不錯,解釋了一些VI 的基本指令



1. 用vi 開啟檔案

vi 檔案路徑/檔案名稱

2. 開始編輯檔案

按鍵盤上的"i",並且看到左下角的出現"I",就可以開始進行編輯了

3. 結束編輯檔案

按鍵盤上的"esc",並且看到左下角的"I"不見,就可以開始使用其他指令了

4. 強制儲存檔案並離開

在結束編輯模式的時候,輸入":wq!"

5. 指令列的一些常用指令

:w
將編輯的資料寫入硬碟檔案中(常用)

:w!
若檔案屬性為『唯讀』時,強制寫入該檔案。不過,到底能不能寫入, 還是跟你對該檔案的檔案權限有關啊!

:q
離開 vi (常用)

:q!
若曾修改過檔案,又不想儲存,使用 ! 為強制離開不儲存檔案。
注意一下啊,那個驚嘆號 (!) 在 vi 當中,常常具有『強制』的意思~

:wq
儲存後離開,若為 :wq! 則為強制儲存後離開 (常用)

ZZ
這是大寫的 Z 喔!若檔案沒有更動,則不儲存離開,若檔案已經被更動過,則儲存後離開!

:w [filename]
將編輯的資料儲存成另一個檔案(類似另存新檔)

:r [filename]
在編輯的資料中,讀入另一個檔案的資料。亦即將 『filename』 這個檔案內容加到游標所在行後面

:n1,n2 w [filename]
將 n1 到 n2 的內容儲存成 filename 這個檔案。

:! command
暫時離開 vi 到指令列模式下執行 command 的顯示結果!例如
『:! ls /home』即可在 vi 當中察看 /home 底下以 ls 輸出的檔案資訊!

2010-04-01

Snow Leopard 下,MAIL 寄的信、回覆的信出現亂碼怎麼辦? Changing Apple Mail default encoding from unicode to Big5



這兩天Seal 在處理公司的信件時,發現一件事情
只要寄給Seal 的信使用BIG5 編碼,Seal 在回信之後
收到的人都會看到一大堆亂七八糟的亂碼

該怎麼解決呢?

1. 把Mail 完整關掉
2. 打開終端機 Terminal
3. 輸入 defaults write com.apple.mail NSPreferredMailCharset "BIG5"
4. 按Enter (應該不會出現什麼訊息)
5. 再把Mail 打開來試試看,應該就可以囉

這樣的動作是要把Mail 預設寄信的語系編碼改成使用Big5 大五正體中文碼寄出
就可以解決囉... 通常是Mac 所使用的Unicode 對於很多家的信箱來說,太過先進的關係吧

試試看囉

除了這個方法之外,其實可以一封一封改啦
不過一次改預設比較快

2010-03-14

Snow Leopard 下,如何指定應用程式用不同於預設的語言來開啟? LanguagesService 1.0



最近Seal 一直在找一個功能,印象中以前常常用到
沒想到Mac OSX 10.6 Snow Leopard 居然拿掉了...



在10.5 之前的OSX 只要在應用程式上按右鍵,Get Info (中文環境是"簡介")
就會出現上面的畫面,Languages 裡可以選擇這個程式要使用什麼語言去執行
很可惜的是,10.6 Snow Leopard 拿掉囉!
應用程式會使用登入使用者的相同的語言,想改要開Terminal 終端機來改.. 不太方便說... 那怎麼辦勒?

以下是Seal 的小方法

這個一個來自Arizona Software的小工具,完全免費喔!10.5 以前的版本叫做LaunchAppPlugin,10.6 改叫做LanguagesService囉!

到以下的網址去下載一個小工具,LanguagesService 1.0 for Mac OS 10.6 (Snow Leopard)
http://www.arizona-software.ch/ilocalize/launchapp-plugin.html

下載完之後,解壓縮檔案會得到一個叫做 "LanguagesService.service" 的檔案

把它放到System/Library/Services 底下,這時系統會要求您輸入密碼來授權這項動作
照著做就對啦,然後重新開機!

照Seal的步驟做完之後,以後只要在您想變更語言的程式上按右鍵,就會出現Show Languages



點選他,就會跳出選擇語言的視窗囉!再來當然就是點選您想用的語言囉!試試看吧!!

2010-01-07

Mac 終端機 Terminal 裡好玩的 SAY 指令!



前幾天Seal 在網路上亂逛的時候,發現了Mac 裡面有一個好玩的指令 "Say" 指令
這是一個指令可以讓你的蘋果電腦,說出你在終端機輸入的任何英文句子!
如果臨時需要知道某個字的發音的話,還不錯用。不過這些都是合成音,有時候還是不太準確的!
參考參考就好囉,而且還滿好玩的,有輸入標點符號的話,音調還會跟著改變喔!

Seal 就在這邊稍微翻譯一下官方的使用手冊文件給各位參考參考!

Mac OS X Manual Page For Say


NAME
指令名稱
say - Convert text to audible speech
say - 把文字轉換成語音

SYNOPSIS
指令概要
say [-v voice] [-o outfile [audio format options] | -n name:port ] ... [-f file | string ...]

DESCRIPTION
指令描述
This tool uses the Speech Synthesis manager to convert input text to audible speech and either play
it through the sound output device chosen in System Preferences or save it to an AIFF file.
這個工具是使用語音合成器來把使用者所輸入的文字轉換成語音並使用系統預設的
輸出裝置來撥放出來,或者是可以另外儲存成AIFF 語音檔案。

OPTIONS
選項
string
字串
Specify the text to speak on the command line. This can consist of multiple arguments, which are
considered to be separated by spaces.
在指令中輸入欲轉換的文字內容。這個可以可以有很多的變化,會使用空格來做判斷。

-f file, --input-file=file
-f file, 檔案位置及名稱 = file
Specify a file to be spoken. If file is - or neither this parameter nor a message is specified,
read from standard input.
選擇一個檔案來轉換成語音。如果檔案沒有特別指定,會使用預設指來做轉換。

-v voice, --voice=voice
-v voice, 選擇的聲音 = voice
Specify the voice to be used. Default is the voice selected in System Preferences.
可以自定需要使用的聲音,預設值與系統設定中的值是相同的。

-o out.aiff, --output-file=file
-o out.aiff,欲儲存的檔案路徑及名稱 = file
Specify the path for an audio file to be written. AIFF is the default and should be supported for
most voices, but some voices support many more file formats.
指定一個可以儲存的路徑及名稱。AIFF 是預設可以支援的檔案種類,有些聲音可以儲存成
其他不同的檔案格式。

EXAMPLES (範例)
say Hello, World
(這時候電腦就會說 Hello, World)
say -v Alex -o hi -f hello_world.txt
(電腦會使用Alex 的聲音 打開hello_world.txt,將裡面的內容轉換成聲音檔並且存成hi.aiff)
say -o hi.aac Hello, World
(電腦把Hello, World 轉換成語音並存成hi.acc 檔案)

-------------------------------- Seal 後記 ----------------------------------

Seal 只翻了一些比較重要的片段,玩玩好玩就好囉
如果有需要的朋友,請自己上官方的參考文件去看看囉
不會很難懂啦,真的滿有趣的!

2008-12-17

10.5.6 升級指南... 如果你很想升的話..



如何從OS X 10.5.5 升級到10.5.6 呢? 這個是給使用我的安裝指南的朋友使用喔..
別的安裝方式可能也差不多.. 請自行判斷..

1. 到"軟體更新"去更新10.5.6,安裝並重開機,過程中可能會自動重開機個幾次。

2. 準備好你的USB 鍵盤與滑鼠,因為10.5.6 的更新把硬體驅動Kext 全部洗掉了,內置鍵盤跟觸控板都會暫時無法使用喔。

3. 當你裝完之後,請下載Seal 整理的驅動和有的沒有的 這個檔案並使用Kext Helper B7 來安裝所有需要的Kext。Seal 建議先安裝Kext/10.5.6 Keyboard Trackpad Fix/AppleACPIPS2Nub.kext 並重開機,這樣你就可以不用外接滑鼠跟鍵盤了。

4. 把Seal 整理的驅動和有的沒有的 裡面的 10.5.6 Touchpad Setting Fix/Keyboard.prefPane 放到 /System/Library/PreferencePanes/ 來覆蓋掉。
再一次的重新開機後,你的觸控板設定就會回到系統偏好設定了。

5. 使用OSx86 Tools 來進行權限的修復。

----------------- (上面很亂,稍微解說一下) -----------------

Apple 官方的10.5.6 更新項目中有一條是這樣說的:
為可攜式 Mac 電腦增加觸控板的偏好設定。

意思就是把觸控版的設定從鍵盤跟滑鼠裡面分出來... 但是Aspire One 不支援啦...
在更新完之後,觸控板的設定會從系統偏好設定中消失,所以我們要用10.5.5 的檔案來把他找回來。

/System/Library/PreferencePanes/Keyboard.prefPane

這一個檔案就是儲存鍵盤滑鼠偏好設定的檔案。

至於 AppleACPIPS2Nub.kext 則是讓你的Aspire One 重新認識PS/2 外接設備的檔案。
這個檔案也在10.5.6 的時候被置換了。

----------------- (其他) -----------------

Seal 目前並不推薦使用10.5.6
建議等Voodoo Kernel 出新版再更新上去。

*********** 08/12/17 更新 ***********

感謝Mobile01 的網友allen0811 提供我Keyboard.prefPane 這個檔案...
已經打包到Seal 整理的驅動和有的沒有的 1.04 版裡面... 有需要的朋友請自行下載...

2008-12-13

轉貼.. 在OS X 下使用大於原生解析度的解析度



今天在Mobile 01 看到一篇好文章... Aspire One 應該也是可以使用的...
感謝mickpro 找出這麼好的方法...
原文在這裡 "U100 OSX 下使用大於1024x600的解析度"


---------------------------- 轉貼內容 ----------------------------


PhotoShop CS4 無法裝嗎?
FinalCut Pro 無法開啟嗎?
PhotoBooth 下方視窗看不到嗎?
找到解法了,雖然頗為麻煩,但不失為在無法外接銀幕時的解決方法

1.首先打開你的終端機(如果你連終端機在哪?都有問題,那我強烈建議你不要再看下去也不要試了)

2.鍵入或貼上 "defaults write NSGlobalDomain AppleDisplayScaleFactor X"
"X"為你所需要的比例

以下是我約略的計算過的比例跟解析度

defaults write -g AppleDisplayScaleFactor 0.5
約為2048x1200 (緊繃了,比這再高的解析度,我擔心會因為無法辨識而改不回原解析度)
defaults write -g AppleDisplayScaleFactor 0.6
約為1680x1000
defaults write -g AppleDisplayScaleFactor 0.7
約為1462x857
defaults write NSGlobalDomain AppleDisplayScaleFactor 0.8
約為1280x750
defaults write NSGlobalDomain AppleDisplayScaleFactor 1
預設值1024x600

3.登出

4.登入(這時你應該就會看到上頭的工具列字都變小了,桌面也變大了)

其實由於osx的畫面處理方式,AA優於win,而且在字型上也都不像xp上是很銳利的
所以在用這種方式處理時,我個人認為是還可以工作的。

2008-12-09

Mac OS X 終端機用指令大全



本文出自InsanelyMac.com
Seal 稍微的翻譯了一點點... 這篇應該對初學 Mac OS X 的朋友有些幫助...
剩下的部份應該不難懂... 等Seal 比較有空的時候再想辦法翻完...


***BEGIN TERMINAL INFO***
***什麼是終端機***
First off, Terminal is Mac OS X's version of Konsole from Linux, or Command Prompt from Windoze. It is located in /Applications/Utilities, down at the bottom. To open it, double click it.
終端機可以說是 Linux 版的 Konsole 、Windows 系統裡的命令提示字元,在/應用程式/Utilities 裡的最下面可以找到。點兩下就可以執行它。

When it opens and has a rectangular block sitting there, it is ready for your command(s).
當他執行後,會有個矩形的方塊在畫面上,你就可以開始輸入你的指令啦。

Info about Root 什麼是Root
On UNIX based systems such as Mac OS X or Linux, root is the main user for the computer, which has access to *everything*. In other words, this is the System Administrator account, which lets you do maintenance, etc.
在以Unix為本的系統(Mac OS X 或是 Linux) root 是電腦最主要的使用者,擁有存取所有東西的權利。換句話說,就是電腦的系統管理員帳號戶,供你對系統進行維護或是其他的動作。

Login as Root (以Root 身份登入)
sudo -s

After typing that, it will prompt you for your user password, assuming you're on an administrator account. Once you are accepted, you can do the rest of these commands.
在輸入上面指令後,終端機會要求你輸入你的帳戶密碼來辨識你是使用管理員的身份。再輸入後,你就可以開始使用下面這些指令了。

OR 或者是:
su, which asks for the root password. If you don't have the root user enabled, follow the directions below. NOTE: Enabling the root user can be dangerous.
su 這個指令會直接要求root 的密碼。如果你還沒有啟用root 的帳戶,請依照下面的步驟。附註:啟用Root 帳戶可能會造成危險呦

Again, after typing that, it will ask for the root password.

在輸入上述指令後,終端機會要求你輸入密碼

Change root password 更改root 帳戶的密碼
If you don't like your root password, use:
如果你不喜歡你的root 帳戶的密碼,請使用:
sudo passwd root

Then type in your old root password, then give it a new password. If you had no root password before, it will simply ask you to enter a new password.
接者輸入你舊的root 帳戶密碼,再來輸入新的密碼。如果你的root 帳戶從來沒有設過密碼,終端機會直接向你要新的密碼。

WARNING: TERMINAL WILL *NOT* PROMPT YOU FOR CONFIRMATION OF DELETIONS, RENAMES, ETC. 警告: 終端機 “不會”詢問使用者是否要刪除、更改名稱等等動作,請小心使用。
***NOTE: sudo CAN BE LINKED WITH ALL OF THESE COMMANDS, IF YOU DO NOT WISH TO LOGIN AS ROOT; THIS WILL LET YOU ACT AS THE SUPER USER FOR THE ONE COMMAND.***
***附注:sudo 這個指令可以配合下列所有指令使用,如果你不想使用Root 帳戶登入電腦,這個指令可以讓你行使跟Root 帳戶一樣的權利***

Change directories 更動資料夾

To move around in the various directories, use cd.
Example: cd /applications
That will move you into the applications folder.
Typing cd with no argument will return you to the directory you were in before.

To change to a directory with spaces in the name, surround the directory name in quotes.
Example: cd /Applications/"XChat Aqua"
That will move you into a folder called XChat Aqua in the applications folder.

Move to other volumes/disks/partitions

To move to different volumes/disks/partitions, use cd again.
Example: cd /volumes/Mac
That will move you into the root (/) directory of the volume named Mac.

You can also change to a volume with spaces, much like the last hint.
Example: cd /volumes/"Mac OS X"

Remove a file from your Mac

This will remove a file from the same directory you are in:
rm
Example: rm something.txt

You can specify a path to a file to delete, if it is in a different folder.
rm /path/to/something
Example: rm /Applications/Candybar.app
This will remove the application Candybar from your applications folder:

This will remove a directory/folder on your Mac:
rm -d
Example: rm -d delete_me
(Say you had a folder called delete_me in /, your start disk's main folder)

Note: You can specify a path for this too, like the previous rm commands.

Copy a file

To copy a file, use:
cp
Example: cp something.txt somethingelse.txt
This will make a duplicate of something.txt and name it somethingelse.txt

Move a file
To move a file, use:
mv
Example: something.txt /Applications
This will move something.txt to the Applications folder.

Find a file
To find a file, use:
locate
Example: locate Callisto.kext
This will look for anything related to Callisto.kext on your system.

Find a binary file
To find a binary file, like rm, use:
whereis
Example: whereis rm
This will look for the rm command.

Create a folder
If you want to make a folder:
mkdir
Example: mkdir directory
Will make a folder called directory in the current folder you are in.

Move a folder
If you want to move a folder:
mv folder_name path
Example: mv folder /applications
Will move a folder called "folder" to applications.

NOTE: You can also specify a path if you want to put the folder somewhere specific.
Example: mkdir /Applications/directory

Repair Permissions of a folder
If you've been naughty and messed with the System/Library/Extensions folder at all, , you can repair the owner and permissions of the folder by doing:

chmod -R 755
chown root:wheel

chmod -R 755 /System/Library/Extensions
chown -R root:wheel /System/Library/Extensions

NOTE: This can also be done(to a lesser extent) through Disk Utility in /Applications/Utilities. Open Disk Utility and select your Mac Volume, then click Repair Disk Permissions.

Repair permissions in Terminal without DiskUtility
To repair permissions on your whole system without the need of disk utility, do:

diskutil repairPermissions /

List Files in a directory
If you want to view files in a folder, do:
ls

NOTE: This will show you the files in the current directory you are in. You can also do ls to see what's in a specific folder. Example: ls /applications
That will show you files in the Applications folder.

Text editing
If you want to edit various files in the Terminal:
nano
vi
emacs

Whichever you use is up to you. They all are text editors. NOTE: I have only used nano, so I can't really help people with vi or emacs.

You can also call TextEdit from the Terminal:

sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit

You can add the path of the file you want to edit to the end of the command line and it will open with TextEdit or just browse for it in TextEdit.

Add your own commands to Terminal!
If you want to add your own commands to terminal, follow these easy steps. In this example, we'll add a command called textedit, which will launch TextEdit with sudo priviliges, giving you a text editor with GUI capabilities that allows you to edit any file.
1. Open Terminal.
2. Type sudo -s, then enter your password.
3. nano /usr/sbin/textedit
4. paste this into the file: sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit
5. press CTRL+O, then enter to save.
6. Type textedit into terminal, and enjoy your new command!

***END TERMINAL INFO***

***BEGIN GENERAL MAC OS X INFO***

Run a Universal program in Rosetta
If you have a program that seems to be acting funny, and it's Universal, just right click(CTRL+Click for one button mice) the program, then choose Get Info, then when it pops up, look for a check box that says "Run in Rosetta". This will make the program run under Rosetta, Mac's PowerPC emulator, which allows for PowerPC apps to run, or Universal apps to run under PowerPC instructions.
N.B.: Not all programs have a "Run in Rosetta" option, so don't freak out if there's no option for it.

NOTE: ALL THE FOLLOWING CAN ALSO BE DONE ON HACKINTOSHES BY PRESSING F8 AT STARTUP WHERE IT WILL GIVE YOU A BOOT COMMANDLINE, WHERE YOU CAN INPUT YOUR OPTIONS THERE, SO THAT YOU CAN HAVE THOSE OPTIONS ON THAT BOOT ONLY.

Boot in verbatim mode to see errors/info about your mac
If you seem to be having weird errors with Mac and can't figure out why, try booting in verbatim mode, which tells you word for word what Mac is doing as it is starting up. In Terminal, navigate to /Library/Preferences/SystemConfiguration. Then sudo nano com.apple.boot.plist . Then below where it reads, "Kernel Flags", where it says , add -v between the two string angle brackets so it looks like this:
-v

After this, press CTRL+O to save the file and reboot. To remove verbatim mode, simply follow the steps again and just remove -v from the string line.

Force a screen resolution on startup
If you want to force Mac OS X to start with a certain screen resolution: you have to add a new key and string line to your com.apple.boot.plist.
Graphics Mode
1024x768x32@60
Where 1024x768 is the resolution you want, x32 is the color depth you want, and if you have VESA 3.0 graphics, @60 the refresh rate you want.

Startup in Safe Mode
If you want to boot up in Safe Mode if something is giving you problems, simply add -x to the kernel flags:
-x
Just follow previous instructions.

NOTE: All of these are to be added on the same line!

----------------------------------------------------------------------------------------------------------------------------------------
More OS X Shell commands can be found at...

http://www.ss64.com/osx/index.html
----------------------------------------------------------------------------------------------------------------------------------------

***END GENERAL MAC OS X INFO***

Mac Shutdown Problem

Mac OS 使用時.. 關機後.. 電源無法自動關閉解決方法..

sudo rm -f /System/Library/Extensions.mkext
sudo rm -f /System/Library/Extensions.kextcache
sudo rm -f /System/Library/Caches/com.apple.kernelcaches/*
sudo chown -R root:wheel /System/Library/Extensions/
sudo chmod -R 755 /System/Library/Extensions/