smallseo.info

osx-lion interview questions

Top osx-lion frequently asked interview questions

How can I remap the Caps Lock key in Mac OS X Lion?

I would like to remap the Caps Lock key to some other unused key (in a system-wide fashion).

Being a MacVim.app user, I always liked to idea of remapping the Caps Lock key to some other key such as the "Help" key or the "End" key in order to use that piece of keyboard real estate to enter and exit insert mode.

Previously, in Mac OS X Snow Leopard, several options existed to do this, such as the excellent PCKeyboardHack which enabled the user to chose the key code that the caps lock key would send to the OS and operated at the driver level it seems. Or the other tool called DoubleCommand. None of these options work anymore under Mac OS X Lion (Gold Master). I tried to install them none the less and ended up with a kernel panic.

The "Keyboard" preference pane in the system preferences of both versions of Mac OS X has the possibility of remapping the caps lock key built-in as you can see in these pictures. But only to one of the other three modifier keys: namely "Control", "Command" and "Option". This is evidently not sufficient for creating a macro in vim. The Caps Lock key needs to be remapped to some other non-modifier key.

Other answers found in previous questions often contain a suggestion to use the Ukulele tool. This program has never had the ability to remap the Caps Lock key.

Other keyboard modifying software such as Consistent Keyboards has similar functionality but will not solve the problem.

Any help greatly appreciated !


Source: (StackOverflow)

Resume Zsh-Terminal (OS X Lion)

OS X Lion has "Resume" feature, i. e. when you reopen an app it restores all windows and their contents. That works for Terminal as well. But if you use Zsh instead of Bash it doesn't restore opened directory. How can I fix this?


Source: (StackOverflow)

How can I assign the F5 key to be refresh in Chrome on Mac OS X?

I'm used to the F5 key being the Refresh command (as it is in Windows OS for every browser I've ever used there) and not Command-R (which takes two fingers). On Mac OS X Lion, how can I assign the F5 key to be refresh inside Chrome?


Source: (StackOverflow)

How do I make the Spotlight menu hint bubble go away in OS X Lion?

In Mac OS X Lion when you bring up the Spotlight menu and start typing something, a large-ish hint bubble will pop up to give more info about the selected result. That's all well and good except that it occasionally gets stuck and I can't make it go away.

Is there a way to get rid of this window without resorting to logging out?

Alternatively, is there a way to just get rid of those popups altogether?

Screenshot of stuck Spotlight Pop-up


Source: (StackOverflow)

How do I hide files from "All My Files" in Mac OS X v10.7 (Lion)

It should probably come as no surprise that their are certain files I don't want to appear in "All My Files" EVER. How do I get Mac OS X v10.7 (Lion) to ignore specific folders for its "All My Files" feature?


Source: (StackOverflow)

How can I merge two terminal windows in OS X lion?

I accidentally split a tabbed terminal up into two windows and I can't figure out how to join it again. Google tells me that I should drag it until it gets translucent on some other version of OS X but that doesn't seem to be working.


Source: (StackOverflow)

How do I resize a FileVault 2 encrypted partition?

Running Mac OS X Lion. My current setup is a 250 GB partition, encrypted by FileVault2, for Lion. Old Snow Leopard install is in second half, another 250 GB partition, unencrypted, of the same disk.

The Disk Utility GUI doesn't allow me to delete the Snow Leopard partition due to CoreStorage (FV2) partitions being present on the disk.

Using diskutil cs on the Terminal, I see commands to remove or add CoreStorage volumes, but no way to resize an existing one.

Will I need to decrypt my Lion HD in order to resize it?


Source: (StackOverflow)

OS X Lion new Finder view that doesn't allow sorting

In OS X, from Lion onwards, when I click on some of my folders in Finder and the title row of the files contains the usual stuff like "Date Modified" and "Size". However unlike the old Finder view I can't click on them to sort. Why is that and how do I make it never show up ever again?

enter image description here


Source: (StackOverflow)

/etc/hosts getting reset in Lion

In order to do web development on my local machine, I use the /etc/hosts file to define hosts that point back to 127.0.0.1 to which I have Apache serve up via VirtualHosts. This works great, except that now it seems that Lion resets my /etc/hosts file every so often.

Has anyone else experienced this? Is there any way to keep this from happening?

I never had this problem in Snow Leopard.


Source: (StackOverflow)

How to make Mission Control keyboard friendly?

In Snow Leopard, when you Expose, you can navigate to each window by using the keyboard arrow keys. With Lion, this is not possible anymore. Does anyone know how to make the arrow keys work in Mission Control?


Source: (StackOverflow)

How to stop Mail.app in Lion creating an Archive folder for archiving in Gmail?

Mail.app in Mac OS 10.7 added an Archive button. Unfortunately, when archiving a message in a Gmail account, instead of simply putting the message into All Mail folder, Mail.app creates a folder called Archive (in Gmail web interface this folder comes up as [Imap]/Archive) and puts the message there. Is there a way to tell Mail to put the archived messages into Gmail's All Mail instead?


Source: (StackOverflow)

Mac OS X (Lion) Chrome: shortcut for "Search With Google"

Under Keyboard Shortcuts : Application Shortcuts I've already tried with either "Search With Google" or "Google Search..." as the Menu Item (both of these for Application set as Google Chrome, of course).

Also, even with Chrome as the default browser, the Search With Google (under Services : Searching; which works) always uses Safari.

In short, how do you set up a keyboard shortcut to avoid right-clicking the selected word and choosing Search Google for 'the selected word' from the right-click menu?

Thank you.


Source: (StackOverflow)

Errors in Homebrew on OS X Lion

I just ran the Homebrew script as described in the installation page. I then ran brew doctor in Terminal, and it returned several errors. I'm not sure how to fix those errors, please help.

brew doctor

Error: Some directories in /usr/local/share/man aren't writable.
This can happen if you "sudo make install" software that isn't managed
by Homebrew. If a brew tries to add locale information to one of these
directories, then the install will fail during the link step.
You should probably `chown` them:

    /usr/local/share/man/de
    /usr/local/share/man/de/man1
Error: You have Xcode 4.2, which is outdated.
Please install Xcode 4.3.
Error: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected dylibs:
    /usr/local/lib/libcdt.5.dylib    /usr/local/lib/libcgraph.6.dylib    /usr/local/lib/libgraph.5.dylib    /usr/local/lib/libgvc.6.dylib    /usr/local/lib/libgvpr.2.dylib    /usr/local/lib/libpathplan.4.dylib    /usr/local/lib/libxdot.4.dylib
Error: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected .pc files:
    /usr/local/lib/pkgconfig/libcdt.pc    /usr/local/lib/pkgconfig/libcgraph.pc    /usr/local/lib/pkgconfig/libgraph.pc    /usr/local/lib/pkgconfig/libgvc.pc    /usr/local/lib/pkgconfig/libgvpr.pc    /usr/local/lib/pkgconfig/libpathplan.pc    /usr/local/lib/pkgconfig/libxdot.pc
Error: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:

    2to3

Consider amending your PATH so that /usr/local/bin
is ahead of /usr/bin in your PATH.

Source: (StackOverflow)

Why does OS X Lion ask for my password whenever I delete a file in my home directory?

I updated to Mac OS Lion and now every time I delete any file it asks me for my password. Any file - be it on the Desktop, in the Downloads folder or in any other place. It asks me for my password every time.

That behaviour is annoying. Is it the new default? Or there is something wrong?

Edit:

For example: this file, which is located on the desktop.

➜  Desktop  l | grep terminal
-rw-r--r--@   1 Nerian  staff   841913 22 jul 14:16 terminal.png

Edit:

Seems that quite a lot of people are having the same issue:

https://discussions.apple.com/thread/3199093?start=0&tstart=0

https://discussions.apple.com/thread/3197928?start=0&tstart=0

Edit:

I can delete the same file – a screenshot in the desktop – using the terminal and I am not prompted for a password. If I use the GUI then I am prompted.

Also, If I create a new account and make a new screenshot and try to delete everything works just fine. No password required.

When I am prompted for my password and I write it, the file is then deleted yet it doesn't appear in the bin.


Source: (StackOverflow)

PostgreSQL homebrew installation lacks config files

So I successfully installed PostgreSQL 9.1 on MacOSX Lion. Unlike people say, I didn't have to change the PATH and no other version of PostgreSQL was installed on the system ($ psql --version shows psql (PostgreSQL) 9.1.4).

However, when I try to run the server with pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start it doesn't work. First, it says no dir /usr/local/var/postgres/ exists. Fine, created one. Then it says the permissions are wrong - fine, changed them. Then it requires postgresql.conf file to be in this dir.

Now, I found sample configs in /usr/local/Cellar/postgresql/9.1.4/share/postgresql, but I'm not sure this is what it's supposed to be like. All the manuals I've seen on the web did not mention creating config files out of samples. Shouldn't homebrew be providing this out of the box, so that I simply start the server right away?


Source: (StackOverflow)