When I double tap on an image url when using Safari, the selected text includes the extension only if the filename is lower case. Why? I write a lot of SE questions and when I include multiple images I frequently copy/paste just the names.
I've just started using Safari on my new MacBook after using Chrome on my old MacBook, and I've discovered that when I double-tap to select the text it sometimes grabs the .jpg extension and sometimes doesn't. As far as I can tell this depends on whether the imgur filename begins with an upper case or a lower case letter.
Is there any way I can get this selection behavior to be case-agnostic?
With chrome the selection always stops before the period, but Safari seems to be more "creative" in where the selection ends.

Try it yourself!
i.stack.imgur.com/GESmi.png
i.stack.imgur.com/124RA.png
i.stack.imgur.com/eFGbq.jpg
i.stack.imgur.com/JOKd4.jpg  double tapping only selects "JOKd4" and not ".jpg"
i.stack.imgur.com/amD8b.jpg
i.stack.imgur.com/wbP9b.jpg
i.stack.imgur.com/bidkm.jpg
i.stack.imgur.com/bebR8.jpg

This is a quirk of the UAX #29 standard on Unicode word segmentation boundaries.  Basically, this document specifies standard rules for determining what's a "word" in a string of Unicode text.  Cocoa Text (the macOS text subsystem) conforms to these rules when implementing features like "double click to select a word".
Using uniseg, a Python library that implements these rules, we can see the word boundaries for these two strings:
In [1]: list(uniseg.wordbreak.words("JOKd4.jpg"))
Out[1]: ['JOKd4', '.', 'jpg']

In [2]: list(uniseg.wordbreak.words("eFGbq.jpg"))
Out[2]: ['eFGbq.jpg']

In the first case, UAX #29 rules specify there are three words in the text (which you can check by trying to double-tap select each piece one by one).  In the second case, it specifies there is only one word.
This should be standard behavior across Cocoa apps, but overridable by individual apps if they care to.  Chrome, presumably, implements an override for text / word selection behavior beyond the Cocoa default.  I'm not sure if there is a way for users to override this behavior without access to source code.


How to get correct file permissions from Macports pip installs? Macports sets up the ownership of its Python site-packages directory as root.wheel with world-readable permissions.  Python packages instally via port install have the same

# ls -l -d /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages
drwxr-xr-x  151 root  wheel  5134 Mar  8 10:56 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages

This of course prevents individual users from using pip install  to add packages, which is just fine since that really ought to be done as root.

However, if one uses sudo or a root shell to pip install, the packages are installed by pip as readable only by root.wheel (740).

% sudo pip install BeautifulSoup
...
% ls -l -d   /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/BeautifulSoup.py
-rw-r-----  1 root  wheel  79567 Mar  8 11:09 /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/BeautifulSoup.py

This precludes my user account from actually importing or using the package (*).

How can I get pip to always put reasonable permissions on installed packages?

Update (edit)

I have reworded the question to emphasize that it is about pip installs only.  I would also like to emphasize here that the problem is not about needing write permission to the modules.  The problem is that the modules are being installed without read permissions.

(*) A hack to fix it is to chmod a+rX the proper permissions (744/755) onto the newly installed package files

Update 2 (solution)

As suggested by both Mark and Ian, and confirmed in a quick test, this has to do with the umask for root.  Here is the documentation on how to change /etc/sudoers for OSX.  Note that it is not necessarily a good idea to change the umask for all sudo instances!

You can use virtualenv to create a local "copy" of the Python installation that's owned and easily manipulated by you. The advantage to using virtualenv is you can make many copies of the same version of Python, but with different versions of similar packages installed, and then switch between them with the virtualenv command line.

This lets you use different versions of libraries in different projects or incompatible libraries.

To install virtualenv:

sudo pip install virtualenv

And now you can use it yourself, without sudo, to create a virtual python owned by you:

mkdir -p ~/Development/mypythonproject
cd ~/Development/mypythonproject
virtualenv .venv
source .venv/bin/activate

For example:

IanCsiMac:~/Development/keybase-python |ruby-2.1.2| [git::develop]
> which python
/usr/local/bin/python

IanCsiMac:~/Development/keybase-python |ruby-2.1.2| [git::develop]
> source .venv/bin/activate

(.venv)
IanCsiMac:~/Development/keybase-python |ruby-2.1.2| [git::develop]
> which python
/Users/ian/code/keybase-python/.venv/bin/python

(.venv)
IanCsiMac:~/Development/keybase-python |ruby-2.1.2| [git::develop]
> deactivate

IanCsiMac:~/Development/keybase-python |ruby-2.1.2| [git::develop]
> which python
/usr/local/bin/python

You can virtualenv-install in your ~ directory if you want a default python that you control to be available at all times like so:

cd ~
virtualenv venv

And now you've got ~/venv/bin/pip available to you. You can modify your ~/.bash_profile and add:

source venv/bin/activate

Right at the end of it to have your virtualenv available by default in your shell.


"Reinstalling" /usr and /local folder How would I be able to reinstall Yosemite keeping the software I've installed through things like brew or macports but not the "system" files? For example, the system files being /System, /usr, /bin, /Library and such.

I think that I might have to backup my personal files then do a full system wipe and then move everything back over. Is there an easier way?

When you upgrade OS X the installer preserves the things that you've installed to /usr/local (through Homebrew) and /opt (through MacPorts). Always a good idea to have backups though, just in case.

It has been suggested that you might want to temporarily move the contents of /usr/local to speed up the install though. Faster Mac OS X 10.10 Yosemite Upgrades for Developers


How to fix mac os high sierra, freeze? My Mac laptop is freezing like age old windows laptop since I have upgrade my mac os to mac os high sierra.

Mac details : Mac book pro retina mid 2012

It just freezes and i am forced to restart my laptop, (it never ever happened before)
Is any one facing this problem, how to fix it ?

Steps done :

Run complete diagnostic test
Reset smc
Reset nvram from this
link

I was faced with the same dilemma, it seemed like my MacBook Pro (mid-2015) was 'freezing.' I stumbled across a the fix to it after seeing your post - you can read about it here: https://jrgarrigues.github.io/2017/11/05/high-sierra-freezing/

The gist of the linked article is this:

  Reset your NVRAM and the SMC [System Management Controller]

  First reset your NVRAM.
  Turn off your Mac. Then turn it on and hold Command+Option+P+R while the computer is booting up. You will
  hear two chimes or on newer MacBook Pro models you will see the screen
  come on and go off twice.

  Now, shut your computer down again and reset the SMC [System
  Management Controller].With your Mac off, press Shift+Control+Option and then hold these keys while pressing and holding the power
  button for 10 seconds.


Can I Change Track Attributes Without iTunes? I accidentally changed the Media Kind of an Audiobook to Voice Memo. I've never used Voice Memos on my iPhone and can't see any way to browse voice memos in iTunes to correct the issue.

I have found the Audiobook files in the iTunes Media folder but when I drag them back into iTunes it's still categorised as Voice Memos. I even tried manually moving it into the Audiobook folder in iTunes Media but it doesn't show up under Audiobooks in iTunes.

Is there a way to change the Media Type of a file before importing it into iTunes? Or, is there a way to view this file in iTunes somehow so I can change the attributes in there?

Well I found a way but it's not easy!

Locate the file in the Media Type > Voice Memos folder.
Double-click one of the audiobook tracks to play it in iTunes.
Right-click the play-bar at the top of iTunes and choose Get Info and you can change that track back to an Audiobook.

You could do this for every track but in my case I found that doing this revealed all of the Audiobook tracks under My Music even though they were still tagged as Voice Memos. So I could select all tracks from there and use Cmd + i to convert them all to Audiobooks in one hit.

Quite a long workaround but hopefully this will help someone else, I'm just glad my audiobooks are playable again :)


Can't install Python Modules I'm running OSX 10.8.5 with python 2.7.10. When I run the following pip install pyodbc I get the following error message.

Error Message:

  Command "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -c "import setuptools, tokenize;__file__='/private/var/folders/vy/13xnp2r52ls80mzhmcns__bm0000gp/T/pip-build-OUZxeg/pyodbc/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/vy/13xnp2r52ls80mzhmcns__bm0000gp/T/pip-BhOEZo-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /private/var/folders/vy/13xnp2r52ls80mzhmcns__bm0000gp/T/pip-build-OUZxeg/pyodbc

Xcode 5.1 is installed and pip list shows:

argh (0.26.1)
html5lib (0.999999)
pathtools (0.1.2)
pip (7.1.0)
PyYAML (3.11)
setuptools (15.2)
simplejson (3.8.0)
six (1.9.0)
wheel (0.24.0)

I'm pretty new to OS X so any help is welcome.

Problem sovled

This issue was caused because I had imported a time machine back which was made using snow lepoard. Doing this had overwrote the mountain lion libraries.

I just had to reinstall mountain lion over the existing install and then xcode and homebrew and it worked fine.


Is it useful to update the OS in my old MAcBook Pro? Knowing that I use the MacBook for programming, surf the web and write in latex do you think that the update to the new OS X version will provide me benefit in performance?

Here the specifics of my MacBook Pro Mid 2010:

It is a tough question to estimate if you will get a performance boost from MacOS Sierra, as every system responds differently.

I have a mid 2011 iMac that I upgraded from El Capitan to Sierra, and I  found a noticeable decrease in performance. So much so that I rolled back and made a clean install of El Capitan.

There are however a number of good reasons to update. The first and most important being security. Apple will stop supporting and producing updates fro El Capitan soon. When this happens your system will become more vulnerable over time

I would recommend that if you do want to upgrade, back up your system to a Time Machine drive and disconnect it from the system before the update. If you decide that you want to roll back, you can follow a guide on making a clean El Capitan install here. Once you have done that, you can then restore from the Time Machine backup.


Can't adjust volume/play music on iPhone 4 For some reasons I can't adjust the volume on my iPhone 4 anymore. Whenever I press it the popup showing the bell is shown but not the bar indicating the .
I can't adjust the volume at all.
Also playing music in the musicplayer doesn't work anymore. The play-symbol is shown but I just can't hear a thing.

Does anyone have a clue what is going wrong?

This might be caused by several things, one of them being your phone believing it's connected to an external speaker through the 30-pin connector. When your phone believes it's connected to an external speaker, it assumes the speaker controls the volume, so you can't control the volume. In addition to that, the phone will attempt to transmit any audio through the 30-pin connector. I can't really think of any solution, other than trying to connect and disconnect from a charching cable or docking station, or try a restore.

I assume you've already attempted to reboot the phone, another thing you could try is to connect it to some headphones with the mini-jack port and see if you're able to control the volume with them plugged in. If you have a cotton swab that can fit in the 30-pin connector, you can also try to clean it (do NOT use water, soap or acid, simply a dry, clean swab).

If nothing helps, I suggest you hand it in for a check-up at the nearest Apple Retail store.


El Capitan on MacBook Air with 2 GB ram I have a MacBook Air (MacBookAir3,2) with 2 GB ram and still running Snow Leopard (10.6.8). The App Store offers me to upgrade to El Capitan, so I guess the MacBook Air is still supported. But I wonder if you can really enjoy El Capitan with only 2 GB ram?

The reason why I think about upgrading at all (beside security issues) is a new iPhone that won't sync with an old iTunes.

The official system requirements from Apple state 2GB of RAM minimum. And as you have flash-based storage the paging to disk that many people see running RAM hungry apps will not be too bad. With any luck.

However I would be hesitant to recommend it as the newer the OS the more RAM hungry it seems to be. I would make a disk image of your current drive somewhere safe (external USB drive) so you can restore it easily if you don't like the results.


Secret way to trigger Thesaurus on Mac OS X? Not really sure how to ask since I have no idea what just happened, but I'll try my best :-)

I just typed "I" into a textfield here on Yosemite and then tried to click on an icon in the Mac OS status bar (with the option key and some other key pressed AFAIK), but I missed and the next thing I saw was a dropdown that contained the entries "He", "She", "It", "You", "We", ...I am unable to reproduce and would like to know what this was and how to  make it happen again?

It is possible that you pressed the esc key. Yosemite has a similar feature to iOS 8's QuickType keyboard that "intelligently predicts" what you are trying to type. It looks like this:

Is this what appeared?


I can not turn off VoiceOver on iPhone 4S How can I turn off VoiceOver and get back to normal ?!

As I follow the instructions how to turn off 'VoiceOver' in Setting on my iPhone,
however VoiceOver icon get back on quickly after double click...
(haven't upgrade iOS 8.1.1 yet)

Tried to do double click 'Voiceover' icon in Setting, but doesn't off and switch on  back quickly..
Done press 'Home' button 3 times quickly, but Top page shows up later..
Done turn off the phone, the VoiceOver shows up with passcode screen..

What else I can do for turning off the annoying voice?

Turning Voiceover Off

Double-tap the Settings icon on your homepage.
Use three fingers to scroll down to the General menu, and double-click on it.
Use three fingers to scroll down to the Accessibility menu, and double-click on it.
Double-tap on the VoiceOver menu item.
Turn VoiceOver off

Alternatively, in iTunes you select summary and click Universal Access, then choose either Zoom or Neither rather than VoiceOver.


mac book pro headphones not working even with the correct sound settings . my macbook pro( 13 inch mid 2009) running yosemite 10.10.5 is not delivering sound to the headphone speakers .I am using my iPhones headphones .it is able to receive mic input though. does it mean it has a hardware issue

To diagnose the problem verify the following things:

Are you sure that the headset is set as source under Input? (Make sure it isn't using the built-in mic of the computer)
If you unplug the headphones, can the MacBook play sound through the built-in speakers?
If you plug your headphones into some other device (i.e. another computer or, an iPhone), can you play sound and hear it?
With the same settings as in your screenshot but with a different headset or a set of speakers (if you have any of those), can you hear sound through the MacBook?

If the MacBook either doesn't play sound regardless of the output device, you probably have a hardware problem. To be extra sure, try running Apple Hardware Test (AHT).

If the headset can't output sound when connected to other devices, that might be what's defective.


Disabling Photo Stream with Shared Apple ID My kid's devices are tied to my Apple ID, and that's working wonderfully.  The problem is that anytime I take a photo on my iphone, it automatically appears on their ipads.  How do I disable that?

If what you are trying to achieve is to give your kids' devices the ability to download apps that you purchased on your device(s), then you probably do not want to log them in to your iCloud account at all. Instead you need to go to the App Store settings, and enter your Apple ID in there, to allow the store to use your ID.

The advantage of this is that you can create each of your offspring an iCloud login of his/her very own, meaning that they can turn on iCloud backup without eating your storage, and to save their own Photo Stream, contacts, et cetera.

Also you can have them appear as different people under Find My Friends.


Which type of storage between HDD and SSD should I use in MacBook Pro for app development job? I'm deciding to buy my first MacBook Pro for developing iOS application. I never use any Apple desktop or laptop before, and also never develop any application. I think if I want faster result when I compile an application, higher CPU and RAM are better. But I'm not sure about storage type, does SSD significantly results faster compilation time than HDD?

Pros of SSD: faster read & write speed

Cons of SSD: expensive!

Is it worth to use SSD instead of HDD?

P.S. I choose MacBook Pro instead of iMac or Mac Pro because I have to bring it to training center to study iOS application development.

It depends on your project size, but an SSD is unlikely to make a huge difference in compilation speeds - it's almost entirely a CPU-bound task. However an SSD can still make a big difference in your productivity with Xcode, and OS X in general. It particularly helps when you're indexing files in a project, or searching the documentation.

You'll also notice a big improvement whenever you're swapping to disk (e.g. if you're doing another task while a big compile is happening).

Unless money is very tight, I strongly recommend getting an SSD. You can save a lot of money buying a 3rd party SSD and installing it yourself (which is pretty easy in a MacBook Pro) - prices have been dropping sharply lately, I'd estimate about 50% from where they were at the start of the year.


Missing email attachments I have a Gmail account but access all my email through Apple Mail. I noticed in the last month or so that I'm not seeing the attachments that are being sent to me. In order to access the attachments, I have to open up Gmail through Safari. How do I fix this problem?

Have you made sure that these selections are checked? Having the incorrect option selected can produce the very symptoms you're describing.


Turning off the App Store gesture? I'm sick and tired of having the App Store launched every other time I try to turn a page in iBook.  Is there a way to turn the stupid "feature" off?  Don't see a setting in the App Store panel, nor in iBooks.

This is a recently added feature.  In any app, a tap or swipe left near the right edge (in other words, the same motion as turning a page) brings in an abbreviated app store panel.  Can dismiss the panel by tapping somewhere else, but my reading is still interrupted, and the full app is still in the background.

I think you're opening Slide Over multitasking on an iPad and App Store happens to be the last app you used with Slide Over.

Instead of sliding from the very edge of the screen, just slide anywhere else on the screen. Start your finger somewhere on the display and Slide Over won't be opened.

You can disable Slide Over completely: Settings → General → Multitasking and turn off Allow Multiple Apps.


give read&write permission to only 1 file in folder I am trying to manually modify preferences file located at

/Library/Preferences/SystemConfiguration/preferences.plist

To modify it, I need to give it read&write permission. I did that. The problem is that the file is in a folder, for which I cannot change permission (I am admin and I have no access), nor do I want to change permissions to the whole folder for security reasons. I only want to change it for preferences.plist file. How can I achieve this?

These are the pop-ups I get when trying to modify it.

Upon modifying permissions to parent folder I get this:

To allow user_name writing to preferences.plist add an ACL with:

sudo chmod +a "user_name allow write" /Library/Preferences/SystemConfiguration/preferences.plist

This changes the output of:

ls -laeO /Library/Preferences/SystemConfiguration/preferences.plist
-rw-r--r--  1 root  wheel  - 59715  9 Feb 23:25 /Library/Preferences/SystemConfiguration/preferences.plist

to:

ls -laeO /Library/Preferences/SystemConfiguration/preferences.plist
-rw-r--r--+ 1 root  wheel  - 59715  9 Feb 23:25 /Library/Preferences/SystemConfiguration/preferences.plist
0: user:user_name allow write

but doesn't change the permissions of the superior folder or other files residing in the same folder:

drwxr-xr-x  15 root      admin        -             510 24 Mär 17:23 SystemConfiguration

To remove the ACL later simply enter:

sudo chmod -a "user_name allow write" /Library/Preferences/SystemConfiguration/preferences.plist


Force enabling TRIM before setup assistant is run Basically, I'm preparing to give a MacBook Pro, running Mac OS X 10.11.4, to someone, but I need to execute "sudo trimforce enable" beforehand, as it contains an aftermarket SSD (fully compatible with TRIM). I wanted them to be able to use the normal setup assistant, so creating a user to run the command is not ideal.

Is it possible to boot into recovery or single user mode and run the command, without having to create a user account?

Thank you.

You can boot into OS X Recovery mode by pressing CMD+R at startup, after it boots and OS X Utility comes up, go to Application menu and them Terminal. Then you can execute sudo trimforce enable. You can also boot into single user mode and execute the command (If it doesn't work in single user mode them try taking out the sudo).


Root crontab won't save I'm trying to add a crontab entry to my root user's crontab. I'm able to add an entry without issue to my regular user's crontab, but when I su to root user and try adding a crontab entry it does not save the entry.

The process I'm going through is:

$sudo su
$crontab -e
# write out my crontab entry and then :wq to write and quit vi
$crontab -l
crontab: no crontab for root

I've also tried exiting vi using wq! and it still will not save the entry.

The entry that I'm entering is:

* * * * * /sayhi.sh

sayhi.sh is a simple shell script I'm using to try to verify that the cron job is running.

Is there something different I need to do if I'm trying to create a crontab entry for root? I've been looking around and I haven't seen anything about crontab that's particular to the root user.

Any help would be appreciated!

Your commands should actually work, however it's not as I would do it.

Instead try :-

sudo crontab -e -u root

then to list :-

sudo crontab -l -u root

As a general rule I go to a great deal of trouble to never run a root shell. When I do I use sudo -s rather than sudo su.

When you exit from vi you should see two lines :-

crontab: no crontab for root - using an empty one
crontab: installing new crontab

If you don't get those two lines you have serious troubles. If you do and then the list command doesn't show anything I would suspect permission troubles.

I also wouldn't use your example line as you are asking the system to run "sayhi.sh" once a minute all day, every day. I also wonder about the path "/sayhi.sh" - do you really have the script right up the top of your boot drive? That's not a good idea either or do you perhaps mean "~/sayhi.sh" which in this case would be in roots home directory (usually /var/root) or do you mean your home directory. In crontab files it's best to explicitly code the entire path, regardless.

You do also realise that tany output of the cron job will not go to any terminal but will instead be emailed to root (by default).

If you want to check that cron is running tasks a simple

*/5 * * * *   echo "CRON" > /Users/myname/.cronout

will do that (the first field runs the task a much more reasonable every 5 minutes).

The crontabs themselves are stored in /usr/lib/cron/tabs. /usr/lib/cron is actually a link to /var/at and if you go there you will find the tabs directory and also the cron.deny file. Check that nobody has added root to that and if you still have no joy then you might try :

echo > /var/at/tabs/root

which should create an empty file that you might then be able to edit.


Is there a Safari 5 download still on apple.com somewhere? My friend's mother-in-law upgraded to Safari 6 and is now panicking because she doesn't have separate address and search fields. Is there somewhere on apple.com where she can download a Safari 5 installer? She's still running Lion so that shouldn't be an issue.

Unfortunately, telling her to relax and get used to it isn't an option. It's like when my mother's Safari started defaulting to Top Sites and she nearly started crying.

Take a look at this question on Ask Different. How do you remove Safari 6 on Mac OS X 10.7.4

I had the same problem when I upgraded and was able to switch back following this answer.


Mac refuses to sleep: Reset PreventSystemSleep? For the last month, my Mac has refused to go to sleep – even when commanding it to do so. The screen goes black, but the computer is still on.

I have checked Apple's support page and made sure that the Energy Saver settings are correct. I've also checked under the Energy tab in Activity Monitor and can't find anything that is Preventing Sleep. I have followed the instructions to reset the  SMC and NVRAM.

In Terminal, when I do pmset -g assertions I get these results:

Assertion status system-wide:
   BackgroundTask                 1
   ApplePushServiceTask           0
   UserIsActive                   1
   PreventUserIdleDisplaySleep    0
   PreventSystemSleep             1
   ExternalMedia                  0
   PreventUserIdleSystemSleep     0
   NetworkClientActive            0

Listed by owning process:
   pid 111(hidd): [0x0000014d00090344] 00:08:52 UserIsActive named: "com.apple.iohideventsystem.queue.tickle"
    Timeout will fire in 367 secs Action=TimeoutActionRelease
   pid 55(configd): [0x0000005f0007016b] 00:12:50 DenySystemSleep named: "InternetSharingPreferencePlugin"
   pid 42(UserEventAgent): [0x0000006d000b0170] 00:12:36 BackgroundTask named: "com.apple.metadata.mds_stores.power"
    Created for PID: 232.
Kernel Assertions: 0x10c=USB,BT-HID,MAGICWAKE
   id=501  level=255 0x4=USB mod=01/01/70 01:00 description=com.apple.usb.externaldevice.fd140000 owner=USB Receiver
   id=502  level=255 0x4=USB mod=01/01/70 01:00 description=com.apple.usb.externaldevice.fa120000 owner=IOUSBHostDevice
   id=503  level=255 0x4=USB mod=01/01/70 01:00 description=com.apple.usb.externaldevice.fa130000
   id=505  level=255 0x100=MAGICWAKE mod=01/01/70 01:00 description=en0 owner=en0
   id=506  level=255 0x100=MAGICWAKE mod=01/01/70 01:00 description=en1 owner=en1
   id=507  level=255 0x8=BT-HID mod=01/01/70 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=BNBTrackpadDevice
   id=508  level=255 0x8=BT-HID mod=01/01/70 01:00 description=com.apple.driver.IOBluetoothHIDDriver owner=AppleBluetoothHIDKeyboard
Idle sleep preventers: IODisplayWrangler

PreventSystemSleep is active 1 for some reason.

Misc. info:

I had the old Caffeine app installed and made sure it wasn't active and then uninstalled the application. I'm not sure how to check if the system is "caffeinated", but I don't think caffeinate is stuck.
I've tried shutting down my other network devices while troubleshooting and don't believe that there is some network service causing the problem.

Is there a way to check what's keeping PreventSystemSleep active? Is there a way to disable it?

From your sleep assertions, it appears you have Internet Sharing enabled. Try disabling it via  → System Preferences → Sharing → Internet Sharing.


Macbook pro sometimes left clicks are not registered Hi I have a macbook pro 15", primo 2011.

It runs perfect with Mavericks. However recently it has started to get a strange bug from time to time. Some times left clicks on the pad is not working. It happens randomly while I work. It's often happening when I e.g. want to close a window in finder or change/close a tab in safari.

The issue shows like this: When I for an example hover over the "X" and clicks to close the window, nothing happens. I can try 10 times but nothing works. Right clicking though always seems to work. I have noticed that if I move the pointer a little around (maybe clicking elsewhere) and then back on the "X" again, then it always works fine again.

The issue comes and goes, and I cannot find any pattern, except that it's happening for every 20. left click I'm doing, that the computer seems to not register it.

This happened to me as well, and I just realized that the problem might be because I swapped the hdd drive with other macbook and the when I installed osx the hdd it was in a different macbook, so probably after a reinstall would work.


Find Font used in Numbers Is there a way to find Font used in Numbers?

Opening the spreadsheet on my Mac is fine, but I get this error message when opening the same document on iPad (iOS)

The font TIMES-Roman is missing.

I want to find which cell(s) are using this font. It most likely came from pasting in styled text and I need a tool or way to track down the offending cells or text.

How can I find the text using this specific font?

To check which cells have the font family "TIMES-Roman," run the following script. It will generate a dialog that will display the column and row of any cells that contain that font. To run the script:

Open your spreadsheet in Numbers and close all other open spreadsheets
Open Script Editor (/Applications/Utilities/Script Editor.app)
Switch the language in the top left corner of the window from "AppleScript" to "JavaScript"
Paste in the script below and click the button with a "play" icon at the top of the window

If you see a blank dialog box, the script couldn't find any cells with the offending font. Please also note that this script assumes that you only have one table and one sheet in your document.

var offendingFont = "TIMES-Roman"

var culprits = []
var table = Application('Numbers').documents[0].sheets[0].tables[0]
var cols = []
for (var i = 0; i < table.columnCount(); ++i) cols.push(String.fromCharCode(65 + i))
var rows = []
for (var i = 0; i < table.rowCount(); ++i) rows.push(i + 1)
for (var r of rows) {
    for (var c of cols) {
        if (table.cells[c + r].fontName() === offendingFont) culprits.push(c + r)
    }
}

var app = Application.currentApplication()
app.includeStandardAdditions = true
app.displayDialog(culprits.join(", "))

Since you said you never use any flavor of "Times" font, here's an additional, altered version of the script that finds any font with "times" anywhere in the name (this might produce better results):

var offendingFontExcerpt = "times"

var culprits = []
var table = Application('Numbers').documents[0].sheets[0].tables[0]
var cols = []
for (var i = 0; i < table.columnCount(); ++i) cols.push(String.fromCharCode(65 + i))
var rows = []
for (var i = 0; i < table.rowCount(); ++i) rows.push(i + 1)
for (var r of rows) {
    for (var c of cols) {
        if (table.cells[c + r].fontName().toLowerCase().indexOf(offendingFontExcerpt) > -1) culprits.push(c + r)
    }
}

var app = Application.currentApplication()
app.includeStandardAdditions = true
app.displayDialog(culprits.join(", "))


How to disable or uninstall iTunes under High Sierra without disabling SIP This answer explains how to uninstall iTunes after disabling SIP.  This appears to be a necessary step for uninstalling iTunes on versions of OSX starting with 10.13 High Sierra or earlier.

I'd prefer not to disable SIP, since the only reason I have to do so is to prevent iTunes from launching in response to various unknown stimuli.

Is there a way to prevent iTunes from starting up without needing to disable SIP?  I just want to prevent it from start up, I don't need to uninstall it.  Most importantly I want to stop it from occasionally commencing to play music for no apparent reason, but ideally I would like to prevent it from running altogether.  Is there some way I can disable it as the handler for some file type, for example?

I wasn't able to find a list of all the file types iTunes handles, but if you are willing to operate piecemeal, any time you open a file and iTunes launches, you can

Select the file in Finder
Get Info (⌘ + i)
select the app you want to use in the "Open With:" dropdown

then click "Change All..."

In the future that type of file will open in your alternate application. After a while you will have opened all the types of files you will open that iTunes handles.

Another method that you may find easier:

Right Click (or control click) the offending file in Finder
Select "Open With > Other..." (even if you see the app you want to use in the list)

Select your App (e.g. Audacity)
Check "Always Open With"

Click "Open"

It just depends on which way you find easier.


Bulk printing of pdf files I have 884 copies of a document  that have to be printed soon. Each document has a QR identity code on each page, so it is not as simple as print 884 copies of a single document. We are using an canon image runner advanced 6255. The problem is that if I print any one of the documents from preview, it prints correctly. I have set the defaults for the printer using print using last setting, and also set the settings for the driver using the cups browser interface.

If I select several in the finder and use cmd p, the top of the QR code gets clipped off. I tried an automator script using three blocks (get finder specific item [folder] -> get folder contents -> print finder items) prints the QR codes correctly, but for some reason all of the ligatures (fi, …, etc) are dropped leaving blank spaces in the document.
I also tried from the command line using lpr. This produces identical results to automator (QR codes are ok, but all ligatures are missing).

Any ideas on a way to print the documents other than opening each one individually and typing cmd p and Enter?

Thanks.

Since you're saying it prints from Preview correctly, then I'd actually combine all the PDFs into one single PDF and print the one document.

To do this in Preview:

Launch Preview
Navigate to and select all of the PDFs
Go to View > Thumbnails
Click on one of the thumbnails
Use commandA (or just go to Edit > Select All) to select all of them
Now drag all thumbnails onto the first one (you'll see a green plus symbol) and let go of your mouse
The first PDF now becomes a single PDF with 884 pages
Select the first PDF
Now hold the Option key down and go to File > Save As to save your  PDF as a different name

Once you've done the above, I would quit Preview and reopen it again, but only to open up your newly combined PDF. Then do a test print, say for pages 1 - 5 to see if it's going to do what you want. If so, then proceed to print the entire document (or perhaps in batches of 50 or 100 pages at a time).

NOTE: If you have trouble combining 884 pages into a single PDF, then maybe create 8 PDFs of 100 odd pages each.


How do I adjust the time Mac Mail takes to mark messages "read"? It takes a number of seconds before Mac Mail marks a message as "read". I would like for it to take no more than 0.5 seconds, though instantaneous would be best.

How can I adjust the time required to view a message before it is no longer considered "unread"?

Mac OS X, 10.9.4 and 10.10

Have you tried quitting Mail, launching a Terminal and putting in

defaults write com.apple.Mail MarkAsReadDelay 0


How to open a file as plain text in TextEdit? I have a *.rtf file which I want to open as plain text. How can I do this?

TextEdit > Preferences > Open and Save

Check "RTF-files as RTF-code instead of formated text" and reopen the file.


How can I force the Mac app store to re-install an application? For some reason, I cannot convince the app store that an application (Xcode, in this case) is not installed.

I have deleted /Developer (which only contained an old, busted Xcode 3.2.3) and tried to rebuild the LaunchServices DB (using lsregister -kill -r -domain local -domain system -domain user) but to no avail; The app store stubbornly claims that Xcode is already installed.

I'm at my wit's end, here.

For Xcode, try to go to /Applications and move "Install Xcode" to trash.

I think Xcode is a special case, it doesn't get deleted when you delete it form launchpad.


Is it possible to synchonize my iPod with iTunes on one computer and drag-drop ad-hoc files on another? I have iTunes installed on both my work and home computer. At home I want to keep it synchronized with my extensive library of music ripped from CDs, but for large files like videos and podcasts I like to download them at work where I have better bandwidth.

I'd like to be able to keep just my music files synchronized with the iPod from my home computer, but still be able to drag-drop a few ad-hoc podcasts/videos downloaded on my work computer onto the device (iPod touch). No synchronization with iTunes on my work computer is desired/required.

It seems like this would be a simple operation, but all of my attempts have resulted in wiping out large portions of the content from the device.

Any advice on how to make this work, or whether it is even possible?

I know it was possible with older iPods, not sure about touches though. If you have it jailbroken, you can SSH into the device and store your files that way. You have to have WiFi access in both locations though. That's the simplest way I can think of, sadly lol.

Here's how to jailbreak. And here's how to SSH. Other SSH info.

Hope this helps!

-Thomas


How do I use the Time Machine command line interface to backup to an internal ip server? I have a Time Machine server which uses a manually defined internal ip (not dhcp assigned.) It is using 169.254.x.x this case.

How do I use the Time Machine command line interface to configure backups?

UPDATE: The Time Machine Server is a QNAP NAS server. I make the DHCP off on my router. I am able to connect to it via 169.254.x.x to the server either.

I can't get known the Time Machine on the client site via the Time Machine client tool. So, I just wonder to use cli to connect to the Time Machine server.

I make an explanation for that.

To configure a client to backup to a remote server, you use the tmutil command, and the setdestination verb.

tmutil setdestination afp://user[:pass]@169.254.x.x/share

This also assumes that you have share already existing as an AFP share on your TimeMachine server.

TimeMachine from client-side doesn't really care much about the remote server, except to mount the AFP volume.


homebrew PostgreSQL upgraded to 10.1 but I need 9.6 I did brew update and brew upgrade

Now my PostgreSQL is 10.1
On the server I have 9.6 and I want it to be the same.

I can connect and read my data now still (as I assume the brew service didn't restart, but I didn't run pgupgrade or anything yet)

Also found packages as

brew search postgres

I have

$ brew search postgres
==> Searching local taps...
postgresql ✔     check_postgres   postgres-xc      postgresql@9.4   postgresql@9.5   postgresql@9.6   postgrest

What is the best and safest way to downgrade the package, save my current database and make postgresql@9.6 run? As I would like a version identical with the server we are working on (9.6), and I would like to make sure pg_upgrade never made it "PostgreSQL 10".

Is there any safe way to downgrade? I could do it on Linux from a description but the Mac+homebrew postgres user management works differently (for example doesn't use a postgres Unix user)

Had the same problem and found this from https://jaketrent.com/post/downgrade-previously-installed-brew-formula/

brew install postgres@9.6
brew switch postgres 9.6.3
brew info postgres // prints summary that should show no conflicts
brew services start postgresql // if desired, of course.


Any way to display the duplicated songs in iTunes 11? I recently upgraded to iTunes 11 (v 11.0 (163)) and the show duplicate feature has been removed. What tools or alternatives exist to display duplicates in iTunes?

Apple have put the "Show duplicates" function back to iTunes 11. Go to View menu in iTunes and select "Show duplicate items"

A word of caution though, iTunes shows many false duplicates for me, anything with the same track name appears to be shown as duplicate. I much prefer the way Tune Sweeper deals with duplicates, there's no false duplicates and you can choose to keep the highest quality track.


Apple terminal no home and end key - Use cmd left or cmd right How do I make

⌘+← and ⌘+→ move the text cursor very left and right of the terminal entry line. This keyboard shortcut works on most things on my mac book but not the Terminal.

Usually I use the home and end keys on other non apple computers. Strangely enough ⌃+A and ⌃+E achieve this in the mac terminal but it is the wrong key combination in my opinion. I want to do it using ⌘+← and ⌘+→.

It is similar to this question, however I want to specifically map it to ⌘+← and ⌘+→.

Can home and end keys be mapped when using Terminal?

You can use Better Touch Tool for this (it's no longer free, 5$ minimum), just assign keyboard shortcuts  to work in Terminal app only. Remap ⌘ CMD+← to ⌃ CTRL+A and ⌘ CMD+→ to ⌃ CTRL+E. Here's the sample:


How to read car charger input current specification? I found two MacBook 60 Watts car chargers, one says on the backside “INPUT: 12V-24VDC 5.6A MAX”, the other “Input: DC 11-15V Max 10A”. So, the latter has an efficiency of 50%?

http://ecx.images-amazon.com/images/I/619ISd6fcKL.SL1500.jpg

http://ecx.images-amazon.com/images/I/61qLRTluyUL.SL1500.jpg

No, you have to read the description different:

#1) Input 12-24V means it is capable for normal cars (12-14V) and Trucks (24V) and the 5.6A Max. is most likely the maximum allowed current before the internal fuse blows off.

#2) Input 11-15V means it is only usable for cars (no Trucks) and a maximum current of 10A before the internal fuse blows off.

so ... they are both usable for your need unless you own a Truck, then you should take #1.


Update MacOS on a MacBook with dead battery I have a macbook 12'' running sierra that I use occasionally.
The battery died some time ago, showing an X in the status bar.

I want to update to a new version of macOS but the installer shows:

  Your computer is not connected to a power source.
  You must plug in and connect your power adapter before installing.

Obviously the device is connected to the power source (the battery is dead).

I have already done the SMC reset. Didn't help.

So:
Can I convince the updater to install despite the fact that it thinks I am on battery power?
Alternatively:
Can I convince the system to recognize my power connection as an actual power connection?

Well baring the obvious and replacing the bad battery you will probably have to install the OS on a different computer and reinstall the hard drive.  The Mac power module is not responding that the laptop is connected to AC but responding that the battery is bad.  Apple will replace the battery for $199 so keep that in mind while doing any work around.

You can also put this MacBook in USB target mode and run the installer from another Mac to perform the upgrade without fixing the hardware. The battery service there is relatively labor and parts expensive due to the thin assembly, delicate cabling and glue that makes the cells part of the case structure. You’re getting a partial frame replacement when the battery is exchanged for $200 and possibly new top case / keyboard if the cabling or parts don’t fit when it’s out for repair.


How to work with 2 Applications folders? I have an internal 250 GB SSD. this drive was filling up and I bought an external 4 TB external hard drive. My Applications folder on my SSD was taking up a lot of space so I decided to create an Applications folder on my external drive. I copied many of the apps from the internal drive Applications folder to the external drive Applications folder.

Now however I realize the ramifications of having 2 Applications folders. The Applications folder on my internal drive is special in the sense that it can't be renamed or removed, and when downloads ask to be moved to the Applications folder it refers to the Application folder on my internal drive.

So my question is - what would be the best way to move my applications to a folder on my external drive but have that folder behave like the Applications folder on my internal drive? Many of the applications didn't copy because they were in use. Do I have to quit all my startup items to accomplish this?

Hints for solving your XY problem

Using an external hard-drive to store your applications is not recommended and will slow down their execution. Unless you are talking about a thunderbolt 4TB Solid State Drive, performances of your applications running on the external hard-drive will be very poor (especially if you compare with your internal SSD).
Try as much as you can to move your movies, pictures, documents out of your SSD and keep your apps there to make the most of your SSD. You don't need a big data read/write rate for: watching a movie, browsing photos or pdf.
If you are a professional and need to process photos/video, then a thunderbolt SSD will be life-saving.

Solution

If you don't mind about the three points above and stick to your idea, to come back to CoderX very bad answer, the proper solution to handle 2 applications folder is:

to keep your original /Applications folder.
Create a folder on your external hard-drive.
Create a symbolic link for each application stored on your external hard-drive into your original /Application folder.

Example

<InternalSSD path>/Applications/ contains:

drwxr-xr-x   3 root       wheel  96 2018-06-16 09:18 app1.app/
drwxr-xr-x+  3 root       wheel  96 2018-07-31 02:09 app2.app/
drwxr-xr-x   3 root       wheel  96 2018-07-10 12:15 app3.app/
drwxr-xr-x   3 mr_bean    wheel  96 2018-08-16 07:09 app4.app/
drwxr-xr-x   3 root       wheel  96 2018-07-10 20:08 app5.app/

Then, <ExternalHDD path>/applications_2/ contains:

drwxr-xr-x   3 root       wheel  96 2018-06-16 09:18 app6.app/
drwxr-xr-x+  3 root       wheel  96 2018-07-31 02:09 app7.app/
drwxr-xr-x   3 root       wheel  96 2018-07-10 12:15 app8.app/
drwxr-xr-x   3 mr_bean    wheel  96 2018-08-16 07:09 app9.app/
drwxr-xr-x   3 root       wheel  96 2018-07-10 20:08 app10.app/

In your terminal, for app6, 7, 8, 9, 10:

ln -s <ExternalHDD path>/applications_2/app<n>.app <InternalSSD path/Applications/.

Finally:

ls -al <InternalSDD path>/Applications

should return:

drwxr-xr-x   3 root       wheel  96 2018-06-16 09:18 app1.app/
drwxr-xr-x+  3 root       wheel  96 2018-07-31 02:09 app2.app/
drwxr-xr-x   3 root       wheel  96 2018-07-10 12:15 app3.app/
drwxr-xr-x   3 mr_bean    wheel  96 2018-08-16 07:09 app4.app/
drwxr-xr-x   3 root       wheel  96 2018-07-10 20:08 app5.app/
lrwxr-xr-x   3 root       wheel  96 2018-06-16 09:18 app6.app/ -> <ExternalHDD path>/application_2/app6.app
lrwxr-xr-x+  3 root       wheel  96 2018-07-31 02:09 app7.app/ -> <ExternalHDD path>/application_2/app7.app
lrwxr-xr-x   3 root       wheel  96 2018-07-10 12:15 app8.app/ -> <ExternalHDD path>/application_2/app8.app
lrwxr-xr-x   3 mr_bean    wheel  96 2018-08-16 07:09 app9.app/ -> <ExternalHDD path>/application_2/app9.app
lrwxr-xr-x   3 root       wheel  96 2018-07-10 20:08 app10.app/ -> <ExternalHDD path>/application_2/app10.app

With this method, you don't modify your base system, don't break any path in your OS and symlink the content of your new app folder to your old one.


Strange behavior in Terminal with custom .bash_profile It's hard to describe the behavior, but here's a short clip:

http://www.youtube.com/watch?v=9KqHBA94FPI

Basically, when entering multi-line commands, at the end of the first line, the insertion block goes back to the start of the first line, writes over the first line, then continues like normal on to the second, third, etc. lines. When deleting, it allows me to delete the whole command, plus the blank spaces on the line above the command (I have it setup so commands get inserted after a line containing user@host/Directory information. It then even allows me to delete the last part of the Directory and host I described above. Sorry I'm terrible at explaining this, the video will do a better job.

Here is the contents of my .bash_profile:

export PS1="\e[31m\u\e[0m@\e[34m\h\e[33m\w\n \$ \e[0m "

You should surround your non-printing characters (in this case, your ANSI escape sequences) with bash escape sequences: \[ and \]. That way bash will know the enclosed characters are not visible, ie. they do not take space, ie. they should not be included in the word-length calculation used by the line-wrapper.

in other words change your PS1 definition:

export PS1="\e[31m\u\e[0m@\e[34m\h\e[33m\w\n \$ \e[0m "

… to:

export PS1="\[\e[31m\]\u\[\e[0m\]@\[\e[34m\]\h\[\e[33m\]\w\n \$ \[\e[0m\] "

And here's the same PS1 value, for human–reading only, with perhaps improved readability (ANSI-escapes in the lower row, bash escapes in the middle and printing characters in the upper row.)

          \u          @          \h          \w\n \$
\[      \]  \[     \] \[      \]  \[      \]        \[     \]
  \e[31m      \e[0m     \e[34m      \e[33m            \e[0m

Further reading:

Bash Prompt HOWTO § 6.1. Colours
Funtoo: Prompt Magic
SuperUser: Do I need to enclose ANSI escape sequences in \[ and \] in a bash prompt?


MacOS: unable to resize partitions after bootcamp failed I tried to install Win10 with Bootcamp on my MacBook Air running MacOS Sierra 10.12.1. Doing so I changed my main partition in order to create the one for Bootcamp. But when running the Windows setup I had to choose the partition onto which to install Windows and always got an error there. So I tried reformatting the Bootcamp partition within the Windows setup, but also failed.

So I decided to stop and remove the Bootcamp partition. But somehow I can not delete nor merge it with the MacOS partition. The disk utility app says I can not remove the partition because the other one (MacOS) can not be resized. FileVault is deactivated.

So what can I do? By the way, the terminal command line diskutil cs or corestorage list does not work:

diskutil cs list
No CoreStorage logical volume groups found

Here's the output from the terminal and from the disk utility app.

The Bootcamp assistant won't allow me to restart the whole process since it can not resize the main partition and it does not let me choose the second partition as a target. Any idea how to cleanup all partitions?

I somehow managed to do it. First, I reformatted all small hidden partitions from disk0s4 to disk0s8 using this command:

diskutil erasevolume JHFS+ data5 disk0s4

Then I merged all those partitions using this command:

diskutil mergePartitions JHFS+ BOOTCAMP disk0s4 disk0s8

Finally I used the visual disk utility app to remove the newly created BOOTCAMP partition, which then gave all the empty space to my MacOS partition.


Old Users App Store Account is still active on my computer I just picked up a used Mac for a great price (I might add but doesn't have much to do with my question); and the old users App Store Account is still linked to him, even though I have everything else going with my iCloud account and or Apple password.  How do I change it back?

Open the App Store app and go to Store → Sign Out.


Is keeping macbook battery 20%~80% good? I heard that keeping macbook battery in 20% to 80% is good.

Is it true? or what is the best way to use macbook best way?

Apple Lithium-ion Batteries

See https://www.apple.com/batteries/ and https://www.apple.com/batteries/maximizing-performance/ for Apple's authoritative recommendations.

  They’re inside every iPhone, iPad, iPod, Apple Watch, MacBook, and AirPods, helping you do all kinds of things in all kinds of places. Find out more about your battery to get the most out of it throughout its lifespan — and beyond.


Why Mac App Store shows open button below the macOS sierra installer icon in the product page? Before when I had macOS sierra installed on my mac and when I used to open macOS sierra in the MacApp store there used to be an option to reinstall/download the installer but now I am seeing an open button below the macOS icon after updating to the latest stable build of macOS sierra

Check your /Applications folder for the 'Install macOS Sierra" file. It is usually deleted at the conclusion of the OS installation but you may have still it and the AppStore is seeing it.


Can I backup my iPhone without Wi-Fi? I have iPhone 6. Can I back it up without WiFi? Is there any other way? I do not have access to WiFi.

If you have a Mac with iTunes you can connect your iPhone to your computer with a USB/Lightning cable and then back up your iPhone to iTunes on your computer. I've done this many times with my iPhone 6 and my older iMac.


AXSelectedRows: Getting selected rows for AXOutline I feel that AXSelectedRows has finally beaten me into submission :) After extensive research, I am stumped as to how to programmatically list the contents of AXSelectedRows; simply put, to get the selected rows of any given AXOutline.

It sounds trivial, but finding an answer has proven difficult - particularly due to the lack of online documentation (though I should probably buy a book!) Strangely, a lot of people just seem to want to programmatically select rows, instead of getting selected rows.

I am certainly close though. I have reached thus far:

set selectedRows to value of attribute "AXSelectedRows" of outline1

where outline1 is set to an AXOutline. Next:

set selectedRow to item 1 of selectedRows

This is where it becomes a little murky (after already failing to set it to row 1 instead of item 1). I would expect selectedRow to be of type AXRow (or row), but instead Automator output displays:

application "System Events"

That is, the item appears to be an instance of 'application "System Events"' - which leads me to believe that I'm overlooking something important. Having said that, I feel that I've tried every combination of value's, attribute's and row's - including some type-casting.

The frustrating part is that I can actually see the contents of AXSelectedRows in the Accessibility Inspector! And so I know that it exists. As a workaround, I am using:

set selectedRows to selected of rows of outline1

However, this is certainly not preferable as I still have to loop through the entire array in order to find the 'true' values, which could have performance issues for very large lists.

Any help would be hugely appreciated!

I guess getting the value of AXSelectedRows is just something that has not been implemented. When I open a Finder window in list view, select two rows, and run this script:

tell application "System Events" to tell window 1 of process "Finder"
    value of attribute "AXSelectedRows" of outline 1 of scroll area 1 of splitter group 1
end tell

The result is:

{application "System Events", application "System Events"}

However you can use a whose clause to get the selected rows without using a repeat loop:

tell application "System Events" to tell process "Finder"
    rows of outline 1 of scroll area 1 of splitter group 1 of window 1 where selected is true
end tell


How to stop ssh-agent from being started on login/boot I noticed ssh-agent is started automatically upon login. I'd rather it not do this, as I'd prefer oh-my-zsh to start the ssh-agent instead (since it automatically adds my id_rsa which is a nice feature).

I've tried tracking down where this is getting started, but I don't see anything. How do I disable it?

The launch daemon (launchd) is responsible for starting processes at boot, on demand, on schedule, in response to incoming network port connections and when a user is logged in.

You may get lucky with grep:

launchctl list | grep ssh-agent

In this case, it's the openssh prefernence that starts things:

launchctl list com.openssh.ssh-agent

I seriously prefer to edit these preference files with a tool like LaunchControl or Lingon. They give contextual help, graphical affordances and syntax checking. Apple's launchd/launchctl documentation exists but is dense, descriptive (rather than narrative / educational / prescriptive or basically easy to learn and use).

Here's an example how it shows an error with this specific agent on my Mac and a helpful warning that I need to disable SIP before futzing with this specific job or agent.

If you want to unload / disable this you need to find where the preference is stored then edit it or tell launchctl to unload (permanently) that item:

mdfind ssh-agent|grep plist
launchctl unload -w /System/Library/LaunchAgents/com.openssh.ssh-agent.plist
sudo launchctl disable system/com.openssh.ssh-agent

The daemons like this system one are being transitioned from the old "unload" syntax to the new "enable|disable" syntax, so you might get different results from my above commands on different versions and builds of macOS. Since you can see when it's running and kill it manually (killall ssh-agent) you should have good success with this extra info on launch daemon that's not on most articles for unix management of this ssh tool.


Using formulas in conditional formatting in Apple Numbers I'm using Apple Numbers in macOS, and utilizing its conditional formatting feature to compare some numbers, however I want to compare the numbers' absolute value.

The numbers I work on are estimations, and the sign signifies whether the value is an under or overestimation, but I need its distance from the actual value while comparing the two. I wanted to do it in conditional formatting to not to add more columns to the table. Is it possible in Apple Numbers?

After research and trial & error sessions, I understood that using formulation in conditional formatting rules is impossible in Numbers. One can only use simple comparisons for formatting. Preparation of values for comparison is needed to be done on the table.


How do I use screencapture for capturing floating windows? I am trying to automate the periodic capture of a floating window. Specifically, of the floating 'Current Call' window which is used by Skype when the main window is off-screen.

By googling, I found out that all I need is a window id to pass to screencapture:

screencapture -l<win_id> <output_file>

The problem is that I haven't found a way to get the window id for "Current Call". Here is what I have tried so far:

$ osascript -e 'tell app "Skype" to id of first window whose floating is true'
20:61: execution error: Skype got an error: Can’t get window 1 whose floating = true. Invalid index. (-1719)
$ osascript -e 'tell app "Skype" to id of first window whose name is "Current Call"'
20:67: execution error: Skype got an error: Can’t get window 1 whose name = "Current Call". Invalid index. (-1719)

Does anyone know how to get the window id for the "Current Call" window?

Or, alternatively, does anyone know if I can get this screenshot in some other way? (e.g. run screencapture with other arguments, or use some other tool for capturing the screenshot)

Update

I have also tried the following:

$ osascript -e 'tell app "Skype" to id of window 0'
-1
$ osascript -e 'tell app "Skype" to id of window 1'
-1
$ osascript -e 'tell app "Skype" to id of window 2'
84
$ osascript -e 'tell app "Skype" to id of window 3'
20:22: execution error: Skype got an error: Can’t get window 3. Invalid index. (-1719)

Window with id 84 is the main skype window. So, I'm a bit puzzled here. What is -1 supposed to mean?

I wrote a command line utility that wraps over screencapture and the Quartz windowing library.

Grab it here: https://github.com/thismachinechills/pyscreencapture

Use it like this:

./screencapture.py Skype -t Current Call -w all_windows above_window


Changing my iCloud account I recently just changed my Apple ID account and I want to change my iCloud account to the same email. I'm thinking of changing it. But, the only problem I have, is whether or not my app and everything on my phone will be deleted and erased when I change my iCloud account. If I change my iCloud account will all of my apps and photos be erased?

Changing the email shouldn’t make a difference. If you delete the account and make a new one backup information could be lost.

From this Apple Discussion:

  When you delete the account and choose Keep on My iPhone (iPad), contacts, calendars and other synced data will remain on your device.  When you sign in with your new ID to create your new account and choose Merge, these will be uploaded to your new account.  Synced notes and photo stream photos are exceptions to this, which is why you have to take steps to save them prior to deleting the account.


What should I do before I give up my iPhone? I am changing jobs and so I am giving back to the old company an iPhone 3GS running iOS 5. I am searching for a To-Do list for things to copy from the iPhone to a Mac computer so that I don't lose anything. Here are the things I could remember:

Photos: copied to the Mac using the Preview.
Music: All are already in Mac using iTunes.
Email, Contacts and Calendar: from iCloud account are still available in Mac Mail and Clendar programs.
Apps: the apps installed are downloaded in iTunes, but, as far as I know, the app data will get lost.
Maps bookmarks: would be nice to copy them from iphone, but I have no idea whether this is possible!

Are there any other things to copy from my iPhone?

You can save all the app data to migrate to another iOS device at a later date by backing the iPhone up to iTunes or setting up a free iCloud account.

This will nicely complement your existing plan in case you forget something until after you turn in the phone. You can restore your backup on to a friend's device long enough to retrieve that additional data and then erase the device. As long as you maintain the iTunes backup on the computer or iCloud access - your backup will be waiting until you get another iOS device to load the backup.

Here are some other apps you may have used occasionally and want to transfer to your Mac:

voice memos can be imported to iTunes
call history, SMS messages and voicemail (using an app like PhoneView)

If you have a good backup, you can feel better about having the phone erase all content and settings so you give it back clean and with no personal data just in case your company doesn't do a great job sanitizing the device before re-issuing it to someone else.


How can I change a smart folder's icon without changing the default icon? I want to add a smart folder for each label in the sidebar (I believe there is no way to directly to add the labels, so I have to resort to smart folder). However, all of them have the gear icon in the sidebar, even if I changed its icon and the icon is correctly shown in finder itself.

Note that I am NOT changing the smart folder's default icon, I just want to change them to a red, green, blue ... dots, just like the labels.

How can I achieve this?

More info:
Changing the icon itself does not affect sidebar look. I tried to change to a red circle:

Info window

However same look at sidebar:

How can you change the colors of the glyphs in the Finder sidebar, while leaving them as their default icon? You can't (unless there's a third party tool about which I am unfamiliar). However, you can change the default icons to your heart's content. Here's how:

As a test, I created a Smart Folder that finds all PDFs in my home directory. The default glyph for the Smart Folder is a gear, as noted in the OP.

Here are the steps to change the glyph:

Locate the directory /System/Library/CoreServices/CoreTypes.bundle/Contents/Resources
Locate the file called SidebarSmartFolder.icns

Rename it to SidebarSmartFolder_old.icns
Paste into Resources folder the glyph you want to use in its place.
Rename it to SidebarSmartFolder.icns
Reboot your Mac.

You'll see now that my Smart Folder glyph in the sidebar has changed to the new one.


Can I stop iPhone apps from changing my Gmail status? I recently got the Mo+ GV iPhone app to replace talkatone and it's a thousand times better. The problem is is that when I'm logged in (It connects to GTalk/voice) my gmail status is changed to an annoying ad. something like "I'm using Mo+ get it now at blah blah", and I know a lot of other apps do this too. Is there a way to disable this from happening? (Its not in the app settings)

I'm going to assume that you mean this app: https://itunes.apple.com/us/app/phone-for-google-voice-talk/id541829441?mt=8 Since the app is free, it's reasonable to have ads. You could email the developer and ask for it to be removed in the next release.

Or, if you don't mind losing the Google Voice integration, you could go with Verbs ($1), which is an IM app.

Less reliable way to fix it: After signing in with Mo+ GV, sign into Gtalk from somewhere else (like your computer). I think only the most recent status will be displayed.

Insane way to fix it: Jailbreak your iPhone to disable code signing. Then, find the "I'm using Mo+…" string in the application's binary and change it to an empty string.


Open an ssh session in terminal with BetterTouchTool I was hoping to configure a keystroke command using BetterTouchTool to open a terminal window and run an ssh session. I do this a lot to connect to a RaspberryPi on my network. The execute terminal command seems to execute the command without opening a window, and all the help I can turn up on Google is people asking how to run commands without opening a window. So what would be the best method for me to open a terminal window and execute ssh pi@10.0.0.x in that window?

So, if I understand you correctly, you want to just click on a shortcut on your Desktop (or somewhere else) that will open Terminal.app and connect to a particular host via SSH.

The quickest way would be to create an AppleScript that opens Terminal and executes the command ssh <user>@<ipaddress>

First... Here's the code you are going to need:

Make sure you change the "user" and "host" to its appropriate values; your username and the host/ip address you wish to connect to.

tell application "Terminal"

    activate
    do script "ssh user@host" in front window

end tell

You have to put that into an AppleScript script then "bundle" it as an Application.

Open AppleScript Editor

You can find AppleScript Editor in the Utilities folder, but I find it much easier to hit Command + Spacebar to invoke Spotlight Search and just start typing "AppleScript" and hitting RETURN when it's found.

Once launched, create a new document and past the code I provided.

Save your Code as an "Application"

When you save your App, save it to your Desktop, give it a useful name and make sure you select "Application."  You can ignore the "Options" at the bottom.

Launch Your App...

An icon will appear on your desk with the name that you gave it in the previous step.  Click on it to Launch your newly created app.

Results

Your terminal window will launch issuing the command you programmed:


Macos Mojave: how to deal with corrupted bsd_flag in a private/var directory? Machine: MacBook Pro late 2013
OS: Mojave 10.14.1

Disk Utility reported several problems with my HDD, so I ran it in recovery mode, and when more problems were left, I ran fsck in single user mode.

The only problem that persisted was this:

  warning: inode_val: object (oid 0x202797435): invalid bsd_flags
  (0x184)

From my research, this has to do with permissions. So I converted 202797435 to decimal and ran this terminal command to locate the file:

sudo find / -inum 8631448629

Which pointed me to this file:

/private/var/folders/8y/3pg_4v8n6m3bf4d11ln3z32c0000gn/T/fr.madrau.switchresx.app-559924946001.conf

I'm not sure how to proceed though, I don't know if it's safe to simply delete. It would appear so as fr.madrau.switchresx.app implies this is a config file for the app SwitchResX, but trying to move this file to Desktop was met with a permission denied error (I'm not sure this is part of MacOS protections, or the actual permission problem).

So...what's the best way to proceed from here?

After further research I found out it's safe to delete some files in private/var/folders (please do your own research), so I cded to the folder and deleted the file via Terminal:

sudo rm fr.madrau.switchresx.app-559924946001.conf

Disk utility reports are clean. If my SwitchResX settings are messed up I can always re-install it or re-configure.


Unable to download Yosemite Long story short: I'm on OSX 10.6.8 and I'm trying to download the Yosemite package in order to (re)create a bootable USB.

When I go to the App Store, I go to the first tab and click on "Free" under yosemite and the OSX icon appears on the bottom bar:

If I hover over it it says "Downloading...". I wanted to check out the speed and progress of the download, but apparently if I go to App Store > Purchased tab, what I see is this:

while, as I understand, there should be informations about the current download.

I've already done this process once already from 10.6.8 on the same computer and I succeeded. This is a clean install of Snow Leopard (updated to 10.6.8) though and my download speed is very low (0.99Mb/s vs 5Mb/s I had back then) this week.

I've tried canceling the download, trying again. I've tried restarting (also shutting down and then manually start it again), as well as canceling and restarting the download numerous times. I've also tried starting the download from the Purchased tab, but that doesn't seem to start the download and just makes the "Download" button go back grey again. Even waiting for a while doesn't show any message and/or progress.

What should I do next?

I've solved this by making sure there were no updates left. Basically after the first "cycle of updates" after a clean install, new updates are silently "unlocked". You need to run all updates. One of them fixes the problem.


How is Disk Usage Determined? When I open my internal hard drive, which is also my start-up disk, Finder lists my account (I’m only user) as taking up 123 GB.

I double-click on my Home folder and sort items by size. Adding all folders containing over 100 MB, I only get about 22 GB. That leaves about 1 GB’s worth of files.

Where are the missing 100 GB?

I ran df -h under my Home folder, which shows about 101 GiB occupied. However most of that is taken up by the Library. What is this folder and why is it so large (93 GiB)?

I also ran Daisy Disk to map my drive. In addition to the 92 GB in the Library folder, it reports that iCloud Drive is using 55 GB and that a section it denotes as 'hidden spaces' is using 80 GB. Why does the iCloud Drive use 55 GB on my disk and what could 'hidden spaces' possibly be?

The ~/Library folder is where the system stores different things(settings for apps, steam games, iOS backups, downloads of iOS apps from iTunes and etc.)

You can look at the folder by going to your home folder in Finder, press Command(⌘)+ j and check the box that says "Show Library folder"


Hotkey for new Finder window On my old MacBook, I could hit ⌘ cmd + ⌥ alt/option + space and get a new Finder window with the sidebar (Downloads, Documents, etc…).

On my new Mac, that same command only gives me a Spotlight window which excludes the sidebar.

Is there a way to get the hotkey shortcut going again so that I don't have to ⌘ cmd + ⇥ tab to the Finder each time to hit ⌘ cmd + N?

I am on a Mac i5 MacBook Pro.

Press ⌘ cmd + ⌥ alt/option + S to show the sidebar (or select View > Show Sidebar from the Finder menubar).


USB Devices not working on Catalina after water spilled over keyboard The other day I spilled water on my MBP 2017 keyboard. I let it dry for 48 hours before turning it on again. And it ran fine.

Ever since that spill, however, I have not been able to use my USB wired mouse on my macbook. Power still runs through it (Charges my iPhone, Powers USB LED) but it does not detect any devices anymore like my USB Wired Mouse.
When I check System Report, it doesn't state any devices plugged in.

I tested the mouse on my PC and it works fine.
I've tried several different USB C to A adapters. Same result.
I tried restarting several times.

Is this a software issue or perhaps it's due to water damage?

EDIT: It still detects my USB Flash Drive, how is this possible?

SMC doesn't seem to reset when I try to..? Is it normal to immediately fast-boot after performing an SMC reset?

Is this a software issue or perhaps it's due to water damage?

It’s water damage.

The USB port (this is  a generalized description) has several pins, but it’s basically two categories - data pins and power pins.  Your USB supplies 5V and up to 500mA.  If USB-C, it can be up to 20V.  This comes from the power rails managed by the SMC.  The data pins go to the USB controller chip.  Your symptoms point to the fact that the USB controller took damage.

  SMC doesn't seem to reset when I try to..? Is it normal to immediately fast-boot after performing an SMC reset?

An SMC reset isn’t going to fix the problem because the power portion of all this is working.  The bottom line is that you have physical damage and “a simple water spill isn’t so simple.”  You need to take it in for service.


How do I run the iPad simulator to test a website on my mac I've developed a web app which is having some weird issues on iOS safari on my iPad.

I've never developed an iOS app, although I am a developer (c#) and have downloaded the latest xcode dev tools (just never got round to it).

Is there an easy way to just get the iPad sim up and start browsing the web on it on my mac?

thanks

Install XCode, then the simulator is located at /Applications/Xcode.app/Contents/Developer/Applications/Simulator.app
Once it's running, go to Hardware -> Device, then pick the iOS version and device.  It will boot up, then you can start Safari.

Update: XCode.app is now a package rather than a folder. In Finder, option/right click on XCode.app and select 'Show Package Contents', then follow the path down from there.


Mac Mini 2018 Reboot Loop? I have a newly acquired Mac Mini 2018 that cannot get out of reboot loops.
I’ve already formatted the drive using target disk mode and trying to install a fresh copy of Mojave. There is nothing to restore or backup at point. I’ve tried:

resetting pram and nvram

doesn’t make any difference just reboot loops

making a bootable usb using the Apple Mojave install image and terminal instructions

the usb can be read, I boot holding down Apple key. The option will be given to install Mojave, once I hit enter, it doesn’t take me to MacOS utilities, it reboots and continues to loop

use internet recovery to install OS
i can successfully enter internet recovery mode, hardliners Ethernet. the progress bar goes to the end in about 5 minutes and instead of entering the installation program, it gets into a reboot loop and will restart in internet recovery mode and start the process all over again

hold down d during boot to get diagnostic mode

this doesn’t do anything. I don’t know if this is because the drive is clean. I can hold down Apple D and it will take me internet recovery and then restart loop.

hold down shift during boot to safe mode.

this doesn’t work because there is no OS on the internal ssd

install Mojave on an USB and hold down Apple to boot, I can get the drive to appear but hitting enter will just restart instead of trying to load the OS

any ideas? Is this computer a lemon?

Wiping the entire internal storage may have been a bad idea, as it also contains the Recovery Partition, and some 'keys' used to authenticate Secure Boot. (Also note that by default, you can't boot to a USB external: you need to set the Secure Boot options to allow that.)
https://support.apple.com/en-gb/HT208198
Your best bet is to install it from another Mac using Target Disk Mode.


Does iCloud require any telephone land line infrastructure to send messages? If all phone lines are down (meaning a local or national phone line outage) and with all cell phone towers being down, is there a way that I could send a iMessage (or an SMS) to other iPhone users by using iCloud Service (your offsite server farm)?

I am trying to figure out if a Cloud-Push Manager could push my message to all receivers, who are registered.

Is Apple's iMessage proprietary text messaging platform a transmission system that allows iMessages to go directly via satellite to those iPhone subscribes? Even if all telephone land lines are down?

iCloud depends on the internet for transmission of data. iPhones, unfortunately, aren't capable of being sat-phones at this point (by themselves). As long as both the sender and the recipient have internet access, and as long as both are using iMessage (not SMS), then the iMessage should successfully be sent and received.

There are obviously multiple ways to get internet through which your phone could be connected. As you are aware, one such way is through cellular towers (if functioning), or another option is through a wifi connection (but again, this must have a landline connection as well). It is possible to get internet through a satellite dish and then broadcast that connection via wifi to your phone.

Again, both the sender and recipient must have internet in order to be able to communicate with iMessage.


Remote control of a Mac that's behind a NAT I'll soon be traveling to set up a Mac for my elderly mother. I'll need to later be able to control it from outside the network. I already use Apple Remote Desktop to control other Macs on my network, but i don't know how to penetrate the remote network to get to her computer.

What do I have to do to get her router to let me connect to it? I don't know what type of router she has, but if need be I will be installing an Airport Express or Extreme instead.

Without VPN-Functionality on the Router you have to rely on Software like 'LogMeIn' or 'Teamviewer' to access you Machine from outside your Home-Network.

As an alternative to LogmeIn you can use "Teamviewer". You have to install 'Teamviwer Host' on the Machines you want to control from outside and the regular 'Teamviwer' on your Machine.


How do I delete all files from a directory tree where the filename contains special characters such as öäüß I have a problem with my backup program which means that I need to delete all files and folders in a specific directory tree where the filename contains special characters, in my case the German ones such as öäüß and their capital equivalents.

I'd be quite happy to do this using the terminal but none of the commands I have tried has matched any of the files. Can anyone suggest a command I could use which would match these files?

For example, I've tried

find -name *ü*

however none of the files are matched. Any help would be appreciated.

A somewhat dangerous solution is this, from the commandline:

find . -type f ! -regex '.*/[ -.0-~]*' -exec rm {} +

Replace the lone . with the name of the top directory if you haven't changed to the relevant directory first. To be safe, however try first the shorter command

find . -type f ! -regex '.*/[ -.0-~]*'

and ensure that it only lists files you wish to delete. The regular expression (regexp, or regex) here will match any pathname that ends in a slash followed by any combination of printable ASCII characters excluding /, the space characters being the first such and ~ the last, while . and 0 surround / in the ASCII sequence.

One caveat among many: I don't know for sure if your current locale might change the collating sequence of characters, and hence perhaps change the meaning of the regexp. I don't think it does, but if it does, running the commands as

LC_COLLATE=C find …

should remove the danger.

Yet another caveat: Please ensure you have a backup before you try this. I will not take the blame for any loss of data if you get it wrong. The commandline is a great tool for shooting yourself in the foot! Sometimes just a misplaced space can spell disaster. (In this case, for example, missing the single space after the left bracket is deadly.)


Show cursor in screen shot Is it possible to take a screen shot, using hotkeys, where the cursor will not disappear? I am making a short tutorial and it would save me time to have the cursor present, as opposed to post-processing the images.

For example, if there is a button I could press in addition to CommandControlShift4 to copy a screen portion to the clipboard, including the cursor, that would be great.

Use the Grab Application.  It allows you to superimpose the cursor on screen captures.  Just go into Grab preferences and select the cursor.  When you click on the screen to take the screenshot, Grab will "place" the cursor where you click. This works for Window capture. Choosing a pointer from the preference window enables this to work when capturing a window shot.


How do I scan for hardware changes? I have had the times where I have used a usb networking card, or other device, and it didn't show up, although I was not sure if it was compatible with OSX. I just was not sure if OSX had a way to scan incase it did not recognize it, or if you needed to install a driver.

Is there a way to see what hardware is on the machine, like a device manager?

Generally speaking there's nothing you have to do except launch the application that supports your hardware.

If you add a new network device, it is immediately listed the next time you open the Network preference pane in System Preferences.

If you add a new sound device, is it immediately listed in the Sound preference pane in System Preferences. (You can also Option+Click the volume icon in your menu bar within seconds of plugging your device in and see it in the list.)

You don't need to "add new hardware" to use it. If it is compatible, it generally just shows up.


Can I type in inverse case, lIKE tHIS, with caps lock on? Every so often, I have to type some text consisting mostly of uppercase letters, but with an occasional lowercase letter—essentially, sentence case, but inverted. On Windows, I would simply have caps lock on the entire time, and pressing Shift would give me a lowercase letter. On OS X, however, if caps lock is on, I only get uppercase letters, whether Shift is pressed or not.

So, I can either hold down Shift the entire time I'm typing, letting go of it briefly to type a lowercase letter, or press Caps Lock twice for each lowercase letter I type. Neither works as well as what Windows does.

Is there a way to get Caps Lock to behave as it does on Windows, where pressing Shift while caps lock is on produces lowercase letters?

I am running 10.6.

See Update below...
It seems (only) the input source "French - Numerical" will behave like Window Caps Lock (with iNVERSE sHIFT):

Found that info here.
But note that this will come with a rather unusual keyboard layout (at least for me).

Update: Using Ukelele this can be applied to all keyboard layouts:
Thanks Daniel for pointing the right direction.
Open Ukelele and save your (current) layout to a file (e.g. by "New from current input source" and "Save"):

Open the .xml file in a text editor and find the mapIndex that you want to use for the combination ⇧ + ⇪ (shift + caps-lock). For German I used mapIndex="0". Insert this line:
<modifier keys="shift caps"/>

Find all other occurrences of this combination and comment them out (or delete the lines). Again for German it's:
<keyMapSelect mapIndex="1">
<modifier keys="anyShift"/>
<modifier keys="shift rightShift? caps? rightOption? rightControl"/>
<modifier keys="shift rightShift? caps? rightOption rightControl?"/>
<!--<modifier keys="shift rightShift? caps rightOption? rightControl?"/> -->
    </keyMapSelect>

Re-open the modified file with Ukelele.
Here is a comparison of the "German" layout before and after the modification:

Follow the instructions in Ukelele to create a new input source (Name, ID, installation).
I didn't test the modified file, should work though.


Apple Remote Desktop Shutdown I am relatively new to Macs and their osascript syntax. I have a mac mini set up as a server and I am trying to use Apple Remote Desktop to send a command to one of the iMac workstations. When I send the command osascript -e 'tell application "System Events" to shut down' I get the message execution error: File permission error (-54). I am unsure how to resolve this. Any help would be greatly appreciated!

If you want to run sudo command with ARD select run command as User and written root.

Edit : It doesn't have to go through the osascript to turn it off. A shutdown -h now with root user is enough

You can also shutdown the station via the Manage menu


How can I use the Pages Full Screen in the old way? I just updated to Mac Maverick and updated Pages.
The question is I just can't get used to it, I don't the exact words to describe it.
In the past, when in the Full Screen modem, I am typing in floating whiteboard in the whole darkness, which is awesome.

How can I do that in the newest version of Pages now?

First, click on "Setup" to toggle the Setup pane off (if it is on).  Then two finger click on the toolbar, and select "Hide Toolbar".


How to look at iPad's photo folder on a Mac? If an iPad is connected to a PC, then in My Computer, there is a iPad device containing a folder with all photos and videos.

But on a Mac with Lion, this won't happen... Finder doesn't show such device or folder -- even when I choose Preference of Finder to show every device -- is there a way to see the folder like on the PC?

(I just want to edit one video using HandBrake, so won't like to use iPhotos or iMovies to import the video, but just take the video file "as is".)

You should be able to use the OS X tool called Image Capture. It is much more lightweight than iPhoto and is for downloading images and videos from digital cameras, which the iPad technically is as well.


Is it possible to disable Terminal's automatic tweaking of colors in Lion? While it's great that Terminal now has built-in support for changing the ANSI colors, I find it annoying that it automatically adjusts the colors to improve contrast, which means the colors that I actually pick often end up washed out or off in some other way. Here's a screenshot explaining the problem:

This bugs me because I like to use the same color scheme in Terminal and MacVim, and with this handling of colors by Terminal, they don't match up to the ones in MacVim.

Does anyone know of a solution to this, besides switching to iTerm 2 (which I'd rather not – I like the rest of Terminal, especially some GUI touches like the pulsating visual bell). Thanks!

Here's the trick that you need to know: Values set via RGB get mangled, those set via HSB do not.

I had a similar problem using the (great) Solarized color scheme: MacVim had a darker (and correct) background color than Terminal, even though I was setting all of the correct RGB values per the Solarized spec. See here:

Basically you need to know what your color values are supposed to be for each of the Terminal ANSI, text, and Background (note this one is on the Window tab) colors and then set them via the HSB picker instead of RGB. See this example:

For whatever reason (I suspect some type of profile thing, or perhaps a contrast tweak as you suggest), the RGB color you enter is not what you get. You'll also notice that once you've set the values via HSB, switching to the RGB picker will show options different than you'd expect. The Solarized value conversions all agree according to Photoshop; it seems to be something that the Apple color picker is doing for you.


Backing up and compressing Photos Library.photoslibrary I am backing up Photos Library.photoslibrary using rsync.

In general my backup philosophy is to keep things only if they cannot be automatically regenerated. Can anyone recommend items inside this package which do NOT need to be backed up (thumbnails, etc.).

If you delete these items from a Photos Library.photoslibrary and then open in Photos.app, will those items be automatically regenerated? And is there documentation of such from Apple?


Automatically arrange icons on the Mac OS 10.6 desktop in groups Recently I found my estimated 100 desktop symbols re-ordered in 5 bunches: 4 bunches with one in each corner and one bunch in the middle (leaving more space for more crowd between the bunches :). Unfortunately I was not aware how my symbols have been arranged in that way, I cannot find any menu entry nor do I remember the short cut that I might have pressed accidentally. Do you know how to invoke this function? Since I tried out some Apple menu items I found, I now ended up with the desktop arranged by the grid. But I prefer the bunches.

Update: Ops, it happened again. I hardly assume this automatic arranging of my desktop happens when I connect an external display in mirror mode having a smaller resolution. Now it looks as follows:

Notice the stacking of symbols in the top right that is the result of a formerly "Clean up" command in the desktop's context menu. But anyway, Mac OS created these 5 bunches again. As there is obviously a feature like that implemented, I am curious if I can run it also manually without connecting an external display to make it happen.

Once the desktop fills up, finder will tile and stack icons with a very small offset. I'd guess the algorithm had a bug or your .DS_Store file was corrupt and the system thought it had more icons to pile than it ended up with.

I dont know of a way to intentionally trigger the effect, but it would be nice to have four or five tidy stacks nice and deep rather than using the whole desktop.


How can you stop sites from sending unwanted or 'enforced' downloads in Safari? I'm not the only one who has been plagued lately with seemingly well-meaning sites suddenly warning me that some piece of software on my Mac is out-of-date and that I need to update 'whatever' (often Flash).  Then, my browser just goes ahead and accepts their download (probably malware) onto my computer and I can't stop it.  How can we stop Safari from downloading files without asking first?  It seems that these infected sites 'push' the downloads on you, and Safari does nothing to stop it.  BTW I'm using Sierra (10.12.6) and Safari 12.1.2.  I hear that this happens with other browsers as well.  Open "Safe Files" after downloading checkbox is not checked. Any ideas?

The real solution is upgrading to Safari 13, but there does exist a solution on Safari 12 and earlier.
Open Safari Preferences, choose the General tab, and for the download location choose ‘ask for each download’.
With this option select, Safari will prompt for a file name and a location to save the file, which you can cancel so the download doesn't take place.


How to show actual email address in iOS Mail app? iOS: 12.2

In the iOS Mail app, if the sender or recipient of an email has more than one email address associated with it, how can I tell which specific email address was used? For example, if I send myself an email from my personal account to my work account, since they're both associated to the same contact, I can't figure out how to tell who the recipient actually was. I have both Short Names and Prefer Nicknames turned off in the Contacts preference.

If you see the word 'Details' at the top of the message (near the right side), tap it.
Click on the persons name to open the contact card
Scroll to their emails
Look for the email with a "recent" tag above it.*

*In older iOS versions the correct email/phone number had a different color but in new versions it has a "recent" tag above the correct email/phone number.

See below:


Why can't I paste a password into a password form on a webpage? On my Snow Leopard Mac, I can't seem to paste into a password field on login pages to Apple sites, (developer.apple.com for example). I thought is was a browser issue but it's happening with Safari, Chrome and Firefox so it must be the System.
I assume this is somebody's idea of a security feature, though I fail to see the logic and it's very annoying.

Any ideas on how to fix, turn off or work-around this?

Right-click on the password field and under the menu that appears, select "paste" (it happens to me in Firefox and that is my fix).


Restored from iCloud - asking for old friends account constantly I just got a new phone, and I restored from my previous phone's iCloud backup, which worked great EXCEPT I apparently had one or two songs in my music that were authorized by an old friend of mine. It keeps asking me now for that friends Apple password to authorize the song - but I have no idea what song it is. I would really just like to get rid of the song, but how can I go about finding it?

This article from Macworld.com last week addressed this issue. I enclose a link, as the technique is too long to describe...and I haven't tried it.


Quick way to Print Multiple Emails Using Mail.app, or exporting from same, is there a quick way to print all the emails from a single folder?

I have about 50 email messages in a folder and I need to print a copy of each one.  I know I could

Open each email
Print it
Remove it from the tray (to conform it printing)
Repeat 50 times

That, however, seems super time consuming. I'd rather be able to

Somehow combine all the emails into a single document
Print that
Walk away

I know I can export to mbox, but I don't know of anyway to view a unified mbox as a single logical document (dealing with a combination of plain text, HTML formated, multi-part, attachments, etc)

I tried your request:

I selected 50 emails, then choose Print under File Tab.

It took some time to generate the print files, but then it showed me print preview for 50 emails.

Without proceeding (do not want to waist my toner), I see there is no problem in printing 50 emails all at once.


Creating an Automator service to add email messages to Reminders.app I've created an Automator service that creates a reminder based on the selected text.  What I really want is to create a keyboard shortcut that gets the same result that you get by dragging an email into the Reminders.app.

The service I have just uses the text to create the title of the reminder, but when you drag an email into Reminders.app it uses the subject of the email as the title and adds a link to the email its self.

Is there a way to create a keyboard shortcut for this action or an Automator service?

I don't have the keyboard shortcut, but I just finished an Actionscript that adds the email Subject as the Reminder Title, the email Body as the Reminder Content and then adds a link to the actual email at the bottom of the Reminder. Hope this helps!
on run {input, parameters}
tell application "Calendar" to activate
tell application "Calendar"
    set miniaturized of window 1 to true
    tell application "Mail"
        set theSelection to selection
        set theMessage to item 1 of theSelection
        set theurl to "message://%3c" & theMessage's message id & "%3e"
        set thedes to theMessage's content & "Show in Mail " & "message://%3c" & theMessage's message id & "%3e"
        set input to theMessage's subject
    end tell
end tell
tell application "Calendar"
    tell application "Reminders"
        make new reminder at end with properties {name:input, body:thedes}
        tell application "Reminders" to activate
    end tell
end tell
return input

end run


Is there a way to remove songs in a playlist from an iOS device? There are situations where (for example to free up storage) on an iOS device with iTunes Match enabled, it would be nice to be able to remove songs on the device, based on certain attributes. For example, it would be convenient to be able to remove all songs one has given low ratings. Match makes the first part of this easy: it is a simple matter to set up a smart playlist that is synced through iCloud to the iOS device; but it appears that (while it is possible to download missing songs from within a playlist) it is not possible to remove them. Is this in fact the case?

Is there no way to remove songs from a device from within a playlist?

From your question it seems you are trying to remove one file from the device.

I do not believe this is possible to remove individual songs that have been cached over iTunes Match on your iOS device (at this stage). Your alternative is to turn off Match from Settings -> Music -> iTunes Match to clear off all cached items and free up space


Recover Files in iCloud I uploaded a garageband song-file to iCloud on my iPad. Unfortunately i deleted it from iCloud (on my iPad) and its gone on both my iCloud drive and iPad local storage. Is it possible to recover my deleted file on iCloud or iPad?

Yes, you're in luck — this is in fact possible!

Login to iCloud, and then click your name in the top right of the page, and then click "iCloud Settings." Scroll to the bottom of the page, and in the bottom left hand corner you should see an "Advanced" box:

Then, click "Restore Files," and it will take you to this window:

If your files are not in this window, then I'm afraid you're out of luck!


Music App crashes frequently under iOS 5.0.1 I'm running iOS 5.0.1, no jailbreaks, customizations etc.

Last night I synced some of my music (I manually manage my videos and music). Probably transferred about 5.8 GBs of music.

This morning, I try to open up the native music app to listen; it doesn't load a single list view, just crashes. I get to work and plug in my iPod and iTunes is able to read and play all my files, so it seems that the music app is the problem.

I'm wondering if anyone else had this problem or a potential fix that does not involve wiping all of my music off my iPod.

It seems to be a software based issue. I would suggest backing up and restoring the device using these steps. I know you are wary about erasing all your music, but you can back it up to iTunes before doing this. Make sure you set it up as a new device so as not to transfer any old software back to the phone after the restore.