Thursday, April 15, 2021

Recent Questions - Ask Different

Recent Questions - Ask Different


Copy of Terminal app is removed after each restart

Posted: 15 Apr 2021 12:12 AM PDT

I'm using a M1 Mac Mini and have created a duplicate of the Terminal app called "Rosetta Terminal" that runs Rosetta.

Each time I restart/update my computer this duplicate is removed from the Applications folder. Why? How can I keep it?

Also, when I create a duplicate of the regular non-rosetta terminal and rename it to "Rosetta Terminal" it somehow remembers/knows that it should open in Rosetta mode. Super weird.

What exactly are the files . and .. on mac?

Posted: 14 Apr 2021 10:44 PM PDT

Anecdotally, files called . and .. seem to often (always?) be present inside otherwise 'empty' directories on macOS.

Example

Create a new directory (with nothing in it)

mkdir test  

cd into it

cd test  

and list its contents

ls -a  .   ..  

What exactly are these files . and ..?

macOS Time announcement -- how to speak a longer phrase

Posted: 14 Apr 2021 11:01 PM PDT

In macOS (Big Sur), ever since I did:

defaults write ./com.apple.speech.synthesis.general.prefs TimeAnnouncementPrefs -dict u -bool YES  

the system announces the time as, for example, "four-thirty," whereas it used to announce the time as "It's four-thirty" (with the word "it's" and, on the hour, "o-clock").

Here's the prefs structure (~/Library/Preferences/com.apple.speech.synthesis.general.prefs):

{      TimeAnnouncementsEnabled = 1;      TimeAnnouncementsIntervalIdentifier = EveryQuarterHourInterval;      TimeAnnouncementsPhraseIdentifier = ShortTime;      TimeAnnouncementsVoiceSettings =     {          CustomVolume = "0.2046729";      };   }  

I've tried:

  1. With and without TimeAnnouncementsPhraseIdentifier.
  2. Deleting the file com.apple.speech.synthesis.general.prefs and then turning on the time-anounce checkbox in System Preferences. That restores the file, but not the long speech.
  3. Using Time Machine to restore an old version of com.apple.speech.synthesis.general.prefs.

After each change, I've killed the Dock to reload the preferences.

How do I get back the "it's" and "o'clock" wording? What values can TimeAnnouncementsPhraseIdentifier take on?

Edit: here's the System Preferences pane: enter image description here

MacBook Pro 13 inch mid 2012 black screen

Posted: 14 Apr 2021 08:50 PM PDT

I have MacBook Pro 13 inch mid 2012 model..

Earlier MBP is running with macOS mojave ... later I upgraded with latest version "catalina"

I found strange after upgrading macOS...few flickerings are started on the screen and Later vertical 8 cm width white patch came on the screen...

Presently total screen black and no display...now I am using MBP with second display to tv screen.

Is macOS can disturb screen display..??

Please help me..

How to output results of an AppleScript image resizing script and display in automator

Posted: 14 Apr 2021 02:44 PM PDT

I am currently using an automator flow that copies finder items, changes them to jpeg, reveals them, and then runs an applescript that presents a dialog for batch resizing by image width. Every now and then, the script misses a couple of files or I prematurely move them from the folder before they have finished. I added a couple of pieces to the automation to

  1. Set value of variable: output
  2. Ask for confirmation: output

This doesn't really output anything useful, but it does notify me when the script has finished running. Is there some way to output whether or not there were any issues with the script or is this way too crazy of a question to be asking on stackexchange? In advance... No, I'm not very familiar with AppleScript.

Here's the script - I appreciate any & all advice/help :)

tell application "System Events"      activate      set theWidth to display dialog "Enter the width" default answer "2000"      set theWidth to the text returned of theWidth as real  end tell  global theWidth  tell application "Finder"      set some_items to selection as list      repeat with aItem in some_items          set contents of aItem to aItem as alias      end repeat  end tell  repeat with i in some_items      try          rescale_and_save(i)      end try  end repeat    to rescale_and_save(this_item)      tell application "Image Events"          launch          set the target_width to theWidth          -- open the image file          set this_image to open this_item                    set typ to this_image's file type                    copy dimensions of this_image to {current_width, current_height}          if current_width is greater than target_width then              if current_width is greater than current_height then                  scale this_image to size target_width              else                  -- figure out new height                  -- y2 = (y1 * x2) / x1                  set the new_height to (current_height * target_width) / current_width                  scale this_image to size new_height              end if          end if                    tell application "Finder"              set file_name to name of this_item              set file_location to (container of this_item as string)              set new_item to (file_location & file_name)              save this_image in new_item as typ          end tell      end tell  end rescale_and_save  

iMac 5k (2017) does not always boot when connected to UPS

Posted: 14 Apr 2021 02:04 PM PDT

Ill start by saying that this particular imac is mainly for music production so it only goes online for software updates if not its always offline. I'm currently on high sierra as it is very stable for all my music stuff.

I bought an EATON 5S 1500VA about 4 months ago and twice now out of nowhere the iMac did not boot when connected to the UPS unless i change in which socket it's plugged (there are 8 sockets total..4 surge protected and 4 with battery).

It was connected to the battery socket number 1 and it worked fine until suddenly it did not boot anymore, so i plugged it in battery socket number 3 and it worked...then today it did not boot again on socket number 3 so i plugged it in socket number 2 and it booted. Both time this happened i immediately tried connecting directly bypassing the UPS and both time the mac started fine.

Now you would think its a problem with the UPS except that my old 2009 mac pro boots on all 4 sockets everytime i've had that problem.

I switched the UPS off, disconnected everything before connecting everything again but its still the same...i really don't know what to do...

Hope someone here may have an idea of what the heck is going on and can guide me.

Thank you

Macbook Pro 2016 - Big Sur Battery Issue after replacement

Posted: 14 Apr 2021 01:34 PM PDT

Background - i bought a 2016 Macbook Pro (A1708) a few weeks ago that was at 800+ cycles and the battery was listed as "service recommended", would not charge past 1% and switch off if unplugged. So i bought a new battery and installed it. Little did i know that there was a replacement program for the 2016/2017 MAcbook Pro's that had issues after Big Sur upgrade..doh! So now Apple wont touch me as i replaced the battery but the issue still persists even with a new battery. I have attempted an SMC reset and PRAM/NVRAM resets and it still doesn't work. I have wiped SSD and gone back to Mojave (same issue) then upgraded back to the latest version of Big Sur.

Did this bug with Big Sur brick something on the logicboard/SMC? Has anyone else had this issue and worked out how to resolve?

Troubleshooting: 90 seconds to eject external Time Machine drive?

Posted: 14 Apr 2021 12:46 PM PDT

I have a 4gb USB-C drive attached to my 16" MacBook Pro running Big Sur 11.2.3. I use this drive exclusively for Time Machine. When ejecting the drive, it takes anywhere from 90 - 120 seconds before the drive is ejected. This happens even when Time Machine is not actively backing up to the drive. A couple OSs back, I remember thinking 15 seconds was a long time to wait for a drive to eject, but now, 90+ seconds feels like forever.

What steps can I take to troubleshoot and shorten the ejection time?

Why are my Mac and Windows machine able to share a flash drive, but they cannot share an external hard drive?

Posted: 14 Apr 2021 02:54 PM PDT

I am recording Zoom meetings with my Windows machine and storing the videos on an external hard drive. I wanted to consolidate the folders by adding videos I have recorded on my Mac, but I realize I cannot just switch the external hard drive between the two machines.

Why is that possible when using a USB Flash Drive?

Should I then store the videos temporarily on a USB drive on one machine, and then use that to transfer the videos to a permanent external hard drive connected to another machine?

2020 M1 MacBook Pro: Built-in display does not show entire desktop (truncates 300px from right and 200 px from bottom)

Posted: 14 Apr 2021 03:04 PM PDT

It seems like I have a desktop which is slightly larger than my screen. When I maximise a window the bottom portion (approx 300 pixels) and right portion (approx 200 px) are not visible. I can move the mouse to that invisible and perform click operations but the pointer is not visible on screen. (It is shown when in the visible region). Attempting to scroll beyond the visible extremities does not pan the screen.

See the attached screen shots. For the truncated ones, I captured a portion of the visible regions, starting at the top of the screen and moving to the right-most visible (or bottom most). For the non-truncated ones I moved the mouse enough such that I could be confident of being at the extremity of the desktop - but I had to do this unseen.

Horizontal truncation: visible portion of status bar, showing horizontal truncation

full status bar

The same thing happens with vertical truncation, but the images take up a lot of vertical space in this post and don't really add much (though I can add them if this is desired).

I've had to move the Dock to the left of the screen in order to make it visible but I would prefer to keep it on the bottom.

In terms of my machine setup:

I'm using a new 2020 issued M1 MacBook Pro running Big Sur. I've tried both with and without an external display. With an external display, that external display shows fine (and has no truncated region). But in both setups, the built-in display of the laptop is truncated.

In case it matters: I migrated my data to it from a 2015 edition MacBook Pro which had been upgraded to Mojave.

I've tried looking in System Preferences but don't see anything related to screen size in the Displays subsection. I've also tried looking for zoom/magnifying settings (such as might be used for a11y reasons), again to no avail.

I'd welcome suggestions for things to try here.

Get notifications for high CPU usage

Posted: 14 Apr 2021 03:01 PM PDT

My new laptop has an M1 chip and no fan, and this is great, but it also makes it hard for me to find out when the CPU has been running high (and consuming more battery than usual).

How can I make it show notifications whenever the CPU has been running high for a while?

tmutil setdestination permission denied

Posted: 14 Apr 2021 08:41 PM PDT

I'm trying to force TimeMachine to point to an smb location. The smb share is on a Ubuntu server and I followed this guide (mostly - it's a little outdated) to setup the smb.

However, I do not see my smb in TimeMachine, so I'm running:

tmutil setdestination 'smb://myusername:mypassw0rd@myserver/timemachine'

and I'm getting back:

The operation couldn't be completed. Permission denied (error 13)  The backup destination could not be set.  

How do I go about troubleshooting this?

How can I disable Finder notifications?

Posted: 14 Apr 2021 07:05 PM PDT

Every time I disconnect my mac from its dock, I get a Finder notification about ejecting a drive before disconnecting. It's a drive I use for time machine backup, and I just don't think it's worth it to take the time to eject it every time I want to move my mac.

Is there a way to disable this notification? The Finder app does not appear in the Notification settings.

What is the ‘has list-id containing’ iCloud Mail rule?

Posted: 14 Apr 2021 04:43 PM PDT

iCloud Mail Rule

What is the "has list-id containing" drop down option mean, how do I use it, and what does it do?

How can I record an app in background

Posted: 14 Apr 2021 12:58 PM PDT

Due to my poor organization I have 2 simultaneous lectures this semester, at this moment I'm following one on Phone and I record the other one with the Mac (Quicktime and Soundflower)

Is it possible to record Chrome or Safari in the background while doing other things on the screen?

And for my specifical purpose, is it possible to direct the audio of an app on the headphones and the audio of another app to a different output (external speaker or Soundflower to record)?

How to send Data block to secure Enclave Processesor [closed]

Posted: 14 Apr 2021 10:10 PM PDT

How to send data block to Secure Enclave processor to use its AES engine for encrypting/decrypting data using its Hardware keys.

SE don't share keys to anyone. So I think the only way to decrypt or encrypt data by sending it to SE

Big Sur - unable to focus any app or make mouse/keyboard inputs after waking from sleep?

Posted: 15 Apr 2021 12:15 AM PDT

Problem Description

Since upgrading to Big Sur I have been experiencing, sometimes multiple times per day, an issue where after waking the machine from sleep:

  1. I am unable to enter text input with the keyboard. Typing into text inputs produces the system alert sound, as if typing is not allowed. Some shortcut combinations like Cmd+Tab still work. Using the on-screen keyboard produces the same results, so it appears not to have anything to do with the keyboard hardware.

  2. I am unable to click on some kinds of UI controls with the mouse. Clicking on a window will bring it to the foreground. But links on webpages have to be double-clicked to navigate, as if the first click is ignored. Other kinds of controls such as the sidebar in Finder don't respond to clicks at all.

  3. When clicking between windows belonging to different apps, the active app in the system menubar does not update. So I may have a Finder window in the foreground, but Chrome's menu will still appear in the menubar.

  4. If I switch to a different desktop space, a different app may appear in the menubar (depending on what is open in that space) but then the menubar becomes complete unresponsive and does not respond to clicks after that.

  5. It's obvious when looking at some apps like System Preferences or Activity Monitor that even when their window has been brought to the foreground, the app isn't fully "focused", as some controls remain greyed out in the way they do when the app is in the background. (I think this gives a big clue about what's going on - is something stealing focus and won't allow any other app to be focused?).

  6. Putting the machine back to sleep does not resolve the problem, it remains in the same broken state after waking again. Using fast user switching to jump to another user profile reveals the other profile to be unaffected, but switching back to the first user returns it still in the broken state.

  7. I have tried force quitting Finder and sending kill signals to SystemUIServer and the Dock process, but this has no impact.

  8. The only solution I have found is to log out and log in again, or restart. Sometimes it is not even possible to log out, as the menubar may become unresponsive and the Cmd+Shift+Q shortcut doesn't always work, in which case a forced restart from the Login Window is required (the Login Window itself behaves normally throughout).

This issue began immediately after upgrading to Big Sur, so I think it must be a macOS bug - but as I have been unable to locate any other reports of this issue by Googling all the terms I can think of, it is conceivable that the problem results from a particular combination in my system of third-party apps or peripherals.

My machine is a MacBook Pro (16-inch, 2019) with i9 and Radeon Pro 5500M. Running Big Sur 11.0.1. I usually have a Thunderbolt 3 dock attached with external display, USB keyboard and mouse, but the problem has also occurred when roaming with nothing plugged in.

Question

Going with the focus-stealing theory, is there a way to debug this by determining which process owns the currently focused app/window in macOS? (I am able to run terminal commands by ssh'ing in from another machine when the problem occurs.)

Alternatively, is this a known issue or has anybody else experienced this? Are there other solutions or workarounds I can try to resolve the problem without logging out?

Can I tell my Mac to charge to 80% only?

Posted: 14 Apr 2021 01:30 PM PDT

I leave my MacBook plugged in for days at a time, so the battery stays charged to 100%. Despite Apple claims to the contrary, I believe that the battery's capacity would be better preserved if I could keep it at an 80% state-of-charge. Is there any command or setting that would let me disable charging from the power adapter?

Here are various options, (1) being my most preferred:

  1. A setting to automatically maintain battery at 80% SoC (like my Tesla has)
  2. A setting/command to use the AC adapter for running power only ("not charging" state)
  3. A command to tell my Mac to totally ignore the AC adapter power

(2) could be cobbled into (1) with some kind of script. Even if not possible from the Mac itself, (3) could be cobbled together with an IOT switch. But with (3), it's unclear the lower maintained SoC would outweigh the cost of the additional cycling.

Macbook is running, but black screen

Posted: 14 Apr 2021 02:37 PM PDT

I have a Macbook Pro (2015). When I switch on, I can hear the fan noice but screen remains black, no backlight (No light on the Apple logo in back). I checked brightness, restarted mac several times, reset the System Management Controller, followed these steps but no luck. Any ideas?

EDIT: Battery is dead

Q: Cannot spoof MAC Address on Macbook Pro 2019 13.3 on Big Sur Beta 4

Posted: 14 Apr 2021 01:25 PM PDT

I usually change my MAC Address frequently and it worked perfectly on Catalina, however when I transitioned to Big Sur it didn't seem to work correctly, at least for Beta 4. I would run the command

sudo ifconfig en0 ether yourspoofedmacaddress  

where I confirmed that en0 is my wireless device. I would expect that after running ifconfig the en0 interface ether would display the spoofed mac address, and it does, but as soon as it connects to any wifi connection, the en0 interface reverts right back to the original MAC address.

This also happens after I try to spoof any interface MAC address including en1, en2, and en3. These interfaces aren't used at all, but once en0 receives any type of network connection, all of the spoofing reverts.

Any ideas as to why it might not work anymore in Big Sur or any workarounds for that matter?

Use Google speech to text instead of Apple's

Posted: 14 Apr 2021 10:29 PM PDT

Google currently has much higher quality speech transcription. You can try it easily by going to doc.new and pressing Cmd-Shift-S and talking. Compare to using the built in system from Apple (pressing Fn twice).

Ideally there would be a good way to do this, but if that doesn't work, hacky is the next best thing. An AppleScript or Hammerspoon script that instantly pops up a Google Docs window, and then inserts the result is better than nothing.

Given that things like this https://dictation.io/speech exist, or this jsfiddle it seems like it should be possible to at least have an extension that can interface with other applications to enable dictation input, but I haven't found any yet.

Is there any way to somehow use this instead of the built in transcription, e.g. with a keyboard shortcut?

'Operation not permitted' accessing SMB Share as root under Catalina

Posted: 14 Apr 2021 03:47 PM PDT

I have a script that copies a file from our server to the local machine. Here is the script and output

+ date  Thu Jun 11 09:16:00 ACST 2020  + id -un  root  + pwd  /Volumes/Macintosh HD/backups  + mkdir /Volumes/Server_auto  + /sbin/mount_smbfs smb://User:password@Server/General  /Volumes/Server_auto  + ls /Volumes  Macintosh HD  Server_auto  + ls /Volumes/Server_auto  ls: Server_auto: Operation not permitted  

Ultimately I want to

cp -f /Volumes/Server_auto/Backups/Web/db_6_1500.zip ./db.zip  

but I think if I can at least get a directory listing, the copy will probably work.

I can sudo this script from the terminal and it runs without a hitch. It has been running for several years from cron without a hitch, it's only after updating to Catalina that the problems have started.

I have tried

  • adding cron, ls and mount_smbfs to the Full Disk Access list
  • moving the job to a plist file in the LaunchDaemons folder

Everything works just fine except for the copy operation. Behaviour is identical under cron or plist/launchd.

This is clearly a SIP issue. Before I added cron to the Privacy 'Full Disk Access' list, I was getting the same error message when the cron job started.
Now, it's entirely blocking the external SMB share, but I don't know why or what permission to grant to make it work. The exact same sequence of operations, when run manually as root, succeed every time.

Any ideas?

Creating a bootable macOS installer errors with ‘dyld: Library not loaded: @executable_path/../Frameworks/IAESD.framework Versions/A/IAESD’

Posted: 14 Apr 2021 06:47 PM PDT

I'm following How to create a bootable installer for macOS guide by Apple, but it's giving me an error. When I execute

sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/disco  

It gives me this:

dyld: Library not loaded: @executable_path/../Frameworks/IAESD.framework/Versions/A/IAESD    Referenced from: /Applications/Install macOS Catalina.app/Contents/Resources/createinstallmedia    Reason: no suitable image found.  Did find:      /Applications/Install macOS Catalina.app/Contents/Resources/../Frameworks/IAESD.framework/Versions/A/IAESD: mmap() error 1 at address=0x103C4F000, size=0x00006000 segment=__TEXT in Segment::map() mapping /Applications/Install macOS Catalina.app/Contents/Resources/../Frameworks/IAESD.framework/Versions/A/IAESD      /Applications/Install macOS Catalina.app/Contents/Resources/../Frameworks/IAESD.framework/Versions/A/IAESD: mmap() error 1 at address=0x103C65000, size=0x00006000 segment=__TEXT in Segment::map() mapping /Applications/Install macOS Catalina.app/Contents/Resources/../Frameworks/IAESD.framework/Versions/A/IAESD  ADMINs-MBP-2:~ ADMIN$   

I'm using OS X Yosemite 10.10.5 on a Macbook Pro 2015.

The USB device is a 1TB External Hard Drive, Mac OS Extended formatted.

Turn off the macbook main display while working with monitor [duplicate]

Posted: 14 Apr 2021 08:24 PM PDT

MBP 2015 13, 10.12.2

I want to use an external display via HDMI and turn off my Macbook Pro's display. How can I do it?

Update

There is another question: How do I turn off laptop display when I have an external display?, but I don't think this one should be marked as duplicate.

Its 2017 now and the old question has answers from 2011-2014.

The other thing is - that the old question has also links to other answers and solutions. With this question we have answer with 2 variations of how to do it in one place.

iCloud drive and git repository

Posted: 14 Apr 2021 11:39 PM PDT

I have upgraded some of my Macs to Sierra. Now, I'm wondering whether I want to enable iCloud on the Document folder or not. It seems useful if it works well. I'm syncing some of the PDF files between iPad over iCloud, and my experience was "so-so" compared with Dropbox based sync (I'm using PDF expert on iPad).

I'm particularly interested in how git repository work (or not work) well on the iCloud drive -- I have multiple Macs; I know the iCloud drive is slow in sync.

Do you have any experience or recommendation on this?

An undiagnosable screen fault (flickering/glitching)

Posted: 14 Apr 2021 08:24 PM PDT

I have been experiencing an intermittent screen flickering/glitching. The problem occurs where I use, or leave the laptop on for several hours, until I let the laptop rest (i.e. shut it down and leave it off) for several days, then promptly starts again with a couple of hours of use.

The flickering/glitching affects the whole screen. I don't think the attached image does the problem much justice. The whole image on screen appears to shake, moving up and down, ghosting between two 'screens'. The problem started with faint horizontal lines across the screen and then escalated within a matter of hours.

I have taken the Macbook Pro into an Authorised Apple Service Provider who were unable to diagnose the fault with their diagnostic systems; as a result they weren't prepared to replace any hardware. The service provider has proved fruitless. Has anyone else had a similar experience?

Shortcut for toggling between different windows of same app?

Posted: 14 Apr 2021 04:38 PM PDT

I opened two Google Chrome windows (because I am using multiple Gmails) and when I do the Cmd ⌘ Tab ⇥ shortcut it just shows me other applications that I opened but does not show me the other Chrome windows that are already opened.

How to switch to the other Google Chrome window that I opened using keyboard shortcut?

Script or workflow to modify find and replace text in clipboard

Posted: 14 Apr 2021 03:25 PM PDT

I need give unique names to many, many files as part of my job. I download dozens of PDFs from a research database which all come with the same name (date of download). I have to open the file, select the title, paste it into the filename field, and then go in and manually remove the colon and replace it with a dash.

That last part is really what's killing me since basically every file I download has a colon in the title that I want to paste! What I want is something that will modify the contents of my clipboard so I can just paste it into the naming field without having to manually replace the colon.

In short, I want any ":" in my clipboard to change to a "-" before I paste it.

How to disable Self Control application?

Posted: 14 Apr 2021 04:37 PM PDT

I use SelfControl quite frequently for completing homework and such, but at school, while I was away from my keyboard at the white board, my friend thought it would be funny to set the timer to 10 hours. I am currently using a proxy to ask this question. Is there any way to disable this useful, but inflexible application?

No comments:

Post a Comment