How to sync time between Windows and OS X? I'm using OS X Mountain Lion with Windows 8 installed via Boot Camp. When I switch between Windows and OS X the time in each operative system is different, exist a difference approximately of 4 hours with the same Time Zone.

So, I need to change the time when start Windows or OS X, but automatically change the time of the other operative system.

Exist any trick that solved this issue using the same Time Zone?

Thanks.

The easy way is to set Windows to use UTC, I didn't test with Windows 8 but I think will work.

Start with Windows and create a new file with the name setUTC.reg and paste this text inside:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation]
"RealTimeIsUniversal"=dword:00000001

save and close, after double click to add the value to the windows registry.
Restart Windows and set the time, after the time zone will not change anymore.

A one click solution for this:

http://romascusoftware.com/windows-mac-time-fix/

I found this solution to be the most convenient, other solutions involve modifying the registry on the windows side or running some commands on the terminal on the mac side.


Time Machine : Can't find deleted files in Time machine I just took Backup of my mac via Time Machine, the problem is :

I can't see my file in Time Machine which i deleted it from mac.
Is it true that if i delete some files from mac they will be deleted from Time Machine also (on next back up)?

Secondly, Does Time Machine takes complete Back up every-time or it just add updated or newly added files to old backup?

Thanks for your time.

Can you see the files if you just browse the backup volume directly in /Volumes/?

If a file is deleted, it won't be included in new snapshots, but there will probably still be older snapshots that have it.

The folders for backups only contain files that have changed. Other files and folders are just hard links. If a file has been modified after the last snapshot, the whole file is copied instead of storing a delta. See the Wikipedia article for more information.

I only can say that Time Machine is not working correctly.
It is just a diskspace hog.
TimeMachine does not back up every file (90% of the time when I need some files few days ago, I can't find that file in time machine.)
And how TimeMachine decides to backup a file or not to backup a file is unknown mystery.


Disabling / Uninstalling iTunes on macOS Mojave I'm using MacOS 10.14 Mojave on a MacBook Pro.

I'm trying to disable iTunes, mostly because it annoys me several times a day when I use my keyboard play/pause media button.

I have Spotify up and running and it usually gets these commands, but sometimes iTunes will pop out of nowhere (mostly when it's been a while without focusing the Spotify window).

I know in the past iTunesHelper process was responsible for this behavior and we could just disable it in the login items.

But today I have nothing in my login items, and no iTunesHelper process running.

The only suspect process I found was "com.apple.iTunesLibraryService", I tried to force kill it but it won't change anything.

Of course I tried to delete iTunes but it is "required by MacOS" -- seriously.

If I try to change authorisation on app to force uninstall anyway it tells me I don't have the required authorizations to do that -- as an administrator, right.

The only way to delete it seems to imply using some shady tricks that may or may not break my OS.

I'm seriously annoyed by the fact I can't own my laptop fully.

How can I uninstall or disable iTunes on macOS?

Side note: I will never connect any Apple device to my laptop, if that matters for iTunes sync or something.

Disable SIP
Open /Applications/Utilities/Terminal.app
Enter in sudo rm -rf /Applications/iTunes.app
Enter your password (it won’t be displayed on screen)

Apple has ensured that iTunes CANNOT be deleted anymore.  rm fails.


How do I install GCC via Homebrew? I am using Homebrew exclusively (i.e. I don’t, and won’t, use MacPorts or Fink). I also want to keep manual installations to a bare minimum.1
… But how can I install GCC?
First of all, I’ve of course installed Xcode but the current version doesn’t ship with a decently up to date GCC (I need ata least 4.5, but would prefer the most recent one) – in fact, it doesn’t ship with a proper GCC at all (it only ships Clang) and that seems to be a problem for Homebrew …
I’m aware of a list of custom GCC and cross compilers but in fact all of those installations require an already installed GCC – at least, brewing them fails with linker errors on Lion which I attribute to Clang, and -use-gcc doesn’t work for obvious reasons.
brew doctor only mentions what I already know, that there is no GCC (4.2.x) installed.

1 I’ve previously mixed MacPorts, Homebrew and some manual installations and have ended up with a maintenance and versioning hell. I don’t want to go there again.

Homebrew solution

To answer my own question, homebrew-versions now has a fairly up to date formula of GCC. It can be installed using

brew install [flags] https://raw.github.com/Homebrew/homebrew-versions/gcc48.rb

Where [flags] should include all the required languages, e.g. (--enable-cxx --enable-fortran).

This will install the executables with a suffix, i.e. gcc has to be accessed as gcc-version to avoid clashes. If necessary, one can create appropriate symlinks to make this version the default.

Manual installation

Alternatively, an up-to-date GCC (as of the time of writing) can be compiled manually using the following shell script:

VERSION=4.7.0
PREFIX=/usr/gcc-$(VERSION)
LANGUAGES=c,c++,fortran
MAKE=make
# Or
# MAKE='make -j 4' # to compile using four cores

brew-path() { brew info $1 | head -n3 | tail -n1 | cut -d' ' -f1; }

# Prerequisites

brew install gmp
brew install mpfr
brew install libmpc

# Download & install the latest GCC

mkdir -p $PREFIX
mkdir temp-gcc
cd temp-gcc
wget ftp://ftp.gnu.org/gnu/gcc/gcc-$VERSION/gcc-$VERSION.tar.gz
tar xfz gcc-$VERSION.tar.gz
rm gcc-$VERSION.tar.gz
cd gcc-$VERSION

mkdir build
cd build

../configure \
   --prefix=$PREFIX \
   --with-gmp=$(brew-path gmp) \
   --with-mpfr=$(brew-path mpfr) \
   --with-mpc=$(brew-path libmpc) \
   --program-suffix=-$VERSION \
   --enable-languages=$LANGUAGES \
   --with-system-zlib \
   --enable-stage1-checking \
   --enable-plugin \
   --enable-lto \
   --disable-multilib

$MAKE bootstrap

make install

# Uncomment for cleanup …
# cd ../../..
# rm -r temp-gcc

This will stage GCC into the path /usr/gcc-4.7.0. Now all you need to do is either create symlinks to the executables or add the bin directory to the $PATH variable.

Command:
brew update

brew install gcc

location : /usr/local/Cellar/gcc/10.2.0_4: 1

Command:
brew update

brew install app
location: /usr/local/Cellar/gpp/2.27


Can I open files in TextEdit from the Terminal in Mac OS X? I frequently find that a Terminal command to open a file in TextEdit would be very handy. Does such a command exist on Mac OS X?

open -a TextEdit filename should do the trick.
The -a flag specifies any application you want, so it's applicable to any number of situations, including ones where TextEdit isn't the default editor.
Other relevant options

-t  opens in the default editor (i.e. if you use BBEdit, TextMate, etc.)
-e will open the file specifically in TextEdit

This is not a programming question. But I did a quick google and found this site:

http://ss64.com/osx/

http://ss64.com/osx/pico.html pico: Simple text editor

http://ss64.com/vi.html vi: Text Editor

And this site explains how to use TextEdit from terminal.

http://www.tech-recipes.com/rx/2754/os_x_edit_file_using_textedit_as_root_superuser/


Is it safe to allow apps to access your photos? Some wallpaper apps try to access your camera roll in order to save photos there. Is it safe to do so ? What am I giving developers once I allow them access to my camera roll's photos ?

I'm just concerned a bit regarding my privacy.
What are they allowed to do with the photos ? Are they encrypted or plain .img files that they can view ?

Whether it is safe or not depends on whether you trust the app and the developer's privacy policy or not.

When you give access to an app to photos (either through the prompt that comes when the app tries to access photos or through Settings > Privacy > Photos), the app gets access to write new photos/images to your Camera Roll and to read all your photos on the device in an unencrypted form.

The date and time when each photo was taken is embedded within the photo. Plus, if you have enabled Location Services for the Camera app, then an app that has access to the Camera Roll can also find out where you took the photos.

How the app then treats the photos and the associated metadata (like date/time and location), if it uploads or sends them elsewhere, is left to the app. For example, once you give permission, iOS apps for popular services like Dropbox, Facebook, Flickr and Google+ can upload all your photos to their services. With iOS 7, these apps can also be allowed to do it in the background (when you're not actively running the app). Most users wouldn't even actively know which photos are being uploaded and when.

From the Data Management in iOS page of the developer documentation:

  Similarly, your app can load, display, and edit photos from the Photo Library, as well as use the built-in camera to take new photos.

So far, Apple has not implemented any granular settings in iOS within Privacy > Photos to restrict read access to specific photos in the photo library.

That is the purpose of asking you to allow access to your photos. Allow only the apps that you trust. In general if you set in security&privacy settings to allow apps only from the mac app store and certified developers, you have little to concern about.


When I open Terminal, I get an "I have no name!" prompt Suddenly, this morning, I open a Terminal window and I get this:

I have no name!@macbook:~$ whoami
502

** I am not a number!  I am a human being! **

What gives?  Anyone know what I need to do to get my name back?

I suppose there are two problems here, one is that my hostname is undefined, the other is that whoami reports my name as a number.

Something in memory got corrupted, and the mapping between your userID (502) and your username (ipd) was lost.  I've seen it happen (usually when I've manually killed hung system processes), although I'm not sure exactly what causes it.  launchd maybe?

Because that mapping is lost, whoami can't convert your ID into a username so returns the ID, and your prompt defaults to the "I have no name!" message because you effectively don't have a name.

Logging out and back in might fixit, but restarting is the best way (as you discovered).

Basically, it's a symptom of another problem, and not a problem in and of itself.

Go to the home folder in Terminal and run . ~/.bashrc.

It works!!


U.S. vs. Canadian English keyboard What is the difference between an US and a Canadian English keyboard layout? Could you give a visual comparison?

There's no difference except for the flag icon.  It is presumably there so that Canadians don't have to be looking at the US flag all the time to type their language.  The same holds for ABC, which is the same as US but no flag at all, for the rest of the world.

Unfortunately Apple does not document anywhere the dozens of different software keyboards/input sources which it provides.

I do not really understand the question. But there are many many keyboards for the macbook (pro) and other "hardware" keyboards.
For the software keyboards: if you compare the CanadianEnglish and the US International in Keyboard Preferences, you will see that they are NOT the same for special characters, when you hold Shift+Option, for example.


Thunderbolt monitor Ethernet adapter causes network preferences pane to crash I have a 2014 Macbook Pro 15" running 10.9.3, connected via Thunderbolt to two Apple Thunderbolt monitors.  Each monitor has an Ethernet jack.

The Ethernet seems to pick up an IP address, but doesn't work unless I turn of Wi-Fi, then disconnect my VPN, then pull the Ethernet and reconnect it.

When I plug in my ethernet cable to monitor, the Network Preferences pane crashes every time I open it.

6/3/14 2:38:36.962 PM com.apple.preference.network.remoteservice[23014]: assertion failed: 13D65: liblaunch.dylib + 25164 [38D1AB2C-A476-385F-8EA8-7AB604CA1F89]: 0x25
6/3/14 2:38:36.971 PM com.apple.preference.network.remoteservice[23014]: assertion failed: 13D65: liblaunch.dylib + 25164 [38D1AB2C-A476-385F-8EA8-7AB604CA1F89]: 0x25
6/3/14 2:38:37.130 PM com.apple.preference.network.remoteservice[23014]: Bogus event received by listener connection:
<error: 0x7fff785aab50> { count = 1, contents =
    "XPCErrorDescription" => <string: 0x7fff785aae60> { length = 18, contents = "Connection invalid" }
}
6/3/14 2:38:37.235 PM com.apple.preference.network.remoteservice[23014]: Could not find image named 'InvalidDataIcon'.
6/3/14 2:38:37.318 PM com.apple.preference.network.remoteservice[23014]: -[__NSCFString count]: unrecognized selector sent to instance 0x7fb8fb502670
6/3/14 2:38:37.319 PM com.apple.preference.network.remoteservice[23014]: An uncaught exception was raised
6/3/14 2:38:37.319 PM com.apple.preference.network.remoteservice[23014]: -[__NSCFString count]: unrecognized selector sent to instance 0x7fb8fb502670
6/3/14 2:38:37.320 PM com.apple.preference.network.remoteservice[23014]: (
    0   CoreFoundation                      0x00007fff8c04425c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff887dee75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8c04712d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff8bfa2322 ___forwarding___ + 1010
    4   CoreFoundation                      0x00007fff8bfa1ea8 _CF_forwarding_prep_0 + 120
    5   Network                             0x00000001117ea6fd Network + 50941
    6   Network                             0x00000001117ea35d Network + 50013
    7   Network                             0x00000001117e8b6b Network + 43883
    8   Network                             0x00000001118284e7 decryptOldStylePassword + 130098
    9   Network                             0x00000001117e7549 Network + 38217
    10  CoreFoundation                      0x00007fff8c012e0c __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 12
...
)
6/3/14 2:38:37.320 PM com.apple.preference.network.remoteservice[23014]: *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x7fb8fb502670'
*** First throw call stack:
(
    0   CoreFoundation                      0x00007fff8c04425c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff887dee75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff8c04712d -[NSObject(NSObject) doesNotRecognizeSelector:] + 205
    3   CoreFoundation                      0x00007fff8bfa2322 ___forwarding___ + 1010
    4   CoreFoundation                      0x00007fff8bfa1ea8 _CF_forwarding_prep_0 + 120
    5   Network                             0x00000001117ea6fd Network + 50941
    6   Network                             0x00000001117ea35d Network + 50013
    7   Network                             0x00000001117e8b6b Network + 43883
    8   Network                             0x00000001118284e7 decryptOldStylePassword + 130098

...    )

I had this same issue (10.11.1). It was triggered in my case by plugging an ethernet cable into a 5k iMac that had previously only ever used WiFi. The network preferences pane would hang and com.apple.preference.network.remoteservice was shown as taking 100% CPU and "(not responding)" in Activity Monitor.

I tried deleting several network related files in /Library/Preferences but the one that seemed to do the trick was /Library/Preferences/SystemConfiguration/preferences.plist. Deleting that file and rebooting allowed me to load Network Preferences, and everything seems good now.

Make a backup and delete all /Library/Preferences/

sudo rm -rf /Library/Preferences/*

Reboot and you should have the problem fixed.... it did work for me... running 10.9.5 beta here.

ProductName:    Mac OS X
ProductVersion: 10.9.5
BuildVersion:   13F18


WhatsApp Web in Fluid throws JavaScript exception When I'm starting the WhatsApp web client in a Fluid app, this JavaScript exception is thrown:

[Error] TypeError: undefined is not an object (evaluating 'e.getDatabaseNames')
    U (app_59f797fae4fc761b3ee8.js, line 63)
    c (app_59f797fae4fc761b3ee8.js, line 62)
    n (app_59f797fae4fc761b3ee8.js, line 6)
    (anonymous function) (app_59f797fae4fc761b3ee8.js, line 6)
    t (app_59f797fae4fc761b3ee8.js, line 5)
    (anonymous function) (app_59f797fae4fc761b3ee8.js, line 5)
    t (app_59f797fae4fc761b3ee8.js, line 5)
    (anonymous function) (app_59f797fae4fc761b3ee8.js, line 5)
    webpackJsonp (app_59f797fae4fc761b3ee8.js, line 5)
    global code (crypto_8cbbef38a0cf6ff138dc.js, line 2)

This leads an infinite loading screen.

When I launch WhatsApp Web in Safari e is a IDBFactory, but it looks like the IndexedDB API isn't available in a Fluid app (there e is null).

You have to set either Firefox, Chrome or Safari as user agent to get to the loading screen. I tried playing around with the settings, but nothing seems to help.

I wrote a mail to the FluidApp support, but no answer so far. Does anyone have advice?

I don't have a solution that works with Fluid, but Aluxian/WhatsApp-Desktop on GitHub provides an open-source wrapper for the WhatsApp web app which works well and provides similar functionality to what Fluid would.

Use this , very simple and elegant -

https://github.com/stonesam92/ChitChat


Is AFP of any value to non-ancient devices? From one person’s tests, SMBv3 is just a hair faster than AFP.

All of the Macs, iPads, and iPhones in our house capable of reading disks are Apple devices that support SMBv3.  We have no devices capable of AFP.

File sharing allows SMB or “SMB and AFP.”  Is there any benefit to enabling AFP?

I am more accustomed to NFS, but speed of disk access is worth switching over.

I personally use SFTP on my home network rather than SMB or NFS, as that allows you to access POSIX file permissions, whereas the others do not. This is a feature offered by AFP, too.

macOS requires POSIX file permissions on users' home directories, so if you plan on having those accessed via the network, SMB is not an option.

Having said that, Apple appears to be phasing out AFP, with no support for APFS volumes (at least not yet). I'd personally stick to just using SMB unless your needs dictate otherwise, in which case, SFTP may be a better choice than AFP simply for its cross-platform support and not being proprietary (though Netatalk provides an AFP solution for Linux).


Numbers appear with country code in message app A friend of mine just bought an iPhone. She imported all her SIM contacts using the regular method: Settings > Contacts > Import from SIM All went well.

But when she opens the Messages app, the list is filled with numbers with a country code prefix, so instead of the normal overview of conversations (Tom Dice, David Swimmer, Kim Bauer, etc.), she gets a list with all the numbers of her contacts as name (+324123456, +328945782, etc.).

So, has she imported her contacts the wrong way? Or Iis there some corrupt data in her phone? Or what?

I know it's a pretty vague question without a screenshot, but if you need any more information, please let me know.

It might be how the previous phone she had save the data on the sim card and the iPhone couldn't import it properly and misplaces the data in the import processes.

I suggest you try once again with the same phone with different sim card [or even the same sim card and see]

This will make sure that the phone doesn't have a problem.

Because to me the importing data from sim card most likely a software issues which easy to solve.

In you computer, go to
System Preferences > Language & Region
change the Region as needed


Spotlight search returns no results on iOS 9 The bug mentioned in this question continues: Spotlight search on iOS 9 returns no results.

I've tried

Sending myself an e-mail (yes really; this occasionally works for a few minutes)
Toggling off all entries in the settings for Spotlight (takes forever)
Restarting
Rebooting
Toggling contacts on and off (suggested in several places, at least of iOS 8)
Re-enablining only Contacts in Spotlight search settings (said to work for iOS8)
All of the above in every possible pairwise combination

None of these work for more than a few minutes. Most do not work at all.

Basically, for practical use, especially "in the field", this effectively bricks my iPhone.

Has anyone had reliable success with iOS 9 fixing this issue?

I've tried

sending myself an e-mail (yes really; this occasionally works for a few minutes)

Toggling contacts on and off (suggested in several places, at least of iOS 8)

Both of these, the only specific attempts you've made to solve your issue (and the only two that seem to be reported as effective) both involve accounts.
My best guess for why your issue is occurring (based on this connection) is that something with your email accounts is screwed up, giving Spotlight a format of information it can't handle, effectively crashing it. The idea that your accounts are causing it is one uncommon thing that isn't changed by a  factory reset, given that you probably re-signed-in to at least one of your accounts immediately after a reset.

How should you stop this issue from occurring?

Sign out of your email accounts (in your mail settings) and delete all of the contacts, emails, calendar events, and notes from your iPhone.
Sign out of your iCloud account and remove any information associated with that account from your phone (this might involve a factory reset without restoring from a backup and without signing into your iCloud account).
Turn off Siri (which has access to and can control your accounts).

Once you delete all email/account related data from your iPhone, I suspect this issue will cease to occur to you, and Spotlight should start working again.

Other tips from other forums:
Make sure you're not hiding contacts in the Contacts app.
Shut down everything from appearing in Spotlight then only enable Contacts.
Reset your network settings in Settings->General->Reset

The only official suggestion from Apple
Make sure you're in a country that supports Spotlight Search, that your language is set to a language spoken in one of those countries, and that your device region is set to one of those countries.

I have this problem a couple times a day. Until it's fixed I've had to double click the home button to bring up the recently used apps. Then I swipe up on two or three of the most recent ones. Then try searching again in Spotlight. If it doesn't work try closing a couple more. Not sure what the deal is but that always works for me


What's the best way to test the battery life on a MacBook Air? I just recently got a MacBook Air and noticed that its battery life is much lower than Apple's estimate of 7 hours.

Since it is not the same, I would like to benchmark my battery life right now (while the battery is fairly new) so that in the future when the battery feels like it isn't holding as much charge, I can know if it's due to the battery life diminishing, or if it's simply my perception that the battery is not holding as much as it used to.

For example, say I find out that my MacBook Air only holds 5 hours of battery life today. A year later, I may notice that the battery isn't holding as much power, and decide I want to benchmark it. I test it again, and find out that its still holding 5 hours of battery (it just seemed like it was holding less). So while it's less than the 7 hours promised by Apple, my battery hasn't actually degraded at all, since it matches the same benchmark I used before. Thus, there is no point of replacing its batteries.

I have several programs running in the background (BetterTouchTool, KeyRemap4MacBook, DropBox, iAntiVirus), which I expect to be running throughout my MacBooks life. Do you think that when performing these battery benchmarks I should quit these applications or leave them running? My guess is that I should quit as many applications as possible to reduce the chance that one of them won't behave exactly the same between benchmarks.

Ideally I want the benchmark to not last a long time so that I don't waste time benchmarking, however, at the same time, I don't want to overheat the battery which could cause permanent damage.

Ideally the benchmark should not require me to be present at the computer and use it constantly (this would mean that I would need to temporarily disable the sleep timers), since then it wouldn't actually reflect a reproducible benchmark (e.g. if I need to use Facebook for 5 hours constantly during each benchmark, its VERY unlikely that I will do the exact same thing during both benchmarks... not to mention that Facebook's code a year later may be less or more efficient, causing more or less battery usage). Thus, I'm thinking an automated program which keeps using the battery at a consistent rate would be the best tool for the job.

Also, how would I know how long the battery lasted? I don't want to sit near the computer and constantly monitor if it's still on or not. I want to be able to set it and forget it. Then after recharging it, it will inform me of how long the battery lasted.

Do you have any suggestions for things that might help perform these kind of benchmarks?

Actually, an Apple battery gives you the percentage of its original capacity that it currently has. You can access that number through the free CoconutBattery app.

If you want to do your own benchmark, I recommend using BOINC and supporting a grid computing project, like SETI@home. These basically use 100% of your CPU from the moment you turn the program on until the moment you turn it off. This drains the battery pretty quick. Just be careful to check temperatures to make sure the computer doesn't overheat, especially with a MacBook Air. You probably should quit extra apps, but it shouldn't matter too much.

Please feel free to downvote my answer because I'm not really answering the question.  I guess a mod could just delete this.

Instead, I have an axe to grid with Apple's battery life claims.  Their seven hour claim is based on a default install of Max OS X on your MBA and a single instance of Safari browsing the internet over WiFi, looking at web pages that are mostly text (read few images and NO FLASH!).

Who does that?  Who cares?  If you do that, you're battery will last a long time...

<over-the-top-rant>

This is similar to car manufacturer MPG ratings, fast food "restaurant" pictures of their products and walkie-talkie range claims.  That is, in PERFECT conditions, things are awesome!  Otherwise, caveat emptor.

</over-the-top-rant>

To try to avoid downvotes/deletion (too late), I'll say that I can't really recommend a good way to establish a baseline battery life that is a repeatable test to determine battery wear and tear, but I'll tell you that I use iStat Menus to track my battery life and it does a good job tracking battery life, remaining time until discharge, remaining time until fully charged and tracking remaining battery health (among other things).

You might check it out: http://bjango.com/mac/istatmenus/

Good luck and sorry for the rant :-)


Keyboard must be press hard on a MacBook Pro (13-inch, Early 2011) I have a MacBook Pro (13-inch, Early 2011) running OS X El Captain and something unusual is happening to me when using my own account, keys must be pressed really hard to work, however on the other hand, when I'm using the  Guest account, everything works okay!

Do you know what can be the problem? What should I do?

Check that Slow Keys isn't enabled in System Preferences > Accessibility > Keyboard.

I have the same problem, I download few programs just the days before, and I think was some kind of virus, at the monitor of activities, I force to quit few programs and after that I can type my user, ant the other hands my macbook pro was sending files and very high temperature, now is ok, but in a few minutes I will reset it. lets see is I can start it up well.
thanks.


iPhone Keyboard font How do I make my Keyboard font on iPhone 6 larger?
I have tried enlarging my fonts on the phone - it only enlarges the typed words I need to have the Keyboard Lager, my fingers are too large so when I type I keep hitting the wrong letters. How can I increase the size of my KEYBOARD?

You can't change the size of the keyboard itself, that's fixed.  What you can do is find 3rd-party keyboards on the App Store such as Thick Buttons or Minuum.

The keyboard can't be made larger, try finding a third-party keyboard which has support for that.


How can I combine PDF files and automatically create a table of contents? I have a bunch of PDF files named, say, chapter1, chapter2, etc. I would like to combine them into a single file and create a table of contents where each file gets an entry.

If memory serves, there used to be a tool called CombinePDFs that could do that, but it was written as a RealBASIC application and does not seem to work on OS X 10.8 anymore.

Any alternative suggestion?

Note: it's really about the automatic table of contents feature; I know how to merge/join/combine PDF files without one.

PDFCombo, new free app for Mac OS X, combines PDFs and preserves the table of contents. It can also add a TOC entry based on filename to link to first page of every contributing PDF in the combined PDF.

Download here: http://www.onekerato.com/downloads.html

For those who don't know the first merge step, open both in Preview. Then drag on PDF icon on top of the other ones. More details here. It doesn't require additonal software.


How to "Secure Empty Trash..." (wipe free space) on OS X El Capitan? Before OS X El Capitan, when viewing the Trash folder and pressing the "Alt" key you have been able to Secure Empty Trash... however this feature has been removed from OS X El Capitan!

Does anyone know how to reactivate this option via Terminal? Is this possible?

The secure delete option was removed from El Capitan, but as explained in this article, there may be some alternatives you may wish to use (see below for notes if the Mac has an SSD).

You can use the disk utility to overwrite the free space on the drive;

diskutil secureErase freespace LEVEL /Volumes/DRIVENAME

Where;

  In this command, change LEVEL to a number of 0 through 4, where 0 is a single-pass of zeros, 1 is a single-pass of random numbers, 2 is a 7-pass erase, 3 is a 35-pass erase, and 4 is a 3-pass erase (note all non single-pass options may take a while to complete).

You can consult the man page for more detail on the command usage.
Overwrite the contents before the deletion (from the terminal);

rm -rP /path/to/file-or-folder

Where r is to recurse over the folders and P will overwrite their contents.
The srm utility provides a mechanism (from at least Yosemite) to overwrite and remove files, lifehacker has an article on its use;

srm -v ~/Path/To/file.remove

The -v indicates verbose mode.
Consider using the "Delete Immediately" option that was added to El Capitan. Whilst this may not be the "secure delete" you are looking for, it does skip the trash.

It is important to bear in mind that with modern SSD wear levelling, writing to the same location in a file isn't necessarily going to write to the same location on the disk, hence the secure deletion would not always achieve what you wanted (see CVE-2015-5901 and hence removed in El Capitan). Given an SSD, the "erase"-ing of the free space is probably the best option, once the files have been deleted and removed from the trash.

For those with mechanical disks (non-SSD), the srm option may be the easiest alternative.

I use Permanent Eraser.app (http://www.edenwaith.com/products/permanent%20eraser/)


Does iTunes in the Cloud apply to Movie Rentals? I rented a movie from iTunes on my Mac running OS X 10.8. I was under the assumption that it would be available on my iPhone (iOS 6) and iPad (iOS 6) to stream or download but it isn't. It doesn't appear in the Videos app and I can't find it under Purchased in the iTunes Store on my devices. All of my devices are logged in under the same account.

Are iTunes movie rentals not available in the cloud? I know movie purchases are.

Every support document I found on Apple's website didn't mention rentals, only purchases.

iTunes movie rentals originally purchased on a computer can be moved between devices as many times as you like during the rental period but can only "exist" on one device at a time. To move it between devices, use iTunes with the device you want to put it on. See this Apple support article. Steps are:

Connect the device and select it in iTunes.
Click the Movies button.
Select the movie, and then click Move.
After all movies have been moved, click Apply in the lower-right corner of iTunes.

To answer your direct question: no, rentals do not currently exist in the cloud.

You can't rent on a mac and then start looking at it on Apple tv and later finish watching it on another device (including the Mac). I spent 4 hrs on hold and 4 contacts at apple care and eventually got this answer. If someone can say for sure this is not rte. I would like to know.


Does Catalina synch and backup devices running iOS 12? I've got one of the first generation iPad Airs and it will only update to iOS 12.4.2.  I'm trying to back it up and synch it using my iMac on which I've installed Catalina (10.15). The iPad shows in the sidebar of Finder but when I click on it, after a minute of waiting I get a message saying "The selected device could not be found."  I have no problem backing up and synching my iPhone which is running 13.1.2 and I've had no problems backing up and synching this iPad in the past. Does anyone know if the new method works with devices running iOS 12?

I would suggest you try this:

https://www.catalinaosx.com/macos-catalina-continuity-issues-device-timed-out/


Filter or Find Finder Items Using Variable In the Filter Finder Items and Find Finder Items actions, Automator lets you type out criteria for what your looking for like:
Folder Name Contains: (Manually Insert Text Here)
Here is an example image of "AnchorFile" being the typed criteria:

Is there anyway to pass a variable onto the filter?
I have tried to put a Get Value of Variable action before the filter/find in the hopes of being able to use the variable as the search criteria. Similar to this workflow:

The goal is to find the "XXXXX_Workers Compensation" folder on my computer using only a variable and filter/find Actions
I hope this is clearer than a previous post I made as I am a newbie in the Applescript/Automator world.
If we can get this "pass a variable to filter/find" thing to work, it would effectively:

Create a foldername from a filename,
Then input that foldername into the search bar of Finder to bring up the folder in Finder.

Thanks for any help you can give.

Turns out I needed to do a spotlight search instead of Filter/Find Finder Items in order to use a string to find the folder by its name alone (Without path).
I also did not need to store the filename as a variable in order for me to accomplish this final workflow but spotlight can use a variable that is a string to search I found out.
Here is my final workflow.
EXPLANATION:
(Get Specified Finder Items and Get Folder Contents were in place for testing within Automator)

A file being added to a folder called "WCCalcs" triggers the workflow.

Steps 1-2 (Filter Finder Items and Set Value or Variable):
Singles out our new file which is a pdf and saves it in a variable called 'MovingFile'.
It will always look like "#####_WCCalcs_YYYY"

with "#####" being a 5-digit number
and "YYYY" being the current year

Steps 3-4 (Get PDF Metadata and Run AppleScript):
Takes the first 5 characters of the file name and adds it to a string and this creates the folder name we need becoming "#####_Workers Compensation" (See AppleScript.)

Steps 5-8 (Spotlight,Get Folder Contents, Filter Finder Items, Set Value of Variable):
Uses the newly created folder name to do a spotlight search as well as  filters down to a destination folder which we stored in a variable called 'Destination.

Steps 9-10 (Get Value of Variable and Move Finder Items):
Calls MovingFile variable and moves it to the Destination folder

Thanks for your help @red_menace it caused me to think outside of what I was trying to do.


Is there any free/paid Windows emulator for Mac OS X? I am new to Mac and I am looking for a Windows emulator for Mac OS X. I want to use an application which is not available for Mac.
Please recommend the strengths and weaknesses (including cost) of the various options available.

Wine
You could try Wine and use the  Winebottler frontend for installing common Windows software.
With Wine isn't 100% compatible with all windows programs, so consider yourself lucky if all your applications work.
Virtualbox
Virtualbox is a PC virtualization software. You'll need to install Windows as a "Guest operating system", which requires a Windows license.
Virtualbox is compatible with all Windows software, but has limited support for hardware 3D acceleration.
Boot Camp
For 3D games you'll need to use Boot Camp.

CoolROM has a list of Macintosh / Mac OS X Emulators:

MacMAME - Arcade
Stella - Atari 2600
Jum52 - Atari 5200
Atari800MacX - Atari 5200
SDLMESS - Atari 7800
Virtual Jaguar - Atari Jaguar
Handy - Atari Lynx
Frodo - Commodore 64
Boycott Advance - Gameboy Advance
Visual Boy Advance - Gameboy Advance / Color
KiGB - Gameboy Advance / Color
OpenEmu - Multiple Systems
NeoRaine - Neo Geo CD
Neopocott - Neo Geo Pocket
RockNES - Nintendo
Nestopia - Nintendo
sixtyforce - Nintendo 64
Mupen64 - Nintendo 64
DeSmuME - Nintendo DS
Dolphin - Nintendo Gamecube
Fusion - Sega CD / Master System / More
lxdream - Sega Dreamcast
Generator - Sega Genesis
Genesis Plus - Sega Genesis
SMS Plus - Sega Master System / Game Gear
Yabause - Sega Saturn
PCSX-Reloaded - Sony Playstation
PCSX2 - Sony Playstation 2
JPCSP - Sony Playstation Portable
Fuzzbug - Spectrum ZX
BSNES - Super Nintendo
Snes9x - Super Nintendo
ViBE - Virtual Boy
Oswan - Wonderswan


How can I gain access to the Windows 10 BitLocker encrypted drive on Mac OSX? My friends send me a USB drive which has been encrypted with a password in Windows 10 before. There are many important photos for our travel. But when I inserted it on my MacBook. It gave me the windows that the disk was not readable by this computer. I have the password and can not access the drive to get what I want!! Bad mood.

Can anyone give me suggestions? I search online and found there is a tool called iSunshare BitLocker Genius. Did anyone use it before? I know nothing about computer, just want the simplest way to get the photos and share the happy times with my family. Help!

By default, we couldn't open, read and write a BitLocker drive on Mac. But take it easy, the BitLocker Genius tool is a really simple and user-friendly tool that can help you get access to the BitLocker drive without any data loss.

When you meet "The disk you inserted was not readable by this computer" error, you can click on Ignore button. I'm also a user that know little about computer. But I insert the drive to Mac and type my password then that drive is able to work normally.

Besides, you can unlock the BitLocker encrypted drive on Mac using a recovery key as well.

Have you resolved your question? Normally, you cannot access a drive encrypted with Windows BitLocker on Mac OS X because Mac OS X doesn’t support BitLocker. To access a BitLocker drive on Mac OS X, you have to firstly connect the drive to a Windows computer and then simply go to Control Panel > System and Security > BitLocker Drive Encryption to turn off BitLocker encryption on this drive. If you cannot find any Windows machine, you have to use a third-party utility to access the BitLocker drive on Mac OS X. I found this utility called BitLocker Reader for Mac at Google. You can give it a try. Good luck.


Why does iTunes not recognise a plugged in iPhone on Windows 8.1? I have iTunes 11.0.4.4 and have just installed Windows 8.1 - iTunes seems to work ok, but when I plug the iPhone in (iOS 6.1.4) it doesn't appear and be recognised.

The OS sees the phone and I can copy files from it, but iTunes doesn't react to it.

Are there any known issues with Windows 8.1 - am I paying the price for being on the bleeding edge?

This technique just worked for me on 11.1.3.8 (it broke on the Windows 8 to 8.1 upgrade):

Control Panel, uninstall "iTunes" and "Apple Mobile Device Support"
Plug out your iDevice(s)
Reboot (might be unnecessary, but Windows 2.0 trained me to do this all the time after driver changes)
Run the iTunes installer (you might already have downloaded it)
Plug in your iDevice(s)

At this point, my iPod and iPad were recognized and synced.  My library appears to be intact as well.

I subsequently rebooted and these devices are still found.

go to itunes properties and in compatibility tab click chang settings for all users and the choose run program as admin under priviledge level and apply


How to find duplicate folder names and resolve naming conflicts in OS X? I have my music collect on my NAS and would like to copy it to my laptop. When I try to copy the music folder and paste it to a new location on my laptop I get messages that OS X can't paste the folder to the new location because a folder with the same name already exists.

For example, let's say I have the following two folders:

/Music/311/horrible album

/Music/311/Horrible Album

As it stands right now, both folders are sitting on my NAS. When I try to copy the Music folder over to my laptop, I get a message that OS X won't allow this because of the above folders have the same name.

Each time I try this whole copy/paste thing I'm getting the same error message, find the conflict, move the files from one folder to the other, delete the original folder and then try again only to have another conflict.

So...I'm trying to find an application or script that could scan my iTunes music folder and see where I have these conflicts so I can actively go in and fix them so that the copy/paste thing will work without errors.  I'm a bit of a newbie with Terminal but willing to give it a try.

System specs:

Latest OSX 10.10.4
Lastest iTunes 12.2.1.16
Old Macbook Pro
Synology DS213J

You can do this in bash to identify which files and folders are problematic:

find /path/to/remote/library | tr A-Z a-z | sort | uniq -d

This will output all lower case files and folders that have a duplicate with upper case letters.

a very unix answer by madmax1 - he is suggesting that you force all file names to lower case on your source disk, then copy .. but his command will fail if both files are in the same folder .. if in different folders on the source disc, no problem. But then, if you copy both files from diff folders on the NAS to the same folder on the destination disk the second one to be copied will overwrite the first one. Maybe not what you wanted.

You could look at the CPIO command .. or the -cpio argument for the "find" command for the filename handling options .. you can copy and rename in one blow as it were .. but this are command line options.

**
My first try at an answer missed the point I think .. your problem is not duplicates, it is mixed case filenames. This happens when the file system you are trying to copy the files to does not understand upper/lower-case file names.

You can check this in Disk Utility .. if your destination disk/partition is

  Format : Mac OS Extended Journaled

then it cannot handle mixed case names.
If it says

  Format : Mac OS Extended (Case-sensitive, Journaled)

then it can. You can use Disk Utility to reformat the partition to add case sensitivity, which will erase everything on it so .. careful!

Another way to attack this is get a really good renaming program to process the filenames on the source disk to be unique and acceptable to the destiation disk's formatting. I like .. i mean REALLY LIKE .. "A Better Finder Rename" .. an awsum GUI solution to text processing batches of filenames in all ways.

** now back to the original answer **

There are a few good duplicate file detectors with GU Interface out there. I like Jaikoz for music files myself .. it is a full service music catalog with duplicate resolution and name correction .. so serious overkill for your needs probably, and you have to pay for it.

I also have Gemini from the people that make CleanMyMac .. both helpful programs IMHO.

googling for

  mac os x duplicate file detector

or searching for "duplicate" in the app store will provide you many alternatives


Turn off iMac main screen while working on external I have an external display on my iMac and I would like to work only on the external display and turn off/disable the iMac one, just like the "clamshell mode" on a Macbook for example. It works with Windows in Bootcamp, but not in the Mac's partition. The iMac's display is too shiny and it gives me headaches when I work while the sun is shining.

How can I turn off the iMac's screen so it won't stress my graphic card, display etc.?

I succeeded by using switchresx.
Terminal command

brew cask install switchresx

then, open System Preferences, SwitchResX

Click icon, setup a display set with a disabled primary display, setup hotkey (ctrl-opt-f1 for me), save&close SwitchResX

Then, if you want to use single external display mode, press the hotkey et voilà

Just turn the brightness all the way down


Image on external monitor is off-center I have a 13" retina MacBook Pro and an Acer X223W external display, connected via an official Apple Mini DisplayPort > VGA adapter. The Acer is set to 1680x1050 (its default resolution).

I wanted to adjust the colors on the Acer, so as a start I hit the physical Auto button on the display. As soon as I did this, the image on the display jumped over to the left by about 2". So the image is now cut off on the left, leaving a big black gap on the right.

If I switch the resolution to anything else, e.g. 1440x900, it'll fill the display like normal again. But if I switch it back to 1680x1050, it gets shifted over to the left again.

I tried adjusting the horizontal position of the image with the display's on-screen controls, but (a) it was already set to 50/100 (which should be the center), and (b) the maximum value of 100 doesn't move the image far enough to the right to eliminate the gap. So that apparently isn't the issue.

I also tried:

Restarting/rebooting the laptop
Turning the external display off and back on
Unplugging the Mini DisplayPort > VGA adapter and plugging it back in
Restarting/rebooting with the adapter unplugged, then plugging it back in
Repairing permissions
Repairing color profiles
Using different color profiles (including one downloaded from Acer's website)
Forcing OS X to detect displays (System Preferences > Displays, hold Option and click the "Detect Displays" button)
Resetting PRAM
Plugging the adapter into the laptop's other Thunderbolt port
Switching the arrangement of the displays
Changing which display is the primary
Enabling/disabling mirroring
Resetting the display via the OSD's built-in reset function
Hitting the Auto button again

None of those steps made any difference.

Then I tried plugging the adapter into a different MacBook Pro entirely (non-retina 13"). Amazingly, it does the same thing – the image shifts 2" over to the left at 1680x1050.

I'm running OS X Mavericks 10.9.4 on both MacBook Pros if that's of any relevance, but it seems like the issue is with the display itself since everything was perfectly fine until I hit the Auto button.

Furthermore, if I take a screenshot of the external display, it captures the full image. So that suggests the laptop is outputting the image to the display correctly, but the display itself is showing it off-center.

I've found other forum threads that suggest using a different adapter (e.g. DVI instead of VGA), but given that I've always used this display at 1680x1050 with the same adapter, I know it works...

I'm at a loss as to what else I can try to get the image to reposition correctly. Any help appreciated!

I had the same problem but with an iMac and a second monitor, where the second monitor, on applying a custom resolution, shifted the screen 2 inches right.

Unplugging the monitor from the back of the iMac, and plugging it back in adjusted the shifted screen back into place.

VGA is analogic, so you have to use Auto function of your monitor to calibrate it's correct size/position. You can also set it from the monitor's OSD control.


How to disable Apple Push Notification Service (apsd) which is trying to bypass firewalls I am using an iMac at work, and the IT security guys are raising issue with the Apple Push Notification Service (apsd) trying to bypass the proxy continually.

I would like to know how I can disable apsd from running.

I figured out that I needed to enter the following in the terminal:

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.apsd.plist

I did this already, and it seemed to fix the issue, but would love to know if this is the advisable way to solve the problem.

========================================================

Also, in case you want to enable the process afterwards, you can use this:

sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.apsd.plist

sources:

https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/launchctl.1.html

http://www.cyberciti.biz/faq/disabling-unnecessary-mac-osx-services/

Another solution would be to use Little Snitch and to block apsd from there.


How do I get the URL of a right-clicked link sent to an automator action? I'd like to create a service to open a link in Chrome. I already have this service installed: Safari Extension for right click menu: Open in Google Chrome?

This works if I right-click on selected text that is a URL. But it doesn't work if I right-click a link whose title is not a URL. For example, I'd like to right click a thread title at http://meh.com/forum and have have a command under Services to open that link in Chrome. The service referenced above doesn't show up in the Services contextual menu. Safari has a "Copy Link" menu item in the contextual menu. Is there a way to trigger that command from Automator or AppleScript?

Try this code on Automator action "Run Javascript".

for Chrome

function run(input, parameters) {

    var app = Application("Google Chrome");
    app.includeStandardAdditions = true;

    var url = app.windows[0].activeTab.execute({
        javascript: 'window.getSelection().anchorNode.parentNode.href'
    });

    return url;
}

for Safari

function run(input, parameters) {

    var app = Application("Safari");
    app.includeStandardAdditions = true;

    var url = app.doJavaScript('window.getSelection().anchorNode.parentNode.href',{
        in: app.windows[0].currentTab
    });

    return url;
}

For example

Right click on the link and select "Copy link to clipboard" service, then you can get the URL.

Build your actions as a Service (This is type of document you choose when you create a new automator workflow).

Relevant services should show up in the contextual menu under "Services" though you may need to turn them on under the "Shortcuts" tab of the Keyboard System preference pane (why there? I don't know).


Is there any way to access some apps before I put in my password? I have a 4 digit passcode for my iphone, but there are some apps that I might use frequently that don't really need to be protected.  Is there a way to access those apps without entering my passcode every time?  An example of such an app would be the calculator or calendar apps, or even the Pandora app.

Any ideas?

No, although there are/were tweaks available on jailbroken devices that enabled locking specific apps with a(n unrelated) passcode.

Yes, Apple provides Siri (voice search, automation, calculator, and much more) and music control plus some notifications that respond to touch when on the lock screen.

No, in that you can't choose any app to actually run from the home screen before a passcode or slide to unlock action.

Back to the yes aspect of the answer, touch and Siri's access is very strictly limited and you don't get to use any apps in their full UI, but instead use Apple controls to automate things like changing volume, skipping to the next song, pausing and playing.

Similarly, when you use Siri to access things, you can generally input a new appointment and interact with data stored in an app as opposed to firing up the app's UI (in the case of calculator or other apps you ask about - like perhaps choosing a new playlist in pandora). Siri of course knows how to play music in the library, but not yet how to select a pandora playlist.

The prevailing idiom is to select specific apps that themselves have passcodes (banking apps, finance apps, secure work apps for medical data, etc…) and not worry about a device passcode or to just enter the device passcode to run any and all apps.


How I can get OSX to recognize Canon MP560 Scanner again? I have a Cannon MP560 that kept having communications errors.  One of the suggestions I read was to remove the printer from the print & scan menu and re-add it.  Once I did that the scanner disappeared as well and I cannot get OSX 10.7 to recognize this device as a scanner again.

Does anybody know how I can get OSX to recognize this device as a scanner again?

Here are some screenshots of my print & scan screen and my add printer dialogue.  Bonjour does not show me any information about this device either.

Canon has updated most of their software (Easy-PhotoPrintEX, MP Navigator) and their drivers (printer, scanner) around the time when Lion came out. Make sure that you have the latest drivers installed.

You can download all the Canon software for your MP560 Scanner here.

Also, be sure to connect your printer via cable in order to use it as a scanner:

New Scanning Instructions:

Canon MP560 to Mac Computer with OS X Yosemite

(Use USB cable to port)

Go to system Preference

Printer/Scanner Icon

Hit open scanner

Hit scan button and open MP Navigator

Default printer last printer used (MP560)
(Use USB cable to port and indicates on line)

Hit scan

Do selection as needed/required

I set the scan to go desktop to see immediately


Is there an AFP Server for Windows? We're only a very small company, we don't have a proper Windows server, but we do store central documents on a Windows XP Pro machine via Windows file sharing.

The boss's MacBook Pro will connect and use the shares, but often will get itself into a state where the shares no longer work - navigating to the "server" in the Finder shows zero shares, yet all our Windows machines still work as they should.

I've asked a question elsewhere (serverfault, I believe) about trying to fix the connection problem, but I've not managed to find a solution yet.

We currently only have one Mac in the office, but that may soon rise if we land a certain project, so I'd like to find a workaround, perhaps by using a non-samba sharing system.

Is there an AFP-compatible server that will run on Windows XP?

Alternatively, are there other file sharing technologies that we can use?

If the Mac doesn't "see" the windows file server, you can always use the "full name" or IP address of that server, starting the address name by "smb://" in the "Connect" dialog (Cmd + K in the Finder) :

See this Apple Note for more details.

Try the program "PcMaclan" on Windows XP.
It's a AFP Server Program.


Install Homebrew packages on macOS Mojave Beta I am trying to install some dependencies for flutter, which requires homebrew. The only problem is that homebrew does not install any tools.

For example, if I try both brew install --HEAD libimobiledevice, brew install ideviceinstaller and brew install ios-deploy, it gives me the following error (sometimes it is slightly different) and the tools do not install.

Last 15 lines from /Users/davidkeen/Library/Logs/Homebrew/makedepend/05.configure:
checking for rename... yes
checking for fchmod... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for X... configure: error: in `/private/tmp/makedepend-20180609-57475-hh24w0/makedepend-1.0.5':
configure: error: The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.

Alternatively, you may set the environment variables X_CFLAGS
and X_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details

Do not report this issue to Homebrew/brew or Homebrew/core!

Error: You are using macOS 10.14.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

Error: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.

Error: You are using macOS 10.14.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

How am I meant to install these dependencies on macOS Mojave beta 1?

Please note that brew install cocoapods works, so I'm not sure if this is an issue with homebrew or package?

Error: Your Xcode (9.4) is too outdated.
Please update to Xcode 10.0 (or delete it).
Xcode can be updated from
  https://developer.apple.com/download/more/

Error: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools:
  xcode-select --install

This is a different error, however the solution is the same: install the Xcode 10 Beta and then run xcode-select --install.

The Command Line Developer Tools are now available!

First, agree to the invisible license agreement.

Wait for it to install...

Now, Brew works happily.

Once you downloaded xcode-beta, you can use xcode-select --switch as described in this article


What is main difference in a portable external HDD and a regular external HDD? I have an external 3 TB WD drive for backup. I think it is shot so I want to replace it. I don't need a portable drive but if they are more durable I'd like to get one. The cost difference between portable and regular is negligible at Amazon. Are there any issues associated with using a portable HDD for a Time Machine backup?

There's a small difference. A portable HDD draws power directly from your computer while an external HDD draws power from a power adapter plugged into the wall. Durability will vary depending on quality. If you're using a portable device (such as a laptop) it is suggested to use a portable HDD so you don't have to plug it in elsewhere. It should also be noted that portable HDDs draw more power from your computer which may result in faster battery consumption on portable devices or worse performance on devices using a very little amount of power (such as a Raspberry Pi).

hello Mr please note that HDD stands for Hard Disk Drive there are two types of hard one fixed and other is portable there is no difference between them just portable give you facility to move it from one place to another for use it on other PC(externally) but if you consider SSD Solid State Drive yes here is difference SSD hard is more faster than HDD and also expensive than HDD.


I can't enter Command+Shift+Up/Down on macOS Sierra Since upgrading to macOS Sierra (10.12.1 non-beta), I can no longer enter the keyboard combination Command+Shift+Up Arrow or Command+Shift+Down Arrow. I use this in text editors to select everything above or below my text cursor. On the macOS Keyboard Viewer, when I press the combination, only the Command and Shift keys show as pressed down.Command+Shift+Left/Right Arrow works just fine though.

I'm not sure what's going on. I haven't found anyone else with this problem on Sierra. I used to have Karabiner installed, but uninstalled it after finding it wasn't compatible with Sierra. I also had Karabiner Elements installed for a bit, but uninstalled it as well. Restarting doesn't do anything to change the problem. The problem occurs on both my MacBook Pro keyboard and my external keyboard.

Since it works in Safe Mode (based on your comment) we know it's definitely a software issue.

Basically, when you boot into Safe Mode your Mac will check the startup disk, only load necessary kernel extensions, and disable third-party fonts and startup options. Put simply, it won’t load third-party hardware drivers or startup programs.

It's likely (although not certain) that something to do with your prior installation of Karabiner is causing the problem. Your question didn't specify what version of Karabiner you had installed (besides the fact you also tried Karabiner Elements) or how you removed it. Assuming you've removed and deleted the application itself, there may still be other files installed. I would do the following:

Check the top level 'Library' folder of your hard disk for anything that looks like it's associated with your Karabiner installation. In particular, look at the following locations:

/Library
/Library/Caches
/Library/Preferences
/Library/Application Support
/Library/LaunchAgents
/Library/LaunchDaemons
/Library/PreferencePanes
/Library/StartupItems

If you find anything, delete the files.

Now, also do the same thing with the same set of folders within your User's Library folder. To access this, within the Finder click on the Go menu while holding the Option key and select Library.

Let us know how you go.

In case you use Noizio app, it reserves Command+Shift+Down/Up for volume adjusting.

You can switch that off in Noizio > Settings > Shortcuts.


Enable macOS "Dark menu bar and Dock" without password or restarting Is there a way to programmatically enable the macOS "Dark menu bar and Dock" option (found in System Preferences > General) via a Terminal command, without having to restart the Mac?

There is a way to change this option in the Terminal, but it requires the use of sudo and seems to require a restart, neither of which I want to use.

I could do this via the Terminal using AppleScript, but as far as I can tell it would require GUI scripting and my having to allow Terminal to control the Mac in the Accessibility settings.

Unfortunately, changing system preference files will always require administrative permissions, which is something the user has to explicitly give your script.

Fortunately, there is a way to accomplish this without changing system preference files! Using AppleScript, one can ask the system event daemon to change the system appearance.

I'm testing this on my work laptop, which doesn't allow me to change Accessibility preferences, so I don't even know if Terminal is enabled there (I suspect it's not). Additionally, this does not do any GUI scripting! (I recorded the below gif with System Preferences not running) Instead, it performs the same action that checking the box in System Preferences performs, but without needing access to that checkbox.

Hope this works for you!

AppleScript

-- Toggle dark mode
tell application "System Events" to tell appearance preferences to set dark mode to not dark mode

-- Enable dark mode, even it it's already enabled
tell application "System Events" to tell appearance preferences to set dark mode to true

-- Disable dark mode, even it it's already disabled
tell application "System Events" to tell appearance preferences to set dark mode to false

Bash

Don't wanna have something kick off an AppleScript? I'm with you. You can execute any AppleScript from bash (and thus the terminal) passing it as a string to the osascript -e command:

# Toggle dark mode
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to not dark mode'

# Enable dark mode, even it it's already enabled
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to true'

# Disable dark mode, even it it's already disabled
osascript -e 'tell application "System Events" to tell appearance preferences to set dark mode to false'

I have made a proof-of-concept app that shows off this technique, plus a couple others:

macOS Dark Mode Switcher

Just use the kill dock command when you have done your sudo ... command,

If you want this for automatic day night mode, what about using Automator and connect it with two daily events in your calendar...


How to use Xcode 4 mergetool in a standalone fashion? I sometimes have to make git merges on the console. Up to now, for resolving conflicts, I was using Xcode 3's FileMerge (you can open it on the console using the 'opendiff' command). If conflicts show, I use 'git mergetool' which automatically invokes opendiff for each of the conflicting files.

However, Xcode 4 features a much nicer mergetool component for resolving conflicts. I believe this component is part of the Xcode 4 executable, rather than standalone. It allows you to preview the merged file, and directly edit merged code on a case-by-case basis, which makes merging complex conflicts incredibly fast and satisfactory.

Is there any way to use the Xcode 4 mergetool when invoking 'git mergetool' from the Terminal?

I cannot find an executable for this tool inside the Xcode 4 bundle. Any hack that achieves this would be welcome.

opendiff takes two filename arguments, and an --ancestor parameter with a third filename, to produce a three-way diff, and a --merge parameter to say the output file to use for the conflict resolution.

So go:

[mergetool "opendiff"]
    cmd = "opendiff \"$LOCAL\"  \"$REMOTE\" \"$(if test -f \"$BASE\"; then echo \"--ancestor $BASE\"; else echo \"--ancestor $LOCAL\"; fi)\" --merge=\"$MERGED\" "
[merge]
    tool = opendiff

That should make git use opendiff as its merge tool, when there are merge conflicts.

That said, I VERY much prefer DiffMerge from SourceGear, which is a free diff and three-way-merge tool that does much better, word-oriented, conflict resolution. And in DiffMerge's documentation there's what to tell git to make it the default diffing and merging tool.

This ended up working for me

[merge]
  tool = opendiff

[mergetool]
  keepBackup = false

[mergetool "opendiff"]
  cmd = "opendiff \"$LOCAL\" \"$REMOTE\" -merge \"$MERGED\""


Is it possible to limit resources to a game? Or forcibly limit the FPS I recently bought and installed a new game through steam 'besiege' if you were wondering, and it ran really hot on my computer. On other games such as CS:GO for example you can cap the FPS in game making my computer not run as hot so less background noise.

I looked around and for this game there doesn't seem to be this option. (I've had similar problems with other games) My Mac (13" macbook pro retina 2013) runs at about 90 - 105 degrees with this game and I know the laptop won't be damaged as it'll thermal throttle and turn up the fans but I'd rather have a worse running game and not so much background noise due to the fan running at 6000 rpm...

My first thought was limiting the resources the game got, I'm not sure if this would affect the heat produced.

But anyways to just make the game run worse to decrease heat output. (It's capped at 60 fps I believe) down to around 20(ish) as this is perfectly bearable visually.

Any help would be greatly appreciated! :D

Let's look at the two things you suggested, as these are two separate approaches to solving the issue.

Limit the resources provided (presumably by limiting the CPU.)
Cap the framerate

Limiting the resources provided is pretty easy (provided you're willing to work with a little bit of third-party software.) You can use cputhrottle to limit the usage at the system level (better explained here.)

Capping the framerate is generally done at the level of the game. Unfortunately, to my knowledge, there's no way to set your framerate cap either lower or higher right now.  So you're stuck with throttling the CPU, although given what you're trying to do, that seems like a fine option.

Not sure if this is what you're looking for, but have you checked out Can I manually limit the %CPU used by a process?


Turn on find my mac (and other functions) without admin account I'm managing Macs on my domain, and would like to allow users to turn on find my mac without calling service desk.
I'd need a command line tool for that so I can push it out to all of the users once the script is tested.
I tried to run
security authorizationdb write system.preferences allow
security authorizationdb write system.preferences.security allow
security authorizationdb write system.preferences.security.remoterepair allow

(and all the system preferences settings)
but not all of them worked. They now can install printers, and set time and date. System Preferences / Security & privacy however didn't open and we DO want that.
Thanks

Trying to control “adults” can be like herding cats...
Just give them full access and responsibilty for backups / shared drive.
Then if they have an issue all you have to do is wipe and install latest image.


Is there a way to see all iPhone App Store purchases? I'm wondering whether there is a way to see all iPhone App Store purchases in a similar fashion that is available on Mac App Store in Purchased section.

I don't think there is a way to view just iPhone App purchases.
You can view your whole iTunes purchase history. You can see your iPhone app purchases there.

Open iTunes -> Store menu -> View My Account -> Sign in -> Go to Purchase History

Update: This seem to include all your purchases using your Apple ID (iOS App Store, Mac App Store, and iTunes Store)

Not true...
None of these links are possible, nor if they when they do seem to be relevant show history of purchases. I do have doubts that Apple Store have charged me few times for an application I have paid for over and over again. So when it comes to check what have purchased there is no way possible, except on the phone and they are not in logical order, which makes hard to pinpoint which have I bought recently that I have gotten charged for it few times. Sometimes it shows that I have purchased something but the some don't show I have paid for them, although I did already. Surprisingly enough sometimes an application will show a price on it, I will install and it will say that I paid for it before, but other times more often it doesn't say that, and it makes me pay for it few times. Now I have been trying to look up the history purchase and no where in hell is it clearly apparent that I can achieve that mission.


How to completely disable Airplay in Mac OS X I'd like to cut out AirPlay entirely.

Looking for an answer, I read
Disable AirPlay on a Mac

But it didn't really offer a direct solution.

Here is my problem:

I have the household media room connected to an Airplay capable receiver.  Our media server is a secondary Mac that runs 24/7 for the express purpose of serving media throughout the house.  This is a headless machine that does not ever output any audio of its own, and in fact could have all audio drivers disabled and it would be perfectly fine with me.

What happens is, this machine appears to spontaneously decide that it wants to connect to the Airplay receiver, which causes my Media room to suddenly switch input sources and is seriously irritating and confusing to other members of the household.

If I could simply disable Airplay completely on this machine, then all would be well.  But I don't want to impact any other internet connectivity as I have multiple apps that need to communicate at all times in both directions to the outside internet.

Is there in fact a direct way to simply disable Airplay entirely in Mac OS X?

I have just found some help here: Disable AirPlay Mirroring. It will let you disable Airplay Mirroring (I assume that includes just the sound) by using a terminal command. It will deny the computer access to the AirPlay.app that allows Airplay mirroring.

sudo chmod 000 /System/Library/CoreServices/AirPlayUIAgent.app/Contents/MacOS/AirPlayUIAgent

Some problems are associated with this though. I've copied the article's "drawbacks" below.

  The only drawback to this method is that it locks up the menubar, which means your users won't be able to use any of the menu bar items. They're still able to adjust the volume using the keyboard, though. Logging out and back in will restore the functionality of the menubar until the user tries to use AirPlay mirroring again. I guess if your users complain about the menubar crashing, you know what they've been trying to do! To remove your users temptation of crashing the menu bar all the time, you can hide the AirPlay icon by opening System Preferences > Displays and unchecking the "Show mirroring options in the menu bar when available" checkbox.

if you don't enjoy it afterwards and you want to fix it back to defaults without reinstalling OS X you want to do the same steps above like you did when disabling AirPlay. But instead of the 000 after sumo chmod you want to use the numbers 755

You would follow the steps, restart your iMac like before and you should have re-enabled it back

Go to System Preferences -> Sound -> Output. There it will say choose a device for sound output,with a table listing the Mac's speakers or Apple TV, and if you have headphones then also those.


Protect a folder from access The folders: desktop, documents, downloads, network volumes and more are protected by Catalina.
Can I protect a folder in the same way as the one so that it is asked whether an application is allowed to access, for example, / usr / local /?
I am happy about every answer
Thanks in advance

I'm not aware of any method to apply the protection of ~/Documents etc to other directories.
If your primary objective is to protect access to a set of sensitive files it might be easier to create an encrypted DMG with Disk Utility and mount this only while you need to access these files.

you could try
chown yourusername:yourusername /usr/local/*

Then
chmod 600 /usr/local/*

and any files in the /usr/local folder will be owned and only readable by you.
Im not sure i recommend this though.


iPad won't send messages on IMessage My iPad will not send messages or receive I'm connected to wifi I can send them but the send bar at the top will go almost all the way then stop and say about thirty seconds later not delivered

Internet traffic moves through a firewall based on service-identification numbers that are referred to as ports. Certain ports must be open for FaceTime and iMessage to work.
Here is a link where you can find the ports to open.

I had this problem and I was typing in the subject field instead of the message field. Pilot error...


External drive not detected on MBP until it's connected to a Windows machine first I have a WD "MY Passport" 1 TB drive which I use for my TimeMachine backup on a 15" MacBook Pro (Mid 2014).

Sometimes, the mac will not detect when the drive is being connected (it's not showing in the disk utility either). Rebooting the mac does not help.

However, after some experimentations, I found out that if I connect the drive to a Windows machine, disconnect it and then connect it to the mac, it's detected and can be used with no issues (until the next time it's not detected).

This happened to me on another drive (a seagate drive) as well.

Anyone has any idea what's going on here?

You do not have the "standard" formatting on the WD:
for TimeMachine it should be imperatively  GUID Partition Table.   and.  Mac OS X Extended (journaled).
If it really has that, open DiskUtility and select the WD, then select the FirstAid tab: it will check and repair permissions.


All pages in Google Chrome are rendered with a very thin, bad looking serif font In every later release of Google Chrome (including the just released version 11), all pages are rendered with a very thin, jaggy serif font.

This is how it looks in Chrome 11:

And here is Safari 5.0.5:

The picture might be too small to really show how bad the serif font is, but on-screen it's horrible.

There's no difference if I try to edit the font settings in Chrome. It's always the same font. I've also — of course — tried to remove and re-install Chrome, multiple times. Have tried to remove everything Chrome-related from $HOME/Library (Application Support, Caches etc). No change in behavior.

Here is an example of my font settings, but as I said, the font is always the same — on all pages — regardless of what I set in the font settings. I can set it to Helvetica and it's still a jaggy, horrible, small serif:

So, what do I do? Suggestions?

Before you go blocking fonts and so on, first check this page:
http://www.google.com/webfonts

How you get rendered the fonts? On my chrome - without any problems, the chrome CAN render different fonts.

You can try these commands from the Terminal.app

sudo atsutil databases -remove
sudo atsutil server -shutdown
sudo atsutil server -ping

the above will remove your font cache. Work only in snow leopard!

Just increase minimum font size in prefs


Markdown + Latex for iOS Simple question: Is there any markdown editor for iOS which supports inline Latex commands (and preview)?

The short answer is "no", I've been looking myself.

TexWriter is a decent LaTex editor and preview but I don't know of a MarkDown one with inline LaTex.

Further, you might want to check out Brett Terpstra's page devoted to iOS editors for a great list of editors and keep an eye out for any that add "LaTex" as an extra feature.

Atom plus the Pandoc package appears to give you a large swath of the functionality of Latex and Markdown.

To get all of that working, you'll need to have Pandoc and Mac Latex installed already. When I have enough rep points to post more links, I'll provide references for these too!


How make snoozing iphone alarm go away for today? Very often by the time I get tothe phone it's lock screen is already on and black so when i wake it up the alarm goes to snooze and i have not found any way to disable the alarm for today unless I go to the alarm settings and switch it off and on again.

Instead of swiping the snooze to the right like you would if unlocking, swipe to the left, then push the x.  Done

Before swiping, the screen will look like this:

After swiping left on the "Snoozing" message, you should see:

Clicking on the small cross should then cancel the alarm.

Just activate it with the home button then you can slide then lock the phone


Replace Text Edit as the default text editor I've seen questions like this which don't quite solve my problem.

I'd like to make Sublime Text 3 the default file viewer/editor for all files that currently use textedit.

Most of these files can be command+i'd, but the ones that have no extension cannot. They give all sorts of permissions errors such as the ones in this image

Is there any way to just never use textedit, and instead set sublime as the default editor for all files?

Another option is to use duti (https://github.com/moretension/duti).

Run brew install duti, save a filetype like this as:

duti -s com.sublimetext.3 public.plain-text all

The changes should be applied immediately, so you don't have to restart like when editing com.apple.LaunchServices.plist.

To also change the default application for executable scripts with no filename extension, add a line like this:

duti -s com.sublimetext.3 public.unix-executable all

Some files are also considered 'public.data', not 'public.plain-text', so you can do this as well:

duti -s com.sublimetext.3 public.data all

Rightclick on the file --> Other --> Choose your favorite text editor (I choose Sublime text in my Applications folder) --> Check the 'Always Open with' checkbox --> Open.

This setting will be automatically applied to all other files in the machine.

No need of any restart or no need of any 3rd party software.


Keyboard shortcuts for resizing windows on mac I'm looking for the Mac keyboard shortcut equivalent of "windows key + left/right/top arrow" to resize windows (not split view)

There is possibility to move window left or to right but I am not aware of quadrant.
If one hovers over resize button (green circle in upper left corner of window) there are different possibilities displayed depending on position and size of window. By default there should be keyboard shortcuts assigned at least to two of them:

Tile Window to Left of Screen ⌃⌘←
Tile Window to Right of Screen ⌃⌘→

These are for split view. However, there are other options, among them are:

Move Window to Left Side of Screen
Move Window to Right Side of Screen

For those one needs to assign keyboard shortcuts. System Preferences > Keyboard > Shortcuts > App Shortucts, click on +, keep 'All applications', enter exact text as above into 'Menu Title' and assign shortcut in 'Keyboard Shortcut'. I personally have followed the path of built-in which start with ⌃⌘. For left it's ⌃⌘L and for right it's ⌃⌘R.
There is also built-in keyboard shortcut to toggle full screen: ⌃⌘F. Combined with moving window to left and right side it's covers basic needs.
There are also options Zoom and Revert to which one can assign keyboard shortcuts in similar fashion.
After assigning shortcuts and while hovering over resize button my machine displays following (interesting to note that full screen toggle shortcut is not displayed)

For more elaborate window arrangements I use paid app Magnet.

There are no shortcuts to do this in macOS, but you could use a free window manager, Rectangle, to do this.


Black screen during change of spaces Using OS X 10.11.3, Mac Pro 5,1, 32GB RAM, Radeon HD 7950 (Sapphire) graphics card w/ 3GB VRAM. I have a multiple monitor setup with displays not having separate Spaces. Usually, when using a shortcut key to change spaces, I see a nice animation where one space slides to the left, and the new space slides in from the right.

However, once I have around six "desktops" and/or a certain number (unknown) of windows open, the animation displays a black screen when sliding the new space into place. Happens in both "directions" - the current space slides left/right, and the black screen slides in. Once the changing of the space is complete, the black goes away and the desktop reappears. This video shows the phenomena at 0:15s.

Anyone encounter this and find out why this might be occurring? Never happened with the same hardware using OS X versions prior to 10.10.

It is not a GPU issue.
With OS X 10.11, this can be corrected by turning Dashboard off or setting it as an overlay (System Preferences>Mission Control).

Had that same issue because I had ScreenShade installed. Disable it, if you have it installed, and the problem will stop.


How can I reset the firmware password on a MacBook Air? I purchased a MacBook Air from someone 4 months ago and everything was working perfectly. There is no user name or password needed to log in and I've never had problems using it.

Now I would like to reinstall OS X but I can't do it because it's asking for a firmware password when booting with Option ⌥ held down. It's 4 months now and I've lost the seller's phone number to ask for password.

I've tried to reset NVRM but those keys are disabled. I can't boot from external HD when I turn on the system. What is the reset procedure?

To reset the firmware password it looks like you have to take it in for service at your  nearest Apple Support location as noted in the following Apple Support Article MacBook Air (Late 2010) and later, MacBook Pro (Early 2011) and later, iMac (Mid 2011) and later, Mac mini (Mid 2011): Recovering a lost firmware password

Symptoms
Learn what to do if you no longer remember the firmware password that you've set or if you see a password dialog when you try to select a startup volume on a MacBook Air (Late 2010) and later, MacBook Pro (Early 2011) and later, iMac (Mid 2011) and later, or Mac mini (Mid 2011) computer.
Resolution
Only Apple retail stores or Apple Authorized Service Providers can unlock these computers protected by a firmware password.
If you cannot remember the firmware password for your Mac, schedule a service appointment with either an Apple Retail Store or an Apple Authorized Service Provider.  If you plan to visit an Apple Retail store, please make a reservation at the Genius Bar using http://www.apple.com/retail/geniusbar/ (available in some countries only).

As a side note you will need the original proof of purchase.

Don't reset it. If you have admin access to the computer's OS X install, just change the startup volume to an external USB with the full OS X installer on it. Mavericks is free from the App Store and you just need to download the installer, mount it or show package contents, copy the .dmg file to desktop, burn it to a USB stick in Disk Utility. It's a simple process. Then start disk.app and change to the USB, then reinstall OS X.

After you reinstall, open Terminal and write a shell command to use the Unix setregproptool (it's inside the firmware password utility.app contents located in the installer image and also on the recovery partition) and remove the password by calling the remove password command. The program will ask for the previous password over and over until you get it right, without any delay. So, you can easily brute force it. Most likely its a 4-digit pin, 6-digit pin, or 4-8 character password. If it was locked from iOS, (app or online) it's 4-digits. If it was locked from a computer or non-Apple mobile device, it's a 6-digit pin, and if it was locked manually, it is a password. I believe it's 12 characters max, but don't quote me on it. Should only take a couple of days at most.


DNS change on Airport Extreme I've recently changed the DNS settings on my latest generation Airport Extreme from their default values to Google DNS. My reason was obvious, I want all of my devices connected to my network be able to use Google DNS without me configuring Google DNS on every single one of them.

After doing so, I still see my default DNS values on my Airport Express, which extends my network, and all of my devices. Is this behaviour right? Does all of my devices use Google DNS as a result but not show it or is there something wrong?

Update

I've a fiber connection of 50 Mb/s at my home. The fiber cable coming into my apartment is connected to a box provided by my ISP which resolves getting fiber to my home. From that box, a LAN cable goes out to the modem/router box provided by my ISP. That box only serves me as a modem and a wired router since I've disabled it's WLAN functionality by it's dedicated button to disable WLAN. And another LAN cable out of the modem/router box goes out to my AirPort Extreme for providing me with wireless connectivity throughout my apartment along with my Airport Express extending Airport Extreme's broadcast.

Asaik the DNS settings closest to the input device  prevail,  so if your router is 8.8.8.8 and your computer is 208.62.222.222 then you will be using 208.....


Automate the repositioning and refreshing of menu bar icons? Background
When menu bar items are rearranged manually using Cmd+drag, macOS writes a new "preferred position" preference to each app that is showing a menu bar icon. (This preference helps, but does not guarantee, that they retain their position for subsequent launches.)
Problem
I want to automate the saving of the menu bar icon positions, without interacting manually, for educational and accessibility reasons.
Question
How can I automate the repositioning of a menu bar item (which will trigger the system to write the new prefs)?
Or, how can I trigger macOS to write the new preferences directly (without automating a repositioning of a menu bar item)?
I do not want to interact with the menu items manually, or write out the preferences myself.

I've found a way to directly write the Preferred Position values using the shell command defaults. I'll leave the automation part out since I don't know the specifics of your project (I assume you know how to automate shell commands as the current user.) This should allow you to change the preferred values but won't move the menu bar items without a restart.
Background

The Defaults system is used to store certain user preferences on macOS. This happens to include the Preferred Position for Menu Bar items. I'll let Apple explain the basics better:
From man defaults:

Defaults allows users to read, write, and delete Mac OS X user defaults from a command-line shell. Mac OS X applications and other programs use the defaults system to record user preferences and other information that must be maintained when the applications aren't running (such as default font for new documents, or the position of an Info panel). Much of this information is accessible through an application's Preferences panel, but some of it isn't, such as the position of the Info panel.

User defaults belong to domains, which typically correspond to individual applications. Each domain has a dictionary of keys and values representing its defaults; for example, "Default Font" = "Helvetica". Keys are always strings, but values can be complex data structures comprising arrays, dictionaries, strings, and binary data. These data structures are stored as XML Property Lists.

In short, Defaults are categorized under Domains (the app or service the setting belongs to), are identified using Keys (the name of the particular setting), and each *Key has a Value assigned to it.

The Preferred Position defaults we care about are not all under one domain, since individual apps can add new items to the Menu Bar. However, the keys all share this format:
NSStatusItem Preferred Position <menu-item-name>
where <menu-item-name> is the name of each item a particular app or service adds.
The values are all stored as float numbers, usually integers but some have a decimal point.
Here are the macOS built-in Menu Item Defaults on my machine as an example.
'com.apple.systemuiserver': {
    "NSStatusItem Preferred Position Item-0" = 23;
    "NSStatusItem Preferred Position Siri" = 61;
    "NSStatusItem Preferred Position com.apple.menuextra.TimeMachine" = 548;
    "NSStatusItem Preferred Position com.apple.menuextra.airport" = 483;
    "NSStatusItem Preferred Position com.apple.menuextra.battery" = 179;
    "NSStatusItem Preferred Position com.apple.menuextra.bluetooth" = 513;
    "NSStatusItem Preferred Position com.apple.menuextra.textinput" = 127;
    "NSStatusItem Preferred Position com.apple.menuextra.volume" = 260;
}

com.apple.systemuiserver is a domain containing the key NSStatusItem Preferred Position Siri with value 61.
Listing All Current Preferred Position Defaults

In order to list all the domains, keys, and values for our Preferred Position Defaults, we can use the defaults find command to search for matches.
The command we need in this instance is defaults find "NSStatusItem Preferred Position".
$ defaults find "NSStatusItem Preferred Position"
Found 1 keys in domain 'com.coconut-flavour.coconutBattery-Menu': {
    "NSStatusItem Preferred Position Item-0" = "344.5";
}
Found 1 keys in domain 'com.lastpass.LastPass': {
    "NSStatusItem Preferred Position Item-0" = 795;
}
Found 8 keys in domain 'com.apple.systemuiserver': {
    "NSStatusItem Preferred Position Item-0" = 23;
    "NSStatusItem Preferred Position Siri" = 61;
    "NSStatusItem Preferred Position com.apple.menuextra.TimeMachine" = 548;
    "NSStatusItem Preferred Position com.apple.menuextra.airport" = 483;
    "NSStatusItem Preferred Position com.apple.menuextra.battery" = 179;
    "NSStatusItem Preferred Position com.apple.menuextra.bluetooth" = 513;
    "NSStatusItem Preferred Position com.apple.menuextra.textinput" = 127;
    "NSStatusItem Preferred Position com.apple.menuextra.volume" = 260;
}
Found 1 keys in domain 'org.pqrs.Karabiner-Menu': {
    "NSStatusItem Preferred Position Item-0" = 750;
}
Found 1 keys in domain 'com.google.GoogleDrive': {
    "NSStatusItem Preferred Position Item-0" = 607;
}
... and so on ...

Reading and Writing the Value of a Given Domain & Key

In order to read the value of a given domain and key, we need to use the defaults read command. To write, we use defaults write.
Here, I will read the value of the key NSStatusItem Preferred Position Siri at the com.apple.systemuiserver domain.
Note that the domain and key must be enclosed in double quotes.
$ defaults read "com.apple.systemuiserver" "NSStatusItem Preferred Position Siri"
61

Here, I will change the the key NSStatusItem Preferred Position Siri at the com.apple.systemuiserver domain to the value 42.7.
Note that the domain and key must be enclosed in double quotes, and the -float before the value
$ defaults write "com.apple.systemuiserver" "NSStatusItem Preferred Position Siri" -float 42.7
$ defaults read "com.apple.systemuiserver" "NSStatusItem Preferred Position Siri"
42.7

Again, I'll leave exactly how you automate this up to you, but this can all be easily integrated into your code.
If this doesn't work out for you, here are some links to the Apple Developer AppKit docs for adding items to the Menu Bar as well as for accessing the Defaults system using objective-c and swift. Not sure if they'll be any use to you but maybe they'll set you on the right track.
https://developer.apple.com/documentation/appkit/nsstatusitem
https://developer.apple.com/documentation/appkit/nsstatusbar
https://developer.apple.com/documentation/foundation/userdefaults

I believe you are referring the invisble file called ".DS_STORE".
If you are command-line comfortable:
You can run this command to disable the writing of that file.
# Avoid creating .DS_Store files on network volumes
(sudo) defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true
# this should be run in your HOME directory. the "." means it will use the current folder.
# alternately you could test on one folder.
find . -type f -name '*.DS_Store' -ls -delete

All previous folders should have their ".DS_STORE" files deleted using this command.
After you delete these files, you can set the "Show View Options" under the view menu in the finder to how you want it, and "make default".
If you share directories with other mac users, their .DS_Store files will be created and affect your view. So it really is only effective in your personal environment.


Screen sharing fails to connect I have chronic problems connecting to my headless Mac Mini using Mac OS X's builtin screen sharing. Usually it works fine, but sometimes it will not connect.

It goes like this:

I initiate a connection (either by clicking the Mac Mini in the sidebar in a Finder window and choosing the "Share Screen..." button, or else by launching /System/Library/CoreServices/Screen Sharing.app and enter the Bonjour name "macmini.local"), the throbber appears with the word "connecting", then the throbber disappears. If it's going to connect successfully, it does so at this point. Often, however the throbber disappears and nothing replaces it. The Screen Sharing app remains active, no message appears, and nothing happens, no matter how long I leave it. No connection seems to occur.

I cannot cause the issue to occur reliably, but once it does occur, it can be observed from several different mac clients. If I reboot the remote machine (via shutdown over ssh), it goes away and I connect without problem, but I'm seeking a better solution.

Checking the processes running on the remote Mac Mini via ssh, I see two processes, /System/Library/CoreServices/RemoteManagement/screensharingd.bundle/Contents/MacOS/screensharingd owned by root, and a child process /System/Library/CoreServices/RemoteManagement/ScreensharingAgent.bundle/Contents/MacOS/ScreensharingAgent. If I try to kill either of these processes, they change their PID but remain running, and it does not allow me to connect.

From this thread Restart Screen Sharing Service on Mac mini Server I learned how to properly restart the screen sharing daemon. Or actually two methods. Not sure which one is proper, so I do them both. Does not help, still cannot connect.

From this thread Why is Mac-to-Mac screen sharing just hanging? I learned the suggestion to connect by IP address instead of bonjour name. Upon trying this, I get the login window, instead of the "connecting" throbber. Still no connection, though. And quitting Screen Sharing on the local machine doesn't get rid of the stuck login window. The only way to rid yourself of it is to kill NetAuthAgent, as I learned in this thread: How to kill stuck Screen sharing authentication dialogue?

Both machines run Lion (10.7.4), though I've been observing this behavior since 10.6, perhaps 10.5 I can't remember. Remote machine is a 2009 Mac Mini, and the local machine is a MacBook Pro (this behavior has been duplicated on many different client machines though).

Surely there must be some process, server, daemon on the remote machine that I can bounce? Something short of rebooting?

ssh into the remote Mac and kill the screensharingd daemon.

$ ps ax | grep screen
1234   ??  Ss     0:00.02 /System/Library/CoreServices/RemoteManagement/screensharingd.bundle/Contents/MacOS/screensharingd
$ sudo kill 1234

It works for me. I have Mac OS X Lion on both local and remote computers.

Guys check the Firewall - it need to be disable or create an exception . thats the most common issue and this always works.