text:
If I disable the app store with screen time will my apps still automatically update if set to do so?
I can't think of a quick way to test it out.

You can't think of a quick way to test this other than actually doing it and seeing if the apps update?

But then how would I know if the app actually has updated itself? It doesn't tell you. Also I only have a few apps, so it could take a week or so for an update to be released.

Disable the store, wait a few weeks, enable it again. Then check whether any app has an update pending since days//weeks.

No, unfortunately apps will stop updating until you allow access to the App Store again. So you will need to periodically enable the App Store to install (security) updates.


text:
How can I prevent a recording from being inadvertently stopped?
After I hit Record on my iPhone for video or audio recordings, the Stop button is too easily triggered accidentally, e.g. by the wind or physical matter (dust, paper) that manages to touch the phone screen. How can I force the phone to require more than a touch (e.g. a password) to stop or pause a recording?

Wind, dust, paper?!?  The iPhone screen is capacitive touch meaning in order for it to register a touch input the medium must conduct electricity.  Either you like in a high statically charged environment or something else is causing this issue.  Where is your iPhone when you have this recording going on?

Also the accepted way is to hit the side/mute/lock button which then requires you to enter a password or faceid. If that is too quick what about turning the phone face down?

@Allan  I definitely know that no human is triggering it. My iPhone is usually on a flat surface, or in a bag where other objects like the paper touch it.

Are you sure that the stop button is actually being tapped? And not something like an audio firing from a different app that stops the recording?

@kumowoon1025 You may be correct! Let's include the second possibility in my question? In addition, how can I prevent "audio firing from a different app that stops the recording"?

Putting the phone on silent will prevent this issue in some cases, but getting a incoming call is sure to stop all things audio related, unless the phone has do not disturb or airplane mode on.

One possible reason for automatic triggering could be lack of storage space, if your iPhone internal memory is near full.

To prevent touch, turn on guided access and set it a password for removing it and block the entire screen using this tutorial.
Disable the internet and set it to airplane mode to prevent incoming calls from stopping the video.
Plug it into power and set the screen timeout time to never, so it prevents it from shutdown and autosleep(which is by default disabled when recording).

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
How can I use my iPhone as a microphone to my Windows laptop?
My Windows laptop has a shoddy microphone. I can connect my iPhone to my laptop via USB; I'm not asking about Bluetooth. I fancy speaking to my phone's audio input as if it were a mic.

Title says iPhone, question body says Android - which is it?

I'm just curious as to why getting an inexpensive USB microphone was overlooked.

I'm voting to close this question as off-topic because the question body mentions an Android phone twice, whilst the Title says iPhone. Android wins by numerical superiority.

@Tetsujin Sorry! Corrected.

You'll need a "microphone app" to be able to do that. That could for example be the "Wo Mic" or the "Ez-Mic" apps:
https://wolicheng.com/womic/
https://www.ez-mic.com

The ez-mic link causes Firefox to issue a security warning about the site specifically the certificate.  It may be a simple oversight by the dev but for me, it's red flag and I would avoid it.

The certificate expired recently - seems like just an oversight. In any case, you can download the app from the App Store for a free 30 minute trial. Personally I would prefer the Wo Mic app I listed first.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Using of mfind in general case : with or without extension for substring of a filename, even with a number
I try to use mdfind to find files from a part (substring) of their filename which can be also a number.
For example, I have a file called 'GCph_WL_FoM_154.46_AND_SIMPLE_SUM_GCsp_XC_AVEC_NO-ZCUT_FoM_571.35.py'.
If I do :
mdfind '154.46'

or
mdfind -name '154.46'

or
mdfind 'kMDItemFSName == "154.46"'

There are not results for these different commands.
I would like to find all the files whose filenames (with or without extension) contains a substring as argument and without case sensitive, and mostly, working also with number for the substring (number could also be located at the end of filename).
Could anyone tell me how could I achieve this ?
UPDATE 1 : I have followed the procedure of reindexing posted on this link.
1) How can I identify the processes launched by the terminal command :
$ sudo mdutil -i on "/Volumes/Macintosh HD"

Moreover, unlike to what is indicated on this link, I didn't find .Spotlight-V100 file into "/Volumes/Macintosh HD" directory. I found it into /System/Volumes/Data/ directory : is it normal ? (I am on Catalina 10.15.3). I have deleted it.
2) Still about this reindexing, is there a way to get a progression bar, graphically or directly inside terminal. Indeed, I remind that I have a 2TB SSD disk and it seems it takes a very long time to reindex all the "/Volume/Macintosh HD". That's why I would like to get this progression   bar.

On my system I opened Terminal and executed touch GCph_WL_FoM_154.46_AND_SIMPLE_SUM_GCsp_XC_AVEC_NO-ZCUT_FoM_571.35.py and then tried both mdfind '154.46 and mdfind -name '154.46', it found it.  I then moved the file to /Users/Shared/ and ran both mdfind commands and it was found. Assuming it's stored on an indexed volume/location it should find it. I'd try rebuilding the index.

@user3439894 . Thanks, I decided to rebuild the index with putting/removing my Volume into System Preferences / Spotlight . The process of rebuild seems not to run : ps aux | grep -i spotlight gives : _spotlight       48545   0.0  0.0  4806584   7684   ??  S    11:04PM   0:00.05 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared

_spotlight       48544   0.0  0.0  4813752   7804   ??  S    11:04PM   0:00.05 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared

_spotlight       48543   0.0  0.0  4832184   7832   ??  S    11:04PM   0:00.06 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared _spotlight       48542   0.0  0.0  4701112   7824   ??  S    11:04PM   0:00.06 /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Versions/A/Support/mdworker_shared -s mdworker -c MDSImporterWorker -m com.apple.mdworker.shared

Does Smean Sleeping process ? So inactive process, doesn't it ?

Please edit your post down to one question: either ask about usage of mdfind or ask for help troubleshooting your Spotlight index. I suggest pulling out your edit into a separate question about Spotlight reindexing.

You are using mdfind correctly, but apparently there is a problem with your Spotlight indexes.

I attempted to reproduce the behaviour you observed, but it seems to work fine for me. In fact I got exactly the same results as user3439894.  First I created a sample file having the same name as your file.
touch GCph_WL_FoM_154.46_AND_SIMPLE_SUM_GCsp_XC_AVEC_NO-ZCUT_FoM_571.35.py

Then I tried two different search commands. Both of them produced exactly one result: the file created above.
mdfind '154.46'
mdfind -name '154.46'

I also tried your third search command, but it yielded nothing because the search term was incorrect. Here it is again, fixed, with * asterisks for wildcard globbing.
mdfind 'kMDItemFSName == "*154.46*"'

This is the answer to the question you asked originally. If you want a different answer, please edit your post to focus on one question.

Thanks for your answer : is there a way to get an insensitive reasearch  of the substring "foo" called for example by :' mdfind kMDItemFSName == "*foo*" ?


text:
How user's name can be displayed before disk is decrypted, when FileVault is turned on?
As far as I understood, FileVault provides full disk encryption functionality. What gets me puzzled though, is that once computer (with disk encrypted using FileVault) is turned on - username is displayed, before disk is decrypted. Thus, it has to be stored somewhere (and wherever it is stored - this storage is not encrypted). So I am wondering:

Where exactly the username is stored?
What else is stored there (and thus left unencrypted)?
It seems to me that (no matter what the answers to two previous questions are) FileVault encryption can not be called "full disk". To illustrate the point: if Android device is encrypted and then restarted - the process of loading OS won't start, until password is provided (which feels 'fuller' to me). Am I missing anything?

In older pre T2 macs the disk is not fully encrypted and the users name is stored in an unencrypted volume called Preboot.  This volume is readable by the firmware which calls boot.efi within it.  This displays the unlock screen and once the password is entered unlocks the OS volume and the OS loads.
The term Full disk encryption is generally used to describe something other than File level encryption rather than implying that there is nothing unencrypted on the disk. Probably Full volume encryption would be clearer.
This is much the same as Windows Bitlocker or Linux LUKS encryption except they tend to simply demand a valid password/key/fingerprint etc to unlock etc without storing the username outside the encrypted volume.
In T2 macs the structure is the same but the whole disk is encrypted so Preboot is not accessible until the disk is unlocked by the T2 chip.

Mac computers that have the Apple T2 Security Chip integrate security into both software and hardware to provide encrypted-storage capabilities. Data on the built-in, solid-state drive (SSD) is encrypted using a hardware-accelerated AES engine built into the T2 chip. This encryption is performed with 256-bit keys tied to a unique identifier within the T2 chip

There are various unencrypted locations on the pre T2 startup disk. First of all the EFI partition is not encrypted.  This partition may contain nothing or may contain firmware updates in a directory EFI/APPLE.  This is not private or unique data.  It may also contain bootloaders for Windows or other OSs, if you have installed them, as they also need an unencrypted partition to boot from.
Next not all the volumes in the partition which holds the APFS container containing macOS are encrypted. In Mojave it looks like this (Catalina has an extra encrypted volume Macintosh HD - Data).
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +21.5 GB    disk1
                                 Physical Store disk0s8
   1:                APFS Volume Macintosh HD            17.0 GB    disk1s1
   2:                APFS Volume Preboot                 27.6 MB    disk1s2
   3:                APFS Volume Recovery                510.5 MB   disk1s3
   4:                APFS Volume VM                      20.5 KB    disk1s4

Recovery is not encrypted (you can get into recovery without unlocking) but doesn't appear to contain unique data.
Preboot is not encrypted (so the system can find the bootloader boot.efi, display users, wallpapers etc) before unlocking the OS volume. It has at least some data that is not generic.

You can mount Preboot and have a look what it contains.  Taking the Mojave example from above...
sudo mkdir /Volumes/Preboot
sudo mount -t APFS /dev/disk1s2 /Volumes/Preboot

Inside you'll find one directory named with the GUID returned from diskutil info disk1s1|grep 'Volume UUID'.
You can then drill down into this directory - there is the bootloader boot.efi which the firmware calls to start macOS and lots of (to judge by their names) efi resource files which  contain fonts, graphics resources, etc.  For example:
[admin@macOS] / $ls /Volumes/Preboot/DD3856E8-5866-4F7E-8DDC-692FB7EB1C9F/usr/standalone/i386/EfiLoginUI
Lucida13.efires         battery.efires          guest_userUI.efires     recovery_user.efires
Lucida13White.efires    disk_passwordUI.efires  loginui.efires          sound.efires
appleLogo.efires        flag_picker.efires      recoveryUI.efires       unknown_userUI.efires

What all the things in this volume are isn't particularly clear but you'll find your username in plaintext at least in these files.

.../System/Library/Caches/com.apple.corestorage/EncryptedRoot.plist.wipekey

</data>
            <key>UserFullName</key>
            <string>hali</string>

.../var/db/AdminUserRecoveryInfo.plist

        <key>RealName</key>
        <string>admin</string>
    </dict>
</dict>
</plist>

.../var/db/CryptoUserInfo.plist - also appears to contain users icon data

        FABQAUAFABQAUAFABQAUAFAH/9k=
        </data>
        <key>PictureFormat</key>
        <string>JPEG</string>
        <key>ShortName</key>
        <string>hali</string>

This is very helpful and I used it as intermediate steps to get the hint from an HFS+ encrypted drive: https://apple.stackexchange.com/questions/444615/find-and-decode-bytes-containing-passphrase-hint-cryptousers-structure-in-file .


text:
where are the tap featues of the Airpods on the Airpod Pros?
I recently got some Airpod Pro earphones. I'm accustomed to being able to tap my left Airpod to advance to the next track and my right Airpod to toggle pause/play
I can't seem to find similar features on the Airpod Pros. First there appears to be no tap options only squeeze and second the squeeze options are only noise settings and Siri. Further, squeeze  is not nearly as convenient as tap since I can tap my AirPods with my hands full but can’t squeeze.
Is there some way to enable the tap options on AirPods Pros or are these really a downgrade from the functionality of the standard AirPods?

Tap on AirPods is replaced with a press on the stem (squeeze) on AirPods Pro.
On either AirPods Pro stem:

Single press for play/pause
Double press to skip media (next song, etc)
Triple press to play from start, or if at start, previous media (last song, etc)
Hold stem for the custom action in Settings, i.e. switch listening mode or start Siri.

There are no “tap” functions on the AirPods Pro.
That is a function of the 1st and 2nd generation AirPods. The AirPods Pro uses a new force sensor that you press (what you call squeeze) to activate its functions.
You can get full details from the Apple Support document Connect and Use Your AirPods and AirPods Pro

Your issue seems to be that you find the new AirPods pro gestures less convenient than tapping, especially with your hands full.
One feature that resolved this really well (which was available on AirPods v2 as well) is the always-on Siri. This provides full hands free control!
I also think you’ll learn to enjoy the added functionality that the new gestures bring. As mentioned in another answer, you can now do multiple actions on either AirPod Pro - whereas before you were limited to one.


text:
iTerm2 error notification ‘Couldn't log to 2020…’
Every time I open a new window iTerm2 says "Couldn't log to …"

I restarted my Mac which is on High Sierra but the problem continues.
How can I solve this problem?

You've got an invalid or inaccessible log path.
From iTerm Preferences → Profiles → your profile → Session, disable ‘Automatically log session input to files in’ or set the path correctly using the Change button.

https://gitlab.com/gnachman/iterm2/issues/8672#note_284043217


text:
Cannot disable parental controls for Admin user
I wanted to put parental controls on my computer before I learned that administrator users can't have parental controls (makes sense to me now). But somehow I still managed to enable parental controls for my administrator user, and it didn't give me any warning message.
I can tell that enabling parental controls really did work because some websites are blocked. This persists even after rebooting my Mac.

Now I want to turn off parental controls, but I can't do it. When I try to turn it off in System Preferences, I get this error message (video):

You cannot enable parental controls for an administrator account. Create a new user account, and then enable parental controls for the new account.

So how can I turn off parental control for the Admin user?

Can't try myself (for obvious reasons), but try the following: create a new admin user, log out of the old one and into the new, downgrade the old admin account to standard, disable parental control, upgrade it again.

I found a solution thanks to @nohillside,
I created a new admin user, loged out of the old one and loged into the new one but I was not able to downgrade the old admin account to standard, so I did this :
dscl . read /groups/admin GroupMembership

then
sudo dscl . delete /groups/admin GroupMembership Anakojm

Then I restarted my mac and created a stantard user with the same name (Anakojm) and I get this message :

A home folder named Anakojm already exist use it ?

Then I clicked yes and disabled parental control, and upgraded it again.


text:
mdfind tool : consider in the same time, to perform researching of files, a substring of the filename and the insensitive case for these substrings
Is it possible to specify, in the context of files searching on my MacOS Catalina 10.15.3, a way  to combine in the same time a potential substring of filename and the case insensitive of this substring ?
For the moment, I know the command :
1) mdfind -name 'substring'for the substring
2) mdfind 'kMDItemFSName == substring for insensitive case
But I wonder if I can combine them (like the classical locate -i substring command).
UPDATE 1 : I can't explain the bad working of my mdfind command compared to classical command locate. Indeed, for example, with the classical locate command, I get a lot of files with substring  *include.h*
by doing :
    $ locate include.h

/Applications/MATLAB_R2016b.app/help/bugfinder/ref/includeinclude.html
/Applications/MATLAB_R2016b.app/help/codeprover/ref/includeinclude.html
/Applications/MATLAB_R2016b.app/help/coder/ref/coder.cinclude.html
/Applications/MATLAB_R2016b.app/help/simulink/slref/coder.cinclude.html
/Applications/MATLAB_R2016b.app/polyspace/examples/cxx/Demo_C/sources/include.h
/Applications/MATLAB_R2016b.app/polyspace/examples/cxx/Demo_C_Single-File/sources/include.h
/Applications/MATLAB_R2016b.app/polyspace/examples/cxx/Demo_C_Workflow/sources/includes/include.h
/Applications/MATLAB_R2016b.app/polyspace/examples/cxx/Demo_Cpp/sources/include.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS.sdk/usr/include/libxml2/libxml/xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/AppleTVSimulator.platform/Developer/SDKs/AppleTVSimulator.sdk/usr/include/libxml2/libxml/xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cffi/_cffi_include.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/gems/libxml-ruby-3.1.0/ext/libxml/ruby_xml_xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/apache2/mod_include.h
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/libxml2/libxml/xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Developer/SDKs/WatchOS.sdk/usr/include/libxml2/libxml/xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/usr/include/libxml2/libxml/xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/libxml2/libxml/xinclude.h
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/include/libxml2/libxml/xinclude.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0/gems/libxml-ruby-2.9.0/ext/libxml/ruby_xml_xinclude.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/apache2/mod_include.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libxml2/libxml/xinclude.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cffi/_cffi_include.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0/gems/libxml-ruby-3.1.0/ext/libxml/ruby_xml_xinclude.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/apache2/mod_include.h
/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include/libxml2/libxml/xinclude.h
/Library/WebServer/share/httpd/manual/mod/mod_include.html
/Library/WebServer/share/httpd/manual/mod/mod_include.html.en
/Library/WebServer/share/httpd/manual/mod/mod_include.html.fr.utf8
/Library/WebServer/share/httpd/manual/mod/mod_include.html.ja.utf8
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cffi/_cffi_include.h
/System/Library/Templates/Data/Library/WebServer/share/httpd/manual/mod/mod_include.html
/System/Library/Templates/Data/Library/WebServer/share/httpd/manual/mod/mod_include.html.en
 ...

whereas with the defined personal command locatedefined by :
#!/bin/bash

if [ "$2" != "" ]; then
  mdfind -name "$1" -onlyin "$2"
else
  mdfind -name "$1"
fi

Then, if I do a : $ locate include.h
I get only one result :
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/cffi/_cffi_include.h

Same thing with : $ locate 'include.h'
Why many results are missing using mdfind command instead of standard locate command ? It seems that I have to specify the substring with an option  for mdfind but I don't know for the moment this option.
Any feedback or help would be nice.

Would mdfind -interpret somestring work?
How 'bout a script?
#!/bin/bash

if [ $# -lt 1 ]; then
    echo "$(basename $0) portion-of-filename"
    exit
fi

find / -type f -print 2>/dev/null | gawk -F'/' -v searchFor="$1" '
BEGIN{
    IGNORECASE=1
}
searchFor {
    base=$NF
    if (index(tolower(base), tolower(searchFor))) {
        printf("%s\n",$0)
    }
}
'

I tried with  your option but it seems that not all results are displayed (in my case, a filename with "substring" and insensitive case").

so you don't want to use locate ?

some persons told me that locate is an old version on MacOS systems and adviced me to use mdfind which is specific to MacOS. I realized that it is very fast and with many more options than locate but I have difficulties to use well all these options : in this post, the options I would like to combine is "substring + insensitive case". Regards

updated with a sample script then


text:
Safari favicons mess
I have been playing with Safari's favicon on my 2014 MacBook Pro (running Catalina) for a couple of days, replacing ugly or non existent icons of my bookmarks (mainly using this).
All of a sudden the database file and all the icons' images in /Users/(me)/Library/Safari/Touch Icons Cache got somehow locked.
The images in particular I cannot unlock or delete, even as root, even in recovery mode.
If I try to replace an icon, a new weird file show up in .../Touch Icons Cache/Images and I cannot erase it. The icon to be replaced has not changed or has become the new one only at the first launch of Safari.
I would like to continue to replace ugly icons of my bookmarks and I also would like to solve this locked folder mystery.

I managed to solve the problem by deleting the whole Touch Icons Cache folder.
I then replaced manually the icons.
If I try to use the safari-favicons.sh code the problem shows up again. I guess I'll adapt.


text:
How can I know if my macbook is hacked?
Today when I turned on my macbook I could see that the Desktop Background has been changed to Yosemite picture.
Then right after clicking on Change Desktop background... the background changed to the one I had, which was a green background with a dog in the center, except for the dog picture, it was only the green background.
After this I clicked again on Change Desktop background... and it changed again to the Yosemite picture.
Finally I went to finder file to see where the picture of the dog was, and when I clicked to see it, it was opened but at the same time 2 more pictures were opened.
After all this, I clicked again on Change Desktop background... but nothing happened. The Yosemite background didn't change this time.
All the time when this happened, my mac didn't have connection to internet.
Why? Is my mac hacked? Does it have a virus? What do I do?
Notes.

Every once in a while I see a message on the upper RHS (in the corner of the screen) telling me that I should update something related to the system but I always click on later and then the message vanishes.

Update
More details of the situation above.
3 pictures were opened by itself at the same time. I did not chose to open 2 of them, had I chose them then they weren't be displayed in the way they did because there is a standard way when one open several pictures at once. There 3 pictures displayed like  if I were selected 1, then the other and then the other within milliseconds.
That above plus the change of desktop background, it's 10000% strange.
I know that is stupid to think that I am hacked but have I another option than to this so?
So, how can I know if someone,  from another part in the world, is in my macbook?
Footnote. Related question of mine Why did my desktop background changed and why pictures were opened, if I did nothing to do so?

No.  You are not hacked.
Hackers do not operate in this manner.  There's this common misconception about hackers being in the dark recesses of their parents basement consuming copious amounts of Red Bull and Hot Pockets in an effort to brute force their way into your computer to change the background picture.
Hacking is 90% social engineering - it's exploiting vulnerabilities to get you to "give up the goods" like passwords, security questions, or any other sort of credential to gain access to a system.
So, what do they do when they gain access?
Try to find more credentials to gain access to other systems. Maybe they get a treasure trove of identity "stuff" (drivers license info, credit card or banking info, etc.) that they can sell online, but what they're looking for is more keys to get into other systems.  It's about a lateral move to the next system(s), not breaking the one they're currently on.
Changing your desktop picture and drawing attention to their activities would be a colossal waste of time because if you know they're there, you're going to cut them off (i.e. wipe the drive and reinstall the OS and/or change passwords, etc.).  If they were going to do something that called your attention to them, it would be to hold your computer/information for ransom; in other words install ransomware.
Is it a Virus?
Unlikely. Again, this would be a waste of time for a virus writer to infect your computer to change your background.  And technically, it would be called malware because a virus is a type of malware that self-propagates much like the flu.  Those are few and far between now and most malware is self inflicted (by downloading/installing software of questionable origin).
What do you do?
If you're concerned someone has access to your computer - change your passwords. Change the passwords on all of the accounts on your Mac.  If you've got three, change all three.  Change your iCloud password.  Change whatever account password you feel may have been compromised.
Now, if you Netflix account uses the same password as your Apple login, well, shame!  Get a password manager and start using it put different passwords on every online account.

Keeper Security (Free for single device, $30/yr for unlimited device and passwords)
Dashlane - (Free for 1 device and 50 accounts, $60/yr for unlimited devices and passwords)
1Password - (Free trial, $36/yr for unlimited passwords, items and 1GB secure document storage)
KeePass (Cross platform and free but requires a bit of tech savvy to sync across all devices)
McAfee TrueKey (Free for 15 passwords/unlimited devices; $20/yr unlimited passwords/devices

Still not certain you have malware installed?
Install security software like Malwarebytes, Webroot, or McAfee Security
However, if you do have an infected computer, I've always subscribed to the "nuke it" and reinstall philosophy.  This is where having a backup really comes in handy.
What about my changing background and open pictures?
Check your desktop settings - see if set to rotate (change every so often).  Change it to something else or turn it off altogether.  Then come back and reset it to what you want.  As for your open pictures, you may have inadvertently opened two pictures at once.  It's happened to me while using the trackpad; it’s happened to all of us at one time or another.
Keep your software updated

Every once in a while I see a message on the upper LHS telling me that
I should update something related to the system but I always click on
later and then the message vanishes.

If it's the left of the screen, it's not coming from the Notification Center.  Track down what it is and either uninstall the software (if not using) or update it.   Know the software you've got installed.
If it’s showing up on the right side of your screen, per your edit, check your notifications!  This is like taking your temperature, ignoring the reading and then jumping to the conclusion that you’ve got Hodgkin’s Lymphoma (it presents with a fever).  The point is, read and respond to the notification, that’s why Apple implemented it.
Probably the most controversial thing I'm going to advise here is that you should stop (if you're doing it of course) looking for and putting a priority on free software over known titles/developers.  Nothing's free.  It's much better to install an app that costs 5 dollars/euros/pounds/seashells from a developer that registers with Apple than finding a free app that requires you to bypass Gatekeeper to install.
IT is my profession for over 30 years now and even though I posses the skills to overcome malware, I will opt for the paid version over the free one 99% of the time.
Bottom Line...
If you skipped over everything above and take only one thing away from this it should be to have a backup.  Catastrophic things are going to happen - I guarantee it.
Even if you actually get hacked and your data is being held for ransom you can recover everything simply by wiping your computer, reinstalling, and restoring your data.
A Time Machine backup is the cheapest insurance policy you can buy.

"There's this common misconception about hackers being in the dark recesses of their parents basement consuming copious amounts of Red Bull and Hot Pockets in an effort to brute force their way into your computer to change the background picture."
That was every 'hacker' I ever met! :-)

@fsb If they only looked like Angelina Jolie from the movie Hackers

"see if set to rotate (change every so often). Change it to something else or turn it off altogether." The change picture (every x time) option is disabled and I have always had it in that way.

"As for your open pictures, you may have inadvertently opened two pictures at once." no. I perfectly remember what I did. I went to finder file to find the picture of the dog and when I found it, I doubled clicked to open it. Then two additional pictures opened too, so a total of 3 pics were opened at once.

With trackpad you mean the one already within the mac or an additional device?

Allan, I edited my question because I wrote wrong the part of the message of the update the system, it was RHS. sorry for the inconvenience.

And nop, I'm not looking for any kind of 'free software' or whatsoever. "IT is my profession for over 30 years now and even though I posses the skills to overcome malware" ohhhhh  so am I dealing with a 100% professional expert in everything about this topic :) BTW what do you mean with the Bottom line part? This --> "If you skipped over everything above and take only one thing away from this it should be to have a backup. Catastrophic things are going to happen - I guarantee it." ? You mean that if I only backup, then catastrophic things are going to happen?

@user8473907 These things are only catastrophic if you don‘t have a backup :-)

@nohillside oh ok. Do you have any idea of what could have happened with the desktop background change and the simultaneous opened pictures?

@user8473907 My primary guess for the simultaneously opened picture is that you inadvertely (and without noticing) selected several pictures at once.

@nohillside no, I swear no. As a matter of fact, this event had never  happened to me in my life. Also, think about this, what a "coincidence" that the same day that pictures are opened without requesting is the same day that my desktop background changes too.

@user8473907 Well, it remains a mystery then :-)

@nohillside :) hahaha very funny

Two things:  1) Did you attempt any of the remedies I listed?  2) why must the diagnosis to this issue be “you were hacked” as opposed to “user error?”  Nothing you describe fits hacking or even malware behavior patterns.

@America It's the default behaviour of e.g. Preview, that all open pictures while quitting in the app are reopened automatically if you open a new pic.

@Allan yes. How could be an "user error" if I did not opened the pictures and I did not change the desktop background? What else could be if not hacked? Tell me any other possiblity

@klanomath  I have just tested what you say: I opened 2 pictures and then I quited Preview. Then I opened a different picture and it only opened that single picture, ignoring the other 2 that I did not close but by quitting Preview were closed.

@Allan I've just seen your edit on your answer. I'll check what exactly is the next time it appears. So far I haven't seen it since probably weeks ago.

This comment thread reminds me of that scene in Friends where Joey gets kidney stones and so desperately wants it to be something else but the doctor keeps saying "kidney stones."    It's user error.  It happens.  However, I do find it interesting that you completely ignored both of my questions

@Allan ok, I see your point. I just honestly thought it was something else because nothing like this had happened to me before. BTW I didn't ignore your questions, I answered to both of them.


text:
Why did my desktop background changed and why pictures were opened, if I did nothing to do so?
This is what happened:

My desktop background changed 3 times at different times.

The change picture (every x time) option is disabled and I have always had it in that way.

When I selected a picture to be open, two more pictures were opened too.

I perfectly remember that I only choose one picture to be open. As a matter of fact, this event had never happened to me in my life. Also, think about this, what a "coincidence" that the same day that pictures are opened without requesting is the same day that my desktop background changes too.

There must be a reason because things don't happen just like that.

NOTES.

All the time when this happened, my mac didn't have connection to internet.
Every once in a while I see a message on the upper RHS (in the corner of the screen) telling me that I should update something related to the system but I always click on later and then the message vanishes.
User Allan said that I am not hacked, then what could possibly have happened?

Please tell me.
I think there must be a reason because things don't happen just like that.

Please don‘t ask the same question several times. If necessary, edit the original question instead to add details and focus.

@nohillside but notice the note on the close box "If this question doesn’t resolve your question, ask a new one." And that's what I did

Your original question is not closed. If the answer you got there doesn't resolve your problem, please revise the question itself to make it more easy for others to understand which problem you want to get help with and what you are looking for in terms of answers.

@nohillside I have edited my other question and I set a +100 bounty

If you were not connected to the Internet at the time, how could you have possibly been hacked?  You can’t have a hacker connected to your computer while your computer is offline

@Allan "You can’t have a hacker connected to your computer while your computer is offline" always? Is there absolute no possibility  of someone being on my computer while not connected to the internet?

Tell me, then, how does one connect to to your computer when it's offline.

@Allan Maybe through an "invisible" connection. For example, I've heard that one can be seen through the camera (which is on the upper side, centered) whether the lens light is on or off, intruders  know how to deactivate this light on purpose to make you think that nobody is seeing you. That's why it's recommended to put a stick on the camera. I think Mark Zuckerberg also gave this recommendation

It was a rhetorical question.  Nobody can connect to your computer and thusly access your camera if you’re offline. There’s no such thing as an “invisible” connection.

Do you have the same image selected for all Spaces? that would be the simplest explanation, that you don't.
Test by pressing F4 [or FnF4 depending on how your machine prefs are set]. This should zoom all the windows out so you can see them all, but also present a set of you current Spaces at the top of the screen.
If you mouse over those, they will expand to small pictures & unless an app is covering the entire Space, you will be able to see the desktop background for that Space too…
For example…

All my Spaces are set to the same image, but it's not compulsory.

The answer to your question is Yes. The same image for all the Spaces

Actually I usually work in one Space. And when adding another Space, it automatically set the same desktop background to the new Space


text:
Why does my Outlook BCC myself on all outgoing emails?
I have Outlook, and use the same @outlook.com, on my Windows laptop and iPhone.
On my Windows laptop, when I email, Outlook doesn't BCC myself. Good!
Yet when I send emails on iPhone, Outlook BCCs myself. Why?

See settings > mail > always bcc myself.


text:
macOS isn't using my configured dummynet
I would like all UDP traffic on my localhost to have 1% packet loss, 5 ms propagation delay. I thought I could use macOS' built-in dummynet for this.
I ran at the terminal
sudo dnctl pipe 1 config bw 10Mbit/s delay 5 plr 0.01
echo "dummynet out proto udp from any to any pipe 1" | sudo pfctl -f -

sudo pfctl -sa and sudo dnctl list show the expected outputs (the rule seems to have been added).

DUMMYNET RULES:
dummynet out proto udp all pipe 1

00001:  10.000 Mbit/s    5 ms   50 sl.plr 0.010000 0 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
Now I expect all udp traffic to be slowed.
I am developing a UDP app, testing it on localhost between a client program and a server program. The UDP traffic is clearly not having any dropped packets even though I would like to simulate 1% dropped packets.

By default, pf is not enabled on modern macOS. You'll need to enable it first by running this command:
sudo pfctl -E

If you prefer a graphical interface instead of the command line interfaces for dummynet and pf, you can use Apple's "Network Link Conditioner" instead.
You can find it in the "Additional Tools for Xcode" package. If you have Xcode installed, it can be downloaded from within Xcode - otherwise you can download it directly from Apple's developer page (you do not actually need to have Xcode installed).
After downloading, you'll find it in the Hardware folder as a preference pane you can double click to install.
From the preference pane, you can enable/disable the link conditioner, choose which interface to have an effect on, and specify what you want to simulate (such as limited bandwidth, dropped packets, delays, etc).

What's the difference between -E and -e?

For me the problem was initially forgetting to enable pfctl, so I'll accept this answer.

The difference is that "-e" merely enables pfctl, while "-E" enables pfctl and adds to a reference counter. This means that if multiple programs asks for pfto be enabled, it will remember for example "4 'enables' have happened". Then when a program doesn't need pf anymore and uses -X to disable, it will not disable pf right away - instead it will just count down. When it reaches zero, pf is then disabled. You can see the "counter" (which is really a list) by running pfctl -s References.


text:
How to simulate network connections / ipfw on macOS?
I would like all UDP traffic on my localhost to have 1% packet loss, 10 ms propagation delay, 10Mbit/s bandwidth.
On other computers I have experience using ipfw something like this:
ipfw add pipe 1 in

ipfw add pipe 2 out

ipfw pipe 1 config delay 5ms plr 0.005 bw 10Mbits/s
ipfw pipe 2 config delay 5ms plr 0.005 bw 10Mbits/s

I thought I could use macOS' built-in dummynet to achieve something similar.
I ran at the terminal
sudo dnctl pipe 1 config bw 10Mbit/s delay 10 plr 0.01
echo "dummynet out proto udp from any to any pipe 1" | sudo pfctl -f -

sudo pfctl -sa and sudo dnctl list show the expected outputs (the rule seems to have been added).

DUMMYNET RULES:
dummynet out proto udp all pipe 1

00001:  10.000 Mbit/s    10 ms   50 sl.plr 0.010000 0 queues (1 buckets) droptail
    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
Now I expect all udp traffic to be slowed.
But, the UDP traffic through my localhost is clearly not having any dropped packets at least, and is likely not following any of the other rules.
What's the correct method to simulate poorer network connections on macOS?

This seems to be directly related to https://apple.stackexchange.com/questions/386493/macos-isnt-using-my-configured-dummynet

"On Linux I'd use ipfw something like this" — nope, you wouldn't. ipfw is a part of FreeBSD, there might be some sporadic attempts to have it ported to Linux but it's certainly not even close to mainstream. Linux has tc utility actually for such purpose.

Your own commands are actually almost the solution. You basically just need to ensure that pf is enabled, and then repeat your rule for outgoing packets to also apply to incoming packets.
You can do this like this:
sudo pfctl -E
sudo dnctl pipe 1 config bw 10Mbit/s delay 5 plr 0.005
echo "dummynet out proto udp from any to any pipe 1" | sudo pfctl -f -
echo "dummynet in proto udp from any to any pipe 1" | sudo pfctl -f -

Yes, you could say that if it traverses both ends of the pipe so to say. However, I was just trying to mimick the commands he used on FreeBSD with ipfw - so if that FreeBSD setup gave him the delays and packet losses he wanted, then this macOS setup should give the same.


text:
Mac Mini 2018 Kernel panic bug_type 210 after Security Update 2020-002
Since installing the Mojave Security Update 2020-002 I do get a message that my Mac Mini 2018 was restarted because of a problem even I shut it down normally. The Mac Mini 2018 was running fine for 3 months. The Apple Hardware Check does not show any errors. Also tried to reset SMC and PRAM.

Is this a known bug? Just curios wether Mac mini 2018 users who also installed Apple's Security Update 2020-002 do see the same error message?
November 15th, 2020: I am pleased to confirm that BridgeOS firmware version 18.16.12561 fixes the Kernel panic bug_type 210 on a Mac mini 2018. Take a look at my answer.
October 19th, 2020: Apple released Security Update 2020-005 and macOS Supplemental Update. The bug has STILL NOT been fixed on macOS Mojave 10.4.6. On cold reboot "Your system was restarted because of a problem" message still shows up.  I
July 16th, 2020: Apple released Security Update 2020-004. The bug has STILL NOT been fixed on macOS Mojave 10.4.6. On cold reboot "Your system was restarted because of a problem" message still shows up. No status update on Apple Bug Report. I am kind of surprise on how Apple seems to ignore Mac mini users. They messed up the T2 chip BridgeOS and simply don't care. I guess this bug will never be fixed. Users should rather invest in a new Mac mini model with their latests Apple processor. I am not willing to spent more money on any Mac mini.
Update May 28, 2020: Apple released Security Update 2020-003. However the bug has NOT been fixed on macOS Mojave 10.4.6. On cold reboot "Your system was restarted because of a problem" message still shows up.
No status update on Apple Bug Report. Mac Mini users do not seem be relevant for Apple. Such a disappointment.
Update April 24, 2020: Workaround: Do not use Safari until Apple fixes the bug. Also make sure to set the default browser to Firefox, Chrome, Brave... which prevents opening Safari by accident. The shutdown message no longer shows upon a cold boot.
Update April 11, 2020: I did some further testing regarding my initial issue. I have restored from a previous system backup using SuperDuper. This backup clone does NOT include the Security Update 2020-002 Mojave and Safari 13.1. Surprisingly the shutdown message still shows up sporadically when I power on the Mac mini. I have completely shut down my Mac mini 2018 around 10 times. I have waited 5-10 minutes. 4 of 10 times the crash report showed up. It's really difficult to debug. What's interesting is the macOS Mojave Software Update does not show the Security Update 2020-002. So it seems to be already applied. I guess it is definitely related to the T2 BridgeOS Update or other firmware settings which have been patched during the Security Update 2020-002. Restoring from a 4 weeks old system backup does not resolved my issue.
This is a really bummer. I wish Apple would spend more time on testing. So far I haven't heard back from my Apple Bug Report #FB7646566.
Update April 2, 2020: I did a clean install macOS Mojave 10.14.6 without the Security Update 2020-002. As soon as I install the Security Update 2020-002 the annoying crash report shows up when the Mac mini has been shut down.
The Diagnostic Report reads as follows:
{"caused_by":"bridgeos","macos_system_state":"shutdown","bug_type":"210","os_version":"Bridge OS 4.4 (17P4263)","timestamp":"2020-03-28 22:10:39.00 +0000","incident_id":"907CAD79-9364-4588-A25A-3810D0E72F8F"}
{
"build" : "Bridge OS 4.4 (17P4263)",
"product" : "iBridge2,5",
"kernel" : "Darwin Kernel Version 19.4.0: Mon Mar  2 20:38:56 PST 2020; root:xnu-6153.101.6~2/RELEASE_ARM64_T8010",
"incident" : "907CAD79-9364-4588-A25A-3810D0E72F8F",
"crashReporterKey" : "c0dec0dec0dec0dec0dec0dec0dec0dec0de0001"

I have a Mini 2018 and have not seen any problems after the Security Update. I'm still on Mojave, if that's relevant.

iBridge is the "T2" security chip - https://www.theiphonewiki.com/wiki/T8012 [tbh, I have no idea what that signifies, but at least that's what it is that's not enjoying the update].

@benwiggy  Did you completely shut down your Mac Mini 2018?

Shutdown is compulsory to install the update.

@benwiggy I wasn't referring to the update. The error message shows up everytime I press the power button. It does NOT show up on reboot. Could you check again?

My Mac mini 2018 is experiencing the same issue after Security Update 2020-002.

@howdytom I don't see any problems.

I'm having the same issue on my Mac mini (2018) since upgrading to the security update.

@howdytom Thanks for updating your progress. So it seems like we just need to wait for a fix from Apple then.

Thanks for all the updates. I have this issue too and this post helped me understand the why's.

There is a 2020-003 security update, released today, at over 2GB.

The bug has NOT been fixed with Security Update 2020-003.

Do you have f.lux installed by any chance? I still have to observe it a little longer but I'm confident that the issue has disappeared for me since I closed the f.lux service runnign in the background.

I don't use any f.lux service. This bug is reproducible on a clean install.

There is a security update 2020-004 !!!

@benwiggy: I have updated my original post. The bug has STILL NOT been fixed on macOS Mojave 10.4.6 and Security Update 2020-004!

Has anyone tried Security Update 2020-005 yet?

yeah, I have updated my original post. Security Update 2020-005 and macOS Supplemental Update does not resolve the issue.

Oh god that's terrible. Thanks for letting us know though.

I am pleased to confirm that BridgeOS firmware version 18.16.12561 fixes the Kernel panic bug_type 210 on a Mac mini 2018.
Solution:
Installing Big Sur on a separate volumes updates the BridgeOS firmware version 18.16.12561. When you reboot back into Mojave you do no longer experience the error message on cold reboot. After 7 months Apple finally fixed the issue. Apple never replied on any of my Bug Reports.
Note: Installing Security Update 2020-006 on macOS Mojave 10.4.6 does not fix the Kernel panic bug_type 210. You have to install Big Sur on external drive prior going back to your Mojave installation.

regarding Security Update 2020-006 I have read that it does or does not update bridgeOS, perhaps depending on the version of bridgeOS on the device. ie. if your Mac mini is original it will update it, but if you've already done the Big Sur fix (like me) it won't (and didn't) update bridgeOS.

That's correct. Which bridgeOS version are running. Did you install a Big Sur Beta release? Did install a clean installation a external drive?

18P50347c, from either Big Sur DP4/PB1 7 Aug 2020. I installed it on a new (to me) 2018 Mac mini before I erased everything completely and replaced with Mojave before migrating my old laptop. See: https://apple.stackexchange.com/questions/406574/bridgeos-not-updating

I haven't installed any security update after 2020-002, but today I installed 2020-005 and it updated the BridgeOS to 18.16.12561. After installing 2020-005, the update for 2020-006 became available and now I'm gonna install the new version.

And no more error after 2020-006 even after using Safari. Finally

I can confirm similar issues post Security Update 2020-002 on a 2018 Mac Mini runnign 10.14.6.

A few days later I power it down. On restart refuses to boot normally, taken to Internet restore, which ends in Error -1008F.
After clearing NVRAM it boots normally.
Left to sleep overnight
In the morning, it had shutdown and on starting up normally I received an ‘Unexpected Shutdown message, the crash log showed a panic with iBridge.

Reported to Apple with Feedback Assistant
Update: Security Update 2020-003 has updated Bridge OS so hopefully fixes the issue....

Categorically NOT fixed by Security Update 2020-003 :( So frustrating. Left it sleeping overnight, woke up to Mac Mini in 'off' state and a panic report message upon startup.
{"caused_by":"bridgeos","macos_version":"Mac OS X 10.14.6 (18G5033)","os_version":"Bridge OS 4.5 (17P5290)","macos_system_state":"sleep","incident_id":"A667FC6A-A14F-44FD-A2C4-35F782EC24B4","timestamp":"2020-05-27 21:42:59.00 +0000","bug_type":"210"} {   "build" : "Bridge OS 4.5 (17P5290)",   "product" : "iBridge2,5",

I also have this after every reboot/restart after running the 2020-002 security update on my Mac Mini 2018. Odd thing is, I first ran the update on a Mac OS that was booted  from my external SSD (which I occasionally boot from for music production) and after I did this I also got the error after booting from my internal SSD, which had not yet been updated. So I don't know what this install did to the T2 chip but it's apparently regardless of wether you're running on internal or external SSD, and it seems to have affected the hardware rather than the Mac OS installation.

Thank you for your feedback. So glad I am not alone with this annoying bug. I have submitted a Apple Bug Report.

In my case security update #3 fixed this issue. Can't reproduce it by opening Safari or putting the Mac to sleep. After a clean shutdown and startup the error shows. So no fix indeed. Shabby.

Can't comment, so just wanted to state that the workaround from @howdytom works (update April 24, 2020).
I'm going to use Chromium (brew cask install chromium) until a Safari update comes and fixes the issue.

Same here. Macmini8,1 since Security Update 2020-002 (Mojave).
In my case the first thing that happened was that I had no screen signal, the update "broke" the thunderbolt port where the screen is connected. The port came to life again after manually resetting the NVRAM.
After that, every time my Mac goes into a deep sleep it restarts. Not sure if it's when it goes to sleep or at the moment I wake it up. That is very annoying and critical since any work I have opened gets lost. After reading this thread tested that a shutdown results in the same error and report.
I'm reading carefully this how-to, although I only have this Mac right now so I can't try. I suppose downgrading as @howdytom did to 10.14.6 (18G3020) from late January and do not apply the #2 security update is the only workaround right now.
I've already filled a report using the Feedback Assistant on March 31. No reply yet, as expected. I'll update the report with this thread link. Please report it to Apple too, the more we are the faster they'll fix that. In case you do (or did) please link to my report ID: FB7646497

Thanks for your comment and sharing your insights. So far I haven't any reply on my bug report as well.

Same here in the Netherlands with my Mac Mini 2018 since the Security Update 2020-002 (Mojave).
The Security Update results in the Crash reports:
{"caused_by":"bridgeos","macos_system_state":"shutdown","bug_type":"210","os_version":"Bridge OS 4.4 (17P4263)"
After a reinstall of Mojave 10.14.6 from a bootable USB and applying the Security Update 2020-002 the crash reports changed a little in: {"caused_by":"unknown","macos_system_state":"running","bug_type":"210","os_version":"Bridge OS 4.4 (17P4263)"
The Mac Mini is stable and does all daily tasks during working from home in this COVID-19 time. I have completed an Apple feedback report and wait for any solution...

Thanks for your comment. Hopefully Apple will address this bug


text:
Why is my Early 2014 MacBook Air's Trackpad Uneven?
My Early 2014 MacBook Air's trackpad is uneven; it's hard to click on the top left corner of the trackpad but it's easy to click on the bottom right corner.
Is this supposed to happen, or is there a problem, say, something is stuck under the top left corner of the trackpad?

The most likely culprit is the battery being swollen.
When you get a physical "deformity" like this, it's due to one of two things:

accidental (or intentional) damage where the case and components don't line up anymore
something putting physical strain on the components themselves.

I'm assuming you didn't drop the Mac or have something heavy impact it.
The battery swells because of off gasses being trapped and it's something you need to fix right away as the trapped gasses at a minimum can damage your Mac (what you're experiencing) to becoming a fire hazard due to thermal runaway.
If you have the technical skills, you can remove the battery and continue to operate your Mac without it as you wait for a replacement battery to arrive.
The battery is located just below the logic board - the four black "squares".  It's an entire module that can be replaced by removing the five screws (red/orange circles denoting different sizes.)  For full removal instructions, see iFixit.com

Image Source:  Ifixit.com


text:
Deleting a suspicious malware (imklaunchagent) in Mac
I have a MacBook Pro (macOS Mojave) laptop and have recently noticed a suspicious process in Activity Monitor with this name : imklaunchagent

I checked this folder:
/System/Library/Frameworks/InputMethodKit.framework/Versions/A/Resources/imklaunchagent and it seems imklaunchagent and its related files cannot be removed. I tried to remove it via Terminal and this message showed up: "Operation not permitted". However, in "Security and Privacy" of "System Preferences", I chose Terminal to have full disk access, still can't delete the file and the same message appears.
I installed the free version of Combo Cleaner and it detected other viruses, none of which are imklaunchagent. Is imklaunchagent a malware? How can it be deleted?

Why do you consider this process to be suspicious?

@nohillside It seems I was wrong, this process itself is not harmful for Mac.

You can't (see † below) remove that file because MacOS doesn't let you (or anyone) alter the contents of /System. Only Apple can write to that location.
MacOS does that to ensure the integrity of the OS. In other words, if it's in /System, it's part of the OS.
† By 'can't', I mean in the normal running of your computer, unless you yourself follow a particular procedure which no active software can perform by itself as a means of corrupting your system.

It's no problem at all (but unwanted) to remove the file (either by disabling SIP or booted to Recovery Mode)! IMHO it's more important to indicate that the process imklaunchagent itself is completely legit. It may "[h]owever oftentimes [be] targeted by dangerous Trojan Horse infections that try to hijack it or disguise themselves as it."


text:
Stop macOS muting while using dictation
When I use dictation on my MacBook Pro 2015 w/ Retina Display, running macOS Catalina 10.15.2, the system-wide audio all mutes while dictation is listening.
How do I prevent this?
This answer from 2014 doesn't seem to work for me.


text:
Do Mac OS apps have access to MAC address?
Do applications installed on Mac OS have access to the device's MAC address? I believe iOS disallowed apps from accessing the MAC address on iPhones with iOS 11, but I don't know if the same applied for Mac OS on MacBooks.

Yes, in general macOS applications can get to the MAC address of the network interfaces in your computer.


text:
How to prevent FaceTime from muting/quietening system sound?
macOS Catalina 10.15.2 on my MacBook Pro Mid-2015, 15" with Retina display,
I would like to stop FaceTime from making the sounds from other apps (normally music I am playing) quieter.
I tried this answer to run
printf "p *(char*)(void(*)())AudioDeviceDuck=0xc3\nq" | lldb -n FaceTime

but it hasn't been working since Mojave at least


text:
Permission denied when I try to change a file’s access and modification times
I can't change a file’s access and modification times. When I enter touch t- CCYYMMDDhhmm.SS file.example , I get "permission denied". It works for other files. I tried to use chmod +x file.example but I am not sure I am using it correctly.  What should I write, please ?

The command should be touch -t (date) file.example
chmod +x just makes the file executable – it should not affect the date - but if you still want to use it, you can do it like this:
chmod +x file.example
touch -t 0401200 file.example

Also, check that you have write permissions on the file by running ls -l file.example (or right-click on the file in Finder and choose Get Info, then look at 'Sharing & Permissions').


text:
Backing up an iPhone without the use of a cloud service or a computer
I will soon lead a lifestyle where I'll be required to travel a lot, and at the same time I've decided to ditch (or at least just phase out using) my computers (both Windows and Mac).
I will be using my iPhone from now on, for all things digital, so I'll move all my files from my computer to my phone.
That sounds all good in theory, but given I do not use any cloud services (nor do I plan to), how will I backup those files?
So far, I kept all my files on my computer. I'd just plug in an external HD and use either Time Machine (on Mac) or an encrypted VeraCrypt container (on Windows) to backup my files.
What can I do to backup the files on my iPhone, without a computer or a cloud service?
While, as of recently, iOS can mount an external flash drive, it makes no sense tranferring my files to an unencrypted drive just for the sake of backup. (Correct me if I'm wrong, but it can't mount an encrypted HD, does it?)
Can you think of any solutions to this problem?

iOS only supports backup to a computer running iTunes or to iCloud.

Without a computer or iCloud to backup to, what were you envisioning would accomplish this task?

but why no iCoud solution?  That works flawlessly and for little money you get a lot of storage space (iCloud). The requirement is internet to create the backups

Great timing to be leading a lifestyle where you're traveling a lot!

@nohillside Thank you for letting me know. This is final, right? No workarounds found yet?

@swisscodemen I wouldn't use a cloud service not owned/operated by me.

Yes.  Thus my question.  How do you see this solution coming together?  Plugging in a drive?  OK.  Did you try it?. What was your results?

@Allan I'm fine with the question, I can understand that users might hope that there is a 3rd party app (or a iOS feature unknown to them) able to backup to an attached drive.

@nohillside, not my point, but OK.

iOS only supports backup to a computer running iTunes or to iCloud.
If your aim is to keep everything on servers you control yourself you might use an NextCloud installation (with disk encryption) and use the Files app (or native NextCloud apps) to manage your data. That way you at least won't use your data in case your phone gets lost or stolen.

If you would never use a "foreign" cloud server, then try a Synology NAS Disk Station. There are many ways to backup data (photos, files, videos ...).
There are even Synology apps from the app store for iPhone and iPad (DS video, DS photo, DS audio, DS file...). A look at the Synology app would certainly be worthwhile.
So you have the backup (photos, files, music...) on your own hard disk and a redundant protection (raid systems possible) with you.
For more information, visit the synology website https://www.synology.com/en-global


text:
My System Preference window moved and isn't in the center anymore
Since I updated my Mac, the System Preferences window no longer appears in the center. How do I return it to its default position (like shown below)?

It's just a window, it will move when you grab the title bar.  Just move it to whatever position you want.

In macOS Catalina you can use the following command in Terminal after closing System Preferences.app to delete the currently stored window position:
defaults delete com.apple.systempreferences "NSWindow Frame Main Window Frame SystemPreferencesApp 8.0"

This will delete the key including the window position.
Afterwards relaunch System Preferences.app and the key will be restored with a default position. The window will be centered in the East-West direction and slightly moved to the North. This is intended by Apple and indicates visual prominence.

In case the key name changes after a system update (e.g. to "NSWindow Frame Main Window Frame SystemPreferencesApp 8.1") you will get an error after entering the above command:
Domain (com.apple.systempreferences) not found.
Defaults have not been changed.

Then you have to search for the new proper key name by issueing:
defaults read com.apple.systempreferences

which will result in a long list:
...
NSQuitAlwaysKeepsWindows = 0;
"NSWindow Frame DestinationSheet" = "643 525 416 311 0 0 1680 1027 ";
"NSWindow Frame Identity Picker" = "673 573 357 263 0 0 1680 1027 ";
"NSWindow Frame Main Window Frame SystemPreferencesApp 8.1" = "9 476 668 548 0 0 1680 1027 ";
"NSWindow Frame NSNavPanelAutosaveName" = "463 333 799 448 0 0 1680 1027 ";
SecurityPrefTab = General;
...

The relevant key is the "NSWindow Frame Main Window Frame SystemPreferencesApp ..." key.
The "updated" command would then be:
defaults delete com.apple.systempreferences "NSWindow Frame Main Window Frame SystemPreferencesApp 8.1"

I have found that deleting that key is not always reliable in reseting the window position. App's can/will read from cached memory at times even after an edit is made. IMO The easiest thing to do it place the window where you want it and close it. It will at least reappear in the same place as when last closed.


text:
iTerm2 : Adapting zshrc prompt to get the same one than with .bashrc
I switched from bash shell to zsh. After sourcing a main part of my old .bashrc to .zshrc, I am faced a problem concerning the rendering of prompt with zsh (which works with bash) :
function ps1 {
        # PROMPT SECTION
        BLUE='\[\033[0;34m\]'
        LIGHT_CYAN='\[\033[1;36m\]'
        DEFAULT='\[\033[0m\]'
        PURPLE='\[\033[0;35m\]'
        LIGHT_PURPLE='\[\033[1;35m\]'
        LIGHT_GREEN='\[\033[0;32m\]'
        PINK='\[\033\[0;31m\]'

        # \! - History number of last command
        # $? - Exit value of last command
        # \t - Exit time of last command
        # \w - Current directory (relative)

PS1="$PURPLE|$DEFAULT$LIGHT_GREEN\u@$DEFAULT$LIGHT_CYAN\h$DEFAULT$PURPLE|$DEFAULT\t$PURPLE|$DEFAULT$LIGHT_PURPLE\w$DEFAULT$PURPLE|$DEFAULT "
}

ps1

Here a screen capture of my old bash prompt :

Now, I would like to have the same prompt but with zsh using exe zsh :

How to get with zsh the same prompt than with the bash prompt ? Which modifications have I to do ?
UPDATE 1:
I tried the following PS1 for zsh but the rendering is not the expected one :
autoload -U colors && colors
PS1="$fg[purple]|{$fg[green]%u@$fg[cyan]%m$fg[purple]|$fg[purple]%*$fg[purple]|$fg[purple]%~$fg[purple]| "

here's the capture :

Any idea to the same ?

This is not an answer, but have a look at https://scriptingosx.com/2019/06/moving-to-zsh/ and, maybe, buy his book.

Here you go:
# %F/%f: start/end Foreground color
# %F{m}/%F{g}/%F{c}: short for %F{magenta}/%F{green}%F{cyan}
# %B/%b: start/end Bold/Bright (depending on your terminal)
# %n: user Name
# %m: Machine name
# %*: 24h time w/ seconds
# %~: pwd, abbreviated
local I='%F{m}|%f'
PS1="$I%B%F{g}%n@%F{c}%m%b$I%*$I%B%F{m}%~%b$I "

This recreates the exact same prompt.
Documentation can be found at http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html


text:
Macbook Pro camera still not working (green light on) - tried heaps of suggested solutions to no avail
My macbook pro camera does not work in facetime, photobooth, zoom, etc despite the green light being on.
What I've tried so far to solve it which hasn't worked:

sudo killall VDCAssistant & AppleCameraAssistant command (returned "no matching processes were found")
Rebooted macbook in safe mode (opened Facetime and it said "No Camera
Available")
Repaired disk using Disk Utility
Reset the SMC

I have a feeling that it is a hardware failure. When I leave my laptop 1/3 the way open and tap the screen, the camera starts working properly (sometimes). However, when I then fully open it, the image freezes and returns back to a black screen.
My camera was working fine in January, however in February I updated from High Sierra to Mojave. But it was only until March I realised my camera no longer worked. Last week I updated from Mojave to Catalina, camera still doesn't work. I don't think updating my macbook was the reason but I just added this incase..
Is there anything to try short of hardware repair?

Sounds like a loose connection.

No, you have exhausted the typical steps and if you can send it in for repair or feel you won’t break it worse by opening it yourself, a repair is in order.
Before a repair, make a backup of everything and wipe and reinstall the OS. You need that to start the repair and if it fixes things, you’ll save the cost and time of the repair.


text:
Macbook Pro camera not working green light flickering
I am the culprit, I heard my camera could be accessible to hackers, so used code in the Terminal to turn the camera off. I never needed the camera until today!
I've tried:
sudo killall VDCAssistant & AppleCameraAssistant command, returned - no matching processes were found
Reset the SMC
Rebooted macbook in safe mode
Repaired disk using Disk Utility

See https://apple.stackexchange.com/q/387900/237687


text:
ipadOS downloads go directly to iCloud Drive folder, while iOS downloads stay on local device
I recently downloaded a file to my iPhone and noticed that even though I have iCloud Drive turned on, the file did not automatically sync to iCloud Drive. Conversely, when I downloaded the same file on my iPad, the file was immediately uploaded to iCloud Drive. Why the discrepancy?

How was the file downloaded? Via Safari?

Yes, via Safari.

There is a setting for the Safari download location in the iOS/iPadOS Settings app.
Settings app > Safari > Downloads
Your iPhone is probably set to a local download folder on the iPhone, while your iPad is set toe the download folder within the iCloud "folder".
Can you check in the "Files" app if the downloaded file on your iPhone lives in the "On my iPhone" location?

Apple broke ios 16-17 when you go to settings>safari>Downloads, now you can set your downloads to local but if you exit the settings app it force resets back to ivloud drive, so technically ios 16-17 is softlocked and impossible to actually save downloaded files from safari without them going directly to icloud, apple does this because they cant back door your device for your info, but if you store files/ or download files to their servers it allows them to sniff the data your accessing

Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.

That's simply wrong, at least in 17.3.1 downloads can easily be stored locally.


text:
How to get MacOS Catalina to allow VMWare Fusion to have Accesibility permissions
I'm trying to give Accessibility permission to VMWare Fusion. It shows up in the System Preferences but clicking the checkbox does nothing.

This is Fusion 11.5.3 which is specifically targeting Catalina.
How can I grant it Accessability permissions?

In General, did you approve the kernel extension first?

Firstly, have you simply tried rebooting? If that doesn't work, uninstall and reinstall the program.

You are doing the correct step. Unless VMWare has an uninstall / reinstall or way to clear that, you might need to start over with the database that tracks that entitlement.

Make a new admin user in system preferences and log out of the current user.
Log out of the current user and log in - try. Also consider disabling automatic log in and restart - then use the new account.
Make sure SIP is enabled: csrutil status should show enabled
Be sure you allowed the kernel extension for VMware Fusion to run. You have to click allow in the general security pane before you can go to the privacy pane to allow Accessibility and other more granular entitlements. Uninstalling and reinstalling VMWare Fusion should prompt you for this kernel approval before you have to accept the EULA and enter a license but after you approve the installer to run an admin script.

To wipe all the settings for that app, you need it's bundle identifier:
How do I reset Screen Recording permission on macOS Catalina?
In your case, the reset would be for the VMware Fusion app or processes. To get that, you can open the command line in terminal app and type mdls -name kMDItemCFBundleIdentifier and then drag the VMWare fusion app into the window and press return.
tccutil reset All com.vmware.fusion

I tried the tccutil reset first and it seems to have worked. I was able to check the box in System Preferences.


text:
Pre-emptively mute notifications from tab in Safari
I have messenger.com open in one tab. Sometimes I get messages and they play a ding.
How do I prevent these dings from ringing out?
I know it's possible to mute a tab that is playing audio by clicking the speaker icon in the tab title, but Messenger is not always playing audio.

I’m voting to close this question because This sounds like a Customer Support question because this is about the functionality of their website.  Your system has no way of anticipating which tab will play audio in the future.  There must be a setting on the site to mute notifications.

@Allan it's probably both :-) I would hope that Messenger has such a feature, but I can also see the benefit of being able to mute Safari tabs in advance, without muting all sound.

@nohillside, I can see a benefit, but currently, there’s no way. https://support.apple.com/guide/safari/mute-audio-in-tabs-ibrwae910b47/mac  Feature request?

I think this is totally answerable. It’s not a customer support in my eyes since it’s about how the software works and it’s not just, “I’m lost and don’t know where to start...”

@bmike - I would agree with you if it was software.  Since it's a web site, there's nothing really running on macOS other than Safari and it's the websites functionality that's in question.  Either way...

@Allan there is no way to mute a Safari tab when it's not playing audio?


text:
How do I bridge a wifi connection from MacOS
[I have used WiFi bridging in Windows 10 to share my WiFi with other devices. This was done on my Mac using Windows 10 on Bootcamp.  Specifically, I want to share WiFi to WiFi.
How can I achieve the same on macOS?
Here's what I'm seeing in Internet Sharing:

It's called Internet Sharing.  Go to Preferences → Sharing → Internet Sharing  Let us know if that works or not.

That's not correct.  Internet Sharing works on Bluetooth, WiFi, Ethernet, even Thunderbolt.  If you have it on Windows 10, it should be there in macOS.  Can you post a screenshot?

Take the picture, edit it in Preview if necessary, then edit your question and click the "image" icon to upload/paste the file.

WiFi 2?  Did you create a network alias or do you actually have to WiFi adapters?

Affect?  No.  Confuses people not familiar with your changes?  Yes.  However, WiFi to WiFi is not impossible, you have to do this manually.  I'll have to research because this isn't something I would do because you'd immediately cut the bandwidth in half serving as both a WAP and a gateway.

Also, why would you do this?  If your devices have WiFi to begin with, just connect them to the WiFi and be done.

I assume your question is how to share the WiFi internet connection you have with other devices on a cabled network.
You do this by opening System Prefences > Sharing and selecting Internet Sharing:
For "Share your connection from" choose "Wi-Fi".
For "To computers using" select the network that you want to share it with - usually this is "Ethernet".
This achieves connection sharing by using NAT.
If you actually want to bridge your WiFi connection with a cabled connection, so that devices on your cabled connection would work like they were connected directly to the WiFi, it can be achieved like this:
Open System Preferences > Network.
Click the cog wheel below the device list and select "Manage Virtual Interfaces".
Click the plus button and select "New Bridge".
Select "Wi-Fi" and the network you want to share it with - usually this is "Ethernet".
Click Create.

@A68AGaming Do you have 2 WiFi interfaces? (i.e. is this a laptop with built-in WiFi with an added WiFi-over-USB adapter or something like that?)

What are your options exactly when trying to create the new bridge? (i.e. which networks are shown)

You've added a photo for internet connection sharing earlier... that's not what I asked about?

Follow the steps in the second method I gave. Not the Internet Connection Sharing one.

I wanted you to take a screenshot? - I.e. click the plus button, select "New Bridge" - now take a screenshot of the window that comes up.

Did you disable Internet Connection Sharing before trying to make the Bridge? - Is it correct that you have a network named "Wi-Fi" and one named "Wi-Fi 2"

This answer does not work because "Wi-Fi" doesn't appear in the connections to bridge and that's by design according to https://support.apple.com/guide/mac-help/bridge-virtual-network-interfaces-on-mac-mh43557/mac.

@JasonR.Coombs This answer was written before the question was changed into specifying that it was WiFi to WiFi - that's why.


text:
How to make path prompt easier to read by color-coding each `/` (forward slash)?
I would like to get another configuration for the path, more a detail than a real request:
Below an example of zsh PROMPT :

In order to make reading the path easier, I would like to change dynamically the color, except for the first slash (into ~/) of every slash in the path in blue (more precisely %F{75}) by the color pink (%F{13}) But I would like to be able to use with deeper path, that would help me to better locate myself into the tree.
On the image above, this would be only one pink slash changed (Phd_2019_2020/Travail_3_...).
Here's my current PROMPT:
PROMPT='%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|%F{75}%~%F{13}|%F{7} '

Is it possible to perform this dynamic change of color with zsh-5.8 ?

Please don't change the question once you start getting answers. If problems with an answer come up, use comments beneath the answer; if new questions come up, use the "Ask Question" button.

@nohillside You are rude, you have removed all my UPDATE1, please restore it temporaly at least, avoiding me to all rewrite for another question.

It‘s still in the edit history, just click on the blue text on top of my name above

If I understand the question correctly, you want to have your prompt display the entire path of your current directory in blue but with each of the forward slashes ("/") in pink.
Unfortunately, you can't do this in your prompt.

Use the builtin precmd () function.
ZSH gives us a precmd function which is similar to Bash's PROMPT_COMMAND.  These allow a command to be issued before the prompt is displayed.
I also wouldn't recommend a long prompt anyway as it makes usability very difficult when entering commands. Putting the full directory above your prompt is much better from a UI standpoint.  The following code accomplishes that.
Simply put the following in your ~/.zprofile.
precmd ()  { printf "\n"; pwd | awk -F "/" ' {for (i=1; i<=NF; i++) printf "\033[01;34m"$i"\033[38;5;206m/"; printf"\n" }' }

And here are the results:

The above screenshot is my iTerm window showing that I have traversed deep into my /Applications/Firefox.app directory with the current directory formatted in blue separated by pink forward slashes.

How it Works...
I've expanded the one line premcmd function above so that it's multi-line and added in some variables so we can better see what's going on.
precmd() {
printf "\n";
pwd | awk -F "/" '{ blue="\033[01;34m"; \
                    pink="\033[38;5;206m"; \
                    for (i=1; i<=NF; i++) \
                      printf blue $i pink "/"; \
                      printf "\n"
                   }'
}

Here's what it all means:

printf "\n" prints out a new line char.  This is for aesthetics.
pwd returns the working directory name (man pwd) which is then piped ("|") to the next command, awk (man awk).
-F "/" defines the field separator to the forward slash; awk's default is a space.  I kept my prompt to it's short and succinct setup.

Within the awk "program," delimited by the braces ("{" and "}") we have the following:

variables blue and pink are set to their ANSI escape codes \033[01;34m and \033[38;5;206m respectively.
We then have a for/do loop that iterates through each of the fields that awk has processed.  NF is the total number of fields.
printf blue $i and printf pink "/" prints out the directory name in blue and the forward slash in pink

thanks a lot ! Just a last thing, how to make the correspondance between the classical blue/pink colors and the colors that I would like to use, i.e %F{75} and %F{13} and mostly, how to declare them since the following function doesn't work : slash_color ()  { pwd | awk -F "/" ' {for (i=1; i<=NF; i++) printf "%F{75}$i%F{13}/"; printf"\n"     }' } with the following PROMPT :  PROMPT='%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|$(slash_color)%F{13}|%F{7} ' (using setopt PROMPT_SUBST before) ?

look up the ANSI color codes I linked.  "Classic" blue/pink isn't a reliable descriptor.  The "blue" I selected came from the 4-bit color codes, so it's probably closest to your "classic" blue.  Pink was in the 8-bit and 256-bit color sequences.

Also, you can't put a function in your PROMPT if that's what you're trying to do.  My answer explains how to get what you want and that's to use precmd()

From this post https://superuser.com/questions/142099/get-function-into-ps1-zsh, I can use a function inside zsh prompt as long as I declare before setopt PROMPT_SUBST

@youpilat13 - I'll have to take a look at that.  ZSH has a TON of features that need to get enabled, but from my security side of my brain...I don't like the idea of a prompt calling a function..Example, I could write a wrapper that checks for sudo being issued and then issue a nefarious command to download and install malware with admin privileges.  That said...there also a TON of useful stuff there as well.

@Allan slight modification: https://apple.stackexchange.com/questions/388754/zsh-issue-with-colorized-prompt-and-double-slash-i-e-appearing-when-i-am-i?noredirect=1&lq=1


text:
How long does it take to decrypt a hard drive with FileVault?
I'm decrypting my hard drive with sudo fdesetup disable (because system Preferences would stop responding when I clicked "Decrypt"), and it doesn't show the progress.
So I left my iMac on sleep mode overnight, and it's still not done. Is it even doing anything or does it just take a while to decrypt a 1TB hard drive?
Also, is there a way to see how long it takes until it's done?

I'm pretty sure it won't do it while it's asleep, but idk of any way to show progress.

@klanomath How do you get to see how long it takes until it's done? It doesn't say in SysPrefs, and entering fdesetup status -extended in a new window just says Volume is APFS. (FileVault Enabled).

@klanomath The thing is when i enter fdesetup status -extended it just says FileVault is On. Volume is APFS. (FileVault Enabled) and nothing else, not even a percentage.

@OMN30 Have you started decryption already?

@klanomath Yes, it has been decrypting for 24 hours.

@klanomath They both say: FileVault: Yes (Unlocked)

@klanomath Should I then force quit teminal and try again?

@OMN30 I would terminate whatever is running in Terminal (ctrl-c). Then diskutil verifyDisk disk0 & diskutil verifyVolume disk1 (assuming disk0 is your internal disk and disk1 is the APFS container scheme containing the volumes to decrypt)

It depends.
There's several factors that go into decrypting a drive:

The CPU - how quickly it can "crunch" the numbers to encrypt/decrypt
Whether or not your have a T2 chip
Drive size - bigger means more things to process
Type of drive - SSDs are fairly quick whereas mechanical drives are much, much slower.
How it's connected - USB 2.0 (480Mb/s) versus USB 3.0 (5Gb/s) versus SATA II (3Gb/s) versus SATA III (6Gb/s).  All these different speeds factor in how quickly the decryption process goes.

When I had to do DoD wipes of mechanical drives, many of them were only 250GB, it could take up to 48 hours and it was just a "3 pass of writing zeros".

So I left my iMac on sleep mode overnight,

When you put your Mac to sleep, it stops the processes.  Don't put it to sleep while decrypting.


text:
ZSH issue with colorized prompt and double slash, i.e "//" appearing when I am into root
I am faced to a problem of appearing slash / appearing double slash into PS1 when I am located on root / .
I explain more precisely, I have in .zshrc :
setopt PROMPT_SUBST
slash_color () { dirs | awk -F "/" ' {for (i=1; i<=NF; i++) {printf "\033[38;5;75m"$i"\033[38;5;206m" "/"}} '; }
PS1='%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|$(slash_color)%F{13}|%F{7} '

The goal was to colorize each slash of the current PATH.
This way, when I go to a deeper directory, I get :

But a problem remains when I do : $ cd /, I get the following result, i.e a double slash representing the  current path and I don't know to handle this to have only a single path :

If someone could help me to get only one slash when I am located on root, i.e / ?

though an interesting case occurs if you have a filename/ folder name with a slash in between

@ankii Did you try to create such a file?

@ankii Slash != Backslash. Try touch foo/bar :-)

@nohillside https://i.stack.imgur.com/al3tW.png https://i.stack.imgur.com/lRRxi.png though I did that in finder. Idk about terminal

@ankii If you look with Terminal you'll find the / replaced by :, so it won't be an issue for the problem here. Finder is doing some legacy HFS magic on this.

How to make path prompt easier to read by color-coding each `/` (forward slash)?

Change the for loop from
for (i=1; i<=NF; i++) \
 printf blue $i pink "/"; \
printf "\n"

to
for (i=1; i<NF; i++) \
 printf blue $i pink "/"; \
printf blue $NF pink; \
printf "\n"

notice the change in <= → <
Take care of semi-colons.

or use some help from searching to get an if else condition for which the pseudocode (not correct bash syntax) is:
for all i<=NF:
 if (i<NF):
   printf blue $i pink "/" ;
 else:
   printf blue $i pink ;
printf "\n";

@ankli thanks a lot ! I am faced now to another issue but this is another story too, so new question, to follow ...


text:
ZSH prompt issue : commands shifted to the right on one hundred space characters when doing completions, i.e using TAB key
From this post, Get Function Into PS1 (Zsh)? , it seems to be possible to execute a function inside a ZSH prompt`.
Here how to use a function into PROMPT :
setopt PROMPT_SUBST
slash_color () { dirs | awk -F "/" ' {for (i=1; i<=NF; i++) printf "\033[38;5;75m"$i"\033[38;5;206m/"} '; }

PS1='%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|$(slash_color)%F{13}|%F{7} '

Below the result :

ISSUE : But now, I am faced to another problem : when I am inside a directory, the first completion with TAB, for example "vim" ⇨Tab shift all the display to roughly one hundred of space characters to the right.
To illustrate, here is a screen capture :

As you can see, just after typing vim te and after press ⇨Tab key, the command vim te is pushed to the right: I don't understand where this shifting could come from.
I am using zsh-5.8 from MacPorts and I also could reproduce the issue by compiling the sources of zsh-5.8 on macOS Catalina.
If someone could have an explanation/suggestion/clue, this would be fine to tell it.
PS: I suspect that using a simple ZSH environment variable could fix this strange behavior.
I have done some research and find these 2 interesting links :

zsh, prompt, variable expansion, ANSI color sequences
Using ANSI escape sequences in zsh prompt

It seems the shifting that occurs in my case is caused by the interpretation of ANSI escape characters but I didn't understand all the details.
However, i tried to modify slash_color() function like this :
slash_color () {
dirs | awk -F "/" '{ blue="\e[38;5;75m"; \
                     pink="\e[38;5;206m"; \
                     for (i=1; i<NF; i++) \
                       printf blue $i pink "/"; \
                     printf blue $NF pink; \
                     printf "\n"
                   }'
}

But this doesn't work, I get the following error about awk:
awk: cmd. line:1: warning: escape sequence `\e' treated as plain `e'

In my original issue (shifting to the right), everything happens like ZSH was badly computing the length of the real visible PATH of PROMPT and overestimating it? That would explain why I am shifted to the right.
Could anyone take a look please at the two links that I gave above, it could contain the solution in my case.
UPDATE 1: @Allan, here you can see my last attempt :
# Prompt for zsh : path separated by %F{13} slash to better see where we are
setopt PROMPT_SUBST

slash_color() {
dirs | awk -F "/" '{ blue="\033[38;5;75m"; \
                     pink="\033[38;5;206m"; \
                     for (i=1; i<NF; i++) \
                      printf blue $i pink "/"; \
                     printf blue $NF pink; \
                     printf "\n";
                   }';
}

# Last method using my_precmd_hook_function
my_precmd_hook_function() {
  slash_path=$(slash_color)
}

autoload -U add-zsh-hook
add-zsh-hook precmd my_precmd_hook_function

PROMPT='%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|''$slash_path''%F{13}|%F{7} '

Rendering of PATH with pink forward slash is good but the issue of shifting to the right remains when I type cd+⇨Tab or ls+⇨Tab. The presence of printf "\n"; doesn't change anything on the result.
Below a capture illustrating this :

SOLUTION FINALLY FOUND : my perseverance has paid off, everyting is working fine, no more shifting and colorized forward slash in PATH, with :
# Prompt for zsh : path separated by %F{13} slash to better see where we are
setopt PROMPT_SUBST

# Path with colorized forward slash
slash_color() {
dirs | awk -F "/" '{ blue="%{\033[38;5;75m%}"; \
                     pink="%{\033[38;5;206m%}"; \
                     for (i=1; i<NF; i++) \
                      printf blue $i pink "/"; \
                     printf blue $NF pink; \
                   }';
}

# Prompt final
PROMPT=$'%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|$(slash_color)%F{13}|%F{7} '

# Zsh reverse auto-completion
bindkey '^[[Z' reverse-menu-complete

Thanks a lot for all your advices.

If you get Down votes, consider making all your troubleshooting an answer - even partial answers and wrong answers get upvotes and help people learn. Then the question can be shortened to a sentence or two describing the problem clearly. Those also tend to get upvotes and traction.

https://apple.stackexchange.com/questions/383297/zsh-moves-texts-when-the-prompt-is-too-long is about zsh 5.7.1, the answer described that the problem doesn't occur in 5.8. So I'm not sure why you consider it relevant.

@nohillside I suspect that the function slash_color () puts the mess in the display of the prompt, especially, non visible characters like ANSI escape codes seem to be added to the prompt when I try to do a TAB completion and all command cd foo/ is shifted on the right. This issue occurs both on zsh-5.7.1 and zsh-5.8.

So https://apple.stackexchange.com/questions/383297/zsh-moves-texts-when-the-prompt-is-too-long doesn't apply, right? :-) Look, on the one hand it's great that you doing research on this and documenting the results, on the other hand it makes the question hard to read and understand (so most people will just ignore it). So please focus the question on the actual problem at hand to get more attention.

@nohillside your link talks about another issue, when one character of command is removed. In this case, zsh-5.8 fixes it, but here in this post, this is another problem.

I agree, that's why I wonder why you've included this link in your question :-)

@nohillside . Link removed as you suggested it, now only one specific problem.

@youpilat13 please post an answer :)

To be candid, I think your making this prompt overly complex and attempting to introduce additional, complex "layers" to what's supposed to be a simple prompt is having unforeseen and unpredictable issues.
In my previous answer to your related question, which what you based your slash_color function on, I cautioned against this from a usability standpoint.  In the comments, I mentioned that I wasn't amenable to putting a function within a prompt for security reasons.
Ok...disclaimers are out of the way.

My first observation is that you have a newline character being generated by awk.

So, in your prompt, you're telling it to output a new line in something that's supposed to be contained to a single line.  I don't now how PROMPT handles things within ZSH, but I doubt it handles new line chars very well.
Secondly, you seem to be mixing up all the different things that ZSH, awk, and functions in general have to deal with.  I'm still a bit foggy as to the actual logic here, but it seems like you're trying to push "normal" escape codes through two layers of functions within ZSH by using their color conventions and ZSH's loadable modules.

Could anyone take a look please at the 2 links that I gave above, it could contain the solution in my case?

Why?  What in those links lead you to believe that?  The first link is about variable expansion within the prompt.  The second show you how to colorize your prompt using both escape sequences and the preferred braces method in ZSH.
I believe the issue is the over-complexity.
You're shoehorning a function that not only has the ANSI escape codes, which are supported, but calling another function that creates a pipe, which means it creates a sub shell to call yet another function!  (This is what I was referring to re:  layers and complexity).
This is why I suggested using precmd().  Not only can you nest functions, but you can call multiple functions and then generate your prompt.  I advise you to explore that more and not fixate on PROMPT being the sole method to skin this cat.
My other piece of advice is to articulate what you'd ultimately like to accomplish and post that as a new question because there's probably a solution you're not aware of.  IMO, this sounds like an XY Problem

Sorry to be boring with my attempt which is tricky, I must admit it. So I am going to follow your advice and explore the precmd() world. zsh can be quickly a monster at level of options and possible configurations, that's why my old bash configuration is simple compared to zsh (I don't say that bash is basic itself). I will add an update as soon as possible to keep interacting with you. Thanks

Solution finally found as you can see after my UPDATE1. Thanks a lot !

SOLUTION FINALLY FOUND : my perseverance has paid off, everyting is working fine, no more shifting and colorized forward slash in PATH, with :
# Prompt for zsh : path separated by %F{13} slash to better see where we are
setopt PROMPT_SUBST

# Path with colorized forward slash
slash_color() {
dirs | awk -F "/" '{ blue="%{\033[38;5;75m%}"; \
                     pink="%{\033[38;5;206m%}"; \
                     for (i=1; i<NF; i++) \
                      printf blue $i pink "/"; \
                     printf blue $NF pink; \
                   }';
}

# Prompt final
PROMPT=$'%F{13}|%F{green}%n@%F{cyan}%m%F{13}|%f%T%F{13}|$(slash_color)%F{13}|%F{7} '

# Zsh reverse auto-completion
bindkey '^[[Z' reverse-menu-complete

Thanks a lot for all your advices.


text:
How to reopen the Google Drive icon?
Sometimes the icon of Google Drive, on the top menu, disappears. This really annoys me also because this is happening always more frequently (and I don't want to go to the web browser and search for Google Drive, etc. I don't know how to solve this unless I restart the mac, but this is also annoying and undesirable.
So, is there a way of making that icon reappear, i.e. restart Google Drive's client on the mac, in case it dies?

I had the same issue. I found that opening the app worked fine, as @wch1zpink pointed out. Google Drive sync had so many bugs for me, like re-adding photos that I deleted and hogging resources, that I just uninstalled it after I got the news that photos was removing unlimited support. I instead switched to the web ui.

Just go to your Applications folder in Finder and double click the application "Backup and Sync from Google.app".  If that does not work, other options may need to be explored.


text:
What is the name of the long cable/plug attachment on the MacBook MagSafe charger?
My MacBook 2015's MagSafe charger has two attachments for plugging it into the wall:

a simple plug, which slides/snaps onto the charging block
a loooong cable, one end of which can slide into the charging block and the other end has a plug on it for going into the wall

I would like to know the name of the second attachment.

The cable in question (pun intended) is called Power Adapter Extension Cable.

Overview
The 1.8-meter Power Adapter Extension Cable is an AC extension cord that provides extra length for your Apple power adapter. Use it with MagSafe and MagSafe 2 power adapters, 10W and 12W USB-A power adapters, and 29W, 30W, 61W, and 96W USB-C power adapters.

P.S.: The attached image is for illustration purpose and is obtained from the aforementioned hyperlink from the Apple Online Store.