Sunday, September 5, 2021

Recent Questions - Ask Different

Recent Questions - Ask Different


Routing apple native logs of specific module to rotating set of files

Posted: 05 Sep 2021 11:54 PM PDT

one of the benefits of using Apple native logging framework (NSLog or os_log) is the synchronization between multiple processes generating log messages to the same console -

It's achieved by managing process that serialize the logs from many sources and writes them to the disk.

I wonder if there's any way to add this mechanism the ability to route the messages to a separate log file that will be dedicated to my application only (and it's helper processes) - when reaching some predefined threshold, it should be rotated and start writing to new inode, while the original file moved to different name (i.e. myapp.log moved to myapp_1.log)

How can I resize these partitions?

Posted: 05 Sep 2021 10:57 PM PDT

I have two partitions on my 2015 MacBook Air, one running El Capitan 10.11.6 and one running Catalina 10.15.7.

How can I resize these partitions? There are no resize controls in the disk utility partition screen.

diskutil

jaymon@MacBook-Air ~ % diskutil list  /dev/disk0 (internal, physical):     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:      GUID_partition_scheme                        *251.0 GB   disk0     1:                        EFI EFI                     209.7 MB   disk0s1     2:          Apple_CoreStorage El Capitan              218.3 GB   disk0s2     3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3     4:                 Apple_APFS Container disk1         31.7 GB    disk0s4    /dev/disk1 (synthesized):     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:      APFS Container Scheme -                      +31.7 GB    disk1                                   Physical Store disk0s4     1:                APFS Volume Catalina - Data         9.7 GB     disk1s1     2:                APFS Volume Preboot                 83.2 MB    disk1s2     3:                APFS Volume Recovery                529.0 MB   disk1s3     4:                APFS Volume VM                      1.1 GB     disk1s4     5:                APFS Volume Catalina                11.1 GB    disk1s5    /dev/disk2 (internal, virtual):     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:                  Apple_HFS El Capitan             +217.9 GB   disk2                                   Logical Volume on disk0s2                                   47C3B984-58EF-44BA-8097-70CDE83F8248                                   Unlocked Encrypted  

Is there a command/simple method to restore all "defaults" settings?

Posted: 05 Sep 2021 07:30 PM PDT

defaults read prints out all the preferences for all apps.

defaults write … … can be used to set preferences

But write cannot use the format that comes from read

I would like a way to get all the defaults on demand, save the results, and later restore them all. I don't want to do it with Time Machine, because that would also revert changes I have made in content.

The reason is that Apple keeps changing settings. Seems like almost every week I try to open an image file and find that Apple has changed it from GraphicConverter to Preview, or .csv from LibreOffice to Numbers, or .mp3 from Amadeus to Music. I have many times restored all of these to my preference, and it keeps happening. It's been filed in bugreporter long ago with no response.

I have an AppleCare on this laptop. Might it be worthwhile calling them? When I had a problem with Mai.app, it was weeks of trial and error before the guy declared it "fixed." They have ignored two or more messages saying "no, it is NOT fixed."

Update: Maybe "all the prefs" is an oversimplification of what's in the man page. Point is, it spits a very different format than it can accept.

MacOs Safari can not delete stored http digest password

Posted: 05 Sep 2021 04:50 PM PDT

How to delete http password for some site?

There is a public site with http digest password and after entering it with success:

  • on linux and on windows and any browser the rule is simple: "password works and is rembembered by browser while browser session is opened". After closing browser entering site asks for credentials again.
  • But for MacOs safari, site is allways opened without asking for a password.

Not sure if I have checked "remember my password" or not but in any case there should be a way to delete it, and there is no line that mention site name in "safari->preferences->passwords nor safari->preferences->privacy->manageWebsiteData nor inside application KaychainAccess. Turning off safari, killing it in task list "force quit applications", reseting turnoff-turnon MacBook, clearing all history and cookies also do not work, meaning i am always entering the site without http password login.

macos version is bigsur 11.4, and safari version is 14.1.1

addition (programming aspect):

  • on my public site i also implemented button "logout" using simple technique of sending empty php page with header "HTTP/1.1 401 Unauthorized". That worked well for many years (in other browser, never used safari before) and is usefull for changing site user. Now i realise that my logout button does not work in Safari. So this is probably some safari-concept problem too. But, in any case there must be some way to delete it.

Need help finding an application [closed]

Posted: 05 Sep 2021 08:17 PM PDT

Ok so I Know this might not be good platform or board to ask this question but I have been searching for the past 3 hours ... I have tried every keyword but can't find an app that once I came across ..

The application is for mac os which automatically keeps recording in background all the time automatically (it keeps recording of last hour) and there's an icon in menubar ...

you can drag the icon from menu bar and get up to an hour of recording ...

I can't get my head around it so if anybody knows the name of that application please tell me .. I shall be really thankful ..

How does MacOS decide when to use M1's performance vs. efficiency cores?

Posted: 05 Sep 2021 01:00 PM PDT

I haven't found the answer by googling.

Is it possible to find precisely the history of WiFis connected on my MacBook Pro 2017 with the times?

Posted: 05 Sep 2021 12:40 PM PDT

Is it possible for me to find out when and what WiFi routers my MacBook has been connected to over the last few months/1 year?

Conditionally run program using Rosetta 2 on M1 Mac

Posted: 05 Sep 2021 05:27 PM PDT

Is it possible to start a program using the command line in a way that has it run by Rosetta 2, without having the application setting that forces the program to always be running under Rosetta 2.

e.g.

  • click dock icon for Xcode → launches Xcode NOT through Rosetta 2
  • run open -a xcode --rosetta2 → launches Xcode through Rosetta 2

How to programatically change application's notification settings?

Posted: 05 Sep 2021 11:50 AM PDT

There are some applications like WhatsApp or Telegram that don't have a fast way of disabling notifications.

I would like to know if it's possible to change notification settings programatically. In my case it would suffice to change the "Allow Notifications" toggle. I want to set a shortcut or make a script to enable/disable notifications for certain apps.

Just in case, here is a screenshot of the settings I'm talking about.

enter image description here

Macbook air won't connect to Huawei phone's hot spot

Posted: 05 Sep 2021 12:47 PM PDT

I have a macbook air 2015 and a Huawei Mate 20 lite phone. Macbook has latest Big Sur installed and the phone has Emui 10 (Android 10). No matter which frequency or band or security I choose the macbook won't connect to the phones hotspot. My fiancee has a Samsung and the macbook can connect to the Samsung's hot spot just fine. This is really inconvient for me. How can I fix this problem?

I should note my other laptop with Windows 10 installed can connect to my phone's hot spot.

Finder suddenly asking for permission to move to trash

Posted: 05 Sep 2021 05:49 PM PDT

In some recent update, the finder has asked me for to enter my password before I can move a file to the trash. It's a similar issue to this question: Finder asks for password to move file to trash, except the OP's solution there did not work for me.

The annoying part about this is that I cannot delete files from my music player (Clementine) like I used to -- it just gives me an error, so I'm assuming it's related.

How can I fix this and revert it back to its original behavior of not needing to prompt every time I move a file to the trash?

EDIT:

Thanks to the comment below I have the following:

MacBook-Pro-8:~ shane$  ls -leO@d ~/.Trash ~/Music/Folder_1/ ~/Music/Folder_2/  drwx------    7 shane  staff  -  224 Sep  5 13:28 /Users/shane/.Trash  drwxrwxr-x@  22 shane  staff  -  704 Jun  2 08:22 /Users/shane/Music/Folder_1/      com.apple.macl    72       com.apple.quarantine      57   dr-xr-xr-x@ 116 shane  staff  - 3712 Sep  3 17:47 /Users/shane/Music/Folder_2/      com.apple.macl    72       com.apple.quarantine      57   

So it turned out this prompt was only happening in one folder (Folder_2). Obviously it's missing write permissions. I'm just not sure how this happened as I followed the same process for this as the other 10 or so folders that don't have this problem (i.e. download playlist, extract it, move it to the Music directory) -- so something seems to have changed with the default permissions at some point in this process?

iOS Shortcut, regex match these words, while excluding these words

Posted: 05 Sep 2021 02:08 PM PDT

I am using iOS Shortcuts and am using it get contents of page (converts the page to RTF), then running through make text to turn it into plain text.

I am trying to develop an IUC flavored regex to search for key words/phrases on a list of pages I am looping over with a while each, but want the regular expression to exclude other phrases and prevent a false-positive trigger.

I have it set up with two capture groups. I'm not sure if it is desired to make the second group a non-capture group, or not attempt capture at all. I only think the second one must be either a capture, or non-capture group for the logical AND provided. I read that (this)(that) acts as an and, but I'm not sure if either is a negate, whether it follows that logic. For that reason, I'm not sure if the negate should not be it's own capture group, non-capture group, or shouldn't be using the brackets at all. I had tried some nested capture group stuff, but that seems to not follow the syntax.

Currently, I have tried a wide variety of regular expressions. I do not have a full list, but I can share a few permutations I have tried starting with the most recent:

(?>Include\sTerm\sOne|Include\sTerm\sTwo|Include\sTerm\s3)(?:<!Exclude\sTerm\sOne|Exclude\sTerm\sTwo|Exclude\sTerm\s3)    (?Include\sTerm\sOne|Include\sTerm\sTwo|Include\sTerm\s3)^(?!Exclude\sTerm\sOne|Exclude\sTerm\sTwo|Exclude\sTerm\s3)  

Just to be clear, I want it to first search the exclude terms and fail if it finds one. Then if it doesn't find any of these negate terms, then begin searching through the include terms. It is fine that the include list and exclude list terms, respective to each grouping are being treated on an OR basis (per piping |) as that is the intended behavior I'm seeking. Finally, I am wanting to start my search at the top of the page and for it to stop searching / attempting capture in this logical order:

  • Exclude term found, STOP -- First include term found, STOP

Final note, this search is obviously performed over multiple lines. I am only seeking to capture the include term, not the exclude term. I only want the exclude term to cancel out a match of both exist (either before or after - cross directionally). That is if an exclude term exists, negate the positive term and provide zero matches.

Can't create Google internet account

Posted: 05 Sep 2021 09:22 PM PDT

I want Apple Mail to talk to a gmail account. In System Preferences, when I say I want a new Google account, I get a dialog that says

Google requires completing authentication in your web browser

So I click the button and immediately I see another dialog

Failed to authenticate with Google, please try again later

There is no evident communication with the browser, so I can't authenticate. I've also tried creating a normal manual mail account, but no better luck.

I have turned on Less Secure App Access for the account I want to use. I have no difficult logging into this account using the web (gmail.com), but I don't want to handle my mail that way; I need it to be part of my mail.

This has worked fine on other machines. This one is Catalina 10.15.7.

App Store app icon is duplicated in Launchpad

Posted: 05 Sep 2021 01:06 PM PDT

Somehow, Apple's App Store app icons are duplicated in the Launchpad on my MacBook Pro running macOS 11.5 (Big Sur). Since this is a system-level application, I cannot delete one of these redundant icons. I tried the strategies that I found on the Internet, i.e.,

  1. Remove ~/Library/Application Support/Dock/*.db
  2. Run defaults write com.apple.dock ResetLaunchPad -bool true
  3. Run killall Dock
  4. Restart the system

But these duplicated icons are still in Launchpad after reboot. I am wondering how to remove one of them. Thanks a lot for your help!

Prevent iCloud Drive From Auto-Downloading on Mac

Posted: 05 Sep 2021 11:05 PM PDT

Is there a way to stop the auto-downloading of files in iCloud Drive on Mac, and if so, how? I want the files synced with iCloud Drive, but I don't want all the files automatically downloaded. I also don't want to have to completely turn off iCloud Drive on my Mac to prevent this behavior obviously. I don't know why it auto-downloads files uploaded to iCloud Drive on the Mac, but not the iPhone. This behavior is really annoying especially when you only have a 128GB Mac and you have to constantly manually remove the downloaded files. Any tips on what to do here would be appreciated.

Can mac os support greater than 2x retina (for a small 4k screen)?

Posted: 05 Sep 2021 04:02 PM PDT

I'm interested in a 4k portable monitor which is 14" in size.

I believe it is mainly intended for use with iOS/Android, however it does say supports mac/win.

The concern I have is that even at the familiar maximum 2x scaling, which we call retina resolution, 14" at "looks like" 1920x1080 will result in very small ui. To compound the problem in this case, this display is touch, too; which is likely to make finger accuracy an issue.

Does or can mac os support greater than 2x retina? How are the supported resolutions for a display defined? Is this something apple does, or does the manufacturer do it; can a user adjust it without going too low level?

Install BootCamp drivers in Windows 10 to fix bluetooth and keyboard issues

Posted: 05 Sep 2021 09:53 PM PDT

I recently installed Windows 10 20H2 along with MacOs on my MacBook Pro, but upon booting Windows I can see the touchbar doesn't work in Windows(doesn't display anything), and Windows isn't detecting the Bluetooth hardware. I downloaded Windows Support software from bootcamp and tried to install it manually in Windows. But I am facing these errors:

Error 1 Error 2

Is there anyway I can manually install drivers?? I also checked on Windows Update but there was no driver updates there either.

My mac OS is on Big sur latest version and Windows is on 20H2.

Update 1

If I force install BootCamp.msi by msiexec /i BootCamp.msi I get this error:

enter image description here

Update 2

Turns out the issue was with the pendrive I downloaded the support software on, using a different pendrive solved the issue. However I am surprised with the poor Trackpad support with no additional multi-finger gestures and also the scrolling is inverted. Can I use precision driver instead of Apple's driver?

Clone APFS Time Machine volume to 2nd hard drive (Big Sur)

Posted: 05 Sep 2021 02:01 PM PDT

I run Time Machine on an APFS formatted SSD and wondered, if it is possible to make something like a backup of my backup.

In practice I would like to copy / clone / get an image of my Time Machine SSD to a 2nd external hard drive from time to time, so that I would be able to restore my backup history to another SSD if anything happens to the Time Machine SSD (corrupt backup, ransomware etc.). Is this somehow possible with disk utility or a 3rd party software?

Troubleshoot slow Big Sur wired network

Posted: 05 Sep 2021 06:00 PM PDT

The wired network on my iMac is uncomfortably slow. Google's speed test (just for one quick and easy metric) frequently dips down to about 1 Mbps for downloads. A separate laptop on the same network at the same time, but through WiFi, will consistently show 250 Mbps.

Sometimes connecting the iMac to WiFi seems to improve speeds a bit. Sometimes they improve on their own. In any case the iMac never sees more than half the speeds a laptop does.

This is a new problem immediately after upgrading to Big Sur (i.e., no other changes to the system or network). I'm therefore assuming this is something to do with macOS. But I am at a loss to even begin to know how to troubleshoot the problem.

What in macOS can I check or tweak or investigate to get any handle on what's even happening, much less how to fix it?

Why am I getting bad distortion on my MacBook Pro 15, mid 2015 right speaker?

Posted: 05 Sep 2021 08:02 PM PDT

My MacBook Pro 15, mid 2015, has bad distortion on the right speaker. Headphones and bluetooth are fine, and when I use the Audio MIDI utility to swap channels it stays on the right speaker. I installed another right speaker I bought online, but the problem persists. Neither speaker had a broken cone, and the distortion sounds more electronic anyway.

Either:

  1. I got a replacement speaker with the same problem. Since it was used, this is possible but seems unlikely given that my searches online don't suggest that this is a common problem.
  2. I somehow managed to get the old one I removed mixed up with the new one, and put the old one back in. Possible as I'm a old fart, but I labeled the old one as "bad" to avoid this, and the one in my junk box is labeled "bad". Tho still possible that it was the labeling where I spaced out, but would require me to have been even more of a screw up than I usually am.
  3. There is some sort of preamp on the sound/mother/other board that has blown.
  4. There is some sort of software issue that is overdriving some amp somewhere.

I can solve #2 by doing the swap again, but it required more futzing inside the case than I like to do, always worried my fat fingers are going to break something else when I have to go that deep. Maybe it's possible to just plug the bad-labeled speaker in to test it, but I hate actually booting the thing with the back off.

It was pretty cheap, tho I don't recall where I got it, so if I could eliminate #2, #3, and 4, I'll just buy a new one.

Can any of you help me eliminate #3 and #4?

Leaving the last 9 characters of a filename in Automator

Posted: 05 Sep 2021 05:01 PM PDT

I have a ton of files to rename where we only need the last 9 characters of the file.

The files are currently named as this: FirstName_LastName_000000000.pdf. Essentially, I want to rename the files so that they are named as such: 000000000.pdf

If somebody can assist with providing a way of doing so that will be awesome.

remove all songs from iPhone that aren't in any playlists via iTunes

Posted: 05 Sep 2021 01:31 PM PDT

Every time I remove a song from a playlist on PC, then sync to iPhone via iTunes, the playlist is updated (i.e. it doesn't include the removed song), but the song is still in the library. That adds up over time. Now a bunch of "rogue" songs have accumulated that aren't in any playlists that take up quite a bit of storage. Any way to get rid of them?

Automatically lock screen if I leave the MacBook

Posted: 05 Sep 2021 11:46 PM PDT

I want my MacBook to get locked automatically if I leave it.

I am open to ideas.

How could the MacBook detect this?

Switching off after one minute of inactivity is not enough. The screen most get locked sooner. And locking the screen after 20 seconds creates too many interrupts for the daily work.

I wear an Huawai GT2 Smartwatch. But that is just one idea.

Maybe I could install a physical sensor in my seat.

Any idea is welcome.

Background: I change the job and in the new company you need to pay pizza for the whole team if you forget to lock your screen :-)

I want it to be automated: I walk away and the screen should lock. No additional action should be required. Keyboard shortcuts, special mouse movements, unplugging devices from USB, bluetooth distance to mobile phone (I don't always carry around the phone) are not valid answers.

Show hidden files on macOS Sierra & newer

Posted: 05 Sep 2021 01:32 PM PDT

To see my /etc folder I've tried this command in Terminal:

sudo chflags nohidden /etc  

followed by:

sudo defaults write com.apple.Finder AppleShowAllFiles true; killall Finder  

also tried:

sudo defaults write com.apple.Finder AppleShowAllFiles YES; killall Finder  

Neither of them seemed to work.

Is there the dark mode (inverted colors) in the 'Preview' Application for PDF reading? [duplicate]

Posted: 05 Sep 2021 11:54 AM PDT

I am using the "Preview" application for reading a PDF file on a MacBook Pro. Is there any way in I can read it in dark mode?

You can do it in Adobe Acrobat Reader by changing background and text color, but can "Preview" do that too?

How to know what nsurlsessiond is downloading

Posted: 05 Sep 2021 10:06 PM PDT

I turned off all iCloud drive stuff and it seems something else is using it. I don't have photo sharing and photo syncing on between my Mac and iPhone. And I've turned off whatever I can. But still nsurlsessiond downloads over 400 MBs every time it runs; which sometimes is triggered with a restart of the system.

I did a sample process on it; but I have no idea what it means.

How do I write to NTFS drives in OS X?

Posted: 05 Sep 2021 09:40 PM PDT

What is the best, easiest, preferably cheapest way to make OS X write to NTFS-formatted drives in Mac OS X?

how to quickly reboot from OSX to Windows and back

Posted: 05 Sep 2021 06:21 PM PDT

From Windows back to OSX is fairly easy. What I would like is a few less steps to get from OSX to Windows. Currently I launch system preferences -> startup disk - then select the bootcamp partition and press restart.

Being completely new to OSX it seems to me that a one-click action on the dock should be possible with some sort of automation scripting. Howerver I know nothing about OSX (yet) and how that works. First, is such a thing possible, and second please provide some tutoral links for such automation system.

Can I see my CPU and memory usage meters in the menu bar?

Posted: 05 Sep 2021 10:55 PM PDT

I'd like to be able to view my cpu and memory usage in real time. Not as a desktop widget or window application, but as a widget in the menu bar. Is this possible?

No comments:

Post a Comment