smallseo.info

osx-lion interview questions

Top osx-lion frequently asked interview questions

/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)

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)

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)

Mac - Convert from Case-Sensitive to Case-Insensitive File System

So I just got my first Mac. After getting everything set up just the way I wanted it I decided to install Steam. When I opened Steam it said something about not supporting case-sensitive file systems...

I did some googling and found that Steam won't be the only application that gives me this trouble. Photoshop (when I eventually install it) doesn't support case-sensitive file systems either. I'm sure there are other applications as well.

There is at least a work around for Steam, but it involves disc images and symbolic links. Not very fun. It works, but it's not very fun (and Steam is supposed to be all about fun, no?). I am not aware of any work arounds for Photoshop.

So here's my question. Can I boot into the disk utility, format the drive to be case-insensitive, and then restore from time machine? Are there any technical limitations that would prevent me from doing this? I haven't named anything like Folder 1 and folder 1 yet, so I am not aware of any collisions that would show up.


Source: (StackOverflow)

Mac Lion: fstab is deprecated. so what replaces it to prevent a partition from mounting?

If fstab is deprecated in Lion (and before, I think?) how does one, properly, prevent a partition from mounting on system boot?

This is loosely related to this question which as of this post has no answer.

Edit:

So my confusion comes from reading about fstab and being told to edit /etc/fstab.hd. So.../etc/fstab is what I need to create and where I add UUID info to prevent partitions from mounting?

$ cat /etc/fstab.hd 
IGNORE THIS FILE.
This file does nothing, contains no useful data, and might go away in
future releases.  Do not depend on this file or its contents.

Source: (StackOverflow)

Start configured VPN from command line (OSX)

I have two VPN configurations on my mac and I would like to be able to start them from the console when I ssh into my machine.

I have found the command networksetup which allows me to configure connections, but as far as I can tell not actually start one.

Using Lion.


Source: (StackOverflow)

What does Terminal app's "Show Alternate Screen" do? (OS X)

Today, I discovered a menu item called "Show Alternate Screen" in Terminal.app. I am just curious about what it does. It seems to be sharing the same shell process (unlike tabs), since I see output from one screen on the other while a command is running (e.g. find .) and the current directory is kept in sync.

What is this feature and how is it useful?


Source: (StackOverflow)

Don't exit full screen when pressing escape in apps like Safari on Lion

In OS X Lion, pressing the ESC key exits full screen mode. Unfortunately, and especially when using Safari, ESC is used for other functions, such as in Javascript keystroke event handling. I don't want Lion to exit full screen mode when pressing escape, but I can't find a place to disable that functionality.

I already know the keyboard shortcut to Enter/exit full screen mode (Cmd-Ctrl-F). I want to disable the ESC shortcut. I've been Googling, but cannot find any answers.

Here is a simple demonstration of the problem, using a simple jQuery Javascript one might find in the wild:

http://dpk.net/demonstration-of-escape-problem-in-lion.html


Source: (StackOverflow)

Setting iTerm2 as the default terminal (OSX Lion)

I would like to set iTerm2 instead of terminal.app as my default terminal.

Go2Shell for example let you open a terminal to the current directory in Finder. I want to ba able to use iterm2 instad of terminal.app.

I didn't find any answer on the official documentation.

Thanks for your help.

Update: ShellTo is a great alternative to Go2Shell and supports iTerm2


Source: (StackOverflow)

How to automount SMB shared network drives in Mac OS X Lion

In Mac OS X 10.7 (Lion) Apple has replaced good old SMB support. Now I can't auto connect to my shared (SMB) network drives. Workarounds? Or is this impossible? In OS X Snow Leopard, I could automatically connect my Ubuntu (SMB) shared network drives with auto_smb / auto_master (autofs configuration in /private/etc/). I made three mount points (folders) directly in '/Volumes', I used /Volumes/Data and /Volumes/webroot (both SMB shared).

Unfortunately Lion doesn't connect (automount) my network drives. I have to manually connect to the server (Ubuntu file server) in Finder, then open up Terminal to navigate to the mount points, and then it connects. This is not a workable solution. I've searched (Google/SO) but found no solutions apart from an unsupported hack.

Isn't it possible anymore to automatically connect to an SMB-shared drive during startup?


Source: (StackOverflow)

Apache Bench test error on OS X: "apr_socket_recv: Connection reset by peer (54)"

I updated my MacBook Pro 13" to Lion a few weeks ago. I just found out that Apache Bench (apache2.2.19) is not working. It always shows this error, no matter what:

apr_socket_recv: Connection reset by peer (54)

I also did a clean install on my Mac Mini and it produced the same error.

How can I fix this?


Source: (StackOverflow)

Where to find the .bashrc file on Mac OS X Snow Leopard and Lion?

I want to install rvm on my Snow Leopard machine.

It says I need to add a line to my .bashrc file (I'm using bash) but where is my .bashrc file?


Source: (StackOverflow)

Error adding cronjobs in Mac OS X Lion

Until now, I have never attempted adding a crontask on my Mac. To my surprise, it threw an error..

[hayek@mac:/www/] 02:33:22 PM: crontab -e                                                                                                         1 .
crontab: no crontab for hayek - using an empty one
crontab: "/usr/bin/vi" exited with status 1

How can I figure out why it's throwing that error?

I'm running Mac OS X Lion 10.7.2


Source: (StackOverflow)