osx-yosemite interview questions
Top osx-yosemite frequently asked interview questions
In Snow Leopard, I had the window switch animation disabled when I quick-key between spaces. Now that it's Mission Control in Lion, there's this long animation during which all my desktop icons disappear and I can't use anything. I'd really like to disable this, but the old fix doesn't appear to work.
Does anyone know how to disable this needless animation in OS X Lion or later?
Source: (StackOverflow)
When I try to get the path of a file using ⌘ (Command)+I
, it gives the path in a different way.
I see this only after updating to Yosemite. It is not a text. How do I get it in the format /Users/Myself/Documents/…
?
Source: (StackOverflow)
It appears that since I upgraded to OS X Yosemite, and fiddled with some of the energy saver and screen saver settings, that my user is logged out due to inactivity.
Where is the setting where I can turn this off and not allow my user to be automatically logged off when inactive?
Source: (StackOverflow)
I just updated the Mac OS X to Yosemite, and now some applications do not work (IBM DB2). I know that I need to set the Open Files to 65000, however the command does not work.
Andress-MBP:~ root# ulimit -n 12288
Andress-MBP:~ root# ulimit -n 12289
-sh: ulimit: open files: cannot modify limit: Invalid argument
Why is this happening and how can I correct the problem?
Source: (StackOverflow)
I recently upgraded from Mavericks to Yosemite....headaches ensued
I'm pretty sure my problem lies w/ the number of files I can open - but I'm not sure how to solve it. I'm also pretty sure I've read every article/tip about creating the /etc/sysctl.conf
file and /etc/launchd.conf
file
For clarity's sake this is what both of them currently look like n.b. (I'm not even sure if these are the right commands to put in them anymore - I've tried just about everything and every combination. ie: higher values, lower values, removing commands, adding commands)
/etc/launchd.conf
limit maxfiles 16384 32768
limit maxproc 1000 2000
/etc/sysctl.conf
# Turn up maxproc
kern.maxproc=2048
# Turn up the maxproc per user
kern.maxprocperuid=512
I've also tried increasing my ulimit values - both globally and locally for my current session...no bueno
ulimit -a
-t: cpu time (seconds) unlimited
-f: file size (blocks) unlimited
-d: data seg size (kbytes) unlimited
-s: stack size (kbytes) 8192
-c: core file size (blocks) 0
-v: address space (kbytes) unlimited
-l: locked-in-memory size (kbytes) unlimited
-u: processes 709
-n: file descriptors 4096
Ok - this is where my headache initially started...My DB (percona-server 5.6.21-69.0 installed via homebrew) started choking and dying, and in the mysql-error.log it was filled w/ the error too many files open
.
2014-10-21 15:19:50 5190 [ERROR] /usr/local/Cellar/percona-server/5.6.21-69.0/bin/mysqld: Can't open file: './ie/tokenorder_products.frm' (errno: 24 - Too many open files)
2014-10-21 15:19:50 5190 [ERROR] /usr/local/Cellar/percona-server/5.6.21-69.0/bin/mysqld: Can't open file: './ie/tokenorders.frm' (errno: 24 - Too many open files)
2014-10-21 15:19:50 5190 [ERROR] /usr/local/Cellar/percona-server/5.6.21-69.0/bin/mysqld: Can't open file: './ie/tsdevices.frm' (errno: 24 - Too many open files)
2014-10-21 15:19:50 5190 [ERROR] /usr/local/Cellar/percona-server/5.6.21-69.0/bin/mysqld: Can't open file: './ie/tsracks.frm' (errno: 24 - Too many open files)
2014-10-21 15:19:50 5190 [ERROR] /usr/local/Cellar/percona-server/5.6.21-69.0/bin/mysqld: Can't open file: './ie/v_classunity_classlist.frm' (errno: 24 - Too many open files)
2014-10-21 15:20:48 5190 [ERROR] Error in accept: Too many open files
This is where I initially started to try and solve that problem by "up-ing" my ulimit, maxfiles, maxproc,etc...
Eventually - frustrated, I moved on and would come back to that issue later. So then I was trying to sudo gem install nokogiri
and over and over it would fail and spit out this same error (a lot of repeats about the builder.rb failing to build the gem native extension - followed by a bunch of repeated stacktraces Logs Gist
nokogiri Install Errors
I've tried/googled a bunch of different approaches to solve this issue (ie: additional flags, etc..). Whats amazing - and when I started thinking this issue was tied to the # of files/processes open is when I checked top
while the gem was installing....I was pretty surprised to see what I found
top during gem install nokogiri
It looks like my process keeps forking, which then made sense for this ONE line in my previous picture (see "nokogiri install errors picture")
sh: fork: Resource temporarily unavailable
So I'm kinda out of ideas, but I'm not really sure how to debug the # of files anymore?
UPDATE
Well, I managed to get nokogiri installed. Unfortunately, I'm not exactly sure what fixed it b/c I've tried so many things. But I think it had to deal w/ reinstalling ruby. However, I'm still getting the same issue w/ my DB complaining about too many files open when I use any sort of database that is not trivially small.
Source: (StackOverflow)
I've just installed the OS X Yosemite beta and can't open MATLab 2014a.
It displays this error dialog:
Does anyone have any ideas as to how this could be resolved?
Source: (StackOverflow)
Can you please see the attached image:
I have no idea where these came from and I can not get rid of them.. The eject buttons next to them do not seem to do any work. This happened after Yosemite update.
Source: (StackOverflow)
Somehow the open file dialog in Chrome ended up being bigger in height than my screen so I can't resize it back.
Here's a full screen screenshot:
Reopening chrome / restarting OSX does not fix the issue.
Source: (StackOverflow)
I have a launchd daemon placed in ~/Library/LaunchAgents
that worked well in Mavericks. But it won’t start in Yosemite public beta. The daemon plist is like this (my username is darksair
with UID 501)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.darksair.retrmail</string>
<key>ProgramArguments</key>
<array>
<string>/Users/darksair/bin/retrmail.py</string>
</array>
<key>KeepAlive</key>
<false/>
<key>StartInterval</key>
<integer>300</integer>
<key>LaunchOnlyOnce</key>
<false/>
<key>UserName</key>
<string>darksair</string>
<key>ProcessType</key>
<string>Standard</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/Users/darksair/Python/bin:/Users/darksair/Python3/bin:/Users/darksair/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>StandardOutPath</key>
<string>/Users/darksair/logs/retrmail.log</string>
<key>StandardErrorPath</key>
<string>/Users/darksair/logs/retrmail.log</string>
</dict>
</plist>
Basically it is supposed to run ~/bin/retrmail.py
every 5 minutes.
I notice that in Yosemite launchd is upgraded to 2.0, and launchctl has new commands. I tried
sudo launchctl kickstart user/501/org.darksair.retrmail
and it said
Could not find service "org.darksair.retrmail" in domain for uid: 501
I also tried the old school
sudo launchctl load ~/Library/LaunchAgents/retrmail.plist
and it said
/Users/darksair/Library/LaunchAgents/retrmail.plist: Path had bad ownership/permissions
The file is owned by me and the staff group. I tried both permission 644 and 600 with the same error.
So does anyone know how to properly fire up a launchd daemon in Yosemite?
UPDATE: Looks like my launch agent file has to be owned by root:wheel
. After I chown, I tried
sudo launchctl load ~/Library/LaunchAgents/retrmail.plist
and it didn’t issue any error. And I think my deamon is running properly. I’ll leave this question open because I remember the launchd document clearly states that the launch agent file can be owned by the user running the daemon.
UPDATE2: No it wasn’t running properly. It got run only once, but not again, as if it was unloaded.
UPDATE3: I upgraded to Yosemite public beta 3, and changed my agent to this
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN
http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>org.darksair.retrmail</string>
<key>ProgramArguments</key>
<array>
<string>/Users/darksair/bin/retrmail.py</string>
</array>
<key>StartInterval</key>
<integer>300</integer>
<key>UserName</key>
<string>darksair</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/Users/darksair/Python/bin:/Users/darksair/Python3/bin:/Users/darksair/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin</string>
</dict>
<key>StandardOutPath</key>
<string>/Users/darksair/logs/retrmail.log</string>
<key>StandardErrorPath</key>
<string>/Users/darksair/logs/retrmail.log</string>
</dict>
</plist>
I reloaded this agent, and I think now it is working properly. I’m still leaving this question open because I don’t know what’s wrong with my previous plist.
In conclusion, what I found is I have to change the owner of the plist to root:wheel
in order to load it.
Source: (StackOverflow)
On OS X, 10.10, if I start a Vagrant based VirtualBox VM that is configured with a host only network adapter and then destroy that VM and attempt to re-create it with the VMware provider the vboxnet# adapter I used previously is still holding onto the static IP I have declared in the Vagrantfile. (the # at the end of vboxnet is an integer that can vary based on how many VM's have been spun up)
Without rebooting or uninstalling VirtualBox, how do I remove that vboxnet# virtual adapter? It doesn't get presented in the OS X network properties window.
Source: (StackOverflow)
I just upgraded from Mavericks to Yosemite, and now curl
can't see loopback host names.
Set up a simple http server to test:
$ python -m SimpleHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...
Now I can hit localhost:8000 in chrome. I can even wget it. But in curl, this happens:
$ curl localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused
However, this works:
$ curl 127.0.0.1:8000
I read this answer about wget proxy settings, but it didn't help, because this works:
$ wget --proxy=off localhost:8000
This is really frustrating, because I have a few different loopback hostnames listed in my /etc/hosts
file so I can develop apps locally, and I'm used to debugging them with curl.
I've tried with the version of curl that ships with osx:
$ curl --version
curl 7.37.1 (x86_64-apple-darwin14.0) libcurl/7.37.1 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate IPv6 Largefile NTLM NTLM_WB SSL libz
$ curl localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused
$ curl 127.0.0.1 # works
And I've tried compiling curl with brew:
$ /usr/local/Cellar/curl/7.38.0/bin/curl --version
curl 7.38.0 (x86_64-apple-darwin14.0.0) libcurl/7.38.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz
$ /usr/local/Cellar/curl/7.38.0/bin/curl localhost:8000
curl: (7) Failed to connect to localhost port 8000: Connection refused
$ /usr/local/Cellar/curl/7.38.0/bin/curl 127.0.0.1:8000 # works
Source: (StackOverflow)
Problem: after downloading an application in OS X Yosemite (10.10.x) trying to open the application (either from the command-line or by double-clicking the application) produces an "The application “SomeApp.app” can’t be opened." Note that this differs from the "SomeApp can't be opened because it was not downloaded from the Mac App Store" or "SomeApp can’t be opened because it is from an unidentified developer” message that is the result of Gatekeeper settings.
Source: (StackOverflow)
I've been following the directions at http://installrails.com to get my Macbook Air setup for some ruby work but I am running in any issue with RVM. When I try to install Ruby I get the following errors. I also see them when trying to run ruby -v
.
dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
Referenced from: /Users/Chris/.rvm/rubies/ruby-2.1.3/bin/ruby
Reason: image not found
Googling around hasn't solved it, so I am confused what is causing it. Any suggestions?
Source: (StackOverflow)
I was having OSX Mavericks 10.9 in Vmware. It was working fine with VMware Tools installed and SVGA Drivers also. When Yosemite released, I updated it from App Store.
I cam across many problems on this update.
- Graphics are very bad
- It is too much slow
What i tried:
- I updated latest VMware tools from VMware site
- Tried to install SVGA drivers again (could not find update for OSX Yosemite SVGA drivers here. These drivers were working well with Mavericks and made it blazing fast in vmware in my previous experience)
- Rpaired file and folder permissions both using Mac OS X's internal utility and using CCleaner application also.
- Cleaned all junk files (e.g. temp files) using CCleaner
Tried to increase Virtual Graphics Memory size using configuration file of Virtual Machine and adding this line to it
svga.vramSize = "sizeInBytes"
Came across a link on internet link here. It suggested to run application called BeamOff (download link available on same site) and add it to startup to disable Beam Sync feature of Mac to improve graphics
By using option 6 mentioned above, when i launched BeamOff application, it suddenly made graphics smoother. So i added it to login item so that it may start with login of Mac. But to my disappointment, this improvement in performance (graphics + speed etc) was not too much great as i was having when using OS X Mavericks.
My Virtual machine is having:
- RAM: 3GB
- HDD Space: 150 GB
What is problem/ What is want:
1.Speedup OS X Yosemite performance (graphics + speed) as i was having before in Mavericks
2. I am having resolution of 1366*768 but When i am at login screen of Mavericks, i am not having this resolution (some black margins from left and right, looks like 1024*768). It changes to 1366*768 resolution after login process is complete and desktop is loaded. Please note it was working fine when i was having Mavericks (have 1366*768 resolution at login screen and desktop both).
Source: (StackOverflow)
I'm aware that there are solutions existing that allow you to prevent auto launch of applications such as iphoto or the newer replacement, Photos on a per device basis through the UI of Photos itself, and more comprehensive control (can set what application opens) through Image Viewer, but my question is if there is a way to stop Photos from auto-launching universally (no matter what removable media I mount), preferably by issuing a default write command or disabling a launchd plist or similar.
I tried figuring this out on my own, using an article from lifehacker "How to Find Hidden Features in Mac Applications".
I've issued the following commands:
strings /Applications/Photos.app/Contents/MacOS/Photos > Desktop/photosstrings.txt
class-dump /Applications/Photos.app/Contents/MacOS/Photos > Desktop/photosclassdump.txt
strings /Applications/Photos.app/Contents/MacOS/PhotosRelauncher > Desktop/photosrelauncherstrings.txt
class-dump /Applications/Photos.app/Contents/MacOS/PhotosRelauncher > Desktop/photosrelauncherclassdump.txt
Output of above can be viewed/downloaded via Gist
I've tried out a few stabs with promising strings such as:
defaults write com.apple.Photos canAutoLaunch = 0
defaults write com.apple.Photos shouldAutoLaunch = 0
No luck so far. I did a:
defaults read com.apple.Photos
which shows the two writes did get written, but they're not doing anything obvious, and definitely not what I was going for.
I'm not sure what service to do killall on for quicker testing, rebooting to test is kinda overkill. Activity Monitor shows the following with "photo" as the search term:
Photos Agent
com.apple.CloudPhotosConfiguration
Photolibraryd
com.apple.photomoments
com.apple.photomodel
Photos
I've tried doing a defaults read on Photos Agent and so on even escaping characters and other variations and whatever with no luck either.
Would appreciate help in achieving the desired effect. Would love education along the way too if that's not too much to ask.
Source: (StackOverflow)