About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Home » Learning Curve

CLIX & Lion

The word's still out on 10.7 but the comments and the commands are coming in.


Buy It

Try It

Things started good enough with the security (hacker) gurus saying Lion's underbody was close to impervious to assault, much more so than that of Microsoft's Windows where it's really needed. Then the downloads began on 20 July and slowly but surely there came a murmur of kernel panics.

It's hard to believe something as deeply rooted as recurring panics can be cured in a point upgrade, but never say never.

Not everyone seems afflicted, leading observers to wonder what those tweeters are doing with their machines. But several very seasoned network engineers have written to this site to report that they too are crashing and burning regularly. And those people don't do stupid things to a computer.

That being said, there's a new CLIX in town released just the other day, and downloads really took off. The new CLIX has been adapted to Lion APIs, and the wonder is both the 32-bit version (actually for 10.4 Tiger) and the 64-bit version (for 10.7 Lion) both run on Lion.

New command files for Lion are meagre as yet, but will undoubtedly pick up as time goes on. This article will explain what needs to be explained about the two dozen new commands.

Auto Animations

'Auto Animations' are automatic window automations - a zoom effect. They can be turned on, turned off, and another CLIX command can read the current setting.

As always: the opposite of using 'YES' to enable a feature is not to use 'NO' - the key is reverting to the system default by removing the key you've added.

Title: Auto Animations Off
Category: Desktop
Description: turn window animations (zoom effect) off
Command Line: defaults delete -g NSAutomaticWindowAnimationsEnabled

Title: Auto Animations On
Category: Desktop
Description: turn window animations (zoom effect) on
Command Line: defaults write -g NSAutomaticWindowAnimationsEnabled -bool NO

Title: Auto Animations Read
Category: Desktop
Description: read window animations (zoom effect) setting
Command Line: defaults read -g NSAutomaticWindowAnimationsEnabled

Note: if you get something back like 'the domain/default pair of [...] does not exist', then setting's reverted to 'factory defaults'.

FTP Server

It's being hidden in Lion but it's still there from the command line. You run an FTP server from time to time? No worries.

Title: FTP Server Load
Category: System
Description: turn the FTP server on
Command Line: sudo -Ss launchctl load -w /System/Library/LaunchDaemons/ftp.plist

Title: FTP Server Unload
Category: System
Description: turn the FTP server off
Command Line: sudo -Ss launchctl unload -w /System/Library/LaunchDaemons/ftp.plist

Geolocation

This isn't strictly speaking 'Lion' but it's good to have handy. It's about Safari's generosity in revealing your geophysical position to the world. No you don't want that. (Or do you?)

Title: Geolocation Off
Category: Safari
Description: toggle geolocation off
Command Line: defaults write com.apple.Safari SafariGeolocationEnabled -bool NO

Title: Geolocation Read
Category: Safari
Description: read geolocation toggle
Command Line: defaults read com.apple.Safari SafariGeolocationEnabled

Title: Geolocation Restore
Category: Safari
Description: toggle geolocation on (which oddly enough is the default)
Command Line: defaults delete com.apple.Safari SafariGeolocationEnabled

Note: Safari will by default broadcast your location to the world. Think about it. Send a love letter to Steve Jobs and thank him.

Press & Hold

'Press & hold' is Lion's new character picker. It means that certain keys don't repeat - more keys than before. Characters that can get diacriticals will wait for you to add something to them before proceeding.

Title: Press & Hold Off
Category: Desktop
Description: turn 'press & hold' off
Command Line: defaults write -g ApplePressAndHoldEnabled -bool NO

Title: Press & Hold On
Category: Desktop
Description: turn 'press & hold' on
Command Line: defaults delete -g ApplePressAndHoldEnabled

Title: Press & Hold Read
Category: Desktop
Description: show 'press & hold' setting
Command Line: defaults read -g ApplePressAndHoldEnabled

Note: the '-g' refers to the 'global domain' (NSGlobalDomain). Storage can be found in '~/Library/Preferences/.GlobalPreferences.plist'.

Resume

Perhaps one of the most consistently unwelcomed 'improvements' in Lion. There's a way to turn this feature off completely in System Preferences - the most hygienic route. But if you want to stop Resume from acting on individual applications, then you do like the following for Safari.

Title: Resume Off Safari
Category: Desktop
Description: turn off Resume on a per-app basis
Command Line: defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool NO

Title: Resume On Safari
Category: Desktop
Description: turn on Resume on a per-app basis
Command Line: defaults write com.apple.Safari NSQuitAlwaysKeepsWindows -bool YES

Title: Resume Read Safari
Category: Desktop
Description: read Resume setting on a per-app basis
Command Line: defaults read com.apple.Safari NSQuitAlwaysKeepsWindows

Title: Resume Restore Safari
Category: Desktop
Description: restore default Resume setting on a per-app basis
Command Line: defaults delete com.apple.Safari NSQuitAlwaysKeepsWindows

There's another sure-fire way to make sure an app doesn't misbehave: take away its toys.

Title: Resume Safari Remove
Category: Desktop
Description: remove Safari's saved windows
Command Line: rm -f ~/Library/Saved\ Application\ State/com.apple.Safari.savedState

Note: yes all the new bad stuff has a new bad directory on Lion. And Steve Jobs doesn't want you in there. But there might be an error in the CLIX command file you downloaded - get the right copy here.

Safari Reading Lists

Safari's new reading list feature lets you save articles for later reading. Nice? Yes it can be. But it can clutter your bookmarks bar. Don't like that? Use these commands to experiment.

Title: Safari Reading List Off
Category: Desktop
Description: remove Reading List from Safari bookmarks bar
Command Line: defaults write com.apple.Safari ProxiesInBookmarksBar '("Top Sites")'

Title: Safari Reading List On
Category: Desktop
Description: add Reading List to Safari bookmarks bar
Command Line: defaults write com.apple.Safari ProxiesInBookmarksBar '("Top Sites","Reading List")'

Title: Safari Reading List Read
Category: Desktop
Description: read Safari Reading List setting
Command Line: defaults read com.apple.Safari ProxiesInBookmarksBar

Note: managing arrays in defaults isn't easy and the above commands make certain 'assumptions' about your default layout.

Search Providers

Search providers aren't new to Safari for Lion or Safari 5 but exposing them is cool. This is a list Safari can download at any time from the mother ship. Perhaps you've noticed Apple did a deal to get commi$$ions on searches from Google?

Title: Search Providers
Category: Safari
Description: show Safari Google search providers
Command Line: cat ~/Library/Safari/SearchProviders.plist.signed | grep --binary-files=text google | grep --binary-files=text "/</string>" | sed s/"<string>"//g | sed s/"<\/string>"//g | sed s/\ //g | sed s/http://g | sed s/"\/"//g | sed s/"www."//g

Title: Search Providers (WWW)
Category: Safari
Description: show Safari Google search providers with 'www' prefix
Command Line: cat ~/Library/Safari/SearchProviders.plist.signed | grep --binary-files=text google | grep --binary-files=text "/</string>" | sed s/"<string>"//g | sed s/"<\/string>"//g | sed s/\ //g | sed s/http://g | sed s/"\/"//g

Note: Safari's list of Google search providers might look like this.

google.com google.ae google.com.af google.com.ag google.off.ai google.am google.com.ar google.as google.at google.com.au google.az google.ba google.com.bd google.be google.bg google.com.bh google.bi google.com.bo google.com.br google.bs google.co.bw google.com.bz google.ca google.cd google.cg google.ch google.ci google.co.ck google.cl google.cn google.com.co google.co.cr google.com.cu google.cz google.de google.dj google.dk google.dm google.com.do google.com.ec google.ee google.com.eg google.es google.com.et google.fi google.com.fj google.fm google.fr google.ge google.gg google.com.gi google.gl google.gm google.gr google.com.gt google.com.hk google.hn google.hr google.ht google.hu google.co.id google.ie google.co.il google.co.im google.co.in google.is google.it google.co.je google.com.jm google.jo google.co.jp google.co.ke google.kg google.co.kr google.kz google.li google.lk google.co.ls google.lt google.lu google.lv google.com.ly google.co.ma google.md google.mn google.ms google.com.mt google.mu google.mw google.com.mx google.com.my google.com.na google.com.nf google.com.ni google.nl google.no google.com.np google.nr google.nu google.co.nz google.com.om google.com.pa google.com.pe google.com.ph google.com.pk google.pl google.pn google.com.pr google.pt google.com.py google.com.qa google.ro google.ru google.rw google.com.sa google.com.sb google.sc google.se google.com.sg google.sh google.si google.sk google.sn google.sm google.com.sv google.co.th google.com.tj google.tm google.to google.tp google.com.tr google.tt google.com.tw google.com.ua google.co.ug google.co.uk google.com.uy google.co.uz google.com.vc google.co.ve google.vg google.co.vi google.com.vn google.vu google.ws google.co.za google.co.zm

You don't seriously use Safari's built-in search, do you?

Secondary Clicks

There have been a lot of issues about this feature - here, here, here, and here for example. This is trackpad behaviour you can regulate through CLIX.

Title: Secondary Click Off
Category: Desktop
Description: turn secondary click off
Command Line: defaults delete -g com.apple.trackpad.enableSecondaryClick

Title: Secondary Click On
Category: Desktop
Description: turn secondary click on
Command Line: defaults write -g com.apple.trackpad.enableSecondaryClick -bool YES

Title: Secondary Click Read
Category: Desktop
Description: read secondary click setting
Command Line: defaults read -g com.apple.trackpad.enableSecondaryClick

Login Background Image

Want to find and review your default Lion login background image? Run this command.

Title: Show Login Bkgnd Image
Category: Desktop
Description: show the login screen background image
Command Line: open -a Preview.app /System/Library/Frameworks/AppKit.framework/Versions/C/Resources/NSTexturedFullScreenBackgroundColor.png

Note: as you now know where the image is located, you can now obviously change it. But don't be foolish and overwrite the one that's there.

System Configuration

This isn't strictly 'Lion' either but it's cool. These commands have to do with running the scutil utility. This might be something fun to play with.

SCUTIL(8)                 BSD System Manager's Manual                SCUTIL(8)

NAME
     scutil -- Manage system configuration parameters

SYNOPSIS
     scutil
     scutil --prefs [preference-file]
     scutil -r [-W] { nodename | address | local-address remote-address }
     scutil -w dynamic-store-key [-t timeout]
     scutil --get pref
     scutil --set pref [newval]
     scutil --dns
     scutil --proxy

Two commands to start you off.

Title: System Configuration DNS
Category: System
Description: show current DNS configuration
Command Line: scutil --dns

Title: System Configuration Proxy
Category: System
Description: show current proxy configuration
Command Line: scutil --proxy

Note: remember you can access information at any time on any command by ⌥ (option) double clicking on it in the 'Command Line' field in CLIX.

Unbinding Spaces

Unbinding the Spaces key is dicey. Don't try copying this one out. Use the command file you're given.

Title: Unbind Spaces Key
Category: Desktop
Description: unbind Spaces key
Command Line: defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 75 "{enabled = 0; value = { parameters = (65535, 96, 0); type = 'standard'; }; }"; defaults write com.apple.symbolichotkeys AppleSymbolicHotKeys -dict-add 76 "{enabled = 0; value = { parameters = (65535, 96, 131072); type = 'standard'; }; }"

Note: h/t to Mac OS X Hints.

~/Library

One of the most curious changes with Lion is Apple deciding to hide your own ~/Library folder.

~/Library has a lot of goodies: it's got your preferences, application support files, gobs of caches that you never need to keep around - more than two dozen subfolders. How OS X users managed to not screw their systems up with this folder exposed up to now is apparently a mystery to Apple.

No worries however. Because 'hiding' something on OS X is specific to OS X (not Unix) and pertains only to 'Finder' functionality - both the application and the file I/O (Open, Save As) dialogs and sheets. All your other applications can see it.

The 'hiding' (and 'unhiding') is accomplished with a nonstandard 'user flag' inherited from dusty old 'MacOS' and implemented through a Unix-like interface (chflags).

So a couple of CLIX commands will fix things right.

Title: ~/Library Hide Off
Category: Desktop
Description: unhide ~/Library
Command Line: chflags nohidden ~/Library

Title: ~/Library Hide On
Category: Desktop
Description: hide ~/Library
Command Line: chflags hidden ~/Library

Note: see this article for more information (and a few lulz).

Download CLIX for Lion

Get your brand spanking new copy of the completely free CLIX (offer limited while supplies last) by clicking here.

See Also
CLIX: Learn How to Fish
Industry Watch: 10.7 Roars
Industry Watch: Lion: Kernel Panics
Industry Watch: Lion: 'Ten Days After'

About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Copyright © Rixstep. All rights reserved.