Friday, April 22, 2022

Recent Questions - Ask Different

Recent Questions - Ask Different


How does Firefox send link to external application?

Posted: 22 Apr 2022 12:47 AM PDT

I want Firefox to call a bash script to open a certain type of URL. I've created a directory MyScript.app and put an executable bash script MyScript into it. When clicking a link, Firefox asks to choose an application to open the URL, I choose my aforementioned "app", and it is launched.

However, I do not get any command-line parameters, nor anything on STDIN. So, how is the URL passed to to the app?

Here's the script:

#!/bin/bash    echo "$1" >> /tmp/input    while read line  do      echo "$line" >> /tmp/input  done < /dev/stdin  

/tmp/input ends up with a single empty line.

What options exist to turn off Mac Studio Status Indicator Light?

Posted: 22 Apr 2022 01:01 AM PDT

I've a Mac Studio that is in a room that sometimes need to be very dark.

Does anybody knows how to turn off its Status Indicator Light for when the screen is turned off but the computer is still on?

Dock alternative respecting virtual Desktops

Posted: 22 Apr 2022 04:07 AM PDT

I'm searching a replacement for Apple's Dock.

Constraints:

  • Should look/work similar to Windows 7's task bar
  • No Window groupings
  • Don't show windows of other virtual Desktops
    • ↑ This is very important and the reason for opening a new question on this topic.
  • paid / free ok

What I've found There are several tools out there. ubar is often mentioned. It's actually almost perfect for the job, but it also shows windows of other virtual desktops.

Finder shows a folder, but Terminal says 'no such folder' [closed]

Posted: 21 Apr 2022 10:55 PM PDT

MacBook Air 2017, macOS 10.15.7 This problem has just happened, never in years before.

Any ideas?

AirDrop stopped working on all my Macs all at once

Posted: 21 Apr 2022 11:00 PM PDT

I was transferring files between my 3 different Macs and one iPhone and then suddenly none of them can find any of the others.

Discovery is set to "everyone".

AirDrop doesn't even do the radar thing where it tries to find other nearby devices.

If it had just been one device, it wouldn't be so strange, but none of them work...all simultaneously. What could have caused this?

Resetting Bluetooth or WiFi don't work. Restarting doesn't work.

How to partition hard drive on Mac?

Posted: 22 Apr 2022 02:44 AM PDT

I am trying to partition my Mac's 500GB hard drive, I have over 300GB of free space, but when I try to partition the drive it doesn't show free space to partition.

Is it possible to save the latest backup from a Time Machine backup drive?

Posted: 21 Apr 2022 08:22 PM PDT

I have an old Time Machine backup drive containing backups of my old laptop. I would like to format and repurpose the drive, but at the same time want to archive the latest backup in case I ever need to revisit it in the future. Is it possible to save my latest Time Machine backup on the drive, to another drive?

Being able to save it as a sparse bundle or other container file to reduce the number of individual files being saved would be an added bonus, as there would probably be millions of tiny files, considering all the applications and system files being backed up.

How to get all Apple Photos file names

Posted: 21 Apr 2022 11:59 PM PDT

Is there a way to get a manifest or listing of all file names from Apple Photos without having to download\export them all?

I have a few thousand photos that are duplicated by file name but with a different extension. eg jpg -> jpeg. The catch is that the duplicates don't have any EXIF data. I've sampled the file names and when I search in the apple photos UI they show up (eg. they exist) they have metadata, etc.

I've tried exporting the photos and importing again to see if photos would pick up that they are duplicates. Photos did not pick up on that. I even tried it after completely renaming the photos from jpeg to jpg.

I think I can delete them, but I want to be sure. I think I need a way to get all of the file names in Apple Photos, if possible so I can cross-check if the duplicate files truly are duplicates or not.

MacBook Pro M1 Pro - NDR006 trackpad code in diagnostic tool, but trackpad works fine

Posted: 21 Apr 2022 07:59 PM PDT

I ran the diagnostic tool on my 14" 2021 MacBook Pro M1 and got a NDR006 error that my trackpad may need repaired, but the trackpad works perfectly fine. Is this a common occurrence/bug? Or is there something genuinely wrong with mine? Thank you!

How can I find the associated event to the notification counter next to a calendar in Apple's Calendar app?

Posted: 21 Apr 2022 11:39 PM PDT

I have the following notification counter in Apple's Calendar app:

Notification counter in Calendar

What does this "1" on the dark oval stand for? If it refers to an event, how do I find this event? And then how can I get rid of the counter notification (i.e. getting rid of the "1" on the dark oval)?

Can I expect another Xcode 13.2 update beyond 13.2.1 that would support iOS 15.4?

Posted: 21 Apr 2022 06:34 PM PDT

Where can I find a roadmap for Xcode to know if Apple intends to provide another 13.2 update?

I foolishly upgraded my iPhone to iOS 15.4.1 without first checking if Xcode 13.2.1 supports it. I can't upgrade Xcode to 13.3 without first upgrading macOS to 12. I've heard some horrible problems (memory management) exist for that release and I'm wanting to wait a bit longer before upgrading from macOS 11.6.5. And there's no telling what other programs (e.g. VMware Fusion) I might have to upgrade after a macOS upgrade.

Return control to bash script when using /usr/bin/open to close SSH tunnel

Posted: 21 Apr 2022 10:13 PM PDT

I want to write a bash script that:

  • establishes an SSH tunnel
  • launches a local VNC client (vncviewer, the RealVNC viewer in my case)
  • closes the SSH tunnel once the vncviewer exits

Best effort so far:

ssh -L 5900:localhost:5900 <my IP address> -N &  pid=$!  /Applications/VNC\ Viewer.app/Contents/MacOS/vncviewer localhost:5900  kill "$pid"  

I couldn't get it to work with open, though. This works, but the script exits leaving an open tunnel behind:

ssh -L 5900:localhost:5900 <my IP address> -N -f sleep 10  open -a 'VNC Viewer' --args localhost:5900   

Using open seems to be more intuitive and user friendly.

Fixing mac bootcamp boot to windows after formating a disk

Posted: 21 Apr 2022 11:12 PM PDT

I have an old iMac (21.5-inch, Mid 2011) and I wanted to give it a new life with a new SSD. I've installed both Mac & Windows on the SSD and life was good.

Then I decided to format the old HDD to exFat as to use from both Mac & Windows, and now it won't boot to Windows anymore, even though Windows partition was untouched on the SSD.

I think even though it's installed & run Windows on the SSD, it was somehow using the boot from the old bootcamp instalation I had on the HDD. Now that it's removed I get No bootable device error when trying to startup in bootcamp using the Startup disk setting.

Startup disk app with non-working bootcamp: startup disk app with non-working bootcamp

Any advice on how I could recover it withouth a new Windows instalation? If it helps I'm not shy to use terminal commands or create other boot disks.

Disks setup: disk

New SSD with working Mac, and non-working Windows installation: New SSD with working Mac, and non-working Windows installation

Old HDD that was formatted: Old HDD that was formatted

How can I backup just user data to an external drive that anyone can read?

Posted: 21 Apr 2022 11:12 PM PDT

I'm trying to back up a mac for a friend who move and left her 2020 iMac 27 (intel) with me. She is having me send her the data from it and then sell the mac. The 1TB SSD iMac hard drive is in APFS format. I'm backing up to a Seagate (ST2000LX001) FireCuda 2TB Solid State Hybrid Drive in a USB-C external enclosure.

Things I've tried:

  1. Created external drive as APFS and used time machine to back everything up. Tried to open it on an older (2017) mac like her MacBook air that she took with her. I don't see the drive as there at all. It does not mount.
  2. Started over: Created external drive as Mac Journaled Extended and used time machine. Older mac sees/mounts the disk but all the user files are locked (see pic & seem to be empty)
  3. Created external drive as FAT. Used finder to just copy the user directories in /Users one at a time. Takes hours and invariably fails to complete. Some error happens hours into copying and it terminates the copy process with no clue of what got copied and what didn't.

I either wind up with a drive that old macs can't read, a drive that old macs can read but not see anything, or a partial copy.
¯\(ツ)

What I'd really like to do is:

  1. Go into terminal
  2. Sudo to root
  3. issue some command that copies everything to the external drive ignoring errors and does so without carrying over the MacOS authentication scheme.

So I'd just wind up with an external drive full of her and her family's data that they could easily access without having to deal with permissions nonsense.

What is the best way to achieve this?

Finder Beachballs on Right Click - And other Symptoms

Posted: 21 Apr 2022 06:04 PM PDT

Mac: 2011 27" iMac, 1 TB SSD, 32 GB of RAM, Mac OS 10.13.6

Symptoms:

Any time you right click on any file, the Finder beachballs for a long time. Sometimes a few minutes, other times even longer.

Images files all have default icons, no 'preview' thumbnail icons.

Many programs exhibit strange behavior. Safari is slow to open, System Preferences throws errors about iCloud Drive, Adobe applications don't launch, or launch and crash.

Unsuccessful Fixes: (Not necessarily in order)

Downloaded a fresh copy of High Sierra and installed it over the old install. No effect on the problem.

The symptoms very much point to a failing hard drive. But this Mac had an SSD drive. Also I created a test user and when I log in to that account, everything runs normally. So even though it feels just like a failing hard drive, it is not.

This computer had lots of 3rd party software installed over the years, much of which was old. I went through and deleted everything that's no longer in use and everything that looks like it was sketchy.

Deleted Finder Prefs ( ~/Library/Preferences/com.apple.Finder.plist ) and rebooted. No change.

Removed most Login Items, LaunchAgents and LaunchDeamons, no change.

Installed and ran MalwareBytes. Found one minor piece of malware. Removed it. No change.

Booted off an external High Sierra volume, ran Disk Utility First Aid on problem boot drive, no change.

Solution!

Delete ~/Library/Preferences/com.apple.XPC.activity2.plist and associated files. (Files in the same folder with the same name but some extra random characters added to the end)

Rebooted and all problems solved! Computer is running totally normally!

I think I'm forgetting a few things I tried. I've been fixing Macs for a long time and this really had me stumped. Nothing I tried was working. Everything pointed to a software problem in the User folder but it felt so much like a hardware problem. I'm not sure how the XPC files even caught my eye. But I knew with the problem in the User folder, with basically no software starting on system boot, and no programs manually started, and with the Finder still beach-balling as soon as you right clicked on ANYTHING, that it was almost certainly some program's prefs file mucking the whole thing up. Took about 5 hours to track it down. Hopefully if I ever come across this again, a google search will find this post :D

How can I specify a directory from which to run .cgi scripts using apache2 on macos12

Posted: 22 Apr 2022 03:06 AM PDT

I'd like to run .cgi scripts on macos12 running an apache webserver, which uses the Sites folder as webroot by default apparently, so I'd like to put my cgi there. I supposed I should be editing httpd.conf for this based on other threads I've read, but I find no fewer than 15 such files and at least one not found by locate for some reason:

(base) jr@Historys-MacBook-Air Sites % sudo locate httpd.conf  /System/Library/Templates/Data/private/etc/apache2/httpd.conf  /System/Library/Templates/Data/private/etc/apache2/original/httpd.conf  /System/Volumes/Update/mnt1/System/Library/Templates/Data/private/etc/apache2/httpd.conf  /System/Volumes/Update/mnt1/System/Library/Templates/Data/private/etc/apache2/original/httpd.conf  /opt/homebrew/Cellar/httpd/2.4.52/.bottle/etc/httpd/httpd.conf  /opt/homebrew/Cellar/httpd/2.4.52/.bottle/etc/httpd/original/httpd.conf  /opt/homebrew/etc/httpd/httpd.conf  /opt/homebrew/etc/httpd/httpd.conf.default  /opt/homebrew/etc/httpd/original/httpd.conf  /private/etc/apache2/httpd.conf  /private/etc/apache2/original/httpd.conf  

those not showing the file I suspect ot be the relevant one, /etc/apache2/httpd.conf. So is that latter the one to edit, or do I need to dig around in the godawful mess of .conf files that locate found?

How can I delete node_modules folders in projects that I have not recently touched?

Posted: 21 Apr 2022 07:01 PM PDT

I want to look for folders (let's call each of them $folder) containing node_modules/ folder.

node_modules folders are places to install javascript libraries, and these libraries themselves often have folders with node_modules, so it behooves us to always exclude node_modules and its children from the above search. They can also safely be excluded from the below:

For each $folder, find their most recently modified file. If that date is more than let's say 4 weeks old, I'd like to delete $folder/node_modules.

I imagine I can add this to cron... but Im not sure if apple provides a nicer way to do this than via bash or node or whatever

Can I power a 2021 iMac via any of its USB-C ports?

Posted: 22 Apr 2022 01:02 AM PDT

Can I use third party USB-C wall adapters to power a 2021 iMac via any of its four USB-C ports?

What is the minimum wattage required with USB-C, in order to operate the iMac at normal and performance CPU frequencies?

How to tile up to 4 windows in MacOS?

Posted: 21 Apr 2022 08:06 PM PDT

I want to tile 3-4 windows on my screen. I don't know how to do this. I tried doing it by first tiling 2 windows and then the same for the third. However, that did not work. I did find one work-around and that was using shortcuts. But for that, I have to open shortcuts and then click on tile 3/4 windows option.

I am looking for a quicker way to do the same. I am NOT looking for any third party apps for the same (as I have seen other answers on this site suggesting). Please suggest me a quick built-in way to tile at least 3-4 windows (kind of like in Windows 11).

Xquartz Catalina hangs

Posted: 21 Apr 2022 10:04 PM PDT

I've had Xquartz working multiple times on different machines over the years but I just did a new install and have some strange behavior with no windows popping up.

My issue is, when I run an app like xclock, it just hangs acting like it's running but no window pops up. And when I try to quit Xquartz it goes away initially but then comes back after a few seconds. Even force quit doesn't kill it, it comes back after a few seconds. Then trying to quite the terminal session, it says Xquartz is still running though killall X11 says:

"No matching processes belonging to you were found"

I installed Xquartz via homebrew and manually with the .dmg file and restarting my computer, still same issue. I saw someone said to delete the X11 .plist files in your User Library but that didn't work.

I can click on /Applications/Terminal and it works but the functionality I am used to in the terminal doesn't seem to be working.

I have added /opt/X11/bin: to my path so I can execute the xcommands anywhere.

Xquartz assigned my environment variable to DISPLAY=/private/tmp/com.apple.launchd.07dUzDaTi1/org.xquartz:0

Any suggestions to troubleshoot would be greatly appreciated!

Create standalone Safari apps in macOS, like you can with Chrome?

Posted: 21 Apr 2022 07:16 PM PDT

This thread explains how to turn a Chrome tab into a first-class Mac app that lives in the Dock:

How to make Web Apps appear as First-Class Mac Desktop Citizens

Looking for the same approach but with Safari instead of Chrome.

Can print graphics, but no text to Canon printer

Posted: 21 Apr 2022 11:07 PM PDT

This has stumped me. Printing was working normally before.

I wrote a document in Pages with text, and one horizontal divider line. I printed it, and only the line printed. After that point, I could only print graphics to the printer, not text.

Printer is a Canon imageCLASS MF8080Cw over a network. Printing the same PDF document from Windows works.

I tried:

  • Print to PDF, then print PDF. Only the line printed.
  • Save to RTF and open in Textedit, then print. Line was not exported to RTF, printed a blank page. Also printed from Libre Office, blank page.
  • In Pages, changed text colour and font. No change.
  • Printed a text chat. Emojis and bubbles printed, no text.
  • Did a screen capture and printed that from preview. Image printed fine.
  • Rebooted and tried again. Removed printer from settings, re-added, and tried again. No change.
  • Printed a printer test page from the Canon print queue. Graphics part printed fine, no text.
  • Tried to print text from Keynote, no text printed.

This baffles me. It as if a bug in Pages just made fonts disappear somewhere before the document gets sent out the network. It seems like there should be some way to reset that, but I don't know enough to know where or how. Any suggestions?

Importing album art from ripped music

Posted: 22 Apr 2022 02:04 AM PDT

I have over 130+ artists with 1000s of tracks all sorted and with valid metadata externally to the Music / iTune app on my Mac (Catalina). The folder layout is Artist / Album / CD in Album (ranges 1-12 currently) / Tracks (e.g. 01 - Composer - Track Name.p4a)

When I import the artist / track, Music does not apply the artwork even though its in the track metadata and stored as Folder.jpg in the source folder. The latter works on a couple of music players and Volumio on the Raspberry under the TV :-)

I'm happy to delete the whole Mac music library and start again if needed.

Though I can, if needed, hack around in Python, I'm not an Apple script creator. I could go through the whole lot and manually link the jpg to the album but does anyone know of an easier way?

Can Quicktime Player Save Recordings as an MP3 by Default?

Posted: 22 Apr 2022 03:16 AM PDT

Quicktime Player allows a very nice workflow for recording audio for Google Slides – right up to the point where you try to insert the M4A audio file that comes out of Quicktime Player. Then Google refuses to play nicely and the workflow becomes ugly…

Perhaps it's the smoke out here on the west coast, but my Google foo is failing to find any defaults settings that would change the format of the saved file (without having to go back and convert it).

Is there any way to have the default format for audio recordings be MP3 instead of M4A?

Why do Mail preferences get lost on reboot?

Posted: 21 Apr 2022 09:02 PM PDT

Apple Mail, the OS bluetooth subsystem and some other applications (e.g. Fantastical) loose relevant (but not all) configuration and preferences on nearly every reboot. For Apple Mail it seems that all lost settings are stored in the file ~/Library/Containers/com.apple.mail/Data/Library/Preferences/com.apple.mail.plist. I haven't yet identified the other affected files.

What could cause the file contents to be lost on nearly every reboot? It does not happen if I hunt for it (keep rebooting), but only after using the Mac for a while.

I currently run macOS 10.15.6 on a MacBook Pro 16" with only a few popular Apps from the App Store plus Microsoft Office.

I am a long term Mac user. The bad behavior started approximately 2 years ago after an update to macOS High Sierra (I think). The Mac became more an more unusable because of this and other strange bugs (it also started to become extremely slow, so I had to reboot regularly, loosing all settings afterwards). Repairing and even installing the OS did not help. Therefore, I got a new Mac and installed everything from scratch (no restore from a backup) and installed only very little software on the system. However, the preferences still get lost on nearly every reboot!

What exactly is meant by PPM002, PPM003, PPM004?

Posted: 22 Apr 2022 04:02 AM PDT

My Macbook Pro's Apple Diagnostics currently reports PPM002, PPM003 and PPM004 error codes, which are associated with the on-board memory.

Apple's page on this topic is not illuminating.

Is there a technician's or engineering manual somewhere that documents these?

Does iOS simulator in Xcode allow AppleID sign in?

Posted: 22 Apr 2022 02:43 AM PDT

I am interested in using iCloud for Windows for syncing bookmarks between Windows browsers (as a replacement for Xmarks, which is shutting down). I installed iCloud for Windows and used my AppleID to log in, but it said I needed to first use an iOS device. I do not have an iPhone or iPad, nor intend to have, so maybe the iOS simulator in Xcode could be enough for this purpose of mine. So my question is: does Xcode's iOS simulator allow me to sign in my AppleID account? Or does it work "offline", account-free?

Why does iTunes continually ask me to authorize my computer?

Posted: 21 Apr 2022 05:34 PM PDT

I just recently bought an album on iTunes and I have a weird problem. All of the songs (18 in all) except for one, play perfectly fine. When I try to play it, it says "This computer is not authorized to play "". Would you like to authorize it?" It prompts me to sign in with my Apple ID, which I did. Then it says "This computer is already authorized." I have no clue how to fix this! I've tried the steps outlined in iTunes: Missing folder or incorrect permissions may prevent authorization and iTunes repeatedly prompts to authorize computer to play iTunes Store purchases, but neither of them work. Any suggestions?

OS X esc key stops working (randomly)

Posted: 21 Apr 2022 11:13 PM PDT

I have a 2011 MacBook Air with OS X Mountain Lion (I've upgraded from Lion). And ever since upgrading my escape key randomly stops working. And it's not that the keyboard on the laptop would be damaged as the same happens if I use Apple's Bluetooth keyboard. So I'm guessing it's a software issue.

Also in some cases pressing ctrl+esc achieves the same thing as just esc so I'm 100% it's not a hardware problem.

Does anybody have any idea what this might be all about and how to fix it?

edit: the escape key stops working completely but it starts working again after I restart the computer.

edit2: this usually happens after the computer wakes from sleep. So it's not like that is just stopps working in the middle of using it, but rather after I put it to sleep (or just close the lid) and then open it again.

Has nobody got the same issue? Is there a better place to ask OS X related questions than Super User maybe?

No comments:

Post a Comment