How to determine which one process owns particular window How to know which process or App is responsible for creating/managing a particular window in macOS?

In my case I got really cryptic error message, in non modal free floating window.
Using message found that it is from Sparkle framework, but I don't know which process or App cause it.

This script will print information(owning PID) about visible windows.
And information for the window that changed position within a 5 second interval.
Credit goes to superuser answer
#!/usr/bin/env python

import Quartz
import time
from Foundation import NSSet, NSMutableSet
def transformWindowData(data):
    list1 = []
    for v in data:
        if not v.valueForKey_('kCGWindowIsOnscreen'):
            continue

        row = ( \
            str(v.valueForKey_('kCGWindowOwnerPID') or '?').rjust(7) + \
            ' ' + str(v.valueForKey_('kCGWindowNumber') or '?').rjust(5) + \
            ' {' + ('' if v.valueForKey_('kCGWindowBounds') is None else \
                ( \
                    str(int(v.valueForKey_('kCGWindowBounds').valueForKey_('X')))     + ',' + \
                    str(int(v.valueForKey_('kCGWindowBounds').valueForKey_('Y')))     + ',' + \
                    str(int(v.valueForKey_('kCGWindowBounds').valueForKey_('Width'))) + ',' + \
                    str(int(v.valueForKey_('kCGWindowBounds').valueForKey_('Height'))) \
                ) \
                ).ljust(21) + \
            '}' + \
            '\t[' + ((v.valueForKey_('kCGWindowOwnerName') or '') + ']') + \
            ('' if v.valueForKey_('kCGWindowName') is None else (' ' + v.valueForKey_('kCGWindowName') or '')) \
        ).encode('utf8')
        list1.append(row)

    return list1;

def printBeautifully(dataSet):
    print 'PID'.rjust(7) + ' ' + 'WinID'.rjust(5) + '  ' + 'x,y,w,h'.ljust(21) + ' ' + '\t[Title] SubTitle'
    print '-'.rjust(7,'-') + ' ' + '-'.rjust(5,'-') + '  ' + '-'.ljust(21,'-') + ' ' + '\t-------------------------------------------'

    # print textList1
    for v in dataSet:
        print v;

#grab initial set
wl = Quartz.CGWindowListCopyWindowInfo( Quartz.kCGWindowListOptionAll, Quartz.kCGNullWindowID)
wl = sorted(wl, key=lambda k: k.valueForKey_('kCGWindowOwnerPID'))

#convert into readable format
textList1 = transformWindowData(wl);

#print everything we have on the screen
print 'all windows:'
printBeautifully(textList1)

print 'Move target window'
time.sleep(5)

#grab window data the second time
wl2 = Quartz.CGWindowListCopyWindowInfo(Quartz.kCGWindowListOptionAll, Quartz.kCGNullWindowID)
textList2 = transformWindowData(wl2)

#check the difference
w = NSMutableSet.setWithArray_(textList1)
w.minusSet_(NSSet.setWithArray_(textList2))

#print the difference
printBeautifully(w)

Output:
all windows:
    PID WinID  x,y,w,h                  [Title] SubTitle
------- -----  ---------------------    -------------------------------------------
    204     2 {0,0,1280,800         }   [Window Server] Desktop
    479    36 {0,0,1280,800         }   [Dock] Desktop Picture - DefaultDesktop.jpg
    731  2893 {640,0,640,800        }   [Finder] /Users/wolf/Downloads
    731   260 {-608,-1440,2560,1440 }   [Finder]
    731   259 {0,0,1280,800         }   [Finder]
   1301   321 {0,366,1280,411       }   [Audio Hijack] Application Audio
Move target window
    PID WinID  x,y,w,h                  [Title] SubTitle
------- -----  ---------------------    -------------------------------------------
   1301   321 {0,366,1280,411       }   [Audio Hijack] Application Audio


How to avoid lags when listening to music on a Mac? On a Mac 10.13.6 I am usually listening to music using the command line command mplayer. However, when the computer is under rather heavy load, the music sometimes stops for a fraction of a second up to a second (or even longer) all the time.

The music is mp3 files stored locally and I’m guessing the CPU scheduling to priority is what is causing this interruption. In my use case, everything else the computer is doing is less relevant so I want to promote this app to the best performance.

The version is:

  MPlayer 1.3.0-4.2.1

Can I change how I run this app to avoid slowdowns when the CPU gets busy?

Check out nice and renice which work on the command line.

You can change the priority level of processes, but to change other users processes you have to be admin level...

Just to provide a link with examples, see https://www.lifewire.com/uses-of-commands-nice-renice-2201087


Can I upgrade from Lion to Mavericks? Or must I upgrade to Mountain Lion, first? I never bothered to upgrade my 2012 MacBook Air to Mountain Lion. Currently I am on Lion.

Can I upgrade straight to Mavericks, or do I need to first upgrade to Mountain Lion and then to Mavericks?

According to the Mavericks How To Upgrade page you can update from Snow Leopard (10.6.8) Lion (10.7), or Mountain Lion(10.8) later to Mavericks (10.9) if your hardware meets the requirements, which yours does. I upgraded my 2012 MacBook Air to Mavericks about two weeks ago and the battery life is noticeably better.


Terminal directory delete issue I don't really know what it is called but it was an issue for me.

So here is what I was doing:

Created Directory with content and have it open in finder
Open a terminal and go to the same directory.
In finder I delete the folder, it goes to the trash.
Recreated folder in finder, with the same name, different content.
Do a ls in the terminal, which prints out the old directory's content.

Is this normal? Do I really have to cd .. on the terminal and enter the "new" directory? (If I cd .. I end up in Trash, not the directory's initial location)

I guess it is a soft link directory, but shouldn't the terminal know that the directory it is currently in doesn't exist anymore and cd .. until it reaches a existing directory? (At step 3)

Is there a reason why it should still point to the old directory?

You're in the "trash" directory now because when you threw out the folder, your view of that folder in the terminal went with it.  The terminal, being completely inside the directory, doesn't even need to know it's been moved to the trash.  It's pwd doesn't even change because it has no reason to re-validate the current directory path on every interaction - and why should it?  the directory itself is still valid, it just lives in ~/.Trash now.

Directories (or folders) are really just references to spots on a physical disk, so moving folders around your hard drive never changes their disk location, so again, why should the Terminal update?  It doesn't care.

It's a "gotcha" that's been part of linux for 20 years and unix for a great deal longer.


USB2, USB3, iPad 2 and iPad Pro I have one USB 2 and one USB 3 hub, both connected to a USB3 port of my mac. The USB 3 hub has a small number of ports, so I have to pick exactly what will use that hub. Both hubs are powered. I have one iPad 1, an iPad 2, an iPad Pro, an Apple TV4 and an iPhone 6. I develop apps for iOS, so I need these devices to be connected on the right hub for them. Will it make any difference to connect them on the USB 2 or 3 hub? I mean in terms of data transmission speed. I don't want to waste a USB 3 fast port on a slow device.

As of August 2017, only the 12.9” and 10.5” iPad Pro (not the 9.7” iPad Pro) support USB 3 transfer speeds. No other iPad, iPhone, iPod, or tv does.

This is confirmed by Apple’s Store page for the Lightning-to-USB 3 Camera Adapter:

  The 12.9-inch iPad Pro and 10.5-inch iPad Pro transfer data at USB 3 speeds, while the 9.7-inch iPad Pro uses USB 2.

The problem is that the USB-to-Lightning cable Apple provides is only a USB 2 cable. You’d need a USB 3.0-to-Lightning cable, or some kind of adapter, to benefit from the greater transfer speeds. Those do not exist yet, and even Apple’s USB-C to Lightning Cable only supports data transfer at up to USB 2.0 (480 Mbps) speeds.

Furthermore, System Information lists my iPhone 7+ as having a maximum transfer speed of 480 Mbps when connected to one of the main USB 3 ports on my iMac. This is consistent with USB 2 transfer speeds, which confirms that so far, no iPhone supports USB 3 transfers, at least not with Apple’s official Lightning cables.

It’s unclear whether the 4th generation tv supports USB 3 transfers. It does include a USB Type-C port, but that doesn’t necessarily mean it supports USB 3 speeds. For what it’s worth, there’s a USB 2-to-Ethernet chip inside TV 4, per iFixit. I doubt Apple would include a USB 3 port in tv, when most users would rarely, if ever use it, while leaving other devices with USB 2 that would benefit from USB 3.

If you want to be certain, plug your tv 4 into one of your Mac’s builtin USB 3 ports, and check System Information.

In summary: Connect your Apple mobile devices to the USB 2 hub.


Using modified SMS database with iOS I've been trying to remove a specific text from my iPhone's SMS database. The text is too long (tens of thousands of characters long, if not more) and is causing iOS to crash whenever I view the conversation it's in. I'd greatly prefer to remove it without removing any other text.

I've tried downloading the SMS database file and:

Modifying the text to [Removed] and saving it to the phone
Modifying the text to [Removed], saving it, backing up, and restoring
Modifying the text to [Removed] and simply replacing the database file in a backup, then restoring
Removing the text from the database and saving it to the phone
Removing the text from the database, saving it, backing up, and restoring
Removing the text from the database and simply replacing the database file in a backup, then restoring

All of these methods have been unsuccessful. The iPhone is always unable to write to the modified database. Some of these methods don't let the iPhone read any of the texts at all (and simply have an empty Messages app) or they make the iPhone read the texts at first, but then once the phone is restarted it cannot read it anymore.
The phone is still able to read and write to the unmodified database file no problem.

I am using DB Browser for SQLite (http://sqlitebrowser.org/) to modify the database file.

I need a way to remove the text in question without viewing it in the iOS messaging app. My phone is jailbroken. I'd really like to get this fixed.

You said your phone was jailbroken.

Open Cydia
Install an app called iFile.
Open iFile.
Navigate to Library -> SMS -> sms.db
Make your edit.
Launch Messages.


MBA 2017 won't boot up in macOS, but will in Ubuntu A few days ago my spouse's MBA started showing problems. At first it wouldn't turn on at all, showing an orange indicator on the MagSafe charger. After resetting the SMC a couple times and letting it charge for a long time it booted up.

It showed the regular login screen but it wouldn't complete the login, it'd just sit on the end of the progress bar.

I tried booted in recovery mode, single mode, internet recovery mode, and afterwards a freshly made USB macOS Mojave installer I made on my MacBook Pro 2018.

None of the above complete the boot up. Instead, it sits forever on the 100% progress bar. I started the Mojave installer in verbose mode and I see an "Unsupported CPU" and "Unsupported PCH" in the log.

I was able to boot up a live Ubuntu USB and everything seems ok. I installed the Ubuntu on the main disk to see if there was a problem with the disk at all. Ubuntu runs just fine on the MBA.

Any ideas on what else can I try?

While the "Unsupported CPU" and "Unsupported PCH" messages in the log appear concerning, I wouldn't jump to the conclusion that this is what's causing the problem. The fact is I've seen these messages before in Macs that run perfectly fine.

I see you've already reset the SMC, but you haven't mentioned resetting the NVRAM and this is something you should also do.

Reset your NVRAM

For your model MBA you'll need to follow these steps:

Fully shut down your MBA
Press the power button and then press the commandoptionpr keys. You have to make sure you press these keys before the gray screen appears or it won’t work.
Hold those keys down until your Mac reboots again (i.e. wait until you've heard the startup chime a second time)
Let go of the keys and let your MBA reboot.

It's not clear to me if you still have macOS installed or not:

If not, then shut down your Mac again and switch it on and immediately press the option key and let me know what drive options (if any) appear on the screen.
If so, what happens when your MBA boots up after the NVRAM reset?


Can I charge a 2017 MacBook Pro with a third-party USB C power adaptor? I've got a 2017 MacBook Pro which comes stock with an 87W USB C Power Adapter.

I want to purchase an additional power adapter, but I don't require an official Apple one. I notice that Anker make one with 60 W power output over USB C.

Other than charging my laptop at about 2/3rds the speed of the Apple Power Adapter, (2/3rds = ca. 60/87 w), would there be any effect / damage on my machine?

The USB-C plug is not the problem, but the charger is.
It is underrated, so it will never manage to completely charge your battery while the Mac is in use, or supply enough when needed.
With that said, you can use it to charge battery overnight to use it during the day.
To verify it is best to take occasional look at the battery charge condition in "System information" (hold the "option" key and click on the apple symbol on the top left corner on the menu bar).

This indicated value will be negative if charger is not plugged in or not sufficient.

It will be positive if charger is sufficient.

No damage to your Mac will occur in any case.


What screen capture tools can copy the image path to the clipboard after a snap? Can anyone recommend a screen capture tool that can:

save a capture as a file, and...
copy the path to that file to the clipboard?

The first part is easy, but I can't find a utility that does the second part.

I dont need another app if there's a way to configure this using the built-in screen capture tool.

You could just assign a shortcut to a script like this:

#!/bin/bash

f=~/"Desktop/$(date '+%Y%m%d%H%M%S').png"
screencapture -i "$f"
echo -n "$f" | LC_CTYPE=UTF-8 pbcopy

See man strftime for a reference of the date format.


Is that possible to make `cp -R /dir/ .` be the same as `cp -R /dir .`? I come from Linux. I keep making mistakes when I do cp -R /dir/ . instead of cp -R /dir .. These two commands are identical in Linux world, but different in MacOS. In cp manpage:

If the source_file ends in a /,
the contents of the directory are copied rather than the directory itself.

Since I always use Tab autocomplete the directory name and it always has / in the end, I really mean copying the directory, not the contents of the directory. I don't always remember to delete the / suffix. How do MacOS developers avoid these kind of mistakes? Thanks.

If you use homebrew, you can install the coreutils package, which provides GNU cp (gcp), which behaves the way you are familiar with. Then, you could set

alias cp=/path/to/homebrew/gcp

in your profile to prefer that version.


Partition Type: FFFFFFFF-FFFF-FFFF-FFFF-FFFFFFFFFFFF appeared when tried to remove Linux(UBUNTU 18.04) from dual boot from Mac I earlier had dual-booted my MacBook Pro(2013), Catalina OS with Ubuntu 18.04 LTS. I wished to remove it, so I erased the unwanted partition in disk utility and restarted my mac, it did not show the macOS symbol in refind so I started in internet recovery mode. Afterwards, I

followed step by step till the step where I removed my third and second partitions.
Since my MacBook is working on Catalina OS and the guide was given according to the Sierra, I refrained from going further.
Please help me out since I'm not that terminal savvy.

Remove the second and the third partition:

gpt remove -i 3 /dev/disk0
gpt remove -i 2 /dev/disk0

Add the (former) second partiton with the proper size and partition type:

gpt add -i 2 -b 409640 -s 461916744 -t apfs /dev/disk0

Check disk0 and the resulting synthesized APFS container scheme with diskutil:

diskutil list #get the deviceID of the APFS container scheme
diskutil verifyDisk disk0
diskutil verifyVolume diskX #diskX: deviceID of the APFS container scheme

Assuming you want to resize the APFS container to the full size of the disk (500 GB) you have to enter:

diskutil apfs resizeContainer disk0s2 0


Group Contacts to Send Sms Instead of specifying each number one by one, is there anyway I can specify a group when sending sms?

For your info, I am using the contacts synced from Gmail, not the iPhone's built-in address book.

There's an app called Smart Group that might accomplish what you want to do.


MBP USB-C charger can't keep up when busy. Is that normal? I have a Macbook Pro 15" (2016 with Touchbar).  The 87 W USB-C charger doesn't keep the battery from discharging when the CPU is working hard (baking lighting for Unity in this case).  This limits the amount of time it can work at this level to maybe an hour until the battery runs out.

Is this normal, or is my power adapter or some other part of the charging system under-performing?

The Activity Monitor graph shows the CPU about 80% utilized.

Yes - when the GPU is full power and the CPU is committed, you could drain things faster than the charger can provide. I’ve not seen it often, but you are certainly able to run things past what most chargers can provide.

Now if you can get this without any external displays connected and when the integrated (logic board) GPU is running and not past 75% CPU load, I would suspect you either have a bad cable, bad adapter or less likely need a repair on the Mac.

Now - one hour battery is clearly an issue. This draining should be slow and run several hours if you are running mostly on wall power and only a little on draining the battery.

Think if you were flying a plane and refueling - you should be topping off slowly or perhaps burning more than you can take in in some cases but you should be able to drain both your tanks and the refuel volume in an hour.

Get the Mac to service for a diagnostic on power with that specific adapter if that’s the case.


Sync files between two different folders on a single Mac I am looking for a solution to sync files within different folders on a single Mac.

The files are tracked under Git version control system, so I can't use aliases.

If the git solution does not work for you Linux has you covered.

For folder syncing use rsync -avP —delete —exclude=‘excludeDir’ /path/source /path/dest
or
mirror
And for automatic operation use the scheduler crontab


Turn Internet Sharing off automatically when on specific network At home I connect my MacBook Pro, running OS X El Capitan, to the Internet using Ethernet, and share the connection with my phone via Wi-Fi.

At work I connect the MacBook Pro to the company network using Ethernet, and Internet Sharing is not allowed.

Is there a way to automatically turn Internet Sharing on and off depending on which network I am on?

A solution which detects the Ethernet network, somehow, the presence or absence of specific Wi-Fi network, or indeed the actual geographic location would do the job.

I am aware that I can set the 'Location' via the Apple menu, but can that control the Internet Sharing options, and can detecting the location not be done automatically? Selecting the location manually is too much like hard work.

Yes, you can use ControlPlane.  It is designed to do exactly the sort of thing you've mentioned.

You'll need to define a context (like "Home" or "Work" or "Out & About") or a few contexts, and then define what clues show what context is active, and then define what actions to take when a context becomes active or ceases to be active.

In most cases a context corresponds to a location (or vague type of location, like "Out & About").  But you could have a "Hotspot" context and a "Wi-Fi" context and an "Ethernet" context, if that suited your needs better.  Or you could have "Metered" and "Unmetered" contexts.

You can also enable multiple simultaneous contexts, but that gets complicated and confusing, and I don't recommend it at first.

You can use presence of networks, geographical location, and perhaps dozens of other things to determine your location/context.  It's quite powerful (but after a while you'll notice things missing, like the ability to directly trigger an action from an evidence source, without the need to use a context as an intermediary).  I heartily recommend it, even though you may eventually wish it did a lot more than it does.


Display photos from iPad on TV without Internet connection Is it possible to show photos from an iPad Air on a TV without an internet connection, Wi-Fi router or 3G data plan subscription (i.e. the iPad is completely offline)?

Here's one way...

If your TV supports HDMI then use a Lightning Digital AV Adapter.

  Use the Lightning Digital AV Adapter with your iPhone, iPad, or iPod
  with Lightning connector. The Lightning Digital AV Adapter supports
  mirroring of what is displayed on your device screen — including apps,
  presentations, websites, slideshows, and more — to your HDMI-equipped
  TV, display, projector, or other compatible display in up to 1080p HD.

  It also outputs video content — movies, TV shows, captured video — to
  your big screen in up to 1080p HD. Simply attach the Lightning Digital
  AV Adapter to the Lightning connector on your device and then to your
  TV or projector via an HDMI cable (sold separately).

You also need a HDMI Cable.

Another possible way is to use a Lightning to VGA Adapter.

  Use the Lightning to VGA Adapter with your iPhone, iPad, or iPod with
  Lightning connector. The Lightning to VGA Adapter supports mirroring
  of what is displayed on your device screen — including apps,
  presentations, websites, slideshows, and more — to your VGA-equipped
  TV, display, projector, or other compatible display in up to 1080p HD.

  It also outputs video content — movies, TV shows, captured video — to
  your big screen in up to 1080p HD. Simply attach your Lightning to VGA
  Adapter to the Lightning connector on your device and then to your TV
  or projector via a VGA cable (sold separately).

You also need a VGA Cable.


Mass deleting email from an iPhone/iPad? Is there a workaround for the iOS inability to easily delete ALL (or large blocks of) email from my iPhone and iPad ?

The fastest way to delete groups of messages in the iOS mail app is to hit the edit button in the mailbox view, and tap the circles to select the messages you want, the delete/archive them.

If that's still too slow for the quantity of mail you have, the best option is likely to use the web interface for your provider (i.e. Gmail, etc.), which will likely allow you to do a select all.


Command found with `which` at the new paths but still tries to run from the old path I have installed new version of npm in the custom directory .npm-global/bin and removed it from /usr/local/bin. The new path is declared:

PATH=/usr/local/bin:./node_modules/.bin:/Users/dmitrizaitsev/.npm-global/bin:...

and the new npm is found with which:

which npm
/Users/dmitrizaitsev/.npm-global/bin/npm

However, it still attempts to run from the old path and fails:

npm
-bash: /usr/local/bin/npm: No such file or directory

Any idea what is wrong here?

The old path is still cached by the shell. Either open a new tab/window or run hash -r to clear it.


Upgrading a Mac from Leopard to Lion I've two Macs: one MacBook Pro Core 2 Duo with 10.5.8 (Leopard) and the other MacBook Pro Core 2 Duo with 10.6.8 (Snow Leopard).

How can I upgrade the Leopard Mac to Mountain Lion while leaving the Snow Leopard Mac as it is for now.

Most of what you need is in this Ars Technica article.

Essentially:

Purchase and download Mountain Lion on your 10.6 Snow Leopard Mac.
Follow the instructions from the article (or elsewhere here on Ask Different) to make the bootable disk.
Put the disk into your Leopard Mac and upgrade! (You may have to do a clean install.)


Reset an iMac to factory without passwords I got gifted an IMac from a friend they asked me to delete everything. It didn’t have an initial password to enter so I thought it was fine. To delete it’s requesting the admin password which they don’t remember. She said I can just delete everything it’s okay she has all her stuff backed up and on new iMac. So is there a way to delete everything and ability to sign in with my apple id and password without hers?

First you'll need to turn off your iMac. Then press the power button and immediately hold down the Control and R keys until you see the Apple logo or spinning globe icon.

Release the keys and shortly afterward you should see the macOS Utilities window appear.

In this are four options: Restore from Time Machine Backup, Reinstall macOS, Get Help Online and Disk Utility. Click on the last one (Disk Utility) and then select Continue.

Next, you'll see a list of all the HDs currently attached to your Mac. In the left column are the names of each drive, while in the main panel are the details of the selected drive.

Look under the Internal section for your main drive. This is often called Macintosh HD and appears at the top of the list. Click on it so that it's highlighted, then click the Erase button from the options in the main panel. Use the same format suggested by the Erase on for your HD.

Once you are done, come back again to the window macOS Utilities and from there select Reinstall macOS. All should go good in 25-30 minutes as it downloads from the internet.


If iOS's filesystem is case-sensitive then why can't I save a.pages and A.pages? When I try to save document in Pages.app on iOS with the same name but a different case I get:

"a" is already taken. Please choose a different name.

I would expect that this would work if iOS is case-sensitive.

HFS+ is not case-sensitive.  It is, however, case-preserving.

Your problem is not a problem, it is working as designed.


dd ruined my USB stick, how do I recover? I tried to copy a Linux distro over to my USB using DD. But half way through it failed because the computer went to sleep or something.

I plugged the USB in and I get a message saying it's unreadable now on the Mac. I've plugged it into a Windows box, and ran Diskpart, but it's saying the volume is 0 bytes.

I've tried to get it to show in Linux and Mac to no avail. The issue happened when using dd on my macbook, hence why I've asked on Apple SA.

Any advice on what to do from here? I recall I had a similar issue in the past but don't know how to fix it.

I'm assuming there is nothing on the USB stick you need to recover, since you were writing over it with dd.

Plug it into your macbook and if it shows up with in /dev as a proper device, you should be able to use dd to clear the beginning and end of the stick to make it look like a brand new USB stick.

dd if=/dev/zero of=/dev/disk__ bs=1024 count=100

will clear the beginning of the stick. (Be absolutely sure that you have the correct device id for the "of=" parameter !! Make sure it wasn't there right before you inserted the USB stick into the computer.)

However, there may be a GPT partition at the end of the stick. To write to the end, you'll probably want to use seek= with the number of blocks on the device minus 50 or so.

Once those are cleared, you should be able to add a new partition table to the USB stick using the disk utility.

If that doesn't work, using the first form without "count=100" would overwrite the whole stick with zeros. That's probably overkill, but at that point any system should recognize it as a new device


Insert images into Pages document using AppleScript I'm trying to automate the construction of a document, and am looking for a way to insert images into a Pages document with AppleScript. For example:

tell application "Pages"
    make new document
    tell document 1
      tell body text
        make new paragraph at end with data ¬
         "another paragraph" with properties {paragraph style:"Body"}

        make new image at end with properties ??? :(

      end tell
    end tell
end tell

Nothing I've tried so far works - "make new graphic", "make new image", "insert image data" and so on. I'm not ruling out the possibility that it's not possible at all (I've used AppleScript for long enough, so that wouldn't be a surprise) but it would be good if it could be persuaded to work.

Solution

@jackjr300 's solution works great. I finally went with this incantation:

set fname to "/Users/me/Desktop/picture.png"
set thisImage to POSIX path of fname
tell application "Pages"
    tell document 1
        tell body text
            make new paragraph at end with data "another paragraph" with properties {paragraph style:"Body"}
            make new image at after last paragraph with properties {image data:thisImage}
        end tell
    end tell
end tell

Here's an example that works.

set thisImage to choose file with prompt "Select an image"
tell application "Pages"
  tell (make new document)
      tell body text
          make new paragraph at end with data "another paragraph" with properties {paragraph style:"Body"}
          make new image at after last paragraph with properties {image data:thisImage}
      end tell
  end tell
end tell


How might text be selected while typing the login password on my Mac? When I wake up my Mac I am presented with the login screen. I begin typing my password in the empty password text box.

After typing the first few characters, the password text becomes highlighted (selected) somehow thereby causing the next character I type to delete those selected characters.

For example, say my password is "password123"

I press power and my Mac wakes up I type "passw"
The password text becomes selected somehow
I finish typing "ord123" and hit enter
The password is incorrect since I am left with "ord123" in the password input box

Why is this and/or how can I prevent this from happening?

I know the behaviour you describe. In my case, I wake up my Mac by pressing a key and I just wait for a few secs before entering the password. The key I pressed to wake up my Mac and if I press any others in that first couple of seconds (I am often impatient to get my computer to wake up!) will get selected as you describe.

I think this is intentional behaviour by Apple, that any character typed before the password field is displayed and working is not treated as part of the password to be entered & so are deleted. The behaviour though is not a good user experience. I think a better experience should be that the characters typed before the text field is ready should not be added to the text field when it is ready, thus making it clear that characters entered before the text field is ready are ignored. The adding them & then selecting & deleting behaviour is just odd.

My answer I suppose is this. After waking your computer, just wait a couple of secs before entering your password. I've just learnt to do that without thinking about it because it works. But your right & if you have the enthusiasm report it as a bug to Apple.


Why is Apple hardware test (AHT) not loading when pressing key D on system start? I purchased a Late-2011 MacBook Pro 15" used a month ago. At the time of purchase, I successfully ran the Apple Hardware Test.

I've since installed a new SSD and aftermarket RAM. The computer appears to be functioning normally (I'm typing this post on it), but I'd like to run the full hardware test to verify everything is OK.

But I can't seem to get it to load into the hardware test.  I've tried holding down D before pressing the power button on as well as right before the grey screen comes up. I'm confused because I've done this before without any problems.

Is there something obvious I'm doing wrong or is there a way I can check for problems that would stop the AHT from starting?

Additional info by @gentmatt:

The last time I have performed the Apple Hardware Test, my MacBook Pro was running 10.7.2. As of today, I'm running 10.7.3.

The AHT loaded even after I had installed my custom SSD and RAM. But not this time.

Pressing ⌥+D right after pressing the power button and before the gray screen appears works on my late-2011 15" MBP. This forces an internet-based hardware test, which will work even if you've lost the the local hardware test software. (It will probably work over WiFi, but you have more chance of success with ethernet.)


Unable to delete a User Account on Yosemite I had a user account of my ex boyfriend installed on my Mac. I want to completely delete it but it has been over a week now that it has been saying "deleting account.." under the user name. When I want to restart my mac it won't let me. It just says:

  System Preferences is busy and can't be closed. Users & Groups preferences is removing a user account and saving the Home directory to a disk image.

If you want to completely delete it, you should cancel the current process as it is saving the whole user account to a disk image –which is why is taking so long– and restart the account deletion process without saving any data when prompted.

From the Apple Support page:

  Select the user you want to delete, then click Remove  below the list of users.
  Do one of the following:

  (…)
  (…)
  Remove the user’s home folder from the computer: Select “Delete the home folder.” The user information will be deleted and the storage
  space will be freed. If you want to prevent programs that read raw
  data from retrieving any files, select “Erase home folder securely.”


Best, or best supported, USB-Serial adaptor for OSX I have various devices to connect to my iMac using good-old RS-232.

Of course, I only have USB connectors on my machine.

I have a couple of Prolific PL2303-based cables, and they seem to work OK, but the kext provided seems a little flaky and I'm not sure about long-term support.

What is the most-stable, best-supported USB-Serial chip-set or cable?

I have two Prolific USB-to-serial adapters but they are made by different Vendors (one is Prolific, the other ATEN).

I've used their supplied drivers just fine. Note that there are open source drivers for these devices too available here: https://github.com/failberg/osx-pl2303 FYI my use case is actually patching them through to a VirtualBox Windows VM and using them in Windows, so I have two layers of drivers and have not had any problems yet.

However, I think the best supported USB-to-serial devices are those made by Belkin. This is subjective, but I've used them for years without problem, and they are a large company with a reputation. They will likely be around in the future.


iterm2 and tmux: Keyboard conflicts When I open a terminal in iTerm2, I can use the command key to make it work like Meta, so that I can for example move between words (e.g. with ⌘-f and ⌘-v.
However, as soon as I start a tmux session within the terminal (e.g. by typing tmux new, for some reason these bindings don't work anymore, why? and how can I fix it?
Update
Below is a picture of my iTerm2 preferences:

Do you have the command keys mapped to option in the Keys tab and the option keys set to act as meta in the Profiles tab? If you do, set the option keys to act as "+Esc" in the preferences:

When the option keys are set to act as meta, they are not recognized in tmux.

Edit: \e[1;5D and \e[1;5C are not recognized by tmux either. You could just map ⌘B  to \eb and ⌘F to \ef:


How can I reset iPhone camera roll to IMG_0001.jpg? I really want to reset the iPhone camera roll to photo IMG_0001.jpg. I have tried to do it with Image Capure, iExplorer and PhoneView, but any of them did not work at all. Is there a way to clear previous history saved on iPhone (when I take picture, my camera roll starts with IMG_0002.jpg) and to make camera roll to be reset without needing to erase all content and settings?

At the risk of you having done the steps, here is how it worked in the past using PhoneView:

Power off the phone.
Connect to USB and let it start (this way the camera app and others are not accessing the camera roll).
Launch PhoneView and in the settings turn on Show Entire Disk (Advanced Disk Mode)
Delete all pictures, files, folders from inside DCIM _(such as .MISC and 100APPLE, 101APPLE, etc... leaving just the DCIM folder empty).
Edit the PhotoData > MISC > DCIM_APPLE.plist file to set things to 0000 and 100 as desired in the xml file.
Disconnect the USB and power down the phone, never once tapping on any apps while you shuffled things under the OS and the Camera app.
Power on the phone and take a picture.

    DCIMLastDirectoryNumber
    100
    DCIMLastFileNumber
    251


Remove shift key augmentation for Mission Control animation I recently upgraded to Mountain Lion and all of a sudden my key bindings for Sublime Text 2 multi-selection editing are no longer working. Specifically, I had key bindings set up for Ctrl+Shift+Up/Down arrow.

Now Mission Control has taken over that key binding. How can I remove the Shift key augmentation (that causes the transition to be slower) for the shortcut?

You can disable the keyboard shortcuts for slow-motion effects by following these instructions:

Open Terminal.
Open the plist file in your user's library preferences folder that contains the setting by typing open ~/Library/Preferences/com.apple.symbolichotkeys.plist and hit return.
A window similar to this will open in Xcode:

For items 34, 35, and 37, set enabled to NO.
Close the file, click Save if prompted, and restart your system.
Enjoy.

Note: 34 and 35 may not be present in the plist if you have never opened the Mission Control preferences pane and changed the "Mission Control" or "Application windows" settings. If 37 isn't present either, simply add it yourself.

This process has been tested with:

OS X Yosemite
OS X El Capitan
macOS Sierra

Source

MacWorld
In Translation


What's the 2020/Catalina method of getting my Mac to boot with Windows Bootcamp next time only? It seems that pre-2015, the world and his mother wanted to get Bootcamp to boot to Windows just once, and keep the default startup disk as Mac. There are loads of threads that say to use Bless or Bootchamp:
https://superuser.com/questions/36266/boot-camp-is-it-possible-to-restart-directly-to-windows-from-mac-os-x/167577#167577,
how to quickly reboot from OSX to Windows and back.
But, these methods no longer work, it would seem.
I found this Reddit post which says to use sudo systemsetup -setstartupdisk /Volumes/.BOOTCAMP/WINDOWS && reboot, but I don't think this sets it to boot next time only; and all the advice I've read says not to test out sudo commands without fully understanding them, which I certainly do not.
So could anyone tell me, or point me towards some information that would get this to work for Catalina. I'm either looking for a modern version of Bootchamp (though, I'm sure Googling it would have got me to it if something like that existed), or a new way to run sudo bless -mount "/Volumes/BOOTCAMP" -legacy -setBoot -nextonly;sudo shutdown -r now.
I know I'm lazy and holding down the option key when I need to boot to Windows really isn't all that problematic, but I think I may have a faulty option key, as sometimes it boots to mac a few times before finally working. It would be so much easier if it could be done with something like the command above.

One primary purpose of the "nextonly" option is to allow for installation of a startup manager. For example, if you install rEFInd as a boot manager, then you would configure the Mac to always boot to rEFInd. This boot manager can be configured to display different operating system to boot. After a selection is made, rEFInd instructs the firmware to boot this operating system once. After the selected operating shuts down or restarts, the firmware will boot back to rEFInd.
One possible solution to your problem would be to install rEFInd and configure to allows boot to macOS after a small delay. You could then during this delay choose to boot instead to Windows.
rEFInd has implemented a new feature that allows you press a number at startup. This number is stored in the keyboard buffer. When rEFInd starts up, the number is read from this buffer. If the number matches a menu item, then the operating system matching the item will boot. This feature was implemented to avoid having to make a select during the small delay mentioned in the previous paragraph.


Is there a Quick Look plugin for epub? Is there a Quick Look plugin to preview .epub (ebook) files?

Yes, there are several:

ePub-quicklook @ github (free)
eBookQuickLook (free) (outdated)
EPUB QuickLook plugin (free)


Time Machine encryption variations - how does each work? I've seen some great answers on Time Machine encryption, especially one by Gordon Davisson. But the variations regarding networked volumes is still hazy. The rules for locally attached volumes seem clear - it's an all-or-nothing proposition, please verify:
TM unencrypted backup to unencrypted volume: TM does an unencrypted backup.
TM encrypted backup to unencrypted volume: TM encrypts the volume (and all the files on it) then does the backup.
TM unencrypted backup to encrypted volume: TM decrypts the volume (and all the files on it) then does the backup.
TM encrypted backup to encrypted volume: TM does a backup and the OS handles the encryption?
Now, as for network attached storage:
TM unencrypted backup to unencrypted volume: TM creates an unencrypted backupbundle.
TM encrypted backup to unencrypted volume: TM creates an encrypted backupbundle. The other files on the volume are not encrypted and require no password?
TM unencrypted backup to encrypted volume: TM creates an unencrypted backupbundle, but it is encrypted by the OS anyway because the volume is encrypted? The backupbundle requires the same password as all the other files on the volume??
TM encrypted backup to encrypted volume: TM creates an encrypted backupbundle but what password does it require - the TM specified password or the volume's password (assuming they are different). Are two passwords required, one to mount the volume and one to open the backupbundle (Apple's documentation implies that you can)? Is the backupbundle encrypted separately using a different key than the other files or is it double-encrypted? Does reality exist?... oops too many questions.
Thank you for your patience! Any light on this subject would be appreciated.

It’s pretty easy if you just look at the disks and you’re on a moderately new macOS version.
Today, Apple encrypts disks and not backups. If the source is encrypted, it doesn’t matter because it gets copied unencrypted to the Destiination. If the destination is not encrypted the file stay clear, if the destination is encrypted, the files are encrypted.
Apple does encryption at rest, so until the filesystem is uncounted and then the key to decrypt them is no longer valid until a key to unlock is provided.
You can inspect encryption status with these two commands.
diskutil apfs list
diskutil cs list

APFS is the newer modern filesystem and core storage was used after the original method of encrypted sparse disk images. Complicated, so that’s why you see so many answers here on the old method, the newer method and the current method. Full disk encryption arrived with 10.7 Lion, so many major versions ago the old implementation is likely not in play for you.

What is the difference between FileVault 2 and Disk Utility Encryption?
When does encryption actually happen in MacOS/OS X encrypted volumes?


Does changing a daemon's plist file extension prevent it from being loaded? I particularly want to disable:
/private/etc/mach_init.d/dashboardadvisoryd.plist.disabled, but in general for any daemon.
Does changing its plist extension prevent it from loading?
In the past I moved them to a different folder, but this is more convenient.

launchctl list and sudo launchctl bstree will show you the jobs. You'll need to read up on the mach_init part as well as be aware that launchd gets more and more of the pie as you go from Tiger/Leopard/Snow Leopard/Lion - your in general question is basically "walk me through launched" - The command mdfind dashboardadvisory will search in the areas hidden by default in spotlight as system files.
@bmike
PS: post it as an answer if you want, so I mark it correct.


Not able to upgrade to iOS 12 from iOS12 Beta Every 2 seconds I’m getting the notification above

But when I go to the Software updates’ tab it says: Your software is up to date

iOS Version: 12.0 (16A5365b)
Model: iPhone 6Plus (64GB) NGAH2HN/A

This is an Apple bug that looks like it is fairly wide spread.

Apparent iOS 12 beta bug causes never-ending notifications to update software


Image Capture takes a long time to import and convert photos and videos from iPhone to MacBook On a MacBook Pro (15-inch, 2017) running macOS High Sierra I have connected an iPhone X via a Lightning cable and am transferring all the photos and videos taken with the iPhone to a folder I created on the MacBook using Image Capture.

I was expecting it to be just a file transfer process, but instead I can see that some conversion it taking place and this is taking a lot longer than expected.

Do you know why this conversion is necessary and whether there is a way to bypass it? All I want to do is to quickly transfer these files from the iPhone to the MacBook.

iPhone settings -> Photos -> Transfer to Mac or PC -> Switch from "Automatic" to "Keep Originals"

There's also a "Keep Originals" option in the OSX Image Capture app, I'm not sure how the two options interact with each other. From my brief testing, if the box is ticked in either place then imports will be super-fast and you'll get the original .heic images instead of the converted .jpeg ones.


Difference between photostream and icloud photos What is the difference between photo stream and icloud photos?  I have both files on my laptop

Each of them comes with their own advantages.
Advantages of Photo Stream:

Does not use your iCloud storage
Only stores your most recent 1000 photos or the last 30 days of images
Does not upload and sync videos

On the other hand, here is the advantages of iCloud Photo Library:

Stores all your photos and personal video
Uses your iCloud storage
Stores full-resolution photos

If you want to see a good article about the whole difference, you can check this link.


How do I change the gateway of a specific connection using the Mac terminal? My goal is to be able to change all of the following for a specific device: IP address, netmask, and gateway. So far, I've gathered that I should be able to use ifconfig con0 10.8.0.14 netmask 255.255.255.252, but when I try to do ifconfig con0 gateway 10.8.0.1, it gets pretty upset and tells me that gateway is a bad argument.

Thoughts?

The command you're looking for is route.

Check what your current gateway is

To check your current gateway, run the command:

route -n get -ifscope en0 default

This instructs route to return the path it would take using en0 to reach www.google.com.

The -n argument turns off domain name resolution in the output (else gateway in the sample output below would be the name of my gateway).
The -ifscope argument limits the query to using en0.  Without it, to OS will select which interface to use.
default tells route that you want to see the default gateway.  You can put a URL here instead if you suspect your OS is choosing something other than the default gateway to access a host.

The output will be something along the lines of:

   route to: default
destination: default
       mask: default
    gateway: 192.168.1.1
  interface: en0
      flags: <UP,GATEWAY,DONE,STATIC,PRCLONING,IFSCOPE>
 recvpipe  sendpipe  ssthresh  rtt,msec    rttvar  hopcount      mtu     expire
       0         0         0         0         0         0      1500         0

Delete the current gateway

To delete the current gateway from en0, run:

sudo route delete default -ifscope en0

This will delete the default gateway from en0 while leaving any other defined routes intact.

Add the new gateway

To add the new gateway to en0, run:

sudo route add default 192.168.1.1 -ifscope en0

Replace 192.168.1.1 with the IP address of the actual gateway.

For way more gory details, check out the man page for route.


How do I clone the local drives' Users directory ACL to an external drive? My local drive (Macintosh HD) runs out of space so I want to setup an external drive (External HD) with the same /Users directory and associated ACL as on the Macintosh HD drive and offload some of the more data-heavy directories there (Photos, Music, Movies).

Get Info on the User directory of Macintosh HD shows these permissions:

I've tried to use the [+] button (after authorising with admin privileges), but it didn't seem to allow me to add 'special' users. How do set 'system' to have R&W access, for instance?

Before making such a fundamental change, I wanted to see if I should use sudo chown -R system:system system to this directory. Though this would only change the owner and not necessarily let other users also have access to it. AFAIK, users 'system' and 'admin' are in different groups too.

Also, if I do a Get Info on a user I see this "Fetching..." line, which never seems to go away. What is this meant to fetch? A list of users who have access to this directory?

Ok, so turns out that all I needed to do was sudo chown root:admin /Volumes/External_HD/Users

Obviously, the checkbox next to "Ignore ownership on this volume" should be un-ticked. You can only see this on Get Info of the Volume:


After Lion can't access NTFS shared folders any more After upgrading to Lion, my NTFS shared folders are no longer accessible. I can see the shared folder, but when I try to enter from Windows 7 box it says Windows cannot access \path\to\usbsharedresource.

Even BOOTCAMP partition which was shared and working now inaccessible...

SMB is ON.

Upgrading to Lion breaks SMB.  Something to do with UUIDs or GUIDs I think.

Create a new user on the system, give that new user access privileges through the SMB share, and connect to the share using the new user name/password.  Accounts that existed pre-Lion upgrade won't work due to this UUID problem.


Installing Aperture from the App Store when a previous version is installed I have installed Apple Aperture some time ago using a serial (likely pirated) that I searched for on the internet.

Now, I want to purchase a legal version through the App Store, but it is seeing the prior version as installed. When I try to buy it, the App Store will not let me complete the purchase or download.

Ive tried to completely remove it and reinstall using this tutorial:
https://discussions.apple.com/thread/1259711?start=0&tstart=0

The steps listed did not work for me and I would appreciate additional steps to help.

You will want to drag the following to trash and then quit and re-launch the Mac App Store:

/Library/Application Support/ProApps/Aperture System ID
/Applications/Aperture.app

If restarting the app store does not work, a reboot should clear any remnants of the older licensed Aperture product and let you install. Apple support is also very helpful if you need assistance removing an old serial number from a Mac. You don't have to necessarily tell them how you got the old serial number if you feel it may make them or you uncomfortable. I can't imagine a scenario where they wouldn't be delighted to assist you in procuring a legitimate license of the latest version of Aperture.

You can also use the mdfind command to search the entire hard drive for files with Aperture in them. Be prepared for a lot of files. I've never heard of people needing to delete all the Aperture directories, but you might also look to move these to trash as well:

~/Library/Preferences/com.apple.Aperture.plist
~/Library/Caches/Aperture
~/Library/Application\ Support/Aperture


iMac won't recognize my iPhone to upload pictures When I plug my iPhone into my iMac via USB, Dropbox tries to access the pictures, but won't download them. iTunes recognizes the iPhone, but doesn't have a selection to import pictures, only videos. iPhoto doesn't even recognize the iPhone.

My iMac is running Mac OS 10.13.5 and my iPhone has the most recent iOS update.

The Image Capture app is designed to allow you export images from your iPhone to your iMac. The Photos app can also do this, but then you will need to learn how the Photos app works.

Both apps are found in the Applications folder.


How can I find out what software I've bought in the App Store? I'm Using my iPhone 3G and haven't backup it as frequently as I should and would like to know what software I've bought for it. So I know I don't have to pay for it again. Yes I can try and buy the software but I want to know of all the apps I've bought.

I know some apps wont be available for my old iPhone but they will work if I buy a new one. I need to know how much money I will lose in Apps I can't use anymore. If I buy a new phone that isn't an iPhone.

So How can I find out what Apps I've bought for my iPhone.
I have both Windows and Mac computers available.

The mac computer runs Mac os X 10.6.8, the iPhone 3G runs iOS 4.1.2

On iPhone

Open the App Store on your device.
Make sure you are signed in  the same Apple ID used for the original purchase.
Tap Updates from the bottom navigation bar.

Tap on Purchased on navigation bar

Tap Purchased on the resulting screen.
Locate the app in your Purchased tab. Tap the download button.

On iTunes 11

Open iTunes on your computer.
Make sure that you have Show iTunes in the Cloud
Purchases enabled in your iTunes preferences by going to iTunes >
Preferences under the Store tab. Then, click OK.
If you're already signed in, choose Store > Sign In, and enter your Apple ID
and password.
After you've signed in, click the Library located in the upper-right of the iTunes Store. Navigate to your iTunes library for the respective content type you wish to using the content selector in the upper-left. Choose Apps to download apps. Locate the item or title you wish to download. Click the download icon to download that item. For instance, you will want yours to say Apps.

Note: The download icon for previously purchased movies is located to the right of the movie title. To download previously purchased apps and books, you'll need to navigate to the Purchased page under the Quick Links section in the iTunes Store.


How to know which Apple ID is used to lock iPad if the display is dead? I bought an iPad mini (Wifi only) and gave it to my nephew as a gift.
He switched on the device and set it up with his apple ID. He did not set up (Find My iPad/iPhone) feature.

After a month of usage, he noticed the device is heating up when connected to the charger. Suddenly, the device display is off, and can not be charged.

When connected to a USB port on a mac, or PC, it does not get detected.

I tried to hold Power button+Home Button for 10 seconds then releasing the Home button, but it did not work.

I tried to put the device in Recovery Mode, DFU mode, but nothing worked. The device does not get detected by Windows or Mac.

I toke the device to the service center I bought it from (Not an Apple Store, we don't have Apple Stores in Saudi Arabia).

At the service center, they have a policy not to service any iOS device if it is locked using Find My iPhone feature from iCloud.

I told them that the feature was never turned on. They checked http://icloud.com/activationlock and entered the serial number, and found out that the device [Activation Lock : ON ]. So they asked me to login to icloud using the apple ID that was used to activate the lock and remove the device from [My Devices] in iCloud.

I logged in to icloud.com using my nephew's apple ID, but could not see the iPad in the list of devices.

I thought maybe the activation lock was done using another apple ID, so I tried mine, my brother's, all of the apple IDs I tried, none of them had this iPad listed among the devices in iCloud.

Now, I can not get service for the device because they think I stole the iPad.  Although I have an invoice that proves the purchase.

I know that revealing the apple ID might be considered a breach of security, but if I could just get the first and last letter of the email of Apple ID used to lock the device, then we can reduce our efforts in this hassle.

My question is: how do I know the apple ID that is used to lock the iPad knowing only the serial number of the device?

Unfortunately, it is likely that your nephew temporarily used someone else's Apple ID in order to gain access to purchases that the other user had made.  My son did this on his device, against my rules.  If this happened, then that other person may have initiated the lock.  Since you have an invoice, proving ownership and the device is only a month old, I would encourage you to use the 1-year AppleCare that came with your device.  Here is the AppleCare contact page for Saudi Arabia.

Please let me know if this information is helpful for you.  Did you by chance register your device with Apple, when you made the purchase?  If so, then Apple will have a record of that action, as well.

Cheers,
Byron


icloud backup storage issues I'm not able to backup my ipod because I have more than 5gb and don't want to pay more. I would love to just put my camera roll on backup, and I deleted the backup for everything else but it still says I have too much gb on it! All I want is my camera roll!

If the size of your camera roll is bigger than the available 5.0GB of space then you won't be able to back up to icloud unless you delete some of the content in your camera roll. Make sure by going into Settings>iCloud>Storage and Backup>Manage Storage that email, and other documents and data aren't using up any space. You can press edit and delete those if you don't need them.


Is it possible to tune OS X so it will execute exe files without having to prefix the command line with wine? I'm writing cross-platform scripts that are executing utilities and some of them are windows executables.

I would like to find a solution that would not require me to prepend the command line with wine when I run from OS X.

I know that on Windows it is possible to define executable files based on file extension but I would like to know if this is possible to do on OS X and how.

I am open to suggestions ;)

How about setting all .exe files to "open with" wine?


Unable to create a NetBoot image on Sierra I've been trying for a couple of ways in every way imaginable to create a Netboot image for sierra.
Up until now I've tried doing the following:
- Mounting the disk from a vm and using that as source
- Using the Install Sierra.app as source
- Using a tool like autoNBI
- Doing the whole workflow through the automator

But when using the disk image utility it always gives error 2 after the "Creating cache" step.
Any clues?

Creating a netrestore image is no problem by the way..

I tried running the commandline tool imagetool instead. It gave me a very similar error. Here is the complete output:

imagetool --netboot --index 2000 --source /Volumes/Macintosh\ HD\ 2 --destination '/Users/Styleshoots/Desktop/netboot\ images/' --name 'sierra netboot'

2016-11-01 14:20:46.182 imagetool[788:13710] Imaging failed. Error: Error Domain=System Image Utility Code=2 "(null)"
2016-11-01 14:20:46.596 imagetool[788:9044] imaging tool has completed '/Users/Styleshoots/Desktop/netboot\ images.nbi'
2016-11-01 14:20:46.596 imagetool[788:9044] image creation took 536.859359 seconds.

I have the same problem using the imagetool command or the System Image Utility app on macOS Sierra.

As a semi-solution (workaround?), you could follow the steps on this web page that shows how to create a NetBoot image (.nbi) using the Install Sierra.app as source. I was able to create a "plain" NetBoot image with these steps. I assume you could also customize stuff using additional Installer packages and post-install scripts.

I'm still looking for a (free-style, good-old) way to create a NetBoot image from a custom bootable macOS Sierra partition though.


How to keep music in iCloud but not downloaded? I bought an album via iTunes on my Mac. On my iPhone, the album is not stored locally (I need a wireless connection in order to play it). However the album got downloaded onto my iPad automatically.

How can I remove the album from iPad? And of course not delete it from my library?

On your iPad, go to Settings → General → Storage & iCloud Usage → Manage Storage → Music.

From there, you can either Edit or directly swipe left on any artist to delete all their songs. If you just want to delete individual albums or songs, you can drill down by tapping an artist or album, respectively, then swipe left to delete each item one by one.

If you want to go thermonuclear, you can simply swipe left on All Songs. Do note that this operation takes some time to complete, up to several minutes. So just let iOS do its work, and soon enough you should have your storage back.

Once you’re done, in order to keep songs from being downloaded in the future, go back to Settings → iTunes & App Store, then toggle Music Off under AUTOMATIC DOWNLOADS.


How do I gain permission to generate ssh keys on my Mac? I tried to generate ssh keys for GitHub (access through SSH in terminal), but I do not have access to the .ssh directory.
I tried to ls -l ~/.ssh, but I got this error ls: .ssh: Permission denied

I tried to read on the internet tuns of tutorials and tips for fix it, but unfortunately nothing works me.

What am I doing incorrectly and how can I fix it? I am running on Mac os X 10.6

sounds like you don't have eXecute permission on your .ssh folder: try running ls -ld ~/.ssh and verify that the permissions are drwx------, and that the directory is owned by you. If the permissions differ, run chmod -R u+rwX,go-rwx ~/.ssh; if you're not the owner, run chown -R <your account name> ~/.ssh (find out your account name by running whoami).

If either the chmod or chown commands fail due to permission errors, run them again but prefic them with sudo.


How do I get my iPhone to type the word "Period" instead of the punctuation while dictating? I love using my iPhone to dictate long emails, first drafts of documents, and such.  It does such an amazing job and I can capture my thoughts quickly.

Unfortunately, a lot of the work I do is associated with accounting periods but however I say "period", it always puts the full-stop punctuation.

Is there a way to get it to actually spell out "period"?  I end up having to use a word that will not be in the final text (penguin) and then do a search and replace at the end.

I have the perfect solution, and it goes as follows.

Create a new contact with the first name of what you want to be dictated, as you want it dictated exactly. (e.g. Contact first name "period" without the quotes.)
Down at the bottom select add new field and add the phonetic first name field.
Go back up and type out the phrase you'd like associated with the word. I like to use the word "literal" space then the word. (e.g. "literal period")
Force quit all apps. and reopen the one you are using to dictate to.
make a new sentence and say the phrase "literal period" and you should now get the word "period" in the sentence instead of "."

To conclude, this works for EVERYTHING. Proper Names, fantasy/sci-fi content, technical terminology, etc.


macOS Catalina installer freezes just after choosing disk I'm trying to install macOS Catalina. Currently I have Mojave, macbook pro 13", mid 2012. System suggested this upgrade so I decided to install it right away :)

When Catalina installer started it asked about accepting license and then to choose disk. After that beachball of death appears i.e. the installer process is frozen (and is marked red in Activity Monitor).
After 30m I force killed this process and retried 3 times, so far.

How can I determine what is slowing or stopping my installation?

I found a fix for me.
Something told me that a disabled Spotlight might be the reason (I had similar issue long time ago and re-enabling Spotlight did the job).

If you have Spotlight disabled, then re-enable it using this in Terminal:

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

After installation you can disable it once again :) Hope it helps someone.

*Can also make this change in System Preferences > Spotlight > Privacy = Then drag and drop hdd into the window. To undo the action, just click on the hdd, and select the minus symbol. This did the trick for me.


How do I copy to the OSX clipboard from a remote shell using iTerm2? Using iTerm2, I start an interactive SSH session to a remote Linux machine (where pbcopy is not available). On the remote Linux machine I would like to capture the output of some arbitrary command (e.g. ls *.foo), and have it magically appear in my OSX clipboard, so that when I hit ⌘+v it appears in whatever OSX application I've just pasted into. Is this possible? I've tried the escape codes mentioned on the iTerm2 doc page and can't make them work.

Solution

Piecing together lots of information from several different sources, here's what I came up with.

Local Daemon

From the local computer (OSX), setup a daemon to listen on a specific port, via launchd (see links below). The daemon process will simply call pbcopy, which will take anything passed in via STDIN and put it on the clipboard. To do this you need to setup a launchd plist file. Mine looked like this:

<?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>local.pbcopy.9999</string>
    <key>UserName</key>
    <string>joe</string>
    <key>Program</key>
    <string>/usr/bin/pbcopy</string>
    <key>StandardOutPath</key>
    <string>/tmp/pb9999.out</string>
    <key>StandardErrorPath</key>
    <string>/tmp/pb9999.err</string>
    <key>Sockets</key>
    <dict>
        <key>Listeners</key>
        <dict>
            <key>SockNodeName</key>
            <string>localhost</string>
            <key>SockServiceName</key>
            <string>9999</string>
        </dict>
    </dict>
    <key>inetdCompatibility</key>
    <dict>
        <key>Wait</key>
        <false/>
    </dict>
</dict>
</plist>

By convention, the plist file name should be the label name with .plist appended, so for the above example, it would be local.pbcopy.9999.plist. If you wish to use a port other than 9999, just change it everywhere (keeping in mind that it should be something above 1024 and should not be a well-known port that you might already be using). Once you have things working, you can remove the StandardOutPath and StandardErrorPath keys and strings, as they're only needed for debugging.

In order to load the daemon, run the following command:

$ launchctl load local.pbcopy.9999.plist

You can see that it's loaded or remove it with the following commands:

$ launchctl list local.pbcopy.9999
$ launchctl remove local.pbcopy.9999

If you would like this to load every time you login, place the plist file into the ~/Library/LaunchAgents directory.

Note: you will need to set this up on each local host you want this to work on.

SSH Port-Forwarding

Because I could be accessing the remote machine from several different local computers, I can't hard-code the sending of the data on the remote machine to a specific host. To make this as painless and dynamic as possible, I've used SSH port-forwarding to create a dynamic link from the remote machine back to the local computer (the how's and why's of this are beyond this answer; see below for more information). Specifically, I create a link from the remote machines's port 9997 to the local computer's port 9999, which now has a daemon listening on it, thanks to the launchd stuff above. I could use port 9999 on both the remote machine and the local computer, but I don't need to.

To setup this tunnel, execute the following command:

$ ssh -R 9997:localhost:9999 user@remote.com

You can remote into multiple different remote machines with the same command and all will function as expected. You can remote into the same remote machine multiple times with the same command, and it will sort of work as expected; see note below.

If you don't feel like typing the -R 9997:localhost:9999 on every SSH invocation you make, you can put the remote forwarding definition in the SSH config file to do it automatically. Here's an example from my ~/.ssh/config file:

Host ufo*
  RemoteForward 9997 localhost:9999

With that, any time that I SSH to a host whose name starts with 'ufo', the remote forwarding from 9997 to localhost:9999 will automatically be set up. See the config file man page link below for more options.

Sending Data

On the remote end I use netcat to send the desired content back to the listening daemon.

$ date | nc localhost 9997

You can get as complicated as you'd like:

$ nc localhost 9997 <<EOF
> `ls -ld *`
> `date`
> EOF

You can even dynamically decide whether or not to send any data, based on whether or not anyone is listening (there's probably a more efficient way to do this, but it works):

#!/bin/bash
cnt=`(netstat -lnptu 2>/dev/null) | grep 127.0.0.1:9999 | grep -v grep | wc -l`
if [[ $cnt -eq 1 ]]; then
    date | nc localhost 9999
fi

Observations & Caveats

Things I noted:

pbcopy plays nicely with Copy'em Paste
if you initiate more than one SSH session with the same remote port forwarding to the same remote machine, only the first one will have any effect; no "duplicate port" type errors will be reported on either end
similarly, if you remote in from several different local computers to the same remote machine using the same remote port (e.g. 9997), only the first one will have any effect

Reference Links

launchd Tutorial
launchd Examples
SSH Port Forwarding
SSH Config files


App cellular settings lost when toggling Airplane mode On iOS 8.4 on iPhone 5s, I noticed that if I set Cellular > App Store > Off, kill Setting app, then activate Airplane Mode, deactivate Airplane Mode, launch Settings, Cellular > App Store  is now On (Green).   Toggling Airplane mode flipped the setting.  This is true for a number of Apple apps.    Why does this happen and what can be done so that my preferences are retained when toggling Airplane mode?

The best solution to this would be to backup and reinstall the OS.


iTunes Store issue - cannot connect I am having difficulties accessing the iTunes store. It attempts to connect for a while, then it times out I think because it remains blank. I suspect that the issue is with connection to the iTunes store, because although I have internet access, when I go to iTunes Help in the program it tells me that it cannot connect to the internet.

I have tried several fixes which I read online. These include disabling my anti-virus, firewall, and anti-malware programs (plus restart); updating iTunes (plus restart); uninstalling then re-installing iTunes (plus restart);  using command prompt as administrator and entering: "netsh winsock reset", "ipconfig /release", "ipconfig /flushdns", "netsh int ip reset resetlog.txt", then restarting computer; going into Internet Options, Connection tab, LAN settings to confirm that "Use a proxy server for your LAN" was unchecked and "Automatically detect settings" was checked; setting IE as default browser and resetting IE settings (plus restarting); in iTunes, changing Parental options to disable iTunes store but allow iTunes U. After most of these attempts failed, I restored the previous settings.

I have checked the apple website and it said iTunes is not currently down.

I am using Windows 8.1, 64 bit; and have the latest version of iTunes (v 12.2.2).

I used the iTunes Store about 1-2 weeks ago without this issue (although for the past month or more I could not search song titles as well as before, I'm not sure if this is a related issue or not).

Any help would be appreciated.

I looked around a bit more and found https://support.apple.com/en-ca/HT203361 in the question of Problems connecting to iTunes store . For the last few months, my computer has been having an issue with date & time (when I restart it moves the clock ahead). Recently, I stopped changing it back, which is probably why iTunes Store stopped working . Once I changed the time, iTunes Store worked again.


Dock doesn’t appear in my Macbook Pro 2015 I have a Macbook Pro 13” Mid 2015 (macOS Mojave) and the dock doesn’t work (it doesn’t show up).
I tried all this to no avail. The problem doesn’t happen when I log in with a different user:

enable / disable “hide dock” and all other options it in system preferences > dock
PRAM reset
repair permissions on the home folder with Terminal
use the keyboard shortcut command + option + D to show / hide dock.
repair drive and volume with First Aid
killall Dock in terminal

I wonder if I can try something else before having to create a new profile and transfer data over ?

Resetting the Preferences list

Dock disappearing?
Follow the following steps, the could be problem with a corrupted file or other non-settings based issue.
The first thing to do is check if there are any system updates available that you can install.
This is easy to do: click on the Apple icon in the top-left corner, select App Store, and when it opens click on the Updates tab.
Should this be empty then it might be worth deleting the preferences file instead. This will reset your Dock back to the way it was when you first got your Mac, so any app shortcuts you've since placed there will need to be added again afterwards.
Open Finder, then hold down the Option key and click on the Go option in the Menu Bar at the top of the screen. This shows a few options that are usually hidden, one of which is Library. Click this and then select the Preferences folder.

Scroll down until you find a file named com.apple.dock.plist. You'll need to delete this file (either by using the Backspace key or dragging it to the Trash).
Now reboot your machine and macOS will create a new default preferences list which should hopefully clear the problem.

If you're still getting issues then contact Apple customer support.


Use downloaded Git instead of preinstalled Git I am following the Lynda.com Git Essential Training. After he downloads and installs Git he enters which git and gets /usr/local/git/bin/git However when I do it I still get the preinstalled path /usr/bin/git

How do I change the path so I am working with my downloaded version of Git

I am using a Macbook Air - Mavericks - OS X 10.9.4 and followed the default install instructions.

Add the following to your ~/.bash_profile

export PATH=/usr/local/git/bin:$PATH


Can I safely charge my iPhone 4 overnight on a regular basis? First time caller, long time listener:  I've seen this question asked on a few other sites but with no "definitive" answers.

The Apple website on iPhone batteries is ambiguous, at best, and the closest it comes to answering the question is saying that a monthly deep cycle is a good idea.  (reference)

So, what do you think -- is there an adverse impact from repeated, overnight charging of your iPhone 4?  Does this negatively affect battery performance over the long term?  Or is there some chip/ software that acts to shut off the charging once the battery is topped off, thereby protecting your hermetically sealed little power source?

All this hype about how to charge your batteries is blown out of proportion.

Although some batteries (I forget which types exactly) can have longer lives if charged at "optimal" rates and temperatures, the reality seems to be that it does not extend the life by much. One of the research papers I read concluded something like if you charge your device at around 17 degrees from 0% until 75% full you can extend the lifespan by about 1/5 of the total life span.

I have charged my devices for days at a time, and my iPod Nano has been plugged in for months, and holds a charge the same as my other nano (I have two) which almost never gets used and only charged ocasionally.

In conclusion, just do whatever is convenient for you.

EDIT: Here are some links to the apple pages related to their iPhone batteries:

Batteries - iPhone
iPhone Battery Replacement Service: Frequently Asked Questions


Creating A Stack That Shows Recently Used Applications etc In The Dock? I would like to create a stack (being able to portray List, Fan and Grid View)  which sits in the dock that allows me to see my most recently used Applications upon clicking it.

Furthermore (and if possible) I would also like it to be able to change (upon right clicking it) from recently used applications to recently viewed documents, favourite items, favourite volumes etc.

Yes, it is possible using the following Terminal command:

defaults write com.apple.dock persistent-others -array-add '{ "tile-data" = { "list-type" = 1; }; "tile-type" = "recents-tile"; }' && killall -HUP Dock

This adds a stack to the right end of the Dock (before the Trash) that lists your recently-used apps.

Upon right-clicking on the stack, you can choose from multiple recents lists, and change the style of the list, as well as remove it from the Dock. Running the above command multiple times will add multiple stacks to the Dock, which you can customise individually.


What does Apple consider to be tethering? I plan to create an app that connects an iphone with another device like a second iphone or a laptop. The problem with my app is that it will transfer data to and from these two connected devices. Some of the data that comes from the laptop will go to the internet and vice versa.

However all the data that is being transferred is very specific to the application. So the user can't simply use my app to surf the net and watch netflix. It's all restricted to the data from my application.

Is this considered tethering? I have seen on many occasions tethering apps being pulled or rejected from the app store and I don't want that to happen to my app after spending a lot of effort developing it.

Apple implements tethering, so if your app proxies TCP/IP traffic directly, you will probably run afoul of several aspects of the review process.

Clearly, if your app is doing things to add value to the network you'll likely have more legs to stand on that your app isn't just the same implementation as carrier tethering:

linking IOT type devices
speak protocols other than just TCP/IP
allow filtering, reporting, proxy, QOS controls

Like all app submissions, your milage may vary. You can do the work and take your chances or you can line up a big customer and sell the app B2B style if you are worried about Apple deciding to pass on your app.


Set F7/F8/F9 to perform iTunes functions like built-in keyboard I have a non-Apple keyboard connected to my MacBook Pro. Is there a way to make the F7 F8 and F9 do the previous song / play-pause / next song actions like they do on the built-in keyboard?

CoverSutra, among other things, will let you set your shortcuts the way you want it

  Global Shortcuts

  Instantly control iTunes from anywhere, quickly and easily. Play, pause, rate, show, skip, rewind, fast forward... and much more! CoverSutra gives you complete control over your music with fully customizable keyboard shortcuts.

It's main feature (at least for me) is its Music Search. Its like Spotlight for iTunes. Activate it with a keyboard shortcut and search away!


Prevent macOS Sierra from prompting for the password for other encrypted volume If dual boot is used to run a second macOS installation off a different volume on the same hard disk, and that volume is encrypted, booting the first macOS will prompt for the encryption password for the second volume on each boot.  However, there is no need or desire to mount the second macOS volume from the first macOS. How can this prompting for the encryption password be disabled?

The solution needs have been verified working on macOS 10.12 Sierra specifically.

You can edit /etc/fstab if you don't want a partition to mount on startup. I haven't tried personally but there's a writeup at Mac OS X Hints.

In short, get the UUID of the partition and add something like:

UUID=F0E430C1-5558-3BB3-9FA9-6904B663FEEA  none  hfs  rw,noauto


How Can I Create A Service To Alphabetize A Comma Separated Text String? My understanding is that RegEx will not do this. What will?

My issue, specifically, is extremely messy iTunes genre tags. I would like to merge genre tags that have the same or similar comma separated values, and to merge those values in alphabetical order. I have found scripts that can do this with tab separated lists, but not comma separated strings. I have not been able to find any existing app (or script) that will allow me to merge, for instance:

'Rock, Indie, Soundtrack, Folk, Electronica, Experimental'

with

'Folktronica, Experimental, Soundtrack, Rock, Indie'

to result in

'Experimental, Folktronica, Indie, Rock, Soundtrack'

Another instance might be merging and alphabetizing the genre strings of tracks with classifications such as:

'Harmonica Blues, Electric Blues, Blues'

'Blues, Harmonica Blues, Electric, Harmonica'

'Harmonica, Blues, Electric Blues'

into

'Blues, Electric Blues, Harmonica Blues'

What's my best bet?

I found the/an answer by combining the information
here: https://stackoverflow.com/a/23026003
and here: https://stackoverflow.com/a/3445211

The created service looks like this:

I will probably look into how to modify this to work on batches of tracks, which will be a little bit different since the text, itself, isn't, in that instance, specifically selected, but this works for now on a single track at a time basis.


I can't download the BootCamp support drivers (OS X 10.11.2) I've got an Early 2015 MacBook Pro (128GB, MacbookPro12,1) and I'd like to run Windows 10 on it but as its own OS instead of via a virtualisation program. Due to the space constraints imposed by the 128GB flash drive, I've installed Windows 10 (using Rufus) as a Windows To Go installation on a 32GB Sandisk USB 3.0 stick I've got.

Windows 10 works perfectly normally from the stick (I boot into it via EFI) but I can't get the drivers for the hardware from Boot Camp. Whenever I run BootCamp on my Mac, it tells me I don't have the 50GB free on my boot disk that I need to be able to partition (I don't), but it won't go any further and give me the option to download only the drivers.

The only thing I want from Boot Camp Assistant are the drivers for Windows 10.

Is there a way to fix this? The Boot Camp 6 drivers (needed for Windows 10, apparently) don't appear to be anywhere online - I could only find version 5 on Apple's website, which I believe is only designed for Windows 8 (the setup program doesn't work on my MacBook when running Windows 10, anyway).

Any help is much appreciated, I'm rather noobish with all this stuff!

Cheers,
Dan

I'm on a Mid 2012 Macbook Pro w/ Retina and El Capitan 10.11.2.

I was able to do boot camp assistant > download drivers (no other options selected) Bootcamp would ask for a usb drive, ignore it and close the pop up. From here I took my mouse up to the menu bar, and did Action > Download Windows Support Software.

The first time I tried this I got the error "The Windows support software could not be saved to the selected drive. An error occured while saving the Windows support software".

The second time I tried it, a day later with a reboot, I tried it again and it worked. Not sure what made the difference. Finder might have not been running as I'm running a trial version of Path Finder.


Finder unable to move files. Makes copies only Since the update from Mavericks to Yosemite I have a very strange and annoying problem.

When I move a bunch of files to an external harddisk (drag & drop) the last file of the group is not moved.
It is only copied.
The original file remains at its source! I have to delete it manually afterwards. (Sometimes I forget to do so!)

I also found a workaround for this problem:
Move the files to the desktop first and from the desktop to the external drive.
This works most of the time.

Does anyone has the same problem?
Any ideas how to fix this?

If it's not a permission issue you can also try to reset Finder's preferences by deleting ~/Library/Preferences/com.apple.finder.plist

Restart your Mac to verify if the problem was resolved.


Looking for a video player with capability to maintain a long list of Recent Items I've tried VLC and MPlayerX and I was disappointed with their "Recent" menu. VLC maintains very little history and it sometimes even randomly erases itself.

I switched to MPlayerX -- it doesn't erase at random, but there are only 6 items in "Recent".

I watch multiple TV series and this lack of more "Recent" history sometimes leads me to lose track of what is the most recent episode I've watched on the particular series.

Does anyone know a video player that supports adjusting that to 25 or more items in it's "Recent" menu

It Appears that Quicktime and VLC will have a default of ten (10) items in their 'Open recent' menu.

This can be over ridden by going to the 'General' system preferences and changing the 'Recent items'  to either:

none
5
10
15
20
30
50

You could also just add your videos Media Library in VLC and remove an item once you have watched it.


Can I change 10.8.2 Mountain Lion window corners from rounded to squared? Cosmetically I'd like all four corners of all OSX windows to be squared.

This proposed half-solution failed on Mountain Lion 10.8.2.

I may have seen a mod that was possible at MacThemes forum; alas I fail to recover any such thread.

How can I get corners on windows in Mountain Lion OSX 10.8.2 to be square instead of rounded?

I found a thread that describes how to accomplish the question asked.
To fix this I installed this artfile hack:

This is just a simple artfile hack that removes rounded corners on windows, the fullscreen button, and replaces the standard traffic lights with the stiijo ones (that fade almost completely on background windows)
I made it because I found it incredibly annoying to look at rounded corners when using my tiled window manager xnomad.
Download: http://d.asgeirsson.is/obtv (Remember to back up your old (S)ArtFile !! This has only been tested on 10.8.2)


Identify macOS Menu bar app - forking arrows icon I follow some videos on macOS and notice this app icon in the Menu bar.

I am curious to learn more about the app and what purpose it serves. I may possibly be missing a great macOS app.

The icon is question is from a paid 3rd party macOS app called Divvy - Window Manager.

This app lets you easily and quickly resize app windows into exact portions. The app lets you use keyboard shortcut to present a configurable panel, which can be used to precisely resize window for the frontmost app.

Use keyboard shortcut or click on the app icon in the Menu bar.

Divvy present the resize panel.

Click and drag on the boxes to select and resize the app window.

Divvy is available for download on the Mac App Store:

Divvy - Window Manager

Note: No affiliation whatsoever with the developer. Have used the app satisfactorily starting with OS X Yosemite. Using with macOS Mojave as of this writing.


Free U2 album doesn't show up in artist folder under U2 The album is instead in my iTunes artist list filed under 'G'?! So my artist list looks like this: Green Day, U2, David Guetta. I do have a song by Green Day and U2 which also appears here but don't know why Songs of Innocence isn't filed under U2 with the other albums of theirs. What is going on and how do I fix it, please?

Check the Songs list, sort by Artist & see if the same happens; then shift/select the entire album tracklist, hit  Cmd  +  I  & make sure both Artist & Album Artist say U2.


Chrome: Keyboard shortcut to go to Address Bar? I just recently switched from Windows and *nix to OS X, and I miss being able to hit F6 to go straight to my Address Bar. What's the OS X equivalent?

To switch quickly to the Address Bar use:

Mac/OS X:     ⌘+L
Win/Linux:     Ctrl+L


Transfer video file from OS X Lion to iPod touch 4th gen with iOS 5 I have a recently purchased MacBook Pro with Lion and I want to transfer a video file to my iPod touch. The only problem is this is not the Mac with which my iPod touch library is synced, so I cannot really use iTunes sync feature. What can I do?

Air Sharing will provide a network drive the Mac can drop files onto so you can view them on your touch.


Weird display issue on OS X Lion when switching external monitor I'm using a MBP with a second (external) monitor and since I upgraded from Snow Leopard to Lion, I encountered some display issues that appear in the Application Switcher, and sometimes in the menu-bar.

In case of the menu, the font in the dropdown appears with jagged edges, as if there suddenly was a huge contrast-change affecting only the menu-items.

In case of the Application Switcher, the effect is even worse as shown in this image:

Interestingly, this glitch seems to only affect overlays like the Application Switch or the menu. The rest of my OS and all Applications are looking fine.

If I go to System Preferences and choose another color-profile for my monitor, the issue is gone. If I select the previously selected color-profile, the issue appears again. The issue happens with every profile though. So if I choose Adobe RGB (1998) and restart my computer, the issue occurs. It disappears when I select another profile, for example Apple RGB. After a restart, the glitch will re-appear (even with the newly selected Apple RGB) and only a profile-change will remove it.

It's not too big of a deal, but if anybody has some pointers how to resolve this, I'd really appreciate it. Btw. the issue appears on different monitors, so it's not some monitor-hardware fault or anything.

Update: I was under the impression that the issue reappears after a restart. That assumption was wrong, the issue appears whenever I switch the external monitor (eg. change from monitor at work to the one at home).

I am also experiencing the same problems and have posted a thread to the Macbook Pro Apple Forums. While there isn't any answer yet you might be interested in following along that thread.

So far the only reliable way to fix it would be to restart the machine. Or to log out and log back in. Neither method is satisfactory.


How can I open a file from a shared location on OSX? I'm fairly new to OSX, and I'm trying to do some work stuff here.
On my job, we usually have to open some files that are located on a shared network folder, so for example, I would hit WindowsKey + R, which brings up the Run command window, and then enter something like:

file://server/clients/T\TestClient\XXXX\XXXX\Email.eml

That just opens the email directly.
I usually have to access network locations as well to browse for files.

How can I do this on OSX?

Thanks in advance!

Think I got it
In case someone runs into the same question

From Finder, command + k brings up the window to connect to a remote machine

I entered the smb:// and the path I wanted to, it prompted for credentials and that was it


How can data be restored when I downgrade macOS versions? I just upgraded to macOS Catalina and that was a pretty bad experience.

I didn't know 32bit anymore, so none of my games work.

Is there a process to back-up everything to prepare downgrading to Mojave or High Sierra.

I'd want to prepare for everything as it was before such as my saved games, existing apps. My supplies are time and an external HD.

Is there a step-by-step guide to perform this?

Copy all important files to another HD (apps, games, your user's library folder, all your other user folders, etc).

Download Mojave, create a USB, boot, erase and install.

Set up the new computer, then copy stuff over. Some things (like Mail, iCloud, some settings, and iTunes data won't work). If you use steam, it should be pretty easy to copy its folder (within ~/Library/Application Support/Steam to your new user.


Sync applications between several countries' stores I have a problem with managing purchases from different stores. As you know, Apple doesnt' provide the one global store for purchases made in different countries and some applications are published only in only local country store. Given that, I now have purchases in two countries and realized it's hard to keep track of applications, remove unnecessary and not used and so on.
I decided to clean up my account and hide not used anymore applications. But it's a completely mess: something is downloaded on my mac, something on iphone, something on ipad, it all syncs in ununderstandable ways.

My question is: how do you handle this situation with different stores? I'm thinking about re-purchasing all applications in my current country's  store, but I got used too much to packaging managers and can't imagine doing it manually.

I just got my new phone and wanted to sync to the backup of my old phone. The problem was with the apps. I deleted the foreign country's apps that were automatically put on the phone by the service provider (that I was never going to use anyway) and this solved my problem.


How does one create a repeating location-based reminder on their iPhone? Typically, when a user creates a reminder on their iPhone they have the option of setting a 'repeat' schedule (e.g. Every Day, Every Week, etc). However, this option is only available when the reminder is set to notify them at a particular date/time.

On the other hand, if a user wants to create a reminder that notifies them when they’re arriving at or leaving a particular location, there is no 'repeat' option. This means if a user wants to create a reminder that reminds them, for example, to do something whenever they arrive home, they can’t. There’s just no way to make it repeat every time they arrive home.

Unfortunately, asking Siri to do this also doesn’t work.

Is there a way to create a repeating reminder based on location, not time?

If you don't mark the reminder as complete but simply dismiss the reminder, it will stay active and you will be reminded each time you arrive at (or leave) the location.


How can I use Google shortening service (http://goo.gl) in Twitter for iPhone? I tried to configure Google service as custom URL shortening service by adding this url http://goo.gl but it's not working.

Any idea ?

You need to add a wildcard to the URL to tell the application where to insert the original URL.
Your custom url should look like this:

http://myshortener.com/shorten?url=%@

However, it looks like this isn't as simple as this on goo.gl. I'll update when I find a way without any proxy-site or other things.


Apple mail sending "Untitled attachment #####.htm" to outlook along with other attachments So I've got a coworker who uses apple mail. When he sends out attachments, they show up as the attachment as well as an "Untitled attachment #####.htm" file along with it (1 attachment becomes 2, 2 becomes 4, et al).

My boss has asked me to look into this because the Mac based coworker sends out several pdf's to clients (This happens on other files too though), and weird attachments may look like spam/viruses to the clients, something we're not too keen on.

Does anyone know why this is, and if its fixable through apple mail? I've done some research, but the jury seems pretty out on this on. I can say along with attachments, this coworker uses an html based signature, but if that breaks things, he can probably use an image based one.

Do you see these strange attachments in some version of Outlook?

In my own testing it seems to be that if there is anything after an attachment then Outlook interprets it as another unnamed attachment and generates an ATT0001.txt file (I'm assuming different versions of Exchange or Outlook might result in different names for the attachments).

If you make sure that the attached PDF is the last thing in the email then Outlook seems to parse the emails okay.

About the Insert attachments at End of Message option on the Edit -> Attachments menu in Mail. By default if you drag an attachment onto a Mail message window it'll place the attachment wherever you drop the attachment. But if you select the Insert attachments at End of Message option, then when you try to attach a file Mail will automatically drop it at the end of the message no matter where you actually position the cursor as you drag the attachment over the window. However it won't prevent you subsequently typing text after the attachment, which results in the ATTxxxx.txt file.

Long story short, make sure the PDF attachment is at the very end of the email and Outlook should parse the email okay.

Let us know how you get on.


Mac asking for username and password on starting up I am running MacOS High Sierra on a Macbook air and this is the screen that usually comes up on booting.

The mac starts up after typing the right password. From yesterday after restarting, after typing the password on this screen, a new screen comes up asking for a username and password.
This is new and has never happened before. The unusual screen looks like this

I have tried the username and password used in the previous screenshot but that doesnt seem to work. The wallpaper that comes up is mine hence I don't suspect a hard drive crash.
Any solutions for this problem? How to go about this?

Go to System Prefs -> Users & Groups and make sure the Display login window as: list of users is set as shown below in the Login Option tab on the bottom left.


Installing .pkg with terminal ? Is it possible to install a .pkg using a terminal ? (I wanted to install an app through ssh).

/usr/sbin/installer

The installer command is used to install Mac OS X installer packages to a specified domain or volume.  The
installer command installs a single package per invocation, which is specified with the -package parameter ( -pkg
is accepted as a synonym).  It may be either a single package or a metapackage.  In the case of the metapackage,
the packages which are part of the default install will be installed unless disqualified by a package's check
tool(s).

See man installer for the full functionality. Often
sudo installer -pkg /path/to/package.pkg -target /

is all that's needed. Here / is the mount point of Macintosh HD volume. -target accepts path like "/Volumes/Macintosh HD", or /dev/disk0 also.


Is there an attribute that can show which process created a file? Now, I can find out which processes are opening files dynamically.  However, for a file on my filesystem, is there a way to find out which process created the file?

I'm trying to differentiate a file I created by:

touch(1)

from one created by say, an NSAPI process running under my id.

lastcomm(1)

will give me information such as which tty is doing something, is that an attribute I can access?

Essentially, my id does a bunch of stuff.  Much of what my id does should be via applications, or from a terminal.  I'd like to find out more.  Suggestions?

Darwin is open source. I'm guessing you'll need to modify OS level things, a kernel extension, etc. and add this ability.

Or you could modify the dynamic-view tools you know (fs_usage and/or lsof), have them check if a file is being created, and append the process chain that created it into the Spotlight comment, etc.