Point Homebrew to a local package instead of the default, remote one I'm trying to pull down and install the Alpine mail client with Homebrew. I'm behind a rather terrible proxy with no such thing as FTP proxying. Unfortunately the formula for Alpine requires I retrieve a package from an FTP server.

I can grab the file by other means and get it on my local system, but I need to know how to tell Homebrew to use the specified package instead of trying to download it on its own.

Is this possible?

My usual workaround of running brew install inside of tsocks fails for some inadequately defined reason (just fails to connect exactly as if I hadn't tried it.. yet I can wget the file with tsocks just fine.

After some digging, I stumbled upon the fact that you can find the exact filename that Homebrew is looking for, download the file, and place it file into /Library/Caches/Homebrew, and try the install again. brew will then notice that the file has already been downloaded and continue following the recipe.


Do I need to enroll in "Apple Developer Program Enrollment" for creating a certificate? I have a website that I am trying to convert to a iOS app using Phonegap. But it requires that I provide ‘certificate (p12) file’ and a ‘provisioning profile’. I  am using a Windows machine and have been following this tutorial. So far I have managed to complete till the second step and created ios.csr file.

The nest step in the tutorial says

  Click on “Certificates” in the left hand side, and then “Request”. You will be prompted to upload a .csr file, and then wait for the certificate to be issued.

But I am unable to find any such button, do I require to enroll in for "Apple Developer Program" to get the certificate?

Is there any alternative way? As the website itself is a prototype and since we are currently in the research and development phase, I cannot invest any money in this program now.

There is a long rambling discussion here on this topic but the crux is: yes, to get a Development Certificate without a Mac you need a full developer account.

An alternative is to get your hands on a Mac, from where you can do everything for free up until the point where you need to distribute your app to the App Store.


Share app with 3D touch context menu defined When you 3D touch on a springboard icon you’ll either see a short list of developer defined controls, or you’ll see a generic “Share appname” control.

However, is it possible to share an installed app with 3D touch?
Or one would have to go find the app in appstore in order to share it?

For example, I want to share the music app, but when I 3D touch on it I only see some music I’ve played

The Music app is part of iOS and cannot be shared from the 3D Touch menu. Third-party apps show the share option in the 3D Touch menu, but first-party preinstalled apps do not.


Can I create symbolic links in OS X which also work in Windows/Linux and vice versa? I'm synchronizing a folder structure between my MacBook (OS X 10.6) and a PC with Windows XP (soon Linux or Windows 7).

My problem is that Windows shortcuts or OS X aliases seem to be unusable on the other system, so those symbolic links can not be synchronized with the other machine.

Is there a common format for symbolic links which works on all 3 operating systems (Windows, OS X, Linux)?
Can I convert the existing aliases and Windows shortcuts to this format?

sync application may be the good choice sometime, I recommend you
BitTorrent Sync, is An Application to keep designated folder content same on  more devices. Changes should be propagated to all the device that keep the folder synchronized.


Can't find iTunes U files to delete I have an 80 GB iPod Classic.  It has many iTunes U episodes on it that I want to delete.  But when it is plugged into my Mac I can't find these episodes listed anywhere.  I've looked in the iTunes U, Podcasts and general Music lists.  Anyone know how I can get the titles to show up so I can delete them?  (Using iTunes vers. 11.3, but this has been going on for almost a year)

Recent versions of iTunes seem to hang on to the list of podcasts etc, though they're not actually on the machine. Try setting up an iTunes Smart Playlist for 'Local Only' to see which are actually still on the machine.


MacOS automatic external drive encryption/decryption Question

MacOS does offer automatic disc encryption for at least 2 "types" of hard drives in the system:

Internal APFS Hard Drive with FileVault
External Time Machine Hard Drive (If set up in Time Machine Preferences)

Result of diskutil list for external Time Machine Drive via diskutil list:

        /dev/disk3 (external, virtual):
    #:                       TYPE NAME                    SIZE       IDENTIFIER
    0:                  Apple_HFS DISK                +499.4 GB   disk3
                                    Logical Volume on disk2s2
                                    [redacted]
                                    Unlocked Encrypted

As we can see, system manages to encrypt and decrypt Time Machine disk (in this case) automatically

Problems

Is there any way in MacOS for automatic external disc encryption and decryption? When disc is plugged, system does decrypt its content and allow normal operations, leaving disc encrypted when disconnected from the system
Would external ssd's with hardware encryption benefit from it using MacOS built-in FileVault features, or does it only apply for disk manufacturer proprietary software?

Yes, it is possible for macOS to automatically handle encryption of external drives in the sense that when you plug the disk in, you're asked for an unlock passphrase - and when you unmount the drive, it is encrypted and safe for transport.

An easy way to do this is to open Disk Utility and then plug in an empty external drive. Choose to Partition the drive (make sure the external drive is selected in the left side bar) - and choose to format the drive as "APFS (Encrypted)". You will automatically be asked for a passphrase, and the system will automatically ask you to unlock the drive when plugging it in.

NOTE: Partioning and formatting the drive will erase your existing files on the drive. Please take a backup before doing so!

Regarding your second question - no, FileVault does not as such benefit from hardware encryption feature on external SSDs. This is really a good thing, as recently it was unveiled that these hardware encryption features on many popular SSDs are really very insecure. For example by having built-in backdoor password that are extremely simple (such as a blank password).

On Windows the BitLocker feature in some cases rely on the external hardware's encryption features, and for those users that meant that their security had been compromised all along. Therefore, even though it sounds counter-intuitive, it was really an advantage that File Vault 2 does not rely on the encryption in the SSD controller of the external drive.


Unable to connect samsung galaxy S5 to mac I'm no longer able to connect a Samsung Galaxy S5 to mac High Sierra!
I used to use samsung Smart Switch app but after updating it I'm no longer able to access the phone. I tried different USB cables but same thing no connection!

Any ideas? Can I connect without the Smart Switch app?

I had to activate the developer mode in my phone by tapping the Build number about 7 times. The Build number is under Settings -> About Device after that a new option will show up in settings called Developer options.

Under this option I activated USB debugging and now I can connect to my phone using the Android Transfer File app.


Is it possible to use Apple Watch with AirPods to detect a "left hand double tap" vs a "right hand tap"? The help instructions for AirPods say I can double tap either my left or right ear to perform an action.

Apple Watch already has a setting for left hand usage vs right hand usage, and that is used by the accelerometer to figure out  when it should turn on the display.  To my mind, this feature could be extended to determine which hand is used to double tap a pair of AirPods...

Does the AirPod / Watch hardware support such a theoretical usage?

I wanted to accomplish this with the iTunes version of the Apple Watch, but it only works if playing music from your phone, otherwise the watch can't program these tap options by itself.


How can I decline a call in iPhone when the screen was locked? I have an iPhone 4S. I really don't know in which basis it shows Answer/Decline buttons when someone calling me. Sometimes it shows both buttons and sometimes it only show the option "Slide to answer".

The scenarios are,

The iPhone is locked/unlocked
The iPhone is in normal mode/silent mode

Note: I does not use Voice mail. I just need the "Decline" button in any mode/ any situation, because the mobile mode should not decide to hide the decline button. The owner of the mobile should decide it!

Push the power button on the top of the phone twice. The first time, the call is silenced. The 2nd time the call is rejected/directed to voice mail (if set up).


Installing gnu-tar without brew I am trying to install gnu-tar based on a tutorial guide I am following. However, I am facing some issues having the installing using the following command brew install gnu-tar --with-default-names)

The laptop I have to install it on belongs to the company and I am not given root access to perform sudo commands (however, I am granted administrative rights or it).

Is there an alternative way to install gnu-tar without brew or anything that requires sudo?

Get GNU Tar from Rudix.

You don't need to use Rudix's command-line tool. Just download a pkg from GNU Tar and open it. This will install GNU Tar in /usr/local.


How to record the screen of an OpenGL application without stuttering? I'm currently recording videos of my screen using QuckTime Player and a MacBook Pro 13" (mid-2010) in a resolution of 640x480. The application I'm recording is called Synthesia (it is a game like Guitar Hero for piano) and is based on OpenGL.

Somehow all videos I record do have a subtile stuttering which I think is annoying (see an example here: http://www.youtube.com/watch?v=GEBAKQ4-Zcg).

Is there a program that will do a better job at recording my screen than QuckTime Player, or is it just my MacBook Pro that is not powerful enough?

The reason for the “stuttering” could be a combination of different factors.

First is of course your computer’s power and video card. The more power you have, the more the number of FPSs your computer can “record”.

Despite that, QuickTime is not known for its “fast” recording, so I suggest you give a try to different alternatives. This comparison is a little bit “outdated” because some (if not most) of the applications mentioned have been updated and have fixed or changed some of the problems they had, however, it should be a starting point for your final QUickTime Replacement. This other link has a very similar list, but rather than a review is a list with a short description of the products.

For reference, the most important Screen Capture tools for OS X (or to put it in another way, the “most used ones”) are (in no particular order): iShowU, Snapz Pro X, ScreenFlow and one that is missing from those lists (because it’s a new player in the Mac world): Camtasia for Mac (which I’ve been betatesting and it’s quite good and in par with the ones I’ve mentioned). Some features missing from Camtasia 1.0 have been addressed in an update and I know they are working on a newer version after getting tons of feedback in the Beta forums (which I can’t disclose because I participated).

I’ve personally tried those four I’ve mentioned (i have a Snapz Pro license) and I think they more or less are the same, but some were (when I tried them) faster than others but lacked certain features. All in all, the “best” doesn’t exist, they all have strengths and weaknesses so your best bet is to give them a try and see if one does the job.

Last but not least, remember that quality also plays an important factor in CPU overhead when recording, try to keep your CPU load low and reduce the recording quality as much as you can afford.


Exclude word(s) from App Store searches How can I exclude words from searches in iOS App Store?

An example query could be like this:

monopoly -bingo

would avoid matches with bingo from turning up in results when searching for monopoly.

This doesn't work. Is there a way to make this work?

How about leveraging a better search engine to accomplish the same task?

Use Google Advanced Search

Hit Advanced Search button and you get this:

Or directly type this in Google search bar:

monopoly -bingo site:itunes.apple.com

I'm not sure if doing a Web search will take into account the keywords associated with the app as supplied by the developer (as you may be intending to include/exclude them).

Note: No affiliation whatsoever with Google. Find it to be a decent enough Web search engine and recommend it for use (best used in incognito mode, without logging in).


Powerpc apps on a MacBook Pro with OS X 10.9 I have several Power PC apps that will no longer work with OS X 10.9.

How can I remove them from my MAC?

Well obviously, yes you can. Why would you keep them ?


Music 1.0.5.10 on MacOS Catalina 10.15.7 not showing 'Up Next' list in Mini Player I click the 'up next' button, I get history.  I don't see 'up next'.  I see nothing in view, preferences or window menus.  Available docs refer to this as the 'up next' button and do not indicate how to switch from/to history.  Is there a mystery meat UI control I am missing?
In IOS I note that the UI provides a way to switch from history and up next: after scrolling to the bottom of the history list, the 'up next' list appears beneath it.

This is a transient issue.  After rebooting the mac, the mini-player displays  'Playing Next' in green text, to the right of 'History'.


Canon iP3000 Printer not working after using with OS X Lion I was able for some time to print from Lion using a 10.6 driver. Recently I got a 5 yellow light blink error sign which is the sign for a print head problem.

I installed a new print head without result (same error message).
I opened a brand new Canon iP3000 printer. It printed one copy and then it had the same error message (it now will not print on any printer).
My son brought over a working used iP3000. It printed one copy and it now has the same error message and will no longer work at all.

It appears that Apple does not provide a driver for this printer so it may be due to the fact of an outdated driver

  It now will not print on any printer

The fact that you say that however leads me to believe that you may have an issue with the USB port in your Mac, if you can try it in all the USB ports on your Mac and see if you still have the same issue. If you do then you may need to contact an Apple Genius to see if they are aware of this issue and a resolution to it


Disk image creation from folder: error 28 - no space left on device I wanted to create a full copy of my MacBook Air in a disk image for archive.
I can't save the disk from the booted system, so I restarted my Mac in Recovery mode (keys Command and R) on boot.
From the recovery menu, I can launch Disk Utility, I select the 'Macintosh HD' drive, give the image a name, select the options "not compressed" and "read only". I select the destination disk and let the process begins...
After a long time, just before ending the process, I have a message "error 28: No space left on Device".

My MBA has a 250 GB SSD disk, I have a 50 GB iCloud account, so in the case iCloud Drive is saved too (I don't think so...), there is just about maximum 300 GB to save.
I tried to save on a Drobo (which claims being 64 TB in size, and have more than 2TB free), and on an empty 1TB Drive, and had the same result.

Well...
It seems that APFS and/or iCloud Drive has killed the ability to create a disk image from an entire disk...
I tried lots of things, even Disk Utility's Restore in a freshly-created disk-image failed.

So I did it the hard way, with the terminal

Creation of a disk image (lot bigger than the drive) hdiutil create -size 500g -fs HFS+ -volname Clone\ Macintosh\ HD /Volumes/WD\ 1To/Clone\ MBA.dmg
Mounting the disk image
hdiutil attach /Volumes/WD\ 1To/Clone\ MBA.dmg
Note the /dev/disk_s_ path to unmount it
Save the disk with RSYNC (options and exclusions found on the internet)
sudo rsync -vaEx /Volumes/Macintosh\ HD/ /Volumes/Clone\ Macintosh\ HD --exclude=/Volumes/* --exclude=/Network/* --exclude=/automount/* --exclude=/dev/* --exclude=/private/tmp/* --exclude=/private/var/run/* --exclude=/private/var/spool/postfix/* --exclude=/private/var/vm/* --exclude=.Spotlight-*/ --exclude=.Trashes --exclude=*/.Trash --exclude=/afs/* --exclude=/cores/*
The result was bigger than the original drive (probably due to APFS which have some tricks to not duplicate data when copying a file, and certainly due to the saving of documents that are on iCloud Drive but not really on the disk: icons with a cloud badge)
Detach the image hdiutil detach /dev/disk3s2
Then I tried to shrink the disk image from the command-line, but neither hdiutil compact, not hdiutil resize worked (errors)
Then I tried to resize with Disk Utility, but it didn't work too (disk utility claimed it was done, but the size didn't change at all)
So I converted the image to read-only with Disk Utility (in fact, it duplicated the image), and now I have a shrinked disk-image of my entire startup disk!

Lot of wasted time, it used to be easyer


AppleID syncing issue I deleted files from my Mac, but at the same time same files from another Mac with the same AppleID got deleted too. Also I got the backup for the files. But I want to change this for future. How to do it?
Also if I change the AppleID of my Mac then will the files and all data get erased on the other Mac too (there the AppleID will remain as the old one) as a result?

iCloud is a sync solution, not a backup solution. Deleting from one device deletes from all, by design.
If you used two separate IDs, they would not sync at all. Each would be completely independent.
If you don't want syncing, you'd be best to disable it rather than attempt to use two separate IDs.
System Prefs > iCloud > iCloud Drive > Options…
Disable everything except essentials like Contacts etc.
As it's a structure I've never used, precisely because I don't want the same data on all machines, I don't know what warnings you will get if you disable. Make sure at least one machine keeps the original data & make sure Time Machine is up to date.


Black bar at the bottom of my screen on new MacBook 2016 I have a black bar at the bottom of my screen which changes as I use the Touch Bar, but cannot remove it. It is eating up my screen space and I cannot see the Dock.

Does anyone know how to remove it?

Finaly after seeing this questionI understand what it is you are seeing.
It appears to be the touchbar zoom functionality.
You can find this and deactivate it by rightclicking the system preferences item.
Then select accessibility>zoom and deselect touchbar zoom.

Be sure to use the rightclick method to go to accessibility, otherwise the touchbar zoom option wont show up.


text messages forwarded from my google voice number aren't recognized as being from my iPhone contacts I set up my google voice number to forward to my AT&T number, but when I get texts from some people who are in my contact list, the text appears to come from phone numbers I don't recognize.  The text message itself will be prefaced by the phone number the text is coming from, but even though that number is in my contact list, the message does not offer me the name of the person.  I have an iPhone 4 and I'm running iOS 6.1.  Any help is appreciated.

This is, unfortunately, a limitation of Google Voice. Google Voice cannot spoof your friends' numbers, so it has to send texts from its own numbers. However, each of your contacts will have a unique number from which Voice will send you texts, so you can send messages to those numbers and reply to them and it will reach your friends.

There are two ways around this. You can use the Google Voice app. Messages will come through your data plan and not your SMS plan, and they'll show up with the right names and everything. Alternatively, you can add the numbers Google uses as the "from" address as another number in your iPhone contacts. The number will still work to reach them, and the messages will appear to come from your Google Voice number.


I backed up my ipad and then did a restore but now some of my apps are coming up incompitable? I backed up my ipad 1 using itunes erased all content off the said ipad.
Then did a restore using the image that came off the ipadn1 and now there are 22 conflicts where these apps are now incompatible with the ipad.
I dont understand why as they were running on the ipad before the restore.
Please help!
Thanks in advance.

The best way to do this is to connect the iPad to iTunes and do a 'sync' of everything, including its applications. This saves the iPad's applications to your local computer.

After doing the sync, you should then do a backup. This will save its settings.

The reason why it is important to do the sync is because there is the possibility that some applications that you had on the iPad are not available on the App Store any more. Imagine, for example, that you had Flappy Bird installed on there :)

After doing the restore, you should then sync the iPad with iTunes again - this will put all the content that was on the iPad before you restored it, back on the iPad.

If you do not do this, the iPad will only be able to get any applications that are still available on the App Store now, and any apps that are no longer available, will not be on the iPad any more.

EDIT: Apps coming back as being "not compatible", may be apps that used to be compatible when they were created ages ago, but have not been compatible with the original iPad for a few years now, and there is no longer a compatible version on the Store.


Accidentally did rm -r ~/.Trash What should I do now? Will my computer be okay?

Yup, the system will recreate it automatically.

Actually about .Trash, it is located on every drive you will connect to your Mac and where you will delete some files. Deleted files on external drive won't show in your local .Trash.


Multi-selection of text in text areas (Chrome, Sparrow) will switch keyboard to "Insert mode" and overwrite too much text OSX 10.7.4, MacBook Air

I've noticed that when I select text and attempt to replace it with additional text, some text areas will maintain the selection and cause me to errantly delete data from my text area. I can easily reproduce it in Chrome 19 or Sparrow 1.5, but I cannot reproduce this behavior in TextEdit or Textmate, however.

To reproduce:

Type some text in a text area in Chrome or Sparrow: "This is a test"
Select "This is"
"This is" will be highlighted
Start typing. "This is" will immediately disappear, but the selection will remain and instead highlight " a test". I hit another keystroke, and it deletes the "a test", deselects, and goes back to normal.
Sometimes, however, it will remain selected for an indeterminate amount of time and I'll have inadvertently deleted most of a paragraph simply by typing a single word!

It seemingly does not work if I highlight a single word - it has to do with multi-word select and typing immediately after selecting.

This is kind of insane, bizarro behavior I've never seen from OS X. Any thoughts? It's driving me crazy. I've reproduced it with the built-in trackpad and the Magic Trackpad.

For reference, it's the same issue as reported here, yet unresolved (https://discussions.apple.com/thread/3756111?start=0&tstart=0)

I think this behaviour can be attributed to Mac OS X's momentum scrolling. While you select the text the text is still being selected (due to the initial momentum of the mouse you used to select it). I can't be sure but this same thing keeps happening to me


How to ask for a mail folder in applescript? I apologise in advance since this will be a long question. I hope that somebody with applescript knowledge can help me. I am transferring whole of my Windows machines to Apple and I am stuck with one last little annoying thing. Within Outlook I had a macro running that asked me where to file a mail after sending it. I am used to file projects in separate folders and have the incoming and outgoing mail there together. Most of the items I send BTW go into the trash folder. In other words, my sent items folders is always empty.

For reference purposes I attach the original macro below.

I tried this through rules but now understand that Mail does not support rules on sent items. Then I ended up with the automator and applescript. I have found some examples on the internet that move selected mails to a specific (preset) folder. That is however not what I need, I need the script to ask me every time what folder to use.

The next thing I cannot found is some kind of automatic trigger when I send a mail. It would for instance be possible through an option "when a mail gets stored in sent mail". Or something similar. The next best thing is just a key board shortcut that starts the macro although this is pretty close to doing it manually by just moving sent mail to a specific folder.

Anyway, I hope my question is clear and some intelligent applescript guru amongst you has a way to deal with this.

Thanks in advance!

Arnoud

COPY OF MY ORIGINAL VBA CODE USED ON THE WINDOWS OUTLOOK SETUP

Dim objFolder As MAPIFolder

 ' Variable declaration
 Dim objNS As NameSpace
 Dim colKeywords As New Collection
 Dim vntRecipients As Variant
 Dim bolExternalEmail As Boolean

 ' Set variables
 Set objNS = Application.GetNamespace("MAPI")

 ' Set up list of keywords that you use when attaching files
 colKeywords.Add "attachement"
 colKeywords.Add "Attachement"
 colKeywords.Add "attached"
 colKeywords.Add "Attached"

 ' Check for attechment keywords and check for number of attachments
 If checkForKeywords(colKeywords, Item.Body) And (Item.Attachments.Count = 0) Then

 ' If attachments should be in email ask for continue
 If MsgBox("Attachement missing. Send e-mail anyway?", vbYesNo) = vbNo Then
 Cancel = True
 Exit Sub
 End If

 End If

 ' Check for subject
 If Item.Subject = "" Then
 MsgBox "Please specify a subject"
 Cancel = True
 Exit Sub
 End If

 ' Only enable actions for emails
 If Item.Class = olMail Then

 ' Get folder to save email
 Set objFolder = objNS.PickFolder

 ' Check if folder has been specified
 If TypeName(objFolder) <> "Nothing" Then

 ' If folder has been specified move email
 Set Item.SaveSentMessageFolder = objFolder
 Else
 ' Otherwise do not send email and get back to email
 Cancel = True
 End If

 End If

send_message:
 ' Unset everything
 Set objFolder = Nothing
 Set objNS = Nothing

End Sub

While I don't know if AppleScript can do what you want, there is an Apple Mail plug-in called Mail Hub that will do what you want as well as add additional functionality. I'm a satisfied customer.


Select windows in tmux using the numeric keypad I'd like to use the numeric keypad to select windows in tmux. Anybody do this?

If your terminal emulator outputs certain codes for the keypad keys, then these commands (e.g. in your .tmux.conf) will bind Keypad 0–Keypad 9 to work exactly like prefix+0–prefix+9:

bind-key -n KP0 select-window -t :0
bind-key -n KP1 select-window -t :1
bind-key -n KP2 select-window -t :2
bind-key -n KP3 select-window -t :3
bind-key -n KP4 select-window -t :4
bind-key -n KP5 select-window -t :5
bind-key -n KP6 select-window -t :6
bind-key -n KP7 select-window -t :7
bind-key -n KP8 select-window -t :8
bind-key -n KP9 select-window -t :9

The -n means that you do not have to use the prefix key; the key names (KPx) do not seem to be in the documentation, but you can find them in the source in the file key-string.c. They values your terminal must send seem to be hard-coded: see tty-keys.c; TTYKEY_RAW means that terminfo is not used, and there are no other entries for the KEYC_KP* keys without TTYKEY_RAW (where terminfo might be consulted; the problem here is that terminfo support for the numeric keypad seems to be incomplete).

You can check whether your terminal emulator sends special codes for the keys by running this outside tmux:

tput smkx;cat -v;tput rmkx

(use Control+c to end the cat instance)

You should probably see something like this for KP0–KP9:

^[Op^[Oq^[Or^[Os^[Ot^[Ou^[Ov^[Ow^[Ox^[Oy

This works for me by default in iTerm2 (Build 1.0.0.20120724), but in Terminal (Version 2.3 (309); from OS X 10.8.2) I had to enable Allow VT100 application keypad mode for a profile (Terminal menu > Preferences…; Settings tab > select a profile > Advanced tab; check Allow VT100 application keypad mode under Emulation).


Can a non-retina MacBook's screen be replaced with a Retina screen? I'm using a MacBook Pro Late 2011. The processor, RAM, hard drive - just about everything else still work fine. I'd like to have retina display without necessarily buying a new unit.

Is there a way to change my screen to a retina display - i.e. physically removing the old screen and replacing it with a retina one?

Not easily. The Retina MacBook Pro introduced a new display assembly which makes retro-fitting very difficult.

  Rather than sandwich an LCD panel between a back case and a piece of glass in front, Apple used the aluminium case itself as the frame for the LCD panel and used the LCD as the front glass

Source: http://www.ifixit.com/Teardown/MacBook+Pro+Retina+Display+Teardown/9493

The cost of doing so would probably be more than the rMBP itself.


Reinstalling MacOS X Snow Leopard on a Mac over a crashed linux Ubuntu I have been a given an iMac 24" with a crashed Ubuntu installed on it. I have an install CD of Snow Leopard (not a machine dedicated one). I use a PC keyboard.

How can I install SL onto that machine to replace from scratch the installed OS ?

When I use the combination option-boot, or C-boot, or Option-R-boot, nothing happens... then Ubuntu launches and crashes. I never see the Apple logo.

When I insert the CD into the Mac at boot or before the boot, it keeps it a little time at boot, then ejects it.

EDIT 1
I have rebooted holding command-option-P-R. No display, the Mac makes THE sound, and auto-reboot.

Then I hold the option key: nothing happens, no image onscreen (power button of the screen is blinking), even if I wait 5 minutes. If I release the option key (alt on my PC keyboard, the Windows key should be the Command one), nothing more. If I then press the power button on the Mac, it shuts down instantly.

If I then reboot in a normal way, Ubuntu launches and crashes as usual.

TIP : I use a Dell 27" screen.

EDIT 2
I've burned a linux boot CD onto my W7 x64 PC (Ultimate Boot CD), inserted it into the booted Mac under crashed Ubuntu (no ejection of the CD, the drive tried to read things onto the CD), Hard reset, then kept the C key during boot. The CD drive did not tried to read the CD (no sound), and Ubuntu started/crashed as usual.

You may need to separate the boot process from the CD reading.

First, power off and reset the NVRAM by holding option + command + P + R

Then, I would boot with the option key held until you have a grey screen. Once the Mac is at the boot chooser (no apple logo yet), you can then insert the CD.

This is firmware running the Mac, so you don't even need an internal HD to mount the CD. If it ejects, you need a repair of the drive or a replacement CD.

If the Mac can't boot to the boot chooser, then you have a hardware issue on the Mac.

Looking over the further details, if your Mac can't boot to the grey screen then there is a hardware issue. It might be as simple as disconnecting a failing HDD or just reseating the HD cable. It also might just need you disconnecting every single peripheral and bringing a new keyboard to the hardware.

I'd seek assistance from AppleCare or a hardware tech if you can't get the boot picker to show up. You could also see if your Mac supports internet recovery, but some 24 inch iMacs were made before that was added to the firmware.


Find device information when Activation Lock is activated Is there a way to find the time and date of when Activation Lock was activated on an iPad? Also, can I find the IMEI and serial of the iPad? My iPad has few iCloud IDs and I know just 1 ID. What can I do to get useful information about which iCloud ID caused the iPad activation lock and when?

The activation lock screen will display the first few characters and domain name of the Apple ID used to lock the device. This should be sufficient information for you to tell which Apple ID is being requested.


Can entry duplicates (or multiples) in etc/hosts do any damage? Can entry duplicates in etc/hosts do any damage?

For example:

##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting.  Do not change this entry.

127.0.0.1       localhost
127.0.0.1       localhost
127.0.0.1       localhost

# and stuff like that throughout the file

No, having duplicates is not a problem. Since the file is read in order, the first matching result is read, and the rest of the file is ignored. Having exact duplicates has no effect.


No image on TV when connected using HDMI cable to MacBook pro when booted in bootcamp I have a MacBook Pro with an NVidia GT 330M graphics board and mini display port output.

I purchased an HDMI converter for the computer, and connected it to my TV (Panasonic GT30). When booted in OSX, the TV displays the image correctly.

However when booting in bootcamp, there is no image on the TV, it's just black. The display drivers can see that a Panasonic TV is connected, and I can select from the possible display resolutions, but the monitor just remains black.

I downloaded and installed the NVidia reference drivers (don't know if it was a bad idea, but one of the points was to be able to display stereoscopic 3D).

Why is the monitor black?

Edit: I tried connecting to an older Sony TV. Same result, the NVidia drivers can detect that a Sony TV is connected, but the TV is black. I also tried selecting different resolutions and refresh rates, no luck there either.

The bootcamp install is running Windows 7 64bit

I got it to work, I'm not sure exactly what I did in what order, but based on my Firefox download history, I think this is what I did.

First I downloaded and intalled version 285.62 (285.62-notebook-win7-winvista-64bit-international-whql.exe). This version gave me the symptoms described in the question.

I then uninstalled all NVidia drivers, which I assumed rolled the driver back to the Bootcamp driver version.

I then downloaded and installed driver verion 260.99 (260.99_notebook_winvista_win7_64bit_international_whql.exe). Now the HDMI output works in my Bootcamp installation.


How to resolve issue of help shortcut key (Cmd + Shift + /) not working? I really like the shortcut key to bring up the help menu (Cmd + Shift + /). I use it navigate the menus by typing in short words.

However, I've just noticed that it's not currently working. Instead, I get an error noise whenever I press cmd+shift+/.

My first thoughts was that either another program is intercepting the shortcut in a global way. But I don't what that program might be.

How can diagnose the cause of this shortcut key failure (Cmd+Shift+/)?
How can I resolve the problem?

UPDATE:

I tried changing the shortcut key in "keyboard shortcuts" to something else (e.g., Cmd + Alt + Shift + /). This alternate keyboard shortcut also triggers the error noise. So this suggests that the problem is not a conflict with another program.

@sameetandpotatoes made some great suggestions.

I tried a different shortcut key for triggering the help menu and still had the problem.
Restarting OSX resolved the problem.


Complete list of App Store review rejection reasons I am iOS Developer. I have seen and had very bad experiences with App Store approval process.

We have developed an app according to Apple standards which are defined on Apple's official site. Despite this, our app was rejected 2-3 times for different reasons.

Why does Apple not give all reasons for an app rejection?
Where can I find more information about the app review process?

You really don't give us much to go on, like what the reasons where and such. BUT, when it comes to Apple, a lot has to come down to the App Reviewer and if they had a good day or not. I have had one rejected, and submitted it again, changing a font and color, and it was then successfully accepted into the App Store.
At the end of the day though, they are professionals, and if there is a reason they have given, fix it and move on. It could be something as simple as UI Design ?
You say they have given you 3 different reasons, but then say why are they not giving you all the reason ??
Apple ~ App Review Guidlines


Where do offline synced google docs get stored on Mac OS X? If I turn on google docs/sheets/drive offline sync through chrome on os x and activate "Make Available Offline" for some doc, where is the doc stored locally on my machine?

I am not talking about google back up and sync - I am talking specifically about activating offline docs sync through a browser (in this case chrome).

This answer gives the answer for PC, Android, and Linux but not mac. I looked in all the typical Application Support folders as well as in Chrome Developer Tools --> Sources --> Filesystem and also Developer Tools --> Application --> IndexedDB but I cannot figure it out. IndexedDB --> GoogleDriveDs --> Offline shows an entry for offline synced files (and not others) but it doesn't help me find it locally on my disk.

Thanks!

It is stored in:

~/Library/Application Support/Google/Chrome/Default/IndexedDB

where "Default" might need to be substituted by your profile name.


Changed home directory of OSX Server user account, user disappeared, access remains I'm dealing with my company's Mac Mini (with loads of data I cannot risk on an external drive, but cannot plug out because of below) running Mac OS X Server 10.6.4.

My problem was that I needed to share a local folder with a client (giving him write permission). And my idea was that I could create a local account with very strict permissions.

Having found the option to change the home directory (system preferences > accounts > right-click > advanced) my thinking was that this would make the account unable to access anything but this directory (which may very well be wrong I now see).

Thus I changed the home directory to the directory I actually wanted to share (which is on this crucial external drive), which worked almost accordingly when logging in to the mac mini remotely (another shared folder was available as well).

But since the change claimed to require a reboot I rebooted the mini. Now I realized the account I had just created was no longer available under System Preferences > Accounts. It's still possible to access the mini using the accounts details remotely, but not when trying to log in on the actual mini itself.

What I find puzzling is that the account neither exists under:

$ /Users/

nor:

$ /path_to_external_drive/dir_i_chose_as_home/

However, when entering the Server Admin and assigning File Sharing permissions, I can see the new account in the users list when clicking add (the + sign) to assign permissions.

Now I could just leave this account there but this feels highly irresponsible.

I do understand it was very ignorant of me, changing the home directory without understanding it's implications. You are welcome to comment on whether or not this whole idea actually was unfeasible and unsafe but I would highly, highly appreciate if you could help me safely get rid of this newly created account (which essentially is my question).

How do I remove an account I can no longer see via System Preferences > Accounts (because I have changed its home directory)?

Thank you in advance

Open up terminal and try:

$ dscl . -list /groups GroupMembership

You should get a list of users along with which group they belong to. You should look for user/admin accounts including the one you recently made; This command will show you all users with the recently created one most likely near the bottom:

$ dscl . list /users

To get information about a user:

$ dscl . read /users/foo

Which will verbosely spit out all of the basic information, yielding this information near the bottom:

NFSHomeDirectory: /Users/foo

if you want to delete a user:

$ sudo dscl . delete /users/foo

asta la bye-bye! from there you can decide  whether or not to delete ex-users directory.


Macbook Pro 13" Audio In/Out Port Adaptor I have the most recent Macbook Pro 13" and on the apple website it says that the audio port is in and out. I just ordered a headset that has two separate 3.5mm plugs and was wondering if there is any sort of adapter that would let me use both the headphone and the mic, or if it has to be one or the other, since there is only one port.

Any headphone / microphone combination that works with an iPhone will work with the MacBook line as the pin connectors are the same.

As a bonus, the play and volume switches get passed to the OS as well.

There are tons of adapters around if you preferred headset doesn't have the correct mic pins to combine the signals in one plug.

Also - look here for the ground that's already been covered.


Removing a debit card from apple wallet I have a debit card in apple wallet that I no longer use. The card has actually been deactivated by my bank because I requested a new card.

When I attempt to add the new card I get an error, ‘invalid card’. I’m certain I typed in everything correctly.

I try to remove the old card first but I do not see it anywhere in wallet until I attempt to add a new card.

How do I delete the old card from apple wallet if I do not see it in the wallet?

Follow these steps to remove a card from the Wallet (based on iOS 12):

Go to Settings -> Wallet & Apple Pay.
Under Payment Cards, tap on the card you want to remove.
Tap on Info button (at the top).
Scroll to the bottom and tap Remove Card.

That will remove the card from your payment options and Wallet.  More info can be found on this Apple Support page.


Pre-approve upgraded software/applications for users under parental control I am responsible for keeping the software on our Mac at home up to date, and some software is updated rather frequently. This includes Firefox.

FF is one of the applications our kids are allowed to use, but after each upgrade they are unable to use it before I approve/allow it again. I usually do the upgrades at night, and when I leave for work early in the morning this means the kids can't use FF before I get home to approve it the next evening.

Is there any way I can approve applications without logging in to each parental controlled account, starting the application and approve it with my own username/password?

I.e. I want to do it in one step (from my admin account) instead of in several (by logging into each restricted account). I also don't have the passwords for my kids accounts (I can get it if I want to by asking them), since I'm trying to teach them to keep their passwords safe and secret.

There is no need to log in to individual accounts, at least with more modern versions of OS X. You can set access privileges for managed accounts from within the Users & Groups pane of System Preferences without leaving your own account.

By selecting the Other tab in the Parental Controls dialog you can even enable Remotely managing parental controls.

Upon further clarification by Cra, it seems that Apple's file quarantine system is causing the difficulty. Starting with Mac OS X 10.5, files downloaded from the internet are quarantined and checked for safety.

Applications that are downloaded must be approved the first time that they are run, and only the owner of the account used to initially download the software can grant that approval.

  If you have multiple user accounts on your Mac, the user account that downloaded the file is the only user account that can remove the quarantine attribute to the file.  All other user accounts can open the quarantine file, but they will be presented with the quarantine dialog box asking "Are you sure you want to open it?" every time they open the file.

ᔥ Apple Knowledgebase:About file quarantine in Mac OS X v10.5 and v10.6

Make sure that you download software updates using your administrator account and that you open and approve the software from your account before making any adjustments (which may not be necessary at this point) to the Parental Control settings. It may be necessary to disable automatic updates in Firefox.

The quarantine system works by attaching an extended attribute to a downloaded file. If absolutely necessary, you can remove this attribute using the terminal

  Enter the following command, replacing  appropriately:

xattr -d com.apple.quarantine /applicationPath/<applicationName>.app

See also: Stack Overflow: How do I remove the “extended attributes” on a file in mac


Remote into Mac Mini after a reboot How can a Mac running El Capitan always be ready for a VNC connection even after a reboot?

I can vnc into the Mac with no problem but when I reboot the Mac remotely I can't vnc back in. Someone has to hook up a keyboard to the Mac and physically log in and log back out. Once the machine has been logged in locally I can once again log in remotely via Mac.

I'm using the Mac's built-in VNC as well as an installed RealVNC server. Neither will respond after a reboot.

I edited the RealVNC launch daemon to run at load but that didn't work.

UPDATE

The mac has filevault turned on.  'sudo fdesetup authrestart' will work with a manual reboot. It will not work however with a forced system reboot or a power outage.  Someone would still need to manually login with a keyboard in those cases.

The options at this point seem to be to disable Filevault or accept the fact that a person will need to login occasionally.

Apple supports this out of the box. Under the Sharing preference pane you need to enable either the Screen Sharing or the Remote Management and then use the Computer Settings dialog to enable VNC.

The service starts up automatically when incoming network traffic on the VNC ports is detected by the OS. Now, you do need to get past any FileVault pre-login screen where the full actual OS isn't running yet. To restart and skip FileVault one time, use:

fdesetup authrestart

You might need to watch for DHCP traffic and see if the Mac is rejoining the network and asking for an address from the router if you can't find the machine on reboot. For troubleshooting, you could assign a static IP address so that you're sure it's not a DHCP issue.

The problem also could be your choice of VNC client and it's not expecting to connect to OS X Lion or newer. Some older clients break when Apple allows a choice to connect to the logged in user or a new login window. The client needs to reconnect once the session drops to log you in.

Are the changes to Lion's screen sharing documented anywhere publicly?
RealVNC on Lion

One client I like on iOS and Mac OS X is http://edovia.com/screens/ Of course Apple's free Screen Sharing app (look for it in /System/Library/CoreServices/Applications ) and Apple Remote Desktop work well, too.


Download iPhoto on Mac OS X 10.6.8 I dont seem to have iPhoto on my Mac and can't find a link to download it, only to update it.

Here is the download link of iPhoto 9.4.3

https://support.apple.com/kb/DL1650?viewlocale=en_US&locale=en_US

Other versions here:

https://support.apple.com/downloads/iphoto


How to specify command to always run as root? In Mountain Lion, I frequently used a simple automator app called "Purge Memory" which just ran "purge" in the command line. I really enjoyed cleaning the RAM, especially when buggy apps ran memory leaks.

But now in Mavericks purge requires root privileges, breaking my app. I know I can open terminal and input it, but that is not nearly as convenient.

I have heard that on Unix you can allow a specific command to always run as root. That way I could automate purge. I would like to know if anyone knows how to do this or if this would even solve the problem?

You could use a Run AppleScript action that runs do shell script "purge" with administrator privileges. It requires entering a password though.

If you don't want to enter a password, add %localaccounts ALL=NOPASSWD: /usr/sbin/purge to sudoers. (Run sudo visudo, press i, type or paste the text, press escape, and type :wq.) Then use a Run Shell Script action that runs sudo purge.


Alternative methods for viewing flash content on the iPad? Is there currently a way to view flash content on an iPad besides VNCing to a desktop computer?

Currently you can connect a VNC client to a desktop computer to view flash content, but I am looking for alternative methods above and beyond that.

Is there any other ways to use Flash (and/or play Facebook games) on the iPad besides the VNC based method?

Unfortunately Apple generally doesnt allow stuff like running some generic program on a virtual machine in their OS, but there are apps which do conversion and make it ready for an iOS device such as iSWiFTER, which even claims it can convert games.

I have never tried these out, but iSWiFTER is a 30 second free trial, so see if it works for you.


identifying devices using find my phone app I will try to be specific.
- I did receive this e mail:

Dear XXXXX,
    Your Apple ID (XXXXXXX) was used to sign in to the Find My iPhone app on a new device.
    Date and Time: October 6, 2014, 3:39 AM PDT
Device: iPhone 5s
    If you recently signed in to the Find My iPhone app, you can disregard this email.
    If you have not signed in to Find My iPhone recently or you believe someone may have accessed your account, go to My Apple ID (https://appleid.apple.com) and change your password as soon as possible.
    Apple Support

I am not the possessor of the quoted device, though the apple id + password are the right one
this means someone else entered my find my phone app using my credentials to track me (probably boy friend!!)

(i did already change my password, of course and already asked the apple care and they told me there's no way to track the device..)

can I somehow track (identify) the possessor of the device used to enter my apple id app?

In general, no. Apple won’t tell a consumer about another consumer’s details.

If you followed the advice of the email and changed your password after the time of the alert, then you have done what you need to secure your privacy.

In the past, Apple didn't send those emails and there was no easy way to know if someone had gotten a hold of your AppleID and your password for the ID.

It could be someone who is trying common passwords and stumbled across your account by chance to use it for fake reviews on the app store or it could be someone who you know and they guessed or were provided the password when you trusted them.

There's no way you can track things unless you were to get a law enforcement order sent to Apple's legal department and even then, you might not be able to get a satisfactory answer as to who accessed your account. That or a lawyer contacting Apple is the best way to get information about who may have your property to your credentials.


Applescript : Getting List of Id's of Visible windows ( windows shown on the desktop ) I am trying to get the list of visible windows, i.e the windows which are shown on the desktop and not minimized.

So, far I have this script which gives me the correst list of processes which are running and have a windows associated with it. But I am not able to get the id's of visible windows associated with these processes.

Here's the script :

set visibleWindows to ""
set message to ""

tell application "System Events"
    set listOfProcesses to (name of every process where background only is false)
    repeat with visibleProcess in listOfProcesses
        try
            tell process visibleProcess to set visibleWindows to visibleWindows & (id of windows whose visible is true)
        on error someError
            set message to "Some error occured :" & someError
        end try
    end repeat
end tell

return {visibleWindows, listOfProcesses, message}

You can try this in script editor but its always giving a empty list.

Any help/suggestions would be much appreciated.

I modified your code, making the necessary changes for it to at least run (work) through the code to gather the information, while adding some additional code to handle the reporting of more then one message by having a separator between them. However, you can change it to something other then what I made it.

That said though, the output for the visibleWindows is just a string of numbers representing the concatenated id's, as that's how it's written to output. I'm not sure if that's the output you expected, however if the code as you wrote it had ran through, the outcome would have been the same for what's returned for visibleWindows.

on run
    set visibleWindows to ""
    set message to ""

    tell application "System Events"
        set listOfProcesses to (name of every process where background only is false)
    end tell

    repeat with visibleProcess in listOfProcesses
        try
            tell application visibleProcess to set visibleWindows to visibleWindows & (id of windows whose visible is true)
        on error someError
            set message to message & "Some error occurred: " & someError & "; "
        end try
    end repeat

    return {visibleWindows, listOfProcesses, message}
end run

In the code above, if you change set visibleWindows to "" to set visibleWindows to {}, then visibleWindows returns as a list of the id's not just a string of numbers.

If you also change:

tell application visibleProcess to set visibleWindows to visibleWindows & (id of windows whose visible is true)

To:

tell application visibleProcess to set visibleWindows to visibleWindows & visibleProcess & (id of windows whose visible is true)

You get the application's name followed by a list of its window's id, so at least the data returned make more sense, then just a string of numbers or a list of id's not knowing which belongs to what.

The bottom line is, get the listOfProcesses separately and then let the application not the process get the id and do so outside of the "System Events" tell block. Every combination I tried while leaving the remaining code within the "System Events" tell block failed. So I moved the rest of it outside of it and changed tell process to tell application and it worked. Then I tweaked the code it a bit.


How to add tags to mail messages in Maverick? With the new mac os maverick I'm able to add custom tag to almost every files. I'm sadly unable to create those tags inside Mail. Did I missed a checkbox or a feature. I'm talking here about color flags.

You can do a Spotlight Finder search, and specify that you want to look for mail messages, and then include words from the subject of your email to locate the message you're looking for (e.g. "kind:mail news"). Spotlight will find the underlying file in which the message is stored, and then you can tag it - for example with the word "stuff". Although this might be a bit clunky, you will then be able to use "tag:stuff" in the search box within the Mail app itself, and the Mail will find it.

Even better is if you use Alfred (the app launcher). Someone recently created a workflow for it which enables you to tag messages from WITHIN Mail (i.e. bypassing the Spotlight step) using a hotkey: http://www.alfredforum.com/topic/3383-mavericks-tags-file-and-email-tagging-with-alfred-2-updated-to-v14/

Hope that helps,
Geoff


How do I know what to put in DefaultKeyBinding.dict? I am trying to create a few system level key bindings. I know about ~/Library/KeyBindings/DefaultKeyBinding.dict but I am not sure what to put in there/or how to go about finding the commands and codes.

I would like keybindings to

Opt <-   //Move cursor back a word
Opt ->   //Move cursor forward a word
Opt Cmd <- //Home
Opt Cmd -> //End
(the same commands, but adding Shift to select instead of just move

Is there a good resource to help me figure this out?

There is a wonderful resource on DefaultKeyBinding.dict including an example file as well as all the shortcut strings and methods you need, available at:

https://github.com/ttscoff/KeyBindings

There are also numerous other resources listed at the bottom of the page, including the official Apple Developer documentation:

https://developer.apple.com/library/mac/documentation/cocoa/conceptual/eventoverview/TextDefaultsBindings/TextDefaultsBindings.html


What is the "host name" in bash? (\h or \H) I set PS1="[\u@\H \w] in bash. So it should print the host name. But I do not understand the meaning and nature of the host name.

Basically, I would assume that it is just a name I assigned to my computer. But depending on different WLANs I use (public/university/home), this seems to be a different name for my own Mac Book Pro.

How is this name set? Could I define a fixed host name for my Mac or is this not possible?

First, you need to set your system name in System Preferences > Sharing > Computer Name. Let's assume for now that you set it to MyComputerName.

The next step is to make sure your computer name is not overridden by DHCP client (which is normally what happens and what you have observed - each time a DHCP server assigns and IP address to your computer, your mac will use the hostname associated with that IP address as its own).

To do that, you need to, in Terminal.app change the content of the /etc/hostconfig file, adding something similar to this:

HOSTNAME="MyComputerName"

where MyComputerName is a text string corresponds to the host name you set in System Preferences.

If you ever need to set it to change the hostname automatically based on the address received from the DHCP server, you can either remove this line from the /etc/hostconfig file or change it's value to -AUTOMATIC- instead of the "MyComputerName".

Finally, in bash you use \h as the host name token - so e.g. you can set your PS1 to:

PS1='[\u@\h \w] '


iPad iOS 6.1.3 suddenly very weak wifi signal After upgrading to iOS 6.1.3 a while ago, my iPad's wifi signal (reception) suddenly became very weak. The iPad basically can't find the (source) wifi if it's like 5-7 meters away. I'm sure the (source) wifi has no problems because everyone else's iPads are working fine with that public wifi.

I've tested that the iPad is still functioning by creating a wifi hotspot with a MacBook.

What else can I do to diagnose the problem?

I would ask if you can definitely link the introduction of the poor signal to the time immediately after installing the upgrade.  They may be linked, they may not.  If you think there is a link, then I would advise backing up the iPad, and reapplying the OS update via a full restore, thus essentially imaging the entire OS from scratch rather than relying on the OTA upgrade from 6.1.2.

After a re-image, then to rule out any configuration issues, try to connect to the WiFi source without restoring your data.  If it works, then perform a restore and check again.  If it's still not working, then my hunch is that maybe you have accidentally caused the wifi antenna connection to disconnect internally - serious question, can you identify any faint rattle type noise if you shake it, particularly in the bottom right where the cable connects.


How to drag files into an app's Dock icon in macOS Sierra? Up until the macOS Sierra update, I was able to do the following, which I used quite a lot:

Start writing an email in Outlook for Mac or in Mail.app.
Select a file in Finder that I want to attach to the email.
Drag the file to Mail.app (or Outlook) Dock icon.
Hover over the Dock icon until the icon flashes a couple of times and then shows the open application windows. You can press the Space bar to speed up the process of showing the application windows.
Drop the file into the email window that I opened in the first step.

This has worked fine for years, up until the macOS Sierra update. With Sierra, the app icon in the Dock flashes once or twice and then nothing happens at all.

The settings described in this question also no longer seem to be in Sierra - I can't find them in the Finder Preferences. It looks like this has been moved to Preferences > Accessibility > Mouse & Trackpad, although it does not help.

Dragging files into other application windows (this does not only affect Finder and email) has become a lot more difficult due to this.

Is this a known bug, or is there a workaround that allows to use the above process again for this use case?

I have just upgraded to Sierra and I am experiencing exactly the same problem, and not only with Outlook.
I hope this bug will be fixed in the next release of Sierra.

In the meantime, immediately after beggining dragging I press F9 to show Mission Control and select the target window.
Most times, this works.


How do I grant root access to user files in Mojave? I upgraded my laptop to Mojave. For years, my backup strategy has included using rsync (MacPorts rsync 3.1.3) to copy files to a file server. This stopped working properly, now showing some errors indicating permission problems with opendir and get_xattr_data, specifically with certain ~/Library folders.

I use launchd to run rsync inside a script located in /usr/local/bin.

As part of my troubleshooting, I went into Terminal and su'd to root. Then cd'd to my user's ~/Library and tested access in some of the folders. The system reported permission denied.

Through Security & Privacy, I gave rsync Full Disk Access, but that didn't resolve the issue.

I'm assuming this is an issue resulting from Mojave's security or privacy settings as I've never seen root not have permission to files. In order to resume my backup processes, I need root/launchctl to be able to access files.

What has changed in Mojave that is limiting root's access?
How do I mitigate this limitation as it relates to rsync?

The possible duplicate seems to confirm the need to adjust settings in Security & Privacy, but so far adding Terminal and rsync to the list of allowed apps does not allow the backup to succeed. I'm working to add the script I use to run the backup, and will adjust my question when I get that tested.

As documented in this post among some other places, MacOS Mojave implements additional security protocols that even affect root's access to user data.

The solution in the linked question provides the basic method I used to resolve my issue.

For custom-built scripts that will run through launchd, the administrator of the computer on which the script is to be run must add that script to Security & Privacy to give that "app" permission to access user data.

It was not necessary to add launchd or rsync (in my case) to Security & Privacy.

I have not researched if there is a way to do this via Terminal, which it seems would be necessary for those administering a large number of clients.

========

Update: I've also learned that if you add a script, and you later make changes to that script, you need to delete it from the Security & Privacy-->Full Disk Access, then add it again. Perhaps macOS creates a hash that is checked?

========

Update w/ Catalina: I do not recall if I had System Integrity Protection disabled on Mojave, but it appears to be required to be disabled in Catalina. I know SIP doesn't have to be disabled for OS versions prior to these.

Disabling macOS SIP allowed the script in question to start running again. This is not ideal, so I'll be researching other approaches.


macOS Big Sur - set env vars for GUI apps? I followed many methods on Ask Different as to how to change the $PATH environmental variable for GUI apps. Some of the methods may work for pre-Catalina macOS, some may work for Catalina, but none of them work for me on macOS Big Sur.
So here's the story - I installed go to /usr/local/bin/go with Homebrew, and VS Code cannot find it -

Methods I've tried to solve this issue:

sudo launchctl config user path "/usr/local/bin:$PATH", and reboot.
Edit /etc/paths so that it includes /usr/local/bin, and reboot.
Other launchctl tricks.

So what's the recommended way to set env vars for GUI apps on macOS Big Sur? Any help is appreciated.

The following worked for me to get an environment variable to be accessible from a GUI app (SwiftBar).
I created a plist file (eg; com.example.set-env-vars.plist) in ~/Library/LaunchAgents/ with the following contents:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>setenv.MY_VARS</string>
  <key>ProgramArguments</key>
  <array>
    <string>sh</string>
    <string>-c</string>
    <string>launchctl setenv MY_VAR my_value</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>KeepAlive</key>
  <true/>
</dict>
</plist>

Then I rebooted for it to take effect. I suspect logging out and logging back in may be adequate, since stuff in ~/Library/LaunchAgents/ should be applied at login.
If anyone can improve this answer, I'd love to know why this works but running launchctl setenv MY_VAR my_value from a terminal does not.
Swap out MY_VAR and my_value as needed. Note, I'm not sure whether this would allow you to do something like launchctl setenv PATH "/usr/local/bin:$PATH", as I'm not sure whether $PATH would exist or expand properly.


Can I make unlocking the screensaver also unlock the login keychain? I have the screen saver on my Mac password protected, but unlocking the screen saver does not unlock the login keychain.  I know this because I get asked to unlock the login keychain shortly after unlocking the screensaver.

Yes, my login password and keychain password have been synchronized.

Yes, I've run Keychain First Aid and confirmed there are no problems.

The workaround is to change the Keychain Settings so the login keychain never automatically locks, but I'd prefer to have it lock automatically, especially on my laptop when it goes to sleep, but now with Mountain Lion and iCloud that means typing my password twice every time I wake my laptop: once for the screensaver and once for the keychain.

There should be a way to make the screensaver also unlock the keychain just the way the normal login also unlocks the keychain. Is there?

This usually happens when you change your login password without changing your keychain password.

Open Keychain Access
Click Edit -> Change Password for Keychain 'Login'
Match the password to the one you log into the computer with.

If you firmly believe "this is not the problem", please try to delete your keychain and recreate it in order to get the link between the login and keychain to properly function. (thanks @dragon788)


Retain print spool until printer available? I'd like to be able to add, by script and by hand, files on dropbox to the print queue and for these to be retained there until I'm at a specific printer with my Macbook Pro.

As it is now, I add docs to be printed when the printer isn't available and after a while these are removed before the printer becomes available.

Is there a setting in OS X I can use to retain the files of the print spool until the printer in question is available?

Alternatively, is there a simple print spool application that can handle this task? I've looked in the App Store and on macupdate.com and googled and found very little.

Any suggestions how to solve this issue in OS X 10.9 Mavericks?

As all macs using cups for printing, you can manage it with a web interface. To enable it, you have to type:

cupsctl WebInterface=yes

Then you should be able to check print server configuration, printers and queues from:

http://127.0.0.1:631/

If you enter in this website, under Administration → Server, click on Advance and yo must see something like the following image:

As you can see, you will be able to modify the Retain Documents parameter, that is the amount of time a Document stay on the printer queue.


Efficient MKV H.264 player with GPU decoding for Mac OS X How can I play MKV files from QuickTime in Mavericks?

I used to use Perian but it hangs and the other third party players are very inefficient as  QuickTime is the most optimized software among the ones I analyzed.

I regularly watch MKV files with H.264 1080p video on my retina MBP 15" (late 2013, Intel GPU only), and up until now, I did so using the latest version of VLC. Unfortunately the battery drains pretty quickly with this setup and I decided to investigate alternatives. In trying to be a little scientific, I created a spreadsheet listing the CPU time used (checked in Activity Monitor) for each alternative that I tested. For all testing, I played the first 1 minute of a video clip of my choosing, with H.264 1080p video and DTS audio, as well as remuxing it to M4V format using MP4Tools, and in the process transcoding the audio to AAC 2-channel (the video was untouched). I measured the CPU time used after playing this first minute of the clip in Activity Monitor. Tests were performed with the computer plugged in to AC, and the resolution set to 1920 x 1200 (recall this is a retina MBP 15"). The video was playing in the foreground, in windowed mode, maximized to use all the horizontal resolution available.

The baseline is QuickTime Player, playing the M4V version of the file, with hardware accelerated decoding supposedly enabled. This used up 4.51 CPU seconds.

Using VLC version 2.12, I got the following results:

MKV file, software decoding: 28.89 CPU seconds;
MKV file, hardware accelerated decoding: 22.82 CPU seconds;
M4V file, software decoding: 29.76 CPU seconds;
M4V file, hardware accelerated decoding: 22.44 CPU seconds.

In MPlayerX version 1.0.21 (1718), I got the following results (no mention is made to hardware acceleration since I couldn't find a way to enable or disable it, and have no idea what is the default behavior):

MKV file: 15.92 CPU seconds;
M4V file: 15.74 CPU seconds.

Finally I tried Movist version 1.3.3, which supports using QuickTime or FFmpeg as the decoder, and also has a checkbox for hardware acceleration. However, I was unable to decode the MKV version of the file using the QuickTime decoder. The results are:

MKV file, software decoding, FFmpeg decoder: 31.96 CPU seconds;
MKV file, hardware accelerated decoding, FFmpeg decoder: 8.31 CPU seconds;
M4V file, software decoding, FFmpeg decoder: 30.73 CPU seconds;
M4V file, hardware accelerated decoding, FFmpeg decoder: 9.04 CPU seconds;
M4V file, software decoding, QuickTime decoder: 37.03 CPU seconds;
M4V file, hardware accelerated decoding, QuickTime decoder: 8.12 CPU seconds.

As can be seen, Movist using the FFmpeg decoder and hardware accelerated decoding is the most efficient alternative compared to VLC or MPlayerX, but still noticeably less efficient than QuickTime at decoding M4V files. The ideal solution would be playing MKV under QuickTime Player, but it appears Perian no longer works in Mavericks.


How do I run apple script on a particular instance of Firefox? I have three instances of Firefox called -

Firefox
Firefox 2
Firefox 3

They all live in the Applications folder and the difference is that they have different Firefox profiles and cookies.
I'd like to run an apple script that works on a particular instance of Firefox.
tell application "Firefox"
    activate
    tell application "System Events"
        keystroke "n" using {command down}
    end tell
end tell

tell application "Firefox"
    activate
    tell application "System Events"
        keystroke "l" using {command down}
        keystroke "a" using {command down}
        key code 51
        keystroke "https://google.com"
        key code 36
    end tell
end tell

If I run this with Firefox open then it works exactly how I want it to.
But, if Firefox is closed, but Firefox 2 or Firefox 3 are open then it has weird behavior.
It will replace the word Firefox with Firefox 2 or Firefox 3 (whichever is open and last active) and then it will run the script using that instance of Firefox which is not what I want.

To test the example AppleScript code, I duplicated Firefox and renamed the copy as Firefox 2.
This was texted under macOS High Sierra, using different scenarios:

Both Firefox and Firefox 2 running, with Firefox started first.

Firefox being frontmost.
Firefox 2 being frontmost.

Both Firefox and Firefox 2 running, with Firefox 2 started first.

Firefox being frontmost.
Firefox 2 being frontmost.

Just Firefox 2 running.

In all tested scenarios the example AppleScript code preformed as wanted, Firefox being the one acted upon, not Firefox 2.
I believe the key here is using the fully qualified pathname, e.g. "/Applications/Firefox.app" verses just "Firefox".
tell application "/Applications/Firefox.app" to activate
delay 1
tell application "System Events"
    keystroke "n" using {command down}
    delay 1
    keystroke "l" using {command down}
    keystroke "a" using {command down}
    key code 51
    keystroke "https://google.com"
    key code 36
end tell

Note: The use of the delay command may be necessary between events where appropriate, e.g. delay 0.5, with the value of the delay set appropriately.


Spotlight and Alfred can't find alias to Emacs.app I installed Emacs.app with Homebrew, and used brew linkapps to create an alias in my /Applications directory.

Since I updated to OS X Mavericks yesterday, Spotlight and Alfred can no longer see this alias.

Since discovering the problem, I've tried reindexing my MacBook as described here, as well as reinstalling Emacs and restarting the machine.

Any other suggestions?

Found the answer here.

I needed to add the Homebrew cellar path to the list of paths under Features | Default Results | Search Scope, and then Alfred recursively scanned it and found Emacs.

On my Mac the path was /usr/local/Cellar.

And there was great rejoicing!


How to install GNU base64 on Mac OS X? I'm trying to run linux scripts on the mac, but even brew's updated base64 doesn't support -w0. I want something close to base64 (GNU coreutils) 8.22

Instead of base64 1.5 from brew or the unknown version MacOs ships with whose binary's md5 is 718fe34e4012999c180f807fe323e7f1

I've had great luck by using iTerm and loading .bashrc to replace most bsd/mac utilities with gnu ones.

P.S. There is little reason to install the one from brew, as it line breaks by default and has no way to disable that "feature".

https://github.com/Homebrew/brew/issues/4558#issuecomment-408225004

Brew does have the gnu version in the coreutils package. It installs it as gbase64


Password prompt for email Is there a way to add a password prompt when opening email app on a mac? To stop others from opening the email program on a shared computer. Basically i dont want anyone to open the email program without a password.

Separate user accounts are for that purpose. If you really have to use a shared account then do it but create additional one just for your Mail app.


Is there a way to set Sound Balance permanently for MacBook? My left speaker of Macbook pro is producing a bit muffled sound. So I have turned the Sound Balance setting in System Preferences towards midway through right speaker, and it's no longer noticeable.

However, this goes off every time system restarts and I've to move the slider to right again. Is there a way to set this permanently (via terminal maybe?)

I once had the same problem and resolved it.

Issue the following commands.

$ mv /Library/Preferences/com.apple.soundpref.plist /Library/Preferences/com.apple.soundpref.plist.backup

$ mv /Library/Preferences/Audio/com.apple.audio.DeviceSettings.plist /Library/Preferences/Audio/com.apple.audio.DeviceSettings.plist.backup

$ mv /Library/Preferences/Audio/com.apple.audio.SystemSettings.plist /Library/Preferences/Audio/com.apple.audio.SystemSettings.plist.backup

Then select whatever preference of sound settings you want and restart the MacBook.


rm all mdfind results, handling pathnames with spaces I already solved this with sed, but there must be a better way to handle spaces. I have run into this with some my scripts as well.

mdfind '(kMDItemFSName=*.ipsw)'

returns

/Volumes/disk/november 2014/Users/someuser/Library/iTunes/iPhone Software Updates/iPhone4,2_6.1_12B411_Restore.ipsw

when trying to pipe this, it breaks because of the spaces. i tried several methods including

rm $(mdfind '(kMDItemFSName=*.ipsw)')

mdfind '(kMDItemFSName=*.ipsw)' |xargs rm -vf

the only solution i found was

mdfind '(kMDItemFSName=*.ipsw)' |sed -e 's/ /\\ /g' |xargs rm -vf

but there must be a better way.

Thanks for your help!

You can use mdfind -0 to print a null character after each path.  Then, xargs -0 to parse the list on each null character instead of using the default whitespace.


Late 2010 macbook air, can't install os again I had wiped my 2010 macbook air and had tried to reinstall the os in recovery mode but the message "this item is temporarily unavailable" keeps popping up as I try to install os lion. Can anyone help me out ??

That's a weird issue, your best bet is probably to download the "OS X Recovery Disk Assistant" to reinstall OS Lion.
From Apple's website:

"To create an external OS X Recovery, download the OS X Recovery Disk Assistant application. Insert an external drive, launch the OS X  Recovery Disk Assistant,  select the drive where you would like to install, and follow the on screen instructions.
When the OS X Recovery Disk Assistant completes, the new partition will not be visible in the Finder or Disk Utility. To access OS X Recovery, reboot the computer while holding the Option key. Select Recovery HD from the Startup Manager. "

Note: In order to create an external OS X  Recovery using the OS X Recovery Assistant, your Mac must have an existing Recovery HD, which in your case it most likely already does.


Disable citrix receiver startup on login I have installed citrix receiver on my home macbook.  It auto starts on login yet it does not show an entry in the Login Items tab under the Users and Groups pane of System Preferences.  How can I disable the service from starting on login?

The following services are are started at login by launchd

/Library/LaunchAgents/com.citrix.AuthManager_Mac.plist
/Library/LaunchAgents/com.citrix.ReceiverHelper.plist
/Library/LaunchAgents/com.citrix.ServiceRecords.plist

You can use launchctl to stop the processes like so

launchctl stop com.citrix.AuthManager_Mac

However I am currently unable to prevent launchd from autoloading these services through launchctl.  It is irrelevant because the Citrix Receiver App will not start those services when it starts and will therefore not work if they were stopped or disabled.

I did notice these services are unneeded if using the the companies web app.  Considering that one can just delete the above .plist files and only use the web app.


iPhone: WiFi, Bluetooth and cellular network not working I have iPhone 3GS and suddenly it's gone away. I mean WiFi, bluetooth is not working, and I can't make any calls.

Here's a screenshot:

Any help will be appreciated!

Wow. Seems like the modem/baseband part is gone wrong. Try rebooting the phone. If still not working - backup your information (from iTunes) and try a restore to factory settings (I'm assuming a factory unlocked phone, no JB). If this doesn't help - probably it's a hardware failure.

About the IMEI blockage - no, it's not the case.


Textmate alt-f to move forward by one word I've recently switched from Linux to Mac. One thing that is really killing my emacs memory muscles right now is the lack of alt+f and alt+b to jump forward and backward by word.

I've gotten the meta/option flag flipped in Terminal.app preferences (so alt+. now works as expected), but I haven't found a similar option for Textmate. Even better if I could enable it as a MacOS  global setting for the U.S. keyboard (so it would work in all input boxes). At the moment I get the following useless (for me) encodings:

alt+f: ƒ

alt+b: ∫

How do I remap alt+f and alt+b to jump forward and backward by word?

As usual... KeyRemap4MacBook to the rescue :P   Its emacs mode will give you those bindings, and you can choose a lot more bindings than that as well:


Can I transfer an Application and its data to a different Mac I was given a MacBook Air to use as a laptop for school in the sixth grade. Now I am graduating and heading off to high school, so I need to turn my laptop in for good. Now I have had this laptop for a long time, and customized everything just the way I like it. For example in my browser, Opera, I have added many extensions, userscripts, and customized it just the way I like it. Now I would like to transfer this browser along with all of its data, to my personal MacBook Pro.
Is there an easy way to do this? I believe that the data is stored under:

  User > Library > Application Support > "Application's Name" / "com.Application's Website"

Though I am not positive of this, but if the data actually is in there then I could just copy the contents of it and put it into the same file on my MacBook Pro. I would rather not do this unless I have to, in-case I mess something up.

I feel like there should be an easier way of doing this. Any help is appreciated, Thanks!

You can use the built-in Migration Assistant to move your settings, apps, and documents to the new computer.

  Move your content to a new Mac Use Migration Assistant to copy all of
  your documents, apps, user accounts, and settings to a new Mac from
  another computer.

Here's a document about how to use it (although it's pretty simple and it looks like you're an experienced Mac user).  I can't say for sure that all your customizations will copy over but it's the easiest, most complete, and free option available.


How to add shortcut to directories to OS X menubar I have several directories that I want to quickly access in Terminal. And sometimes even in the finder. I would like to be able to hit an icon in the menu bar and have it drop-down a list of folders and files. When I release the mouse I would like the path to be typed out in terminal or a text editor if that's what I am using. If I am in the Finder, I would like the enclosing folder to open.

Is there an app for that? I tried writing an AppleScript but am not having luck.

found it.
XMenu

http://www.devontechnologies.com/products/freeware/

To expand on the functionality I needed:
Quickly access a directory while in terminal

Solution:
create a text file or a clipping with the path of the desired location
place that text file or clipping or an alias of either in the specific location
/Users/username/Library/Application Support/XMenu/Snippets

Now an entry with the title of that text file appears under an icon in your menubar. Selecting that entry pastes the CONTENT of that textile or clipping wherever your insertion point happens to be. This works in any text editor or shell.

So if I have a text file named C++ projects and it has a one liner in it like:
cd ~/Documents/Projects/Programming/Fun/HomeAuto/C++
I just select that entry from under the 'snippets' icon that XMenu puts in the menubar, and BAM it's typed for me. I know that another utility, TextExpander has that option but they recently updated their app to be a subscription model. REALLY?!

As a bonus, XMenu can put another little gear icon in the menubar with similar functionality- ANY FILE under that icon is just opened.

In addition, XMenu has options for other quick access directory drop downs as separate menubar items - for example the applications list, home directory, developer specific applications and the documents folder.

Oh, and XMenu is free.


How to sort remixes under remix artist name in iTunes Is there some way to sort remixed versions of songs in iTunes under the remix artist's name?

As an example, Adventure Club has made a lot of songs that are remixes. For now, all these songs appear under the original artist's name with "(Adventure Club remix)" after the song name. However, I would like for all the songs by Adventure Club (remix or not) to appear under the artist, Adventure Club.

I do know of one way to make this work:
I can put the remix artist as the "Album Artist". This way the original artist's name is preserved, but the remix will sort under the remix artist's name. However, (and maybe I'm just being way too picky here) there are some cases where either (1) the song actually appears on an album by the original artist or (2) the song does not actually appear on an album at all. In these cases, putting the remix artist as "Album Artist" is inaccurate.

Thus, is there any other way to sort remixed versions of songs in iTunes under the remix artist's name?

How about creating a Smart Playlist (File->New->Smart Playlist...)?

You might set it up to Match Any, with a couple of rules: 1) Artist/contains/"Adventure Club" and 2) Album Artist/contains/"Adventure Club".  (Without the quotes.)


In Mavericks, is it possible to use Enhanced Dictation from the command line? A use case is: I have a recording in AIFF or MP3 format, and I'd like a text version of it as Enhanced Dictation would have recognized it if I had spoken it myself.

Copy the MP3 file to an iPod & play it into Dictation via line in source (or the mic?)... Not the answer to your question, but it might work for your task :)


What is the native program OSX load to edit the screenshots? When creating a screenshot with Cmd+Shift+3 or Cmd+Shift+4, a smaller version of the screenshot image appears at the corner of the screen.
When clicking the image, the full-sized screenshot image pop on the screen in an annotation kind of app.

This app allows to draw, circle or outlines and it will interpolate the drawing to the closest geometrical shape.
What is this app?
Is there any way to load any image through it instead of Preview?

The editor is part of the QuickLook functionality. You can also start it by activiting QuickLook on any image (usually by pressing Space) and then clicking on the Pencil tip icon at top right.


iCloud Tabs no longer a feature in Safari 13? Prior to updating to Safari 13, iCloud Tabs was a feature that, when turned on and on clicking the tabs button on "Desktop" Safari, would show you tabs that were open on other devices at the bottom of the list.

Here’s how they used to work per Apple's support documentation: https://support.apple.com/en-us/HT202530

I no longer see this list of tabs.

As of this writing, I am running Safari 13.0.1 on 10.14.6.

I noticed this problem a while ago, but didn't dig into it until now. I am using iOS 13.3 and trying to get tabs from 10.13.6.

The Apple support page clarifies what should work and what will not work:

  iCloud Tabs works between devices running iOS 13 or iPadOS and macOS
  Mojave 10.14.4 or later, or between devices running iOS 12 or earlier
  and macOS Mojave 10.14.3 or earlier.

Apple's What's new in the updates for macOS Mojave page does not mention changes that would make things incompatible, but here is a much more detailed break down of the 10.14.4 update.

So:

Catalina & iOS 13 - iCloud Tabs should work

Mojave 10.14.4 & iOS 13 - iCloud Tabs should work

Any version of macOS less than Mojave 10.14.4 won't work without iOS 13 for iCloud Tabs.

If you're running iOS 12, then don't go above Mojave 10.14.3 or you will not have iCloud Tabs anymore.


Stream a Video URL to Apple TV I know that, for example, when I'm playing a video in YouTube on my iPhone then I AirPlay it to Apple TV, iPhone simply pass video link to Apple TV than iPhone works only as remote (in fact, turning iPhone's wifi off, Apple TV will keep playing video).

So is there a way, even with Mac, to give to Apple TV an URL then look it there?

Apple will support it natively in Safari from El Capitan!! (only with HTML5+)
http://www.apple.com/osx/elcapitan-preview/


How to modify Hardware UUID of a macOS Sierra Virtual machine in VMware fusion/parallel desktop I've got to have different Hardware UUID for software testing purposes.
When cloning a VM in Fusion pro 8.5, the clone gets a new MAC address but the hardware  UUID in system report in macOS doesn't change.
Any idea how I can assign a new UUID to virtual Mac guest OS?

The text file that Fusion uses to assign this is editable when the VM is powered off (don't suspend, shut down the OS):

Turn off VM
In machine folder, change uuid.bios section in <>.vmx file (f e.g. uuid.bios = "aa aa ...").
In machine folder delete .nvram file
Boot VM

In "About this MAC" you must see


Philips TV: Connect MacBook shared folder to TV I have an issue: Connect Macbook and Philips TV.

I want to browse Macbook shared folder in Philips TV, but it cannot be done as easily as on Windows (uh)

Maximum what I've found after an hour of searching in google: Smart TV Share, program in App Store. It allows Philips TV to browse only in Pictures folder.

I also try to change target directory of this program by settings, but nothing seems to changed. (No settings available for user :( )

Please, if anyone knows solution, help me!

try plex ;)
it creates a media server on the network and you reach the shared contents from your smart TV like a flash drive. it works on my LG smart TV


Sign in to App Store After I've created an iCloud acc then sign in to App Store the status is shown that (your Apple ID was created for a different country. Go back and select that country, or choose a new Apple id. You must switch to the U.S store to create an id.

Noted : my country is Cambodia.

If your are on an iPhone/iPad go on settings/ iTunes and App store, click on your email address and select disconnect.
Then connect again with your AppleID, that automatically gonna brink you to the correct store country (linked to your AppleID)


Prompting personal warning before putting my Macbook Pro to sleep I carry my Macbook Pro (15" Retina, Mid 2012 with Mt. Lion) between my work and home. It is connected to an external HDD as a Time Machine. I always forget to properly eject the HDD before putting my notebook to sleep (I rarely shut it down) at my office.

Is there a way to have it prompt with a custom reminder or warning when I try to put MBP to sleep, using Automator or something?

You could have the drive automatically ejected when you sleep the mac instead?

Quick search found Jettison on the Mac App Store
http://itunes.apple.com/us/app/jettison/id447430809?mt=12

There is also an app you can use to run Apple script on sleep/wake:
http://www.lagentesoft.com/scenario/index.html


How to automate deleting what's inside the search box in the Dictionary app after 3/5 seconds? I use the Dictionary app many times when I'm reading a very old novel, and sometimes I write two words side by side without realising it (until I get no result), with that said, I need to tweak the Dictionary app so that it'd delete the word I've searched for after, say, 5 seconds of writing that word in the search box. Is it possible to do something like this?

Sorry for being verbose.
Huge thanks in advance.

This works for me using the latest version of macOS High Sierra.

Save this following code in script editor as an application.  This application will continue to run until you quit the Dictionary.app

Adjust the delay values to suit your needs.

tell application "Dictionary" to activate
delay 1
repeat until application "Dictionary" is not running
    tell application "System Events"
        tell process "Dictionary"
            tell its window 1
                repeat
                    delay 1
                    try
                        if value of text field 1 of group 3 of toolbar 1 is not "" then
                            delay 5
                            try
                                set value of text field 1 of group 3 of toolbar 1 to ""
                            end try
                        end if
                    end try
                    exit repeat -- when you want to exit the loop
                end repeat
            end tell
        end tell
    end tell
end repeat

Be sure to add this new created application to your list of apps allowed to control your computer.


How do I determine when my Macbook pro was manufactured? I have an early 2011 17" Macbook Pro which is giving me issues related to SATA 6.0gbps; these issues were apparently consistent with the first machines off the line but some of the later machines have been better. I bought my first in March but fed up with the issue I went this week and bought another - alas - same issue.

How can I determine the manufacturing date of the machine?

I'm always hesitant to recommend an app to do what a terminal command could do... but I cannot for the life of me find the terminal command to output the date of manufacture of any given Mac.

So...

I recommend the free app coconutBattery for this task.  It's a battery health monitor, and it happens to also show the date of manufacture of the Mac that it's running on.

Installation

brew cask install coconutbattery (if you use Homebrew) or download from the developer's site.


How to prevent ssh from adding my key to ssh-agent on Snow Leopard? I recently started using Snow Leopard (after using Leopard for a few years), and I noticed that when I ssh using a passphrase-protected private key, ssh will automatically add the key to ssh-agent. Question 1: How do I prevent ssh from behaving this way (doing the auto-add)?

I am not looking to disable the auto-launching of ssh-agent. I actually use it, but I want keys to be added manually (via ssh-add), not automatically.

My current workaround:
I've edited /System/Library/LaunchAgents/org.openbsd.ssh-agent.plist to run with the argument "-t 1" and that works well. But I'm afraid that some software update will revert it.
Question 2: If I put the modified plist in ~/Library/LaunchAgents/ will the one in /System be ignored for my user? This would qualify as a stable workaround.

Automatically Added Keys

There are three ways SSH keys are added to ssh-agent in Snow
Leopard.

manually, with ssh-add,
automatically, by ssh when you supply a key’s passphrase via
the GUI prompt, and
automatically, by ssh-agent when it first starts.

The last two methods are Apple extensions: there are no “automatic”
additions with stock OpenSSH. All references to ssh, ssh-agent,
and ssh-add below are to Apple’s Snow Leopard versions unless
I prefix the program name with the adjective “stock”.

You can disable all of Apple’s keychain-oriented SSH modifications
with a (undocumented?) preference setting:

defaults write org.openbsd.openssh KeychainIntegration -bool false

Keys Added Automatically By ssh

(This is the part I missed in the previous version of my original
answer since I usually use a “stock” ssh.)

Whenever ssh tries to use a passphrase protected SSH key to
authenticate itself to a remote host, it will issue a GUI prompt for
the SSH key’s password. The key is also loaded into the agent (if
the passphrase is correct) whether or not you mark the “Remember
password in my keychain” checkbox.

There are two (undocumented?) ways to prevent ssh from issuing
this GUI prompt (and thus adding the SSH key to the ssh-agent):

A preference setting:

defaults write org.openbsd.openssh AskPassGUI -bool false

An
ssh_config
entry (or -o option to ssh) that specifies AskPassGUI no.

(see keychain_read_passphrase in
keychain.c;
the oAskPassGUI parameter comes from the AskPassGUI
configuration setting)

When AskPassGUI is disabled, ssh will prompt you in the normal
way for the key’s password (i.e. through the tty).

You could also avoid automatic adds from ssh by using a “stock”
ssh (e.g. OpenSSH compiled by
MacPorts,
Homebrew “duplicates” from
homebrew-alt, or
Fink).

Keys Added Automatically By ssh-agent

The keys that ssh-agent automatically adds are those that have
their passphrases stored in a keychain.
These “remembered keys” are automatically added when a new
ssh-agent starts.
There is no command line or configuration option (other than
KeychainIntegration, described above) to prevent ssh-agent from
automatically loading the “remembered keys” (see the call to
process_add_from_keychain (defined in
keychain.c) from main in
ssh-agent.c).
If, however, you can arrange to lock the keychains that store your
SSH key passphrases, you can click Cancel when ssh-agent asks to
unlock the keychain(s) and effectively get ssh-agent to skip
adding these “remembered keys” when it first starts.

If there is no ssh-agent running, your first use of ssh will
likely trigger launchd to start an ssh-agent which will load all
the “remembered keys”. This makes it seem like ssh is loading the
keys into the agent, but it is really the agent itself that is
loading the keys. It only does this automatically when it first
starts.

The -k option of ssh-add provides a manual way to add the
“remembered keys” (see add_from_keychain in
ssh-add.c
which ends up as a message to the agent which calls
process_add_from_keychain from process_message in
ssh-agent.c).

launchd Configuration

You are right that a system update could overwrite your modification to the file in /System/Library/LaunchAgents/. You should always avoid changing things under /System/; most things can be (re)configured without making changes there. In this case, it looks like you should be able to override the system default launchd job specification on a per-user basis with a file in ~/Library/LaunchAgents/.

From what I can tell1, entries are loaded in this order2:

~/Library/LaunchAgents/
/Library/LaunchAgents/
/Network/Library/LaunchAgents/ (not present on most systems)
/System/Library/LaunchAgents/

It does not seem to be documented, but only the first job configuration for each Label (e.g. org.openbsd.ssh-agent) will be kept. Any configuration from a later directory with the same Label as a configuration from an earlier directory is effectively skipped.

1
See
NSStartSearchPathEnumeration used in launchctl.c
and defined in
NSSystemDirectories.h/NSSystemDirectories.c.

2
launchd also looks in the LaunchDaemons/ directories next to the various LaunchAgents/ directories for other types of jobs.