Fastest way to disable daemons gone wild; how to know if attempts to interrupt will break app?

Moscarda, friend:

These are good points, each, and I agree with your conclusion that the list of system daemons or services which are running after the operating system installation is rather excessive.

Between performance and ease-of-operation I readily prefer performance.  Thus, I tend to reduce to bare minimum the list of services which are allowed to run.  I also expect that if something fails to work auto-magically, that I probably need to launch a particular system service which got disabled as a consequence of my preference for performance over ease-of-operation.

Apple has made disabling services rather elegant via launchd in the more recent versions of its operating system.  To a system administrator's dismay, however, Apple continues to allow the historic, deprecated means of launching services and therefore some third-party software still uses the likes of SystemStarter.  SystemStarter is a direct descendant of historic BSD rc (resource control) and System V init processes.  While being more modern than the historic UNIX parents it descends from, SystemStarter is still a far cry from the more evolved functionality and elegance of launchd.

My procedure:

Preserve a copy of the original state of configuration by making a backup of relevant files.

 mkdir /private/var/archive ; tar -czvf /private/var/archive/SERVICES_$(date '+%Y-%m-%d-%H:%M:%S').tar.gz /System/Library/StartupItems /System/Library/LaunchDaemons /System/Library/LaunchAgents /Library/StartupItems /Library/LaunchDaemons /Library/LaunchAgents ~/Library/StartupItems ~/Library/LaunchDaemons ~/Library/LaunchAgents

Inspect what still relies on the deprecated StartupItems and disable anything relevant by removing its items from the ( ~/ | /Library/ | /System/Library/ ) StartupItems folder.

Please remember this: These paths ~/, /Library/, /System/Library/ are listed in order of their importance and therefore sensitivity to potential errors that might affect the ability of your machine to boot properly or behave normally.  Use caution, and when in doubt, recover from the archive the original file, replacing any edited files in error.

Identify what is running via launchd:

 launchctl list | grep -v '^-' | sort -nr -k 1

Test system stability and needed functionality by stopping the services identified in step 3:

 launchctl stop [service name] ; launchctl remove [service name]

Unload services that are able to be disabled in the list from step 4.

 launchctl unload [service name]

Disable the startup of the items stopped in step 4 by editing the appropriate .plist file ( for info -- man launchd.plist ) and if already present, set the 'Disabled' key to true.  If this key is not already in the file, add it by adding the following lines to the first  block:

    <key>Disabled</key>
         <true/>

The first five lines from a config file on my system illustrates this:

 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 <plist version="1.0">
 <dict>
     <key>Disabled</key>
     <true/>
     <key>Label</key>
     <string>com.apple.tftpd</string>

Reboot the system.  Better to do it the gentle way, than to issue a launchctl reboot, unless you are prepared for the brutal user session tear down which may result in lost information, unpreserved states, inconsistent file states.

I hope this helps.

F.


No - the system controls the output so it’s not easy for an app to remember a different output and override the system choice.

Unless Apple releases a new version of Workflow or some automation for iOS, you can’t script a change to the output device and then launch an app.


OSX Mail - deleting imap email without deleting on gmail server

You can check Mailbox Behaviors in your Gmail account setting (under Accounts) and check Store deleted messages on the server. This will make your messages still available in other clients even if you delete them in the Mac where you have this setting.

Reference: Mail (El Capitan): Mailbox Behaviors preferences


Is there a way or a tweak to make Siri execute shell commands

Ok I got it working with the awesome tweak Assistant+.
You just need to set the voice command you wan't to say, and then you can type the shell command to execute.

It costs 1.99$ on cydia


How do I see all iOS in-app subscriptions that I have active?

This article by Federico Viticci on Mac Stories gives a detailed description of how iTunes subscriptions work. In particular, he provides a link to a page to manage subscriptions which you can open on an iPad (and presumably an iPhone or iPod touch):

As soon as I subscribed to The Daily, Apple sent me an email to confirm the Weekly Subscription.
I clicked on the link provided in the email, which looks something like this.

This page allows you to see all of your existing subscriptions, as well as to manage or unsubscribe from them.
It’s worth noting, however, that the article in question was written almost two years ago (February 2011). He states:

The browser tried to launch iTunes on my Mac, but iTunes returned the following error:
Subscription management: Please use your iPad to Manage your Subscriptions
Apparently, Apple’s current implementation of subscriptions can be managed only on the iPad.

Since then, this issue has been closed. Clicking the link on a Mac now takes you to a page to manage your subscription in iTunes, in addition to using an iOS device.


Can the iCloud apps backup of an iPhone be restored to a different iPhone?

If you want to restore your data to your new phone, you most certainly can; that is the point for have iTunes/iCloud backups. But you cannot select what data you wish to restore from backup, regardless if its an iCloud or iTunes local backup.

I suggest you restore your backup to your new phone and then manually remove any applications and data that you do not wish to keep on it. Otherwise, you are forced to start with a brand new phone without any data from your previous phone.


Assuming answers to my clarification questions above are that you want:

the script to run anytime a specific application is run, regardless of how or by what process or user, and
the script to run in an asynchronous, non-blocking way (e.g. for logging purposes)

...there may be a few ways to do it.  None I can think of are terribly elegant or turnkey and all require some sort of demonized process running as root which act to monitor the system for launch events.

Monitoring exec calls via fs_usage

One possible way is to create a daemon (LaunchDaemon) which runs continuously, monitoring a running fs_usage command for exec events.  You can see the kind of information you get by running the following command:

sudo fs_usage -f exec

Here's the relevant line when I opened Safari:

17:30:14.465075  posix_spawn    /Applications/Safari.app/Contents/MacOS/Safari    0.000352   launchd.51630812

Here's the output when I opened ran open /Applications/Maps.app from the command line:

17:35:51.594849  execve       /usr/bin/open                                 0.003680 W bash.51635318
17:35:51.642212  posix_spawn  /Applications/Maps.app/Contents/MacOS/Maps    0.003158 W launchd.51635324

Note that nearly all "Applications" (/Applications/*.app) are launched via posix_spawn by launchd and the file used to launch them is /Applications/FOO.app/Contents/MacOS/FOO (where FOO is the application's name). So, theoretically, you could have your LaunchDaemon monitoring this command and triggering your script whenever it outputs the path to the app you're monitoring:

sudo fs_usage -w -f exec | perl -lne 'm/.*posix_spawn +(.*?) +[0-9.]+ . launchd.\d+/sm && print $1'

Monitoring launchservicesd via lsappinfo

I wasn't terribly happy with the above because it's kinda hacky, watching for filesystem events instead of the launching event that triggered them. And then I realized, "launchd"!  Enter Launch Services:

launchservicesd(1) manpage
lsappinfo(8) manpage

Leading to:

lsappinfo listen +all forever

And Voilà, you not only have launching, but also get notified when an app quits. The keys you care about are the following:

kLSNotifyApplicationLaunch
kLSNotifyApplicationBirth
kLSNotifyLaunchFinished
kLSNotifyApplicationDeath


Bug - Invisible Window (blue outline only)

[This answer not final until this sentence removed]

As I'm sure you know, troubleshooting is a process of elimination and often requires patience.

I would start with testing your MBP in Safe Mode to see how it behaves both during Safe Mode and afterwards.

Boot into Safe Mode

Follow these steps to boot your MBP into Safe Mode:

Fully shut down your MBP
Restart your MBP
Immediately press the Shift key and keep it down
Let go of the Shift key when you see the login window (NOTE: If you have FileVault enabled you may need to log in twice).
Take a note of what happens (i.e. use your MBP long enough to establish if the problem reappears.)
Exit Safe Mode by restarting your MBP as normal
Test again to see if the problem reappears

Let me know how you went and we'll go from there.


Are TimeMachine backups password protected?

Not by default.
By default Time Machine Backups are not encrypted. They are stored in a sparse bundle disk image with the name of the computer which the backup is from. You can open this image and browse it without a password.
You can easily enable encryption for Time Machine backups if they are connected via USB/Firewire. It's more complicated if you access your backup disk using ethernet/Wi-Fi. How can I enable encryption for my Time Machine backup?


⇧⇥ is the shortcut for unindent, but you need to select the paragraph to unindent. If you have no selection, or just a word, the shortcut doesn't work.


Email photos in full resolution from iPhone 6 running iOS 8

IOS 8.x does not prompt for resolution options when using the front facing camera, only the rear facing camera.  The front facing camera will usually max out resolution with a file size in KB.


How can I sign in on the Mac App Store with my Apple ID using the Terminal?

Currently mas does not support the signin command on Mojave.

No other purely Terminal-based method exists at the moment. There is none delivered with Mojave from Apple, nor does one exist currently as a third-party program.

However, you can use the following workaround:

https://github.com/tiiiecherle/osx_install_config/blob/master/05_homebrew_and_casks/5b_homebrew_cask/6_mas_appstore.sh

In lines 162-201 it uses Apple Script to open the Mac App Store GUI application, and automatizes entering the Apple ID credentials. Essentially this makes it possible to sign in using the command line, in scripts and similar.


Is there any need to update again on ios 7 when i have updated it one month ago using ios 7 beta version?

You should update your phone to the Gold Master (GM) or restore your phone back to iOS 6 and then update to iOS7 using the public version.

If you continue to use the beta, you will not have all the latest updates/fixes from GM and may also run into issues later.


You could add a new line in your hosts file (see man hosts(5)). The easiest that I know of would be to open a Terminal and use nano to edit the file. You could type this in your terminal:

sudo nano /etc/hosts

(replace nano by vi if you are more familiar with the latter). Then go at the end of the file and add something like this:

127.0.0.1    mytest.com

Save the file (key combination for nano is (it's a o upper case): Ctrl + O).

The file hosts is read by mDNSResponder which is the local DNS cache on OS X (incl. Snow Leopard). So your browser will be redirected to the IP you set in the file.


It sounds like you are referring to the proximity sensor, which is meant to turn the screen off when you are on a call (so that your face doesn't press any buttons). However it shouldn't do it if you're not on a call. Can you clarify when it is doing it?


How do you exit guided access when it freezes?

A triple-press of the side button should prompt to exit Guided Access using a passcode.

A double-press of the side button should use Face ID to authenticate exiting Guided Access.

Force restart iPhone:

Press and quickly release the volume up button, press and quickly release the volume down button, then press and hold the side button. When the Apple logo appears, release the button.


How can I restore an app on my iPad if it isn't available in the Store anymore?

If you had your iPad in sync with your computer, the app should still be in the "Apps" section of iTunes, available for you to synchronize with your restored iPad.

Alternatively, on your computer, select "iTunes Store", and from the "Quick Links" section on the upper-right hand side, select "Purchased", and then "Apps" (and then "iPad").  Some removed apps are still available for re-downloaded from that area.


How to paste files using Applescript (or bash)?

One way I can think of doing this is to use a little bit of AppleScriptObjC.  It provides access to the various data type representations on the clipboard, and in multiple.

After retrieving the full file paths, these can then be passed to the cp command.

Wrapping this in a bash function declaration:

pastefiles() {
    IFS=$'\n'
    fs=($( osascript -e "use framework \"Foundation\"
        property this : a reference to the current application
        property NSPasteboard : a reference to NSPasteboard of this
        property NSURL : a reference to NSURL of this
        property pb : a reference to NSPasteboard's generalPasteboard

        property text item delimiters : linefeed

        pb's readObjectsForClasses:[NSURL] options:[]
        (result's valueForKey:\"path\") as list as text" ))

    cp -r "${fs[@]}" "$1"
}

Usage: pastefiles~/Example/Destination/Path

You can add this to your .bashrc file to have the function available to each new shell session.


osx - How to override automatically enabled proxy

I don't think you're going to find a "legitimate" way around this.  The owner of the machine has installed this, and they desire that it remain turned on.  It would be a poor security measure indeed which could be disabled without the owner's consent in any sort of simple way.

If you have admin access you may be able to determine which process is doing this and terminate it.

I am using a company-supplied MacBook Pro.  If I want to access internal company resources, I have to leave the stuff they've installed in place.  I have admin access, but cannot see some of the software my company has installed.

I believe that you have basically two choices:

Reinstall El Capitan, overwriting the existing install [this might
cause problems with access to school resources]
Install El Capitan on an external drive, then boot from it when you seek
to do the things that the proxy is preventing.

Some replacement SSDs come with external cases; you could replace the internal SSD with your own clean El Capitan SSD and then boot from the external one when you need school access.

All of this is probably contrary to some acceptable-use agreement you signed when you accepted the school-supplied machine.  Take care.


It's currently not possible to use the education store on the Apple Store app and you'll need to use the website.


Stopping iPhone app from using Facebook login info

If you want to remove personally identifying data (for example tokens or whatnot) that the developer has stored about you in the Keychain on your device, you'll need to not only delete that specific app - but also delete any other app created by the same developer. I.e. other apps that share Keychain access with the problematic app will retain the data.

The developer also has the possibility of storing 2 bits of information unique for your device - the so called DeviceCheck API. The bits are stored at Apple and won't be deleted when you uninstall the problematic app and all other apps by that developer. The developer might have used one of those 2 bits to mean that the user is blocked from using the app.


Can an ios application access sms messages?

It is nearly impossible for this to occur because Apple has next level security, as well as they scan apps before they are placed on the AppStore! They specifically scan for malware and security breaches, like this one!! All iPhones are extremely secure and if an app can access your messages (which I don’t think it can) they would be breaching the Apple Privacy Policy along with some other Terms and Conditions! Highly unlikely, but good question.


No - Applescript is not multi-threaded in the sense that you can set up two things to happen at one time.

To do what you want, you'd need another language that could open a window so the user could type characters to be interpreted and change the signal variable to exit the loop. That language would handle multiple threads and communication between the two processes so that the setting of the new X value would be visible to the other thread running the loop.

If you'd rather stick to AppleScript, you could probably do what you want by using the existence of a file to keep the loop running:

if file "semaphore" of application "Finder" exists then
   -- continue processing...
end if

This is documented at https://developer.apple.com/library/mac/documentation/AppleScript/Conceptual/AppleScriptLangGuide/conceptual/ASLR_fundamentals.html

Search for the section titled Direct Parameter or use the semaphore string to locate the snippet I copied above. Then you could have the user delete the "chosen" file - maybe putting it on their desktop and call it "keepRunning" or something so they trash it when the script should stop running.


Calendar that's accessible from Mac OS X and Linux

The following solution is clumsy in that it uses discontinued software (Mozilla Sunbird), but works for dual boots, or any situation where both OSes have access to a common partition. The idea is to install Sunbird 0.9 (the last stable version) on both Mac OS X and Linux and have a common profile folder as is customary for Firefox and Thunderbird. The obvious thing to do would instead be to set up Thunderbird on both sides with a common profile folder and install Lightning. However, the Lightning plugin has a Mac and a Linux version, and is installed in the profile folder, so you would end up using the Mac version in Linux or vice versa, which doesn't work. There seem to be workarounds, but I haven't found any understandable one.

I think this solution is relatively safe: Sunbird is closely related to Lightning, so it should be easy to move to Lightning when it solves this issue or when you no longer need a shared profile folder.

In Mac OS X:

Install Sunbird 0.9, for example from this place.
Open and close Sunbird so that your computer realizes it's there and removes the application-downloaded-from-the-internet safety measure.
Open a terminal (Applications > Utilities > Terminal)
Type /Applications/Sunbird.app/Contents/MacOS/sunbird-bin -p. This opens the Sunbird profile manager.
Click "Create Profile...", then "Next" to get past the info screen.
Give the profile a name of your choice.
Click "Choose Folder..." and pick a folder that is accessible for both OSes, say SharedPartition/SunbirdProfileFolder
Click "Finish". Select the new profile, and click "Start Sunbird" to make sure the new profile is set to default. You can quit Sunbird right away.

In Linux
(Sunbird is probably no longer available from any software centers, so we will have to do it manually. I will follow this guide with a few tweaks based on my own experience):

Install the package libstdc++5, e.g. through a software center.
Change the name of the profile folder you created in OS X, say to SharedPartition/SunbirdProfileFolder_MovedAside. Create a new folder called SharedPartition/SunbirdProfileFolder
Download a tarball for Sunbird 0.9. Best search the web for "Download sunbird-0.9.en-US.linux-i686.tar.gz"

If you have a 64-bit processor, either look for a 64-bit tarball or install the package ia32-libs, e.g. through a software center.

Open a terminal. Every time, type the given command. When in doubt, use man theUsedCommand for more info on what you're doing.

sudo bash This gives you root permission (including the permission to mess up your system entirely).
cp -t /usr/lib ~/Downloads/sunbird-0.9.en-US.linux-i686.tar.gz (Replace ~/Downloads with the path to your download folder.) This copies the tarball to /usr/lib.
cd /usr/lib to go there yourself.
tar -xvf sunbird-0.9.en-US.linux-i686.tar.gz to unpack the tarball. A folder /usr/lib/sunbird is created.
chown -R root:root /usr/lib/sunbird/ to set the owner of this folder to root.
gedit /usr/bin/sunbird This opens a text editor showing an empty file. Paste

#!/bin/sh
cd /usr/lib/sunbird/
./sunbird

Save and close.
chmod +x /usr/bin/sunbird Make the file executable.
gedit /usr/share/applications/sunbird.desktop This opens another empty file in a text editor. Paste

[Desktop Entry]
Name=Sunbird
Comment=Calendar Application
Exec=sunbird
Icon=/usr/lib/sunbird/chrome/icons/default/default.xpm
Terminal=false
Type=Application
Categories=Application;Office;

Save and close.
exit Ends root permissions. Close and reopen the terminal.
which sunbird This tells you where Sunbird is located. It should answer /usr/bin/sunbird
/usr/lib/sunbird/sunbird -P This launches the Sunbird profile manager.

Click "Create Profile...", then "Next" to get past the info screen.
Give the profile a name of your choice.
Click "Choose Folder..." and pick the original SharedPartition/SunbirdProfileFolder, not the renamed one.
Click "Finish". Select the new profile, and click "Start Sunbird" to make sure the new profile is set to default. You can quit Sunbird right away.

Erase the folder SharedPartition/SunbirdProfileFolder which now contains a new profile; rename SharedPartition/SunbirdProfileFolder_MovedAside to SharedPartition/SunbirdProfileFolder. You now have Sunbird on Mac OS X and Linux, sharing the same profile, including calendars, settings etc.

If you're on Ubuntu, you can go to /usr/share/applicatons in the file browser and drag the Sunbird icon into the launcher.


3rd party videos in iOS app, legal issue?

There is a setting in youtube called public.

That means anyone can view it, including downloading or from other apps ect.

If the owner wants to prevent that he/she can do that in youtube settings.

As long your app is not breaking the youtube T&Cs and you are fine.

Consider following: many websites contain link to youtube and many even allow embedding the videos, so it is up to the owner to allow or not.


Prevent a program (steam) to start for a time period

How do you launch Steam?  I think you could create some kind of scheduled task in Automator/cron that either moves Steam.app to another location (preventing your Dock icon from working) or, if you use Spotlight, somehow breaking the application bundle.

For example, you could disable with:

mkdir ~/NoSteam/
mv /Applications/Steam.app/Contents ~/NoSteam/

And re-enable with:

mv ~/NoSteam/Contents/ /Applications/Steam.app

Kludgy but effective.


What application can rotate a TIFF without re-encoding it?

GraphicConverter ($40 shareware) is the "Swiss Army Knife" of graphics applications.
The list of what it can do & the file types it can handle runs to pages, far too much to even précis here.

The one thing it's very good at is 'not doing anything you didn't ask it to do' so for instance, it won't add an alpha channel if all you want to do is rotate an image.

Being "Shareware" in the good old-fashioned sense, if you run over the trial period it doesn't cease to function, unlike many other apps, so you can continue to use it until you decide it's worth your money.

No affiliation, it's just a cracking good product that I've been using for perhaps 20 years :-)


How to go through all the windows of application even the minimized ones?

It's not exactly satisfying your request, but Expose in 10.6 (not sure about Lion) shows minimised windows in a subsection at the bottom of the screen.


Big Sur - unresponsive dialogs to mouse actions

So I tested it in the "Safe mode" and no problem. After I restarted to normal mode, the problem is also gone ♂
Strange, I know I have quite a long uptime, but I installed an update to macOS 11.2.2 last week and the problem survived the installation of the update and restart.
Hope it will never return


(Lion installed) Can I use Boot Camp to install Snow Leopard? Is it legal?

Is this on your MacBook Pro? If so, the disks should work both legally and pragmatically. You wouldn't need to use bootcamp though, since bootcamp is designed just for Windows. Nevertheless, it's pretty easy. Here are the basic steps I would follow:

Insert your install DVD. Shutdown your computer.
Start your computer pressing the C key to boot from the DVD.
Once in the installation assistant, go to Disk Utility under Utilities > Disk Utility.
Select your disk. Select the Partition tab and click on the "+" to add a new one. Call it whatever you please, add at least 10GB of disk space (enough to install Snow Leopard), and make sure it's in Mac OS Extended (Journaled).
Apply the settings. Go through the installer like you normally would, though when it asks you where to install it, tell it you want the Snow Leopard to be on your new partition.

This should let you boot on Snow Leopard by pressing the opt/alt key, just like when you boot Windows.

Hope it helps! Any other thing you need fear not comment.


Why is my mac displaying a grey loading screen on wake up?

What you're seeing is to be expected if your Mac is waking from what's called Safe Sleep.

Safe Sleep is a protective measure used by your Mac to ensure any data stored in memory isn't lost when your Mac shuts down due to a flat battery.

My guess is that the reason this only started about four months ago is that either:

the overall condition of your battery has changed
the power adapter has developed a fault
the way you leave your Mac at night has changed

In other words, for some reason, starting four months ago your battery is being drained to a level that data stored in your memory will be lost because your Mac is going to shutdown. So your Mac is going into Safe Mode to save all this data to your drive.

When it wakes up, you'll see the grey screen and progress bar that appears after Safe Sleep.

You can read more info from this Apple support article.

Now, in your question you state:

  Battery fully charged and still in good shape. Laptop is pretty much always plugged in. Full charge lasts all day, so I don't think it's a power issue.

If you're absolutely certain of this, and have no reason to suspect a faulty power adapter, then I would reset your System Management Controller.

Reset the SMC

Shut down your MacBook Pro
Unplug the power cable from your Mac
For 10 seconds, press and hold at the same time the shiftcontroloption keys (on the left side of the built-in keyboard) and the power button
After 10 seconds let go of all keys and the power button
Plug in the power cable
Turn your Mac back on with the power button.


Is it safe to still use an iBook G4 on Wi-Fi?

What your friend is likely talking about is not connecting it to the Internet as the newest macOS that works on that Mac is OLD.
And that matters because it does not have the benefit of updated patches to macOS that make it more secure and more importantly it runs a badly outdated version of Safari that may not even connect to most modern websites due to standards changes in web publishing and the outdated security certificates built-into old versions of macOS.
Depending on which iBook you have you may be able to install a more modern browser. I have an old G4 tower with some older, never updated, apps on it that I use from time to time and use a version of Firefox called TenFourFox. It (as I have been told) supports G3 and G4 processors. So that particular browser would be safe to use due to its more modern foundations, if slow on modern websites.
I believe there are other, alternative, browsers for legacy versions of macOS, but I have no direct experience with them. Other folks here may be able to chime in and offer suggestions, but it would be good if you edited your original question and add the model of iBook you have and the version of macOS installed on it.
But without a more modern browser I would also suggest you avoid connecting to the Internet, merely for safety reasons. Wi-Fi, itself, is likely okay as long as you are only using it to transfer files between your local Macs and not going out onto the Internet.


Chrome crashes but stays displayed on external screen and I can't remove it

I had the same issue with Mojave 10.14.6.

The j5Create worked perfectly until installing the supplemental update to the OS.  With Apple trying to fix blacked-out/locked screen issue, whatever they did in the update broke j5Create.


Unfortunately, it is not possible to daisy chain displays through Mini DisplayPort.

However, there is a company called DisplayLink that makes software drivers for USB video adapters. They also have links in their store to Mac compatible, DisplayLink approved USB display adapters. One of my coworkers uses this to connect a MacBook Pro to two external displays and a TV in his office. It uses the extended desktop feature for each display. It's a pretty sweet setup and works flawlessly.

I see no reason why this wouldn't work for you. Good luck!


How to remove connected passwords on Wi-Fi on Mac

EDIT 2 Sorry, misread the question.

Your System Preference pane is probably locked. The screenshot you posted is from the "Advanced" section.

Go back to basic network preferences, and look at the bottom left corner of the window. There should be a lock saying "Click the lock to make changes".
Click the lock and enter an administrator username and password.

Go back to the "Advanced" settings and the controls will no longer be locked.

EDIT 2: Un-check "remember networks this computer has joined" to prevent your Mac from remembering the networks.

In Network preferences, remove the network whose password you want to enter each time.

In Keychain Access, search for the name of the network whose password you want your Mac to "forget". Then right click on it and click the item that says Delete "item name" where item name is the name of the password item.

EDIT 1

If you want to prevent panes from locking, go to "Security and Privacy" preferences, unlock the pane (this one will always be locked) and click "Advanced..." in the bottom right. Un-tick "Require and administrator password to access system-wide preferences".


How can I ping a given host behind an Airport Extreme Base Station

You can make this host the default host in your AEBS settings, also known as the DMZ host.

Note however that everything that isn't mapped otherwise will be routed to that host, effectively making that host public from the internet. This might make this host more vulnerable for break-in attempts, be sure to lock all services down properly, and consider putting on a firewall.

Depending on your version of the Airport Utility client, you'll find the setting here:

AirPort Utility 6:

AirPort Utility 5.6:

Overall, I wouldn't recommend this approach because of the security risks on the one hand, on the other hand it doesn't look like a very reliable approach. If the host doesn't respond to pings there's no reason the host can't still be up, and if it does respond, are you sure it is the host responding, and not for example the router after a config reset?

I'd consider polling a dedicated service like httpd which you run on the host and you forward properly from the AEBS. You could run it on a non-standard port as well. With some scripting you could also return a whole lot more detailed information about the availability of the host and it's services.

Edit:

Since you mentioned the host in question is an ATM, I'd be even less inclined to make it the DMZ host. Consider polling it from another host on the local network and notifying you from there.


Update multiple devices with one download using iTunes?

As it won't download the same binary file for each device: Nope.


How do I sync contents of my iPhone App with iPad using iCloud?

Your app (no details provided) needs to support iCloud in order to sync files between devices.


How can I force an app to redownload from Mac App Store?

Answering my own question. I enabled the debug menu and then selected Reset Application, restarted the App Store and now the Download button shows up again.

To enable the debug menu, open Terminal and run

defaults write com.apple.appstore ShowDebugMenu -bool true


copy 501 directory from .Trashes of external drive, but not visible

Short answer

No, this is not a bug in OS X.

Long answer

Mac OS X volumes contain quite a few files and folders that are invisible from the Finder. Usually they're hidden for a good reason and most users won't ever need to see them. Basically, because people shouldn't muck around with them unless they know what they're doing, Apple has designed the system to hide them.

501 folder

On volumes other than the boot volume, a .Trashes folder is used to store files & folders that've been moved to the trash but not yet emptied. Because every user has their own personal trash can, subfolders are created under .Trashes for each user, named according to their user ID number. For example, if user #501 throws something on a volume named "Harry" into the trash, it'd be moved to a folder named /Volumes/Harry/.Trashes/501/.


The Internet Sharing service will handle all the translation requirements by itself. For some reason, though, it's necessary to use the Network Preferences pane to manually confirm the information the bridging interface has already come up with on its own. (Since the BBB has its own DHCP server, perhaps the Mac is willing to accept the BBB's DHCP offer in the 192.168.7.x subnet as a suggestion, but then reinforces the fact that as the DNS it holds the keys to the external world, thereby imposing its configuration on the communication process. I don't know. I do digress, however.)

After turning on Internet Sharing for the BBB in the Sharing pane, switch to the Network pane of System Preferences. Select the en6 service in the lefthand window, click "Advanced" at the lower right, and select the "TCP/IP" pane. If it's not already filled in, Under "Configure IPv4," select "Manually" from the drop-down menu, enter 192.168.7.1 for both the IPv4 and router addresses and 255.255.255.252 as the subnet mask. This leaves 192.168.7.2 for the BBB and 192.168.7.3 as the broadcast address. You can ignore the IPv6 configuration section. Next, select the "DNS" pane from the top row of tabs. Click on the '+' mark just below the window and add 192.168.7.1. In the right hand window, add "local" (without the quote marks) to the search domains.

FYI, I'm sure you'll want to know that ipfw has been deprecated and replaced by pfctl in OS 10.9.


Purchase movies from US store using itunes giftcard

Yes you can buy anything. Your appleid must have a US address. I use an Apple store address ;-)


I managed to delete everything in the command line and i now have 2 drives (ssd and hdd). I then installed OS X on the SSD and this is how it looks like.

diskutil list
/dev/disk0 (internal, physical):
#:                       TYPE NAME                    SIZE
IDENTIFIER
0:      GUID_partition_scheme                        *3.0 TB     disk0
1:                        EFI EFI                     209.7 MB   disk0s1
2:                  Apple_HFS 1                       3.0 TB     disk0s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1 (internal, physical):
#:                       TYPE NAME                    SIZE
IDENTIFIER
0:      GUID_partition_scheme                        *121.3 GB   disk1
1:                        EFI EFI                     209.7 MB   disk1s1
2:                  Apple_HFS Untitled                120.5 GB   disk1s2
3:                 Apple_Boot Recovery HD             650.0 MB   disk1s3


How do I change my background on my MacBook?

The easiest way I've found to do this is to simply right click on the desktop, which will open up a popup menu (see screenshot below of popup menu).

NOTE: Right clicking can either be a 2 finger click or a 2 finger tap (depending on how you have your gestures configured).

Then from here you can change the image.


How do I find and use the filename on photos in Photos.app?

You can still see the original file name of a photo in the information panel, opened using cmd ⌘ I. It's right there under the photo's title.

It seems you cannot search for file names in the Photos.app search. What still works is creating a smart album (⌥ alt cmd ⌘  N) to search for a specific file name or a pattern. See for example this Macworld article.

The Photos app really hides the actual file names quite well. In the finder, you cannot even search for them using Spotlight unless you first open the package content of your Photos library and directly search in that Finder window.


How to save photos from iCloud to external hardrive

In OS X Mountain Lion or later

1.Open Photos and select the Shared tab.

2.Double-click a shared stream.

3.Right-click (or Control-click) a photo and choose Import.


Is iPod docking station just a USB with a different connector?

Engadget has a great tutorial on how to create a custom iPod docking station, along with system configurations, etc.

Hope this helps:

How-To: iPod docking station/configuration


On macOS Mojave 10.14:

To move files to a different disk: Press and hold the Command key, then drag the files to the disk.

To keep an item in its original location and put a copy in a folder: Press and hold the Option key, then drag the item to the folder.

In older macOS releases, you could press the option key to change the behaviour

move instead of copy between different volumes
copy instead of move on the same volume


The Software License Agreement for Mac OS X states the following:

  3. Transfer

  A. If you obtained the Apple Software preinstalled on Apple-branded hardware, you may make a one-time permanent transfer of all of your license rights to the Apple Software (in its original form as provided by Apple) to another party, provided that: (i) the Apple Software is transferred together with your Apple-branded hardware; (ii) the transfer must include all of the Apple Software, including all its component parts, printed materials and this License; (iii) you do not retain any copies of the Apple Software, full or partial, including copies stored on a computer or other storage device; and (iv) the party receiving the Apple Software accepts the terms and conditions of this License. For purposes of this License, if Apple provides an update (e.g., version 10.8 to 10.8.1) to the Apple Software, the update is considered part of the Apple Software and may not be transferred separately from the pre-update version of the Apple Software.

This means that a transfer to you as a buyer or to the next seller that does not meet these conditions (eg. does not include the installation media), does not imply a valid license transfer for Mac OS X for you to reinstall the OS or sell the computer again.


How to do Remote App Installs from iTunes in Macbook to iPhone

You can browse the App Store on your Mac/Windows PC and install apps on your iOS devices by installing iTunes 12.6.3 with App Store support. More information and download links are available in the Apple Support article, Deploy apps in a business environment with iTunes.

As far as the options shown in the screenshot are concerned, it enables automatic installation of apps purchased on other devices which are logged into with the same Apple ID as this device.

To further clarify, using the mentioned setting enabled, your iPhone will only download any new apps purchased either on any other iOS device linked with the same Apple ID or Mac/PC with iTunes 12.6.3 or older installed and logged in with the same Apple ID. It can't be used to install any previously purchased app not already installed on your iPhone.

Installing iTunes 12.6.3 is the only resort for the time being if you wish to manually sync apps from your iTunes library.


Can't connect to internet on Wi-Fi since update to iOS 7.1.1

I had the same EXACT problem when I upgraded my iPhone 4S to iOS 7. I had no wi-fi. I never got it to work, except, if I did the "freezer" trick with my phone, sometimes it would work for a little bit. This makes me believe it has to do with power use and heat.

I kept meaning to take it to the Apple Store to make them do something about it, but never got around to it. Then, when the latest iOS update came out, a couple days later, my phone started working fine again, and it has been ever since.

I think there is definitely something crazy going on with the power saving algorithms Apple uses. Did you get your iPhone 5 when it first came out? My iPhone 4s was one of the first ones. I stink the hardware changes during the production cycle, and sometimes us early adopters get left out when they start tweaking things.


Error while installing Mavericks in a clean hard drive

I know it's late, but if anyone coming here for macOS 10.10+ I did the following:

Reset Drive

Boot in recovery mode (Cmd ⌘ R)
Select Disk Utility
Choose Macintosh HD
Verify Macintosh HD
Erase Macintosh HD

Reset Mac time and PRAM

Restart and hold Cmd ⌘ Opt ⌥ P R (Resetting PRAM as stated above)
After second chime, hold Cmd ⌘ R to boot in recovery mode
Select language
Enter wifi information (or plug in ethernet cable)
Select Utilities from the task bar
Choose Terminal
Enter date mmddHHMMyyyy where mm = two digit month, dd = two digit day, HH = 24 hour, MM = minute, yyyy = 4 digit year (time zone was incorrect for me, but didn't seem to matter)
Exit Terminal (Cmd ⌘ Q)

Reinstall macOS

Reinstall Mac OS X (or macOS)

It worked only after doing all of these.

Source:
https://blog.macsales.com/31640-tech-tip-an-error-occurred-while-preparing-the-installation-fix


The iPhone could not be updated. An unknown error occurred (4013) - Is there still a way to solve?

it looks like you are using iTunes which is not available in the latest macOS Catalina.
Please try the same with apple configurator 2. It might help.

This error might have occurred because your macOS is not up to date.


Dark grey bar at the bottom of Chrome in iPad

You cannot remove that grey bar because it's an area of the virtual toolbar with additional tools that  will appear like Undo/Redo, Cut, Copy, and Paste. The "up and down arrows" is like hitting Tab and ShiftTab to cycle between fields on the webpage.  It usually doesn't show unless there are fields to navigate or items in the clipboard.

It appears in Firefox, Safari and Brave browsers as well.


How can I be sure that Mac chat applications like Adium won't leak my Gmail, iCloud, AIM, or other account/password credentials?

As a rule, unless you've reviewed the full source code of an application yourself, you have to trust the developer(s) of the application that they're not going to misuse your login credentials.

Depending on your level of concern, you might set up a separate, dedicated Gmail account / login, exclusively for use with GTalk and related services.

I'm uncertain how Adium's network protocol operates, but if it uses well-known servers and ports, you could also use LittleSnitch to inspect and approve outgoing network connections from Adium, to be sure that it is communicating only with places it's supposed to communicate with, i.e. official GTalk servers. (LittleSnitch inspection is only feasible with well-known servers, not with peer-to-peer based services.)


Option + Command + Spacebar opens Searching this mac window instead of Finder

I found a solution to the issue. OptCmdSpace has always been a command for showing a "finder search window". If you now just see a window without the sidebar just do this:

press OptCmdSpace To open this window
Press OptCmdT or go to "view>hide
toolbar".

Sometimes we just press it accidentally and this hides the toolbar, which makes this searching window into a "normal finder window".


Make sure you really want to delete all the music because they can’t be restored afterwards.

Open General » Usage in Settings.
Wait for iOS to load all the apps that take up the storage of your iPhone/iPad.
Find and select Music from the list.
You’ll see All Music in the list. Tap the Edit button on the top right, and choose to delete All Music.


Here's the link to the discussion about it. https://discussions.apple.com/message/29070991#29070991

It has been modified to group only messages in that actual conversation and the feature we all loved is now gone.


How can you log out of iCloud if you forget the password?

Since you bought it from a friend I would refer them to: What to do before selling or giving away your iPhone, iPad, or iPod touch and ask them to take these steps.

You should also familarise yourself with the above info.

In summary though, before selling any iDevice, you should:

Do a full backup of your device
Unpair your Apple Watch (if applicable)
Sign out of iCloud (if applicable)
Also delete the device from Find My iPhone (if applicable)
Sign out of iTunes and the App Store
Do a full Erase of contents and settings

It's fortunate for both you and your friend that you bought your iPhone from a friend.


Will Apple Store employees activate my new iPhone?

Camila, you can give Apple a call regarding your issue and they will fix it for you I believe. I've had my new iPad locked for a few months. I called them up from my country Bangladesh and then they asked me some security related questions. Within 24 hours my iPad was unlocked. Hope it helps. You can also go to the Apple Store and see if they can help. You might need to bring your purchase receipt.


How do I uninstall the Apple Mail app and reinstall it?

To uninstall try with AppCleaner, it's free in the AppStore.
Apple Mail is a system app so, in AppCleaner, try double click on the checkbox and then proceed to Delete the app.

For Reinstall.
Apparently you'll need to do a reinstallation of OSX.
According to this Apple page, a reinstallation wont affect your files, can't tell for myself, I've never done that.
Simply make a backup before anything and may the force be with you.

OSX Reinstallation

Reboot your Mac and hold the COMMAND + R keys while rebooting.
You will enter to Recovery environment.
Choose reinstall.


Notification that ‘someone might be watching what you browse’

It's worse than Spam, it's a Scam - an attempt to trick you into paying them something, and maybe installing their own malicious software on your computer.  (For example, software that does encrypt your information, and you can only ever see it again by paying them more.)

You said it was a "notification" - was it really a system-wide notification, or just a picture in the web browser?
The important thing is to note that such messages usually comes from the anonymous creator of the website - Not from Apple or your Phone/Computer's OS.  Sometimes will display what looks like an alert in your web browser - but remember it's just an image in your browser, not a real popup alert.

The site you visited is either hacked, or is a malicious website.  You may want to avoid visiting that sort of website lets you fall prey to another trick.


Need to recover information from a reformatted external drive

PhotoRec is a free program that I've used that may help you recover files. http://www.cgsecurity.org/wiki/PhotoRec

However, some information may not be recoverable no matter what you use, such as folder structures. Whatever you do, don't save any new files to the drive, and probably leave it off unless you are recovering. If you are uncomfortable, there are lots of places that will do data recovery for you.

You probably already know that you were unable to write to your external drive if it was formatted with NTFS.


El Capitan + Microsoft Office 2016 + Category Shortcut

This may be what you are looking for:

It only references deleting color categories, which is ALT + D.


Screen video capture application OS 10.5.8 (Leopard)

Screenium app supports 10.5 and higher
http://www.syniumsoftware.com/screenium/

Old versions of ScreenFlow supports 10.5
https://www.macupdate.com/app/mac/26915/screenflow


How can I find where an app's files are stored?

Deleting the files from an individual app and doing a clean install of Mountain Lion are two different things. As per mckeed's answer, you can use AppZapper to delete an individual app, other alternatives being AppDelete or Clean my mac, although the latter could be a bit overkill for what you want.

Fresh install for ML is a different story though, I did a fresh install the other day and I'm super glad I did - I'm one of those people who just collects apps and files they don't need and everything gets a bit clogged after a while. Simple instructions to do so are:

Start off by backing up whatever you need (I know this ones a bit
obvious), save anything you want to keep to an external harddrive.
You'll need to get your hands on another external harddrive or usb stick at least 8gb, and it has to be empty as we're going to use this to make a mountain lion boot disk. If it's not empty, don't worry we'll erase it in step 7.
Download mountain lion from the app store, but don't install it otherwise the app disappears and you'll have to re download it.
Secondary click (right click, whatever you want to call it) the install icon and choose "show package contents" from the menu.
When the contents of the install file are displayed you'll see a folder called "SharedSupport", open this up and you'll find a file called "installESD.dmg". Copy this file somewhere so you know where to find it.
Open "utilities" in your applications folder and open "Disk Utility"
Plug in your blank USB drive from step 2. You'll now see it in the left pane of the disk utility window, click on it to select it.
Click on the "Erase" tab in the main disk utility pane. Change the "format" dropdown to MAC OS Extended (Journaled) and then name your disk something that makes sense to you like "Mountain Lion Install". Click erase.
Click on the "Restore" tab in the main disk utility pane. In the "source" section, you'll need to navigate to and select the "InstallESD.dmg" file we copied earlier. In the destination tab you'll need to select your now clean drive. Click Restore.

The drive and your mac will now make whirry and buzzy noises for a while. When it's done cooking it will tell you. You now have a Mountain Lion boot disk.

Restart your computer with the new Mountain Lion drive plugged in still and immediately hold down the option key when it starts back up. If you've done this right, instead of booting OSX you'll see a picture of your drive to select. Click on the disk you created earlier to boot from it.
Now the scary part. You don't want to install just yet, somewhere on the screen there is an option for utilities, I think from memory it's in the top bar. Click utilities and select "disk utility" which looks alot like (actually exactly like) the disk utility app you used to make the disk earlier. This time, select your macs harddrive in the left pane and click the erase tab, make sure the format is set to MAC OS Extended again and click erase.
You've now erased your harddrive. Close out of the utilities window and continue the installation as normal installing Mountain Lion onto your newly clean Harddrive!

Hope all this helps, best of luck!


How to play AAC 5.1 audio through S/PDIF on Mac OSX?

Apparently Plex can do this according to this forum post

  "Posted 06 March 2013 - 02:28 PM
  I recently discovered that Plex now are able to do transcode AAC to AC3 on the fly - "under preferences for system" audio, select audio output to "digital" and of course highlight AC3 and DTS capable receiver. If you select HDMI if doesn't transcode AAC to AC3. "

I don't have the hardware to test it out though


That means that contact has been designated for Siri to use when she needs personal information about you.

For example, if you have a contact created with your home address you can then ask Siri for "directions to home".  She will look up the home address attached to the "me" contact.

You can change which contact the "me" is attached to by going to Settings > General  > Siri > My Info and selecting a different contact.

Apparently this setting also can be changed here: Settings > Mail, Contacts, Calendars> My Info.


This is the purpose of a Location. With only one Wi-Fi service, create a new location at the top of the window. Settings such as DHCP only apply to the currently selected location. Locations can be switched from this menu or from anywhere using the Apple menu once created.


How to check how much RAM a program uses?

If you go to the Utility folder on your Mac, open the Activity Moniitor.
Then go to the Memory tab.
There you will see who is using how much.
There is also a Disk Tab, where you can also see who is using how much on active basis (when programs are running). You wont see the passive usage (how much information is stored) in that window.
In this example the application Firefox
Using Memory:

Using Disk space:

How much space is a Application occupying on the disk, is answered by looking in your Finder -Applications then under the - Size coulomb.
Again in my example, the Firefox occupies 147 MB of permanent disk space, which is not the same as the information above which was for the active situation.
Back to your original problem- slow computer:
In the Activity Monitor look now in the CPU tab to see who is most active there.


Command+C (copy) with the left command key does not work

Make sure when you press CMD+C your Edit menu in the top flashes, this indicates it works as expected.

If it doesn't, go to Keyboard settings in System Preferences and:

Restore defaults Modifier Keys...,
Restore defaults in Shortcuts tab,
In App Shortcuts click the + button and test if Keyboard Shortcut input box will react on your combination.

If Edit menu flashes and it still doesn't work, then the first thing to do is to restart pasteboard service by the following commands:

launchctl stop com.apple.pboard
launchctl start com.apple.pboard

If still doesn't work, here are some other suggestions to troubleshoot the problem:

Re-test in different applications just in case.
Re-test if works when using contextual menu (without using the shortcut).
Re-test alternative combination such as CMD+X for Cut instead.
Run Console to see your System log queries if something obvious is happening.
Test if the Clipboard works from the terminal via:

$ echo test | pbcopy
$ pbpaste

If Paste menu item is no more greyed out, then maybe it's a problem with Paste command.

If you're advanced user, use dtruss or fs_usage to debug it, for instance:

$ sudo fs_usage | grep -C4 MyAppWhereCopyDoesntWork

and then notice other apps which appearing exactly when you press the shortcut which potentially you could consider quitting for testing purposes.
Disable any recent programs that you run or restart your computer.
Disable VoiceOver as suggested here.
Force quit the Finder (e.g.: killall -HUP Finder).
If still doesn't work, consider rebooting the system, especially in Recovery or Safe mode to re-test.

As for a workaround, you can install Karabiner app and remap your shortcuts by configuring private.xml file (see Misc tab). For more suggestion, please check the following posts:

Remap Ctrl+C, Ctrl+V, and Ctrl-X only
How can I reassign the copy/paste keyboard shortcuts?


It must be something like :

  System Preferences > Accessibility > Keyboard > Sticky keys options > Display pressed keys on screen


Plugging in external monitor "logs out" (crashes?) user session

If the issue occurred after an update you may have a potential software issue. I understand you have tried a lot of troubleshooting in the comments but I listed the steps that I would follow below.

Make sure you backup all your files first before continuing troubleshooting: https://support.apple.com/en-us/HT201250
Follow this support article from Apple regarding video issues using external displays: https://support.apple.com/en-us/HT201177
As @Stefan suggested, Try reseting SMC.
Shut the machine off. Press Shift-Control-Option on the left side of the built-in keyboard, then press the power button at the same time. Hold these keys and the power button for 10 seconds. Release keys. Power Machine on.
SMC: https://support.apple.com/en-us/HT201295
Try reseting NVRAM: Shut down your Mac, then turn it on and immediately press and hold these four keys together: Option, Command, P, and R. You can release the keys after about 20 seconds, during which your Mac might appear to restart.
On Mac computers that play a startup sound, you can release the keys after the second startup sound. NVRAM: https://support.apple.com/en-us/HT204063
Try booting in Safe Mode as @Allan suggested and see if you can reproduce the issue. Restart machine and hold down the shift key till you see login screen.
Safe Mode: https://support.apple.com/en-us/HT201262
Run diagnostics on your device locally and check for potential hardware issues. Restart machine and hold the "D" key till prompted to run diagnostics. Even if you machine passes the diagnostics, you may still have a hardware issue.
note the Apple Store Genius Bar can run deeper tests on your machine if you schedule an appointment. Diagnostics Mode: https://support.apple.com/en-us/HT202731
If hardware diagnostics passes, you can use Recovery Mode to reinstall the operating system or erase the machine and do a clean install. In recovery mode, if you choose to reinstall the macOS it will preserve the files on your system. You can also perform a clean install from macOS by reformatting the storage drive before installing the macOS. Recovery Mode: https://support.apple.com/en-us/HT204904
You can try updating to the latest macOS. I was having issues using display port and external monitors, updating to High Sierra resolved the issue for me. Update the software on Mac: https://support.apple.com/en-us/HT201541

At the end of the day, the issue you are having is either software or hardware related. By performing a clean install, we eliminate any potential software issues, not factoring in bad display driver code (typically these drivers get updated when you run system updates or upgrade macOS). If the issues continue to happen you may have a hardware issue of some sort either with your MacBook Pro, the displays, or the cables.


I'm looking for an application to measure words per minutes when typing


What files should be copied to manually migrate a user account?

Remove accounts.plist file from /Users/username/Library/Mail/V2/MailData/ as well as /Users/username/Library/Preferences/com.apple.internetaccounts.plist
Log out, then log back in.
Try it again.


This means you don't have an active internet connection to access iCloud. From the picture, I can see you're not connected to WiFi but using a cellular network. To access iCloud and it's relative Settings you need to make sure:

Mobile Data is on
You have enabled Mobile Data for Settings

To enable Mobile Data:

Go to Settings
Mobile Data
Toggle the switch at the top

To turn on Mobile Data for Settings:

Go to Settings
Mobile Data
Go to Settings and toggle the switch so it is green


How to use iPad Pro with (LG) ultrafine 5k?

You do not need an adapter - you'll only need the USB-C cable that comes in the box with the monitor.

Note however that the iPad Pro (any model with USB-C) will only work at a 3840x2160 resolution at 60 Hz. I.e. you won't be able to take advantage of the full 5120x2880 capability of the monitor.

Also note that the monitor will only supply about 7.5 watts of power to the iPad Pro. This is usually not enough to charge the battery.

Note, the original LG 5k display is thunderbolt only, so if you done get a connection, check the model and firmware on your LG to be sure it supports USB.

Difference between old and new LG UltraFine 5K(4K) Displays


Unusual iMessage received from my mom, who wasn't aware she sent it

Check the following:

Settings
Phone
Click the third line (free translated) "Answer with text message"
The exact text you received is right there.

If you have a running phone call, your screen will turn black once the sensor will notice the darkness of your face being close to it.

Once you click on your phone during an incoming call, you can decline the call and answer with one of the messages explained above.

This has nothing to do with spying and hacking.


How do I trigger a script when a second monitor is attached

There may be a more efficient way but if you save this following AppleScript code in Script Editor, as an application, after customizing it to your needs… running this application, as currently configured, will continue to run and check every five seconds, until an additional monitor is detected.

property displayCount : 1

repeat until displayCount is greater than 1
    tell application "Image Events"
        set theDisplays to count of displays
    end tell
    set displayCount to theDisplays
    delay 5 -- How Often To Check How Many Connected Monitors.. In Seconds
end repeat

-- The Following Line Will Execute When An Additional Display Is Connected
-- Replace The Following Code With Whatever Actions You Choose

activate
display dialog "New Display Connected" buttons {"Cancel", "OK"} default button "OK"

-- OR use the "run script" command as in the sample below

--set theScript to (path to desktop as text) & "whatever.scpt"
--set runScript to run script alias theScript

return

This next option will detect whether a monitor is connected or disconnected and will continue running

property displayCount : missing value
property tempDisplayCount : missing value

countDisplays()

repeat
    repeat until displayCount is greater than 1
        countDisplays()
    end repeat
    displayConnected()
    countDisplays()
    copy displayCount to tempDisplayCount
    repeat until tempDisplayCount is not equal to displayCount
        countDisplays()
    end repeat
    copy displayCount to tempDisplayCount
    if tempDisplayCount is greater than displayCount then
        displayConnected()
    else if tempDisplayCount is equal to displayCount then
        displayDisconnected()
    end if
end repeat

on displayConnected()
    -- The Following Lines Will Execute When An Additional Display Is Connected
    -- Replace The Following Code With Whatever Actions You Choose
    -- OR use the "run script" command as in the sample below
    -- set theScript to (path to desktop as text) & "whatever.scpt"
    -- set runScript to run script alias theScript
    activate
    set newDisplayConnected to button returned of (display dialog "New Display Connected" buttons {"Stop Monitoring", "Continue Monitoring"} default button "Continue Monitoring")
    if newDisplayConnected is "Stop Monitoring" then
        quit me
    end if
end displayConnected

on displayDisconnected()
    -- The Following Lines Will Execute When A Display Is Disconnected
    -- Replace The Following Code With Whatever Actions You Choose
    -- OR use the "run script" command as in the sample below
    -- set theScript to (path to desktop as text) & "whatever.scpt"
    -- set runScript to run script alias theScript
    activate
    set newDisplayDisconnected to button returned of (display dialog "A Display Was Disconnected" buttons {"Stop Monitoring", "Continue Monitoring"} default button "Continue Monitoring")
    if newDisplayDisconnected is "Stop Monitoring" then
        quit me
    end if
end displayDisconnected

on countDisplays()
    tell application "Image Events"
        set theDisplays to count of displays
    end tell
    set displayCount to theDisplays
    delay 5 -- How Often To Check How Many Connected Monitors.. In Seconds
end countDisplays


Try resetting your macs PRAM. See http://support.apple.com/kb/PH14222?viewlocale=en_US. If that doesn't work then hold cmd+r at startup to boot into recovery and then try choosing Macintosh HD as your startup disk.


Waterproofing the iPhone 7 Plus for use in sea water

The iPhone 7 Plus is splash, water, and dust resistant and has a IP67 rating under IEC standard 60529. Which means up to 30 minutes under water at up to 3 feet deep.

If you are not submersing your iPhone 7 in more than 3 feet of water for more than 30 minutes you shouldn't need to do any additional waterproofing. However even though the iPhone 7 Plus is has a water resistant rating, water damage is not covered under warranty. You should also note that Apple has specific instructions for drying out a wet phone. See this Apple Support page for all of the details.

Personally, I would invest in a waterproof case to protect a device that costs at least $869, especially if I was planning on exposing it to salt water.

Many "field" tests have been done and the iPhone appears to exceed this rating when new. If you google around a bit you can find videos of iPhone 7 immersion test videos.

Here's a quote from Apple's official iPhone 7 page:

  iPhone 7 and iPhone 7 Plus are splash, water, and dust resistant and were tested under controlled laboratory conditions with a rating of IP67 under IEC standard 60529. Splash, water, and dust resistance are not permanent conditions and resistance might decrease as a result of normal wear. Do not attempt to charge a wet iPhone; refer to the user guide for cleaning and drying instructions. Liquid damage not covered under warranty.


How do I maximize window after I've minimize them?

beside Asmus Solution you can use cmd+tab to find your minimize software's windows after you go on select windows hold option and release all the key.


Does Macbook Air 2015 support daisy chaining monitors in macOS Catalina?

You can use daisy chaining with an Apple ThunderBolt display and the MacBook Air.

If you haven't got two such displays, the easiest method is to buy a Thunderbolt 2 docking station that support multiple monitors.


How to get Finder in Lion to set group permissions to read/write by default?

You can use BatChmod for setting permissions of files. You can also use it to chmod a batch of files. Download link: http://download.cnet.com/BatChmod/3000-2248_4-19574.html


Is there a fullscreen Terminal app that is faster than iTerm?

Try iTerm2. It's supposed to be significantly faster than iTerm, but since I've never used the first version, I can't say for myself.

I have no complaints about it, that's for sure.


macOS: How to read the file system of a disc image

Yes - you can read the details from ISO and DMG from the command line using OS provided tools.
The primary command line tool to manipulate disk images is hdiutil and you may need to attach / authenticate / mount them and use diskutil to determine file systems contained within a dmg or iso if the wrapper doesn't contain the information you require.
The option I use is hdiutil imageinfo but also hdiutil fsinfo has exceptional details on these containers that may be useful to you.
% hdiutil imageinfo foo.dmg
Format Description: UDIF read-only compressed (zlib)
Class Name: CUDIFDiskImage
Checksum Type: CRC32
Size Information:
        CUDIFEncoding-bytes-total: 1015091
        Total Empty Bytes: 13726208
        Sector Count: 30730
        Total Bytes: 15733760
        CUDIFEncoding-bytes-wasted: 0
        Total Non-Empty Bytes: 2007552
        Compressed Ratio: 0.50548329507778633
        CUDIFEncoding-bytes-in-use: 1015091
        Compressed Bytes: 1015091
Checksum Value: $81F7C3A0
Segments:
        0: /Users/me/foo.dmg
Partition Information:
        1:
                Name: disk image (Apple_HFS : 2)
                Partition Number: 1
                Checksum Type: CRC32
                Checksum Value: $AAEEB101
        -1:
                Name: Driver Descriptor Map (DDM : 0)
                Partition Number: -1
                Checksum Type: CRC32
                Checksum Value: $77150592
        2:
                Name:  (Apple_Free : 3)
                Partition Number: 2
                Checksum Type: CRC32
                Checksum Value: $00000000
        0:
                Name: Apple (Apple_partition_map : 1)
                Partition Number: 0
                Checksum Type: CRC32
                Checksum Value: $5AC9B785
Format: UDZO

There are dozens of verbs to send to the tool, so I suppose the one you need may vary based on your specific query against the data contained within the packaged file.


How do I disable Do Not Disturb While Driving in iOS 11 if I'm a passenger?

If you have a 3D Touch device, 3D Touch the notification on the lock screen and choose the "I'm not driving" option.

If you have a non-3D Touch device, you will need to long-press the notification and then choose the "I'm not driving" option.


How do I ONLY receive and send iMessage (not SMS)?

Might this have changed recently?

It appears now one can select to "send as SMS" when iMessage is unavailable (Settings > Messages on iPhone).  Perhaps now there is also a way to only have texts sent as iMessages only when being sent internationally, yet also have domestic (within country) texts sent as either iMessage and/or SMS?


FaceTime on Macbook without iPad interference

No - there's no cross talk possible since Apple uses different encryption keys for each device. All of them receive a notification / offer to start the call and continuity would allow you to hand off a call from one device to the other.

If you're distracted or worried, you can sign out of FaceTime / Messages on the device you want to be sure isn't bugging you, but architecturally - there's no downside / benefit to having more than one device signed in other than if your network can't handle the signaling items or can't NAT the traffic correctly.


macOS Big Sur - unnotarized 3rd party quick look plugin?

You do the same thing as with an app. QuickLook plugins are installed to ~/Library/QuickLook.
You can run xattr -d -r com.apple.quarantine ~/Library/QuickLook to remove the com.apple.quarantine attribute from all QuickLook plugins.


Is adding a GPS cradle to the iPod touch worthwhile?

No info to report on the cradle you linked to, but several Bluetooth models work fairly well. Apple apps work the best but some third party mapping apps don't use the GPS as well as the onboard one for the iPhone. Others resist installing as the developers require iPhone or iPad with GPS to install.

It would be best to contact the developer of your mapping app of choice and see what they recommend.

http://www.gns-gmbh.com/ - tested that for a day so it worked but I can't recommend it for the field without more time with it.

XGPS 150 - this worked well but I ultimately sold it since I don't want a short days GPS but a whole weekend to a week so I'm back using my garmin that is all in one and takes AA batteries.


How to copy the entire contents of a Time Machine backup drive to a new one?

"Transfer Time Machine backups from one backup disk to another."

  https://support.apple.com/en-us/HT202380


Can't seem to get into internet recovery mode

Internet Recovery is not available on 2009 machines. In general, you need a Mac to create the install media for installing macOS when you don't have an existing macOS install or recovery disk. It may be possible to create the macOS install media using a Windows computer, however I have no experience with this.


Why are iMessages appearing on my iPad but not coming through on my phone?

I had the same problem.  Looking at Settings > Messages > Send & Receive on both iPad and iPhone, my telephone number was listed under 'You can be reached by iMessage at' on both and was greyed out on the iPhone, but ticked on the iPad.

The fix was to:

(a) tap the telephone number on the Settings page of the iPad (Settings > Messages > Send & Receive > You can be reached by iMessage).  This removed the tick beside the number, and

(b) on the iPhone, disabled and re-enabled iMessage (Settings > Messages), and then enabled the telephone number (Settings > Messages > Send & Receive, and tapped the telephone number on You can be reached by iMessage at settings page.

A notification was then shown on the iPad:

  Your Apple ID and phone number are now being used for iMessage on a
  new iPhone.


Signed application cannot be opened once downloaded - ("unidentified developer") error

When you downloaded apps with Safari an extended property is set on the file to mark is as quarantined. Another extended property is set to save the URL you've downloaded the file from.

Depending on your security settings you will be prompted the first time trying to start the downloaded application. You will be informed that you have downloaded the program, the URL and - depending on your settings - be allowed to bypass the prompt and run the program.

You can remove the attribute manually to allow you to script these downloads. Run the following command in Terminal.app:

xattr -d com.apple.quarantine path/to/file/filename


Apple has separated the store into different countries because the rights to movies and shows can be owned by different companies in each country. For example a film might be distributed by Paramount in the United States and 20th Century Fox in the rest of the world (as was the case with James Cameron's Titanic). So Apple has to make separate deals with these companies to distribute their content in the store.

You can change the country attached to your account, but then in Apple's own words: "After you change the country of your account, you won't see the items you purchased from the previous country’s store in the Purchased section."

To change the country you may need a payment option located in that country. Again in Apple's own words: "only German credit cards can be used to buy content from the German iTunes and App stores".

Life would be easier for us if this wasn't the case, but unfortunately Apple has to follow the rules of the people who own the content they are distributing through their stores.


How to use all the space in extracted hard disk (remove leftover system folders)

If you go into disk utility select view then show all devices. For the drive you want to erase, select the upper most text/name and then click erase. You can now chose the name, its file system (for normal use I would recommend MacOs Extended) and its scheme (you most likely want to have GUID). Unless its an SSD you can also select security options to securely erase the data.
Make sure that all files on all volumes and its partitions of that physical drive are backed up, since you will reformat and therefore erase the actual hard drive, not just a partition.

More info about the file systems: Apple support page, APFS vs MacOS Extended


How to recover files from a Macbook that won't boot which has an SSD

There are two possibilities:
1. The SATA cable connecting your SSD to the Mac is intermittently failing. This is a common problem in MBPs of that vintage.
The good news is that this means the data itself on the drive is ok, and the internal cable just needs replacing. Alternatively, you could get an external USB enclosure (a box with a USB cable), and put the SSD in there. You may want to get a repair shop to do this.
2. The drive itself has failed in some way.
If this is case, then it is very unlikely that your data can be recovered.
Backups of data are essential to prevent data loss from drive failure. This is why macOS has Time Machine.


Why does the menubar hide when I'm in iTunes?

It sounds like you're running iTunes in full screen mode if you're on Lion. In the top right corner you should have a button with two arrows that allows you to switch between full screen mode and regular mode.


Stream iOS camera live video to other device over Wifi

TJUNKS Video Camera

You can stream to other devices. This app does a lot, with video including uploading and sharing video on facebook, twitter etc but to stream video all the devices will need this app.

It also works across platform.

As far as personal experience goes I have only used it once to test it quickly, it workked accross a home WiFi network, other than curiosity I had no need for this.


Triple booting a modern Macbook (early 2015) with Bootcamp in EFI mode

The short answer is yes. Starting with the 2015 Mac models, you can not use the "hybrid MBR" mode. You must use GPT partition scheme for all operating systems installed. Installation is fairly straight forward. When installing Ubuntu, I would advise that you create a second EFI partition. This would allow you to use the Startup Manager to select the current and default operating system to boot from.

The order of installation would be OS X, Windows and finally Ubuntu. This allows you to use the Boot Camp Assistant to install Windows. After installing Ubuntu, you will need to copy some files from the first EFI partition to the second EFI partition in order for the Startup Manager recognize the Ubuntu operating system.

To get Ubuntu to appear in the Startup Manager, you have to manually mount the both EFI partitions and copy the files in the \EFI\UBUNTU folder of the first EFI partition to the \EFI\BOOT folder of the second EFI partition. Also, the copied grubx64.efi file needs to be renamed to BOOTX64.EFI.

You can also use rEFInd as a boot manager. While rEFInd is not required, it does have the advantage of not having to hold down the option key a startup to switch operating systems. Personally, I have it installed in its own EFI partition, but I rarely use it.


How to increase graphics memory in Mac OS running as a client in VMware?

VMware's knowledge base article, Setting Custom Video Memory Size in Fusion, shows the setting to change:

  Setting Custom Video Memory Size in Fusion

  There is no way to choose a different video memory size through the
  user interface. It must be done by editing the virtual machine
  settings (.vmx) file. For more information, see Editing the .vmx file
  for your Fusion virtual machine (1014782).

  Add this line to the .vmx file:

  svga.vramSize = value_in_bytes

  where value_in_bytes is the desired memory size in bytes

The .vmx mentioned in the article is hidden within your virtual machine's bundle. To find the file to edit, right-click (or Control-click) on your virtual machine in the Finder and
 select Show Package Contents.


You can try and follow the Automator action at the following related post.
https://apple.stackexchange.com/a/120300/316076
I do something like this to launch my work apps in the morning.


Set Bitcoin.app to mount image before opening itself

No script needed. Store the app in the DMG. Keep the app (alias) in the Dock. Launching the app via the Dock will mount the DMG.


How do I retrieve a specific photo from iCloud backup of my camera roll

I guess with videos and Photo Stream you're out of luck.

From the iCloud: Photo Stream FAQ:

Does Photo Stream support video?

No. Photo Stream only works with photos.

With a local backup you could use something like the iOS Backup Extractor to extract the iOS files, including your video.

Don't know about iCloud backups and extraction of specific parts.

Good luck.


You can also turn on VoiceOver with the keyboard command cmd + F5 or cmd + function + 5. Might you be pressing those keys?

You can also tell Siri to turn on VoiceOver. I don't think this is your problem though.


One tap on a download icon will download an entire playlist of songs onto the local storage of the device. It doesn't matter if the playlist is a normal one or a smart playlist or a genius mix that you assemble on the go. You can also download albums, individual songs, everything by one artist, etc...

Furthermore, You can easily toggle between showing all songs and just the downloaded songs to check before a trip if you want to grab more songs for offline play. The toggle is also nice when you want cellular data on, but want to avoid accidentally streaming more music from the cloud.

I see no reason why worrying about data caps or cost would hold you back from getting match.


'mdls' and 'mdimport' interaction: good practice question

I would use stat instead of mdls on a system running the 64bit kernel.

stat -f "%B" file

will return the creation date or birthtime in seconds since epoch (Unix/Epoch time). A human readable output can be produced with

stat -f "%SB" file

You can also format the output of this command by adding the -t option (see man 3 strftime).

On a system running the 32bit kernel, you need to use GetFileInfo.

GetFileInfo -d file

The output from GetFileInfo can be converted to Epoch time by running the output though the date command.

cdate=$(GetFileInfo -d file)
date -j -f "%m/%d/%Y %H:%M:%S" "$cdate" +%s


The Grub boot files installed by Ubuntu are compatible with the Mac Startup Manager. While the Mac should automatically boot Ubuntu, you can also select to always boot from Ubuntu by holding down the option key at startup, then selecting the icon label EFI Boot. After doing so, the Mac should boot Ubuntu by default.
I assume here your MacBook Pro is a newer model that would capable of 64 bit EFI booting Ubuntu and have at least 4 GB of memory. If not, then you should update your question.
I also assume here your Mac does not have the T2 chip. If your Mac has the T2 chip, then you have to remove Secure Boot and allow External Boot. Some releases of Ubuntu can not be installed on the internal drive of newer Intel Macs. If this is the case with your Mac, then you will need to install to an USB drive.
You can install the rEFInd boot manager if you wish, but consider this. The firmware on the Mac logic board contains a boot loader and boot manager. Ubuntu will by default install Grub, which is also a boot loader and boot manager. (Although in this case, the boot manager will operate silently.) Installing a rEFInd as a third boot manager is not necessary.


iOS App Store: Can't scroll to see more results

To resolve, try the following one by one:

Relaunch the App Store app. Invoke the multitasking UI by double pressing Home button, and swipe up to quit the app. Now relaunch the app and try again.

Make sure you have an active Internet connection and the App Store is able to access it. You can browse around in the app to ensure you have an active connection.
Try connecting to a different Wi-Fi/mobile data network (basically to a different ISP). Sometimes App Store may not be able to fetch data over some network. Switching to a different network may help resolve the issue.
You can also try by restarting your iPhone.
One last resort would be reset your Network Settings. Go to Settings app → General → Reset and tap Reset Network Settings. Do note to use it with caution as this will reset all network configuration on your device and you'll have to re-add the saved Wi-Fi access points.


Download, install and start Karabiner. In the menubar open (Karabiner icon)-> Preferences. Enter "Return" in the search field and choose one of the preconfigured key codes:

By editing the private.xml in Misc & Uninstall  you may add any additional  key or (not already used) key combination and choose this one instead.


Netbeans or Eclipse on macOS Sierra - Java problems

You need to install the full JDK version of Java 8 (jdk-8u121-macosx-x64.dmg) rather than just the JRE.

The JRE install does not include the support to run Java programs outside of a browser.


How do I install new Mac OS onto a new unformatted HD

The MacBook 13" Mid 2007 is obsolete!  Meaning that even with the latest version of Mac OS X it supports, 10.7.5, the OS is no longer supported in any respect, has un-patched security flaws that will never be fixed. From a security standpoint, you'd be better off running a current version of Linux Mint then Mac OS X Lion 10.7.5 on that MacBook.

That said, if you really want to run the latest Mac OS X that MacBook model supports, then you'll need to acquire a copy of the Install Mac OS X Lion.app application bundle and use DiskMaker X (formerly Lion DiskMaker) to create the USB Installer as it does not support the createinstallmedia command found in the application bundles of the OS X installers starting with OS X Mavericks and later.

If you previously purchased Mac OS X Lion, then I believe it should appear under Purchased in the App Store and can be downloaded again and if not then you'll have to ask a friend to see if it's in theirs.

Another possible option is to take the MacBook to an Apple Store and see if the Genius Bar can install a copy of Mac OS X Lion for you.


Open iTerm and execute some commands automatically

You could do it with an Alfred Worflow (you need the Powerpack).

First create a Blank Workflow and fill the data:

Use the plus symbol in the right cornet to add Trigger → Hotkey action. Define your prefered hotkey and save it.

Add Actions → Run script. Use /usr/bin/osascript as language. Paste the following script and save it. Change ls -l to whatever command you want to execute.

tell application "iTerm"
    activate
    set the clipboard to "ls -l"
    delay 0.5
    tell application "System Events"
        keystroke "v" using command down
        keystroke return
    end tell
end tell

Connect the two actions and you will be ready.

Type your hotkey and it will open iTerm and execute your command.


Able to print, but can not scan from my printer

This is because the Epson Artisan 725 is considered an MFP or Multi-Function Printer.  This means it's actually two separate devices that just share the same footprint.  So, it is entirely conceivable that the printer drivers are readily available from Apple while the scanner driver isn't.

Heading over to their Support Page, it appears that they have both printer AND scanner drivers for macOS (Sierra) so you would need to install that driver for your scanner to work.


If you open up the menu to the left in the address bar - I think you'll find what you are looking for.


Just open up terminal, go to the preferences and select the theme (the .terminal file)


On MacOS 10.15.5, "About This Mac --> Storage" is not recognizing my RAID-1 drive correctly

About This Mac > Storage doesn't show my RAID set either, on my 2018 Mini running Mojave. I suspect it's just a bug in the OS.


Can't see list of screen resolutions anymore when Option-Clicking the Scaled button on macOS 10.15.4

This behavior was restored after the latest macOS update (10.15.6).  Maybe it was accidentally disabled in the previous version.


Xcode.app gets scanned by socketfilterfw (OS X Firewall) at every launch

Xcode is likely trying to use the network. This is triggering a rule in your firewall that results in Xcode's code signature being checked – requiring a read of the complete application bundle.

Experiment with the following option in OS X's firewall settings:

System Preferences.app >
Security & Privacy >
Firewall >
Firewall Options… >
Automatically allow signed software to receive incoming connections

I have this option disabled. As a result, I am frequently prompted to allow Xcode incoming network access. I always deny access as doing so still allows local connections between Xcode and underlying development tools.

As a side note, I am unable to reproduce the behaviour you are seeing on OS X 10.10.3 and Xcode 6.3.2.

Alternative Firewalls

If you do decide to disable your Mac's built-in firewall, investigate using a third party alternative such as Little Snitch:  Reasons to prefer Little Snitch over the built-in firewall


Disable auto suggest typing when using the CTRL key

As noted in another answer:

It's the auto completion from the built in spell checker and after a lengthy search I found the solution in Apples Discussion Forums:

defaults write -g NSUseSpellCheckerForCompletions -bool false

Afterwards restart affected programs and Esc just cancels searches again.


Sync Notes on iphone with a txt file on windows PC

You have two options:

Using Dropbox, save your files on your Dropbox folder and access them on your iPhone through:

The Dropbox app, tap on a file. I think Dropbox has a built in text editor, or you can select any text-editing app on your device to view/edit it.
Any of the many dedicated text editing apps with built in Dropbox support, such as Elements, Droptext, etc. Look around a bit.

Using iCloud, create notes using the native app. They will be accessible on your PC through:

iCloud.com. Click on mail and select the folder
called "Notes". Note though, you wont be able to edit them just now on this site.
Nonetheless, Apple is supposed to be releasing an update to their
iCloud.com website during the next month or two and give it a
dedicated notes application, which will likely allow for editing
within the web interface.
Outlook. Install the iCloud Control Panel for windows, and check the box that allows you to syinc notes. Note though, you need a compatible version of Outlook.


The suitable named Push Reader app seems to be what I'm looking for, it has push notifications that we filtered by keywords, not exactly sure where the keywords are used to filter (like body or title etc) but as far as I can see it's pretty good.

Edit: it filters by keyword at least in the title. I just got a push notification telling me I have homework ;)


Test a list of passwords on Sparse Image

The hdiutil command combined with a bit of bash scripting can accomplish what you're looking for. You'll need a plain text file with each password on a separate line, ending with a blank line.

Copy and paste this into a text file:

#!/bin/bash

while read line
do
    echo -n "$line" | hdiutil attach -quiet -stdinpass "$1"
    if [ $? -eq 0 ]; then
        echo "Password is $line"
        break
    fi
done < "$2"

Save it and make it executable by running chmod +x /path/to/scriptfile in Terminal.
In Terminal, run /path/to/scriptfile /path/to/image.dmg /path/to/passwords.txt.

It will run until it successfully mounts the disk image, and will output the password that worked. In my tests, it took 1.3-1.6 seconds per password, so 3000 passwords may take around an hour, depending on your system (although it could be sooner depending on where the password is in the file).

That should do the trick. If you're curious how and why it works, read on.

Explanation

While loop

    while read line
    do
    […]
    done < "$2"

This loops over each line in the password file (which is fed in via the < "$2" part) and executes  the stuff between do and done each time it loops. $2 is a special variable in Bash that represents the second argument passed to the script (i.e. if you ran ./foo bar blah, $2 would be blah). It's enclosed in quotes in case there are any spaces or other characters in the name that could cause problems for Bash.

Mounting the image

hdiutil attach -quiet -stdinpass "$1"`

This is the command to actually mount the disk image (which we get from the command line arguments via the $1 variable, just like the password file). The -quiet flag means don't print any output (just to keep things tidy), and -stdinpass means get the password from the command line, not the usual OS X password dialog.

echo -n "$line"

The echo command simply repeats the input it's given, which in this case is an individual line from the password file, from the $line variable (which is again quoted in case the passwords contain special characters). The -n flag is the final piece of this puzzle, it prevents echo from repeating the newline character, which would be included in the password (and thus prevent even the correct password from working).

We use echo with a "pipe" (|) to send hdiutil the password. A pipe sends the output of the preceding command (echo) to the command after the pipe (hdiutil). This way rather than asking us for the password, hdiutil simply takes the text we read from the file.

Checking if the password was successful

if [ $? -eq 0 ]

This checks if the previous command was successful, by checking its exit code. The $? is another special variable that stores the exit code of the previous operation.

If the exit code is 0 (no errors), then we know that the password worked, and the if statement runs these lines:

    echo "Password is $line"
    break

This displays a simple message telling the user what the successful password is, then the break command exits the while loop and ends the program. We do this because the script would otherwise continue until it's checked every password in the file.

Combining all these pieces together gives you a convenient way of automating an otherwise long and painful task.


Second iOS devices getting my iMessages and FaceTime calls

You can simple  switch of these sync settings by disabling the services in the Settings < FaceTime/Messages.

Of course, if you've got like a troll brother, he will simply turn back on these services. If that's the case, you can protect these settings with Restrictions. At least, you can for FaceTime. With a simple password, you can prevent him from using FaceTime.
If you let him use your Apple ID, he should be able to live with the fact his iPod is password protected.

Or you can make him his own Apple ID of course. It's free of charge and done within a few clicks.

If he uses your Apple ID in order to use iTunes Match or get the apps you've bought, that's possible as well. Please see this extensive topic about sharing an Apple ID.


Can iOS apps upload camera roll pictures automatically

In the iOS settings app - privacy - disable photo permissions for the apps you don’t trust.

Then add those apps as receivers when you use the photos app to push only selected photos.

Or delete the apps from your iOS devices and only use web versions or eschew them entirely.


Only HTTPS websites working otherwise I receive ERR_CONNECTION_REFUSED

You are probably victim of an adware: OSX/Pirrit. Please read the linked analysis.

To remove the adware save the following shell script as remove-adware.sh (e.g. on your Desktop) and execute it as root:

echo "*** Osx.Pirit Removal script, Amit Serper, @0xamit ***"
echo "*** BEFORE YOU RUN THIS SCRIPT, STOP! I CAN'T TAKE ANY RESPONSIBILITY ON ANY DAMAGES HAPPENING TO YOUR MACHINE. YOU ARE THE MASTER OF YOUR OWN FATE"
echo "*** Before running this script check that you are indeed infected with osx.pirrit. TERMINATE THIS SCRIPT BY HITTING CTRL+C AND RUNNING THE FOLLOWING COMMAND:"
echo "$ dscl . -list /Users UniqueID | grep 401"
echo "If this command has an output then continue running this script. Else DONT"
echo "Press any key to continue running this script, remember - I am not responsible for any unfortunate outcomes"
read

echo "[*] Getting net_pref name"
netPrefFileName=$(sudo defaults read /Library/Preferences/com.common.plist net_pref)

echo "[*] Netperf name is:"
echo $netPrefFileName

echo "[*] Getting appname from com.common.plist"
appName=$(sudo defaults read /Library/Preferences/com.common.plist name)
echo $appName

echo "[*] Stopping and removing LaunchDaemon"
sudo launchctl unload -w "/Library/LaunchDaemons/"$netPrefFileName
sudo killall $appName

sudo rm "/Library/LaunchDaemons/"$netPrefFileName

echo "[*] Removing injector"
sudo rm -r "/Library/"$appName
echo "[*] Removing malicious pf configs made by Pirrit"
sudo rm /etc/change_net_settings.sh

sudo pfctl -evf /etc/pf.conf

servicePrefFileName=$(sudo defaults read /Library/Preferences/com.common.plist service_pref)
echo “[*] Net pref file name:”
echo $netPrefFileName

appName=$(sudo defaults read /Library/Preferences/com.common.plist name)
echo “[*] App name is:”
echo $appName

echo “[*] Removing LaunchDaemon”
sudo launchctl unload -w "/Library/LaunchDaemons/"$servicePrefFileName
echo [*] Killing app and osascript”
sudo killall $appName
sudo killall osascript

echo “[*] Cleaning up…”
sudo rm "/Library/LaunchDaemons/"$servicePrefFileName

sudo rm -r "/Library/"$appName

echo “[*] Removing pirrit launching script”
sudo rm /etc/run_app.sh

echo “Script finished”

Make it executable:

chmod +x ~/Desktop/remove-adware.sh

change your working directory:

cd ~/Desktop

and execute it. Read the intro of the script thoroughly (especially the advice to run dscl . -list /Users UniqueID | grep 401 before continuing:

sudo ./remove-adware.sh


From iMovie, go to Share-> Export Using QuickTime. Set the Export: menu is set to Movie to MPEG-4. Click the Options... button next to that menu.

Set the File Format to MP4
Set the Video Format to H.264
Set the Data Rate to something like 2048
Set the Image Size to 1080
Click OK
Click Save

That should give you a much better-quality video.

Hope this helps!


Iphone 4 is acting glitchy.Should I update it?

I don't think having a slight outdated OS or Jailbroken device would cause those glitches to occur.  On my iPhone 4 it once acted funny in a different way by not responding to my finger taps correctly.  Try this, it helped me:

Hold the sleep/wake button on top and the home button at the same time.  When the "slide to power off" slider appears keep holding the two buttons.
When it appears to be off keep holding the two buttons still.
Finally, when the boot apple logo appears you can release the two buttons.

This isn't a jailbreak technique that turns the phone into DFU or Recovery Mode.  It's like a soft reboot that clears any lingering data on its RAM that might be causing your problems.


If you have an Apple-branded SSD (i.e. it came with your Laptop and you did not install it yourself), there is no need to enable TRIM manually.


cd x/y/z command does not work even if I see z with ls command when directory is x/y

Your data directory name ends with a space character, so the name is actually "data" (without the "" of course). Unless you really need it like that, it's probably best to rename it by running mv "data " data.

If you can't change the name, use cd "data ", or cd data?, or cd data\ to change into the directory.


In my ~/Library folder there is Caches folder. Can this be emptied?

Yes.  Enjoy this sweet release.

Is it safe to delete ~/Library/Caches?

and savor the sensation when the next program to write to that folder finds the folder misssing. Usually the slow down to rebuild all the cached files isn’t worse than whatever you are experiencing now to cause you to want to purge.


How to install Mountain Lion on USB disk and boot from USB

You can buy the ML from App store.

Then install it on USB following these instructions from Apple-HT202796.

Then hold the Option key during boot to select the start up disk.

How ever, running from USB disk can be slow.

Alternative->better solution is to create a new partition (size to be determined) and install the ML on it, if you are using the ML frequently.


in Spaces Preferences you can set the browser application to appear on all spaces. that's how i have my Terminal set up, among a few others. unless you move more apps onto your secondary monitor, the browser window should constanly stay visible even when switching around Spaces.