请选择 进入手机版 | 继续访问电脑版

苹果发烧友论坛

 找回密码
 注册
查看: 7865|回复: 21

[UNIX] 经典终端命令,开启雪豹隐藏设置

[复制链接]
发表于 2010-3-7 21:47:34 | 显示全部楼层 |阅读模式
经典终端命令,开启雪豹隐藏设置

          作者:佚名     译者:macing2010

      macing语:翻译版已经有过一个贴了,这篇算是补充吧!因为避免了重复的和去掉不常用的,macing只是选译了部分。这些终端命令国外有许多,什么经典15、经典50……基本结构都是:defaults write come.apple.XXX XXX XX。通过初步分析,macing得出的结论是:这些命令都是向come.apple.XXX.plist里写进去某些设置项。程序在启动时会先加载plist,这样那些通过终端加进去的功能就默认启动了。这些plist在/Library/Preferences和/User/用户名/Library/Preferences,而程序的设置大都在用户的资源库里。以第一个X射线为例:如果运行了那个命令,在打开come.apple.finder.plist时就能找到此项了(如图)。所以,以后这些命令我们不记得了或者找不到了,我们就可以找到相应的plist,再到相应的项后的string里1改0,0改1……就行了。当然删除应该也可以,不过macing没试过,并不确定。修改可以用软件:Property List Editor Property List Editor.zip (81.41 KB, 下载次数: 19)

评分

参与人数 1威望 +40 收起 理由
luki + 40 ++

查看全部评分

 楼主| 发表于 2010-3-7 21:48:20 | 显示全部楼层
Top 15 Terminal Commands for Hidden Settings in Snow Leopard

                                                  Author:Unknown
  1. http://www.macosxtips.co.uk/index_files/terminal-commands-for-hidden-settings-in-snow-leopard.html
复制代码
Every time Apple brings out a new version of OS X, we compile a list of our favourite Terminal commands for enabling hidden features and changing hidden settings (here are the lists for Tiger and Leopard).

For those who are new to Terminal Commands, here's a quick run down of how to use them. Don't worry, it's really easy. Start by opening up Terminal, located in the Utilities folder in the Applications folder. In the window that appears, paste in one of the lines provided below, and then hit return. For the changes to take effect, you need to restart the application concerned. For applications like the Dock or Finder, it is easiest to just type killall Dock or killall Finder into the Terminal to restart them. To reverse the changes, you just need to change the last word of the command and run it again. If the last word is YES, change it to NO, change 1 to 0, and change TRUE to FALSE and vice versa for all.




1. Folder previews in Quick Look

This is my favourite hidden feature in Snow Leopard. When enabled, using Quick Look (hit the space bar) on a folder will show you a preview of the folder's contents inside a translucent folder icon. The previews of the files inside the folder also cycle through so you can see all of them. Just use the following command:

defaults write com.apple.finder QLEnableXRayFolders 1

You will need to restart the Finder, either by typing killall Finder into the Terminal or by Control-Option-clicking on the Finder in the Dock and choosing Relaunch.





2. Globally enable Text Substitutions

You may have realised that the new text substitutions feature in Snow Leopard isn't enabled in all applications by default, most noticeably in Safari. To enable it , you need to right-click on a text box and choose Substitutions then Show Substitutions. To globally enable text substitutions, use the following three commands one at a time. The first one will enable substitutions, while the second will enable dash replacement and the third will enable spell checking.

defaults write -g WebAutomaticTextReplacementEnabled -bool true
defaults write -g WebAutomaticDashSubstitutionEnabled -bool true
defaults write -g WebContinuousSpellCheckingEnabled -bool true

If you decide there are some specific applications where you want to disable these again, you can do it in the normal way. As always you will need to restart each application for the changes to take effect.




3. Bring back AppleScript Studio palette

As of Snow Leopard, AppleScript Studio has be deprecated in favour of AppleScriptObjC. You can still work on AppleScript Studio projects, but you can't create new ones, and the AppleScript Studio palette in Interface Builder is gone. To bring it back, use the following command:

defaults write com.apple.InterfaceBuilder3 IBEnableAppleScriptStudioSupport -bool YES

4. Disable "focus follows mouse" in Terminal

In Leopard there was a Terminal command to make the Terminal's window focus change with mouse movement. If you had previously enabled this, you will find things don't work quite right in Snow Leopard when you use Command-Tab to switch between applications in different spaces. To fix this, you will need to disable the focus follows mouse behaviour using the following command:

defaults write com.apple.Terminal FocusFollowsMouse -string NO

5. Force Dictionary to only use one window

If you aren't a fan of using Command-Control-D to quickly look up definitions, you might use the "Look up in Dictionary" contextual menu item or Services menu item. In Snow Leopard, each word you look up using these methods opens in a new Dictionary window, which gets a bit annoying. To make each word you look up open in the same window, just use the following command:

defaults write com.apple.Dictionary ProhibitNewWindowForRequest -bool TRUE

6. Change the behaviour of the green zoom button in iTunes

With the release of iTunes 9, Apple messed around a bit with the behaviour of the green zoom button in iTunes. Things are back to normal as of iTunes 9.01, but briefly the green button maximised the window instead of switching to the mini-player. If you liked the temporary change, you can bring it back using the following command:

defaults write com.apple.iTunes zoom-to-window -bool YES

Of course, you can always get the alternative behaviour by holding the Option key and clicking in the green button.




7. Debug menu in Address Book

The debug menu has been available in Address Book for some time, but there are some new additions in Snow Leopard. If you don't already have it enabled, the command is:

defaults write com.apple.AddressBook ABShowDebugMenu -bool true

Restart Address Book, and then click Debug in the menu bar to see the new options. You can enable reflections under contacts pictures, get to the "People Picker Panel" and enable a debug panel called "Ye Olde Debug Settings".

8. Autoplay movies in QuickTime X

One of the weird things about the new version of QuickTime is that it has no Preferences. Luckily you can still change things using the Terminal. To make a movie automatically start playing when you open it, use the following command:

defaults write com.apple.QuickTimePlayerX MGPlayMovieOnOpen 1

9. Keep QuickTime in full screen when switching applications

If you are watching a movie in full screen in QuickTime and you use Command-Tab to switch to another application then the movie will automatically exit full screen. To make it stay full screen in the background, use the following command:

defaults write com.apple.QuickTimePlayerX MGFullScreenExitOnAppSwitch 0

10. Disable Rounded corners in QuickTime

If the slightly rounded corners of movies in QuickTime bug you, use the following command to disable them:

defaults write com.apple.QuickTimePlayerX MGCinematicWindowDebugForceNoRoundedCorners 1

11. Always or Never show titlebar and Controller in QuickTime

The following two commands either permanently enable or disable the titlebar and controller that pop up when you mouse over a movie in QuickTime:

defaults write com.apple.QuickTimePlayerX MGUIVisibilityNeverAutoshow 1
defaults write com.apple.QuickTimePlayerX MGUIVisibilityNeverAutohide 1

12. Automatically show closed captioning and subtitles on opening

This turns on subtitles and closed captioning automatically when you open a movie that supports them.

defaults write com.apple.QuickTimePlayerX MGEnableCCAndSubtitlesOnOpen 1

13. Make list view stacks work like grid view Stacks

This command slightly changes the behaviour in Stacks in list view. Once enabled, they act more like grid view Stacks, but with a single list of files and icons on the left. The main difference is when "drilling-down" through folders within the Stack.

defaults write com.apple.dock use-new-list-stack -bool YES

You will need to restart the Dock for changes to take effect. The easiest way is to use killall Dock in the Terminal.

14. Enable mouseover highlight in stacks

If you want items in grid view stacks to highlight when you move the mouse over them, use the following command. It's slightly different from the equivalent in Leopard. Also, note that you can get the highlight behaviour in Snow Leopard without using this command by using the arrow keys to select items in a stack, or by clicking and holding on a stack before dragging the mouse up onto the grid.

defaults write com.apple.dock mouse-over-hilite-stack -boolean yes

You will need to restart the Dock for changes to take effect. The easiest way is to use killall Dock in the Terminal.




15. Set a precise screensaver password delay

A useful new feature of Snow Leopard is the ability to set how long your Mac is asleep or how long the screen saver is on before it requires a password to wake up again. You can access this from the Security section of System Preferences. However, you have to choose a time period from a drop-down menu, and you can't enter your own custom time period. To do this, use the following command. The number at the end is the time in seconds. For example 1800 is 30 minutes, which bizarrely isn't an option in the drop-down menu.

defaults -currentHost write com.apple.screensaver askForPasswordDelay -int 1800
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-3-7 21:56:38 | 显示全部楼层
另外还有一篇,是在Mac OS X登录窗口获得有用系统信息。我觉得意义不大,地址如下,想看中文的说。
http://www.macosxtips.co.uk/inde ... x-login-window.html
回复 支持 反对

使用道具 举报

发表于 2010-3-8 10:16:48 | 显示全部楼层
11 - 15 怎么没翻啊?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-3-8 12:44:07 | 显示全部楼层
11 - 15 怎么没翻啊?
luki 发表于 2010-3-8 10:16


    其实是原篇的6个没有翻译,第三、四、五、六、七、十四条。前四条不需要,第五条bug菜单只有在英文环境下才有(我试过),最后一个跟前面的那个贴子重复了。本来这是个系列教程:tiger、leopard、snow leopard都有大概十五条的样子,前两个有的是不需要、有的不适用。我就觉得显示当前文件夹的那个很实用,就加进来凑成这篇翻译。要是这样不好的话,我下次都翻了。有的tip确实很鸡肋。
回复 支持 反对

使用道具 举报

发表于 2010-3-9 04:27:52 | 显示全部楼层
建议你还是全部去译,有些你觉得没用或者不实用的功能,你可以用"译者注"来表达
你这样直接砍掉原文内容,一个注解也没有...

    其实是原篇的6个没有翻译,第三、四、五、六、七、十四条。前四条不需要,第五条bug菜单只有在英文环境下才有(我试过),最后一个跟前面的那个贴子重复了。本来这是个系列教程:tiger、leopard、snow leop ...
macing2010 发表于 2010-3-8 12:44
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-3-9 08:14:12 | 显示全部楼层
建议你还是全部去译,有些你觉得没用或者不实用的功能,你可以用"译者注"来表达
你这样直接砍掉原文内容,一个注解也没有...

luki 发表于 2010-3-9 04:27

收到,以后注意
回复 支持 反对

使用道具 举报

发表于 2010-3-9 09:40:47 | 显示全部楼层
这贴版主应该加精。
回复 支持 反对

使用道具 举报

发表于 2010-8-16 10:36:31 | 显示全部楼层
帅~留名以便查找
回复 支持 反对

使用道具 举报

发表于 2010-8-16 11:02:55 | 显示全部楼层
顶楼主翻译的贴子,辛苦了。
我也分享下自己在用的好东西:

terminal 命令来改隐藏设置还是很麻烦,保存那些命令行很麻烦,其实用 secret 这个小软件就简单多了。
下载:
http://blacktree-secrets.googlecode.com/files/Secrets_1.0.6.zip

安装以后在“系统偏好设置”里面就有secret这个控制,里面几乎有所有的可以改的东西,
http://secrets.blacktree.com/ 他们这里就是一个有关的修改设置的数据库, 可改的太多了。

要是临时找命令行还不如用这个推荐的软件试试看。
回复 支持 反对

使用道具 举报

发表于 2010-8-16 11:39:49 | 显示全部楼层
留名备用
...
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-8-16 22:36:49 | 显示全部楼层
顶楼主翻译的贴子,辛苦了。
我也分享下自己在用的好东西:

terminal 命令来改隐藏设置还是很麻烦,保存 ...
ligui2080 发表于 2010-8-16 11:02


谢谢分享。这个面板我看到了,确实方便,但是繁杂,估计有点难上手。不如这样,你可以翻译几篇相关的文章来此,算是正式推荐给大家。不知这位朋友意下如何?
回复 支持 反对

使用道具 举报

QQ|小黑屋|手机版|Archiver|苹果发烧友论坛 ( 京ICP备16012027号-3 )

GMT+8, 2017-10-23 03:05 , Processed in 0.016975 second(s), 11 queries , Xcache On.

Powered by Discuz! X3.3 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表