Wednesday, April 27, 2022

Recent Questions - Ask Different

Recent Questions - Ask Different


How can I specify an encoding in Mac OS when unzipping zip files?

Posted: 27 Apr 2022 01:46 AM PDT

I am trying to unzip some zip files into a directory and the result of

unzip '*.zip' -d directory  

leaves a lot of the files as gibberish. I would like to have a way to specify the encoding, but am not sure if this is possible. I know that unarchiver can do this, but it doesn't allow you to unzip multi part zip files into the same directory. Is there another option to do this in Mac OS?

Electron app not asking for Camera and Microphone permission on macOS Monterey [closed]

Posted: 26 Apr 2022 11:07 PM PDT

I have built an application of stack electron and reactjs. I am trying to access the camera and microphone from the application. But the app does not ask for permission when requested and also it does not show in the System Preferences -> Security and Privacy under camera and microphone. Below are the versions I am using:

"electron": "^15.3.0",      "electron-builder": "^22.14.5",      "electron-devtools-installer": "^3.2.0",      "electron-notarize": "^1.1.1",      "electron-rebuild": "^3.2.3",       "react": "^17.0.2"  

Let me know what I am missing or needs to be changed. Thanks in advance.

MacBook Pro recovery key has special character ($)

Posted: 26 Apr 2022 08:40 PM PDT

Hi people so I am trying to recover access to my MacBook pro however my recovery key has a special character in it the Dollar sign ($). I can't seem to get the keyboard to type the character or any other special characters. Would anyone have an idea of how I can go about getting the dollar sign

How to change the color of the white across all applications?

Posted: 26 Apr 2022 08:39 PM PDT

With the advent of Dark Appearance (System Preferences, General) macOS became more pleasant to use on a dark room. Since Dark Appearance turns dark (or darker) many parts which used to be white (or brighter).

However somethings are still not affected by the Light/Dark appearance control, i.e. this website. It is perhaps outside the boundaries of what the OS can do, I actually don't know.

Is there someway we can tint the white? I would like to do it across all applications.

If that's not possible perhaps I should keep using Light Appearance and reduce screen brightens. That would be and unfortunate solution though.

IMac 2020 , Is this Mac's OS a full VM? [closed]

Posted: 26 Apr 2022 10:31 PM PDT

I was given an IMac Pro 2020 to see if I could fix it, because my cousin could not get it to work properly. It seems the OS is a Virtual Machine? Im not that familiar with this type of Virtualization. I suspect the whole OS is a VM, because when I go to reset it normally another company is basically saying their going to monitor the system. Excuse my lack of Computer Literacy, Im still working on my A+. Does anyone have input or resolutions to this issue?

  • He bought it on FB Marketplace for $1200, I told him that's a good price given the small crack on the side. I told him I would come check it out before he buys it, but he bought it anyway saying the seller said they had other people interested +

A company wanting to monitor the computer is a red flag to me. Im hoping his impulsivity did not lead to a $1200 paperweight...

How to set BundleIsRelocatable as false

Posted: 26 Apr 2022 06:12 PM PDT

I've been using Stephane's fine Packages program to create pkg installers, but I'd like to do something scripted.

I need to learn how to set the BundleIsRelocatable value as false when building a pkg. I don't see this setting as an option in pkgbuild.

Can someone help me out?

External keyboard function keys suddenly stopped working

Posted: 26 Apr 2022 10:28 PM PDT

I use a Logitech K850 Bluetooth keyboard with my MBP on MacOS 12.3.1. I had configured my fn keys to be the standard F1, F2, F3 instead of the special feature keys like changing the volume:

enter image description here

Suddenly though, this has stopped working. If I press F8, it now mutes the speakers instead of actually being the F8 key. I have tried:

  • restarting
  • unpair/pair the keyboard again
  • untick and tick the option in the screenshot above

All don't make a difference. Any ideas how I can fix this?

Is it possible to set a per-profile HISTFILE in iTerm2?

Posted: 26 Apr 2022 04:29 PM PDT

Let's say I have a "Work" profile in iTerm2 and want to set a different HISTFILE for this profile, called .zsh_history_work, so that I don't see my work commands showing up in my regular profiles.

I know that it's possible for me to switch to the different HISTFILE by writing HISTFILE=~/.zsh_history_work every time I open a new window with the "Work" profile. Is there a way to make this automatically happen so that I don't need to run the command all the time?

MacOS 12.3.1 Full Disk Access problem

Posted: 26 Apr 2022 04:12 PM PDT

We use an MDM solution to manage devices. A .mobileconfig 'profile' grants all the necessary access for Ivanti File Director, that works perfectly fine when the rights were granted on an earlier version of MacOS however when we start the application the first time on 12.3.1 the Full Disk Access request just jumps back and forth. (even if we grant it manually with admin rights)

With one word with 12.3.1 something has changed and we're unable to figure it out. Ivanti support ticket is open and we're waiting for their answer however it'd be good to know that we dig in the right direction.

I'm not sure I can post the .mobileconfig file, since it may contain sensitive information.

Thanks for the suggestions.

Bash script or AppleScript to connect & disconnect an Airplay display in Monterey+

Posted: 26 Apr 2022 03:48 PM PDT

In System Preferences > Displays, bottom left corner is "Add Display". I can choose another (Monterey+) Mac, Apple TV, iPad, possibly other things, to effectively become an additional display for my Mac. It's pretty cool.

I want to automate connecting and disconnecting to one of those. Either AppleScript or bash is fine. I'd really prefer not to use GUI scripting if possible, but if it's the only way I'll take that over no solution.

An anyone say definitively if this is possible, and/or how to do it?

Thanks!

What is '<<EOS' in shell commands like 'osascript <<EOS'

Posted: 26 Apr 2022 04:09 PM PDT

In this post and one or two others I've seen things like:

osascript <<EOS  -- some AppleScript code  EOS  

I expect it's part of bash and presumably other shells... or is it an AppleScript/osascript specific thing? I've Googled, man'd, searched, etc. in vain.

I can infer from context more or less what it's doing, but can anyone tell me what officially is this <<EOS ... EOS thing, and/or point me to documentation for it?

Thanks!

How to allow screen sleep (but keep WiFi up, under Power Adapter)?

Posted: 26 Apr 2022 10:24 PM PDT

Monterey 12.3.1 on a 2020 M1 MBA

Issue

I run a streaming client in a Terminal under VS Code. It's ok if the screens go off through the timer when I step away, but I want WiFi and the computer to continue running. WiFi should stay up indefinitely under Power Adapter.

Battery Settings

There's only a slider for "Turn display off after:". There used to be a "Turn computer off after:" setting (on never would prevent WiFi from shutting off), but it's no longer there.

Is there a way to allow for the screens (MBA + external monitor) to turn off with the MacOS timer, but otherwise have the MBA continue running (no WiFi interruptions)?

Mac not connecting to public Wifi, TCP to captive portal blocked?

Posted: 26 Apr 2022 03:11 PM PDT

I am having a similar issue as this, where some public wifi works on my iPhone and not on my Mac (Big Sur 11.6.1)

iPhone connects to public Wi-Fi but Mac doesn't - why?

Other public wifi works fine.

Troubleshooting further, I see that the wifi itself connects, I got an IP address but the TCP connection times out when trying to connect to the captive portal. I can ping the IP where I get redirected (something like 172.0.20.1), but can't establish an HTTP connection on port 8000. It's a TCP issue rather than a cert error, because it doesn't even get a TCP connection established (confirmed with curl -v). My phone can reach the same port and IP on the same wifi.

I suspect some settings might be blocking outbound TCP - where should I look? Settings & Privacy > Firewall seems to be focused on inbound connections.

Podcasts on Hompods with Siri

Posted: 26 Apr 2022 03:59 PM PDT

I use Apple podcasts with Homepods. iOs 15

I can ask Siri "Play podcast X" It then plays the lasted unlistened podcast from the series X.

However it does not mark it as played so when next time I ask Siri to "Play podcast X" it plays the same podcast.

If I listen to the podcast from my iPad or just mark it as listened to then on the Homepod it will play the unlistened episode

How do I get Hopepod to mark the episode as played?

VPN config with QR

Posted: 26 Apr 2022 06:00 PM PDT

I know you can create a QR for WiFi to share around with friends and family so I was wondering if you could do the same with vpn configuration. I google around and got no where,but this seems to be the right place to ask.

How to change the color of the top menu bar on Monterrey to light gray?

Posted: 26 Apr 2022 09:05 PM PDT

I just upgraded my mac from Big Sur to Monterey and the color of the top bar changed from gray to this color: enter image description here

I went to system preferences->Accessibility->Display and checked "Reduce transparency" and that made it this color: enter image description here

I want the light gray color that I had before. If I check "invert colors" it makes the top bar light gray but the rest of the display is too bright.

Can someone please advise?

Safari downloads files to last opened folder

Posted: 27 Apr 2022 01:23 AM PDT

Although Safari has a setting for a default download folder, it always defaults to the last folder I uploaded something from when downloading via "save as". This is very annoying for obvious reasons: I rarely want to download something to the last opened folder and I rarely remember what that folder was. Is there a way to make it not do this?

Couldn't read partition map when deleting APFS container

Posted: 26 Apr 2022 05:02 PM PDT

I'm trying to clean install macOS 11.5.1 via a bootable USB. But I couldn't find the internal SSD through the onscreen installation steps. I searched Google, trying fixing this problem, and found this command: diskutil zerodisk force disk0. So I tried this in the command line(Now I realize I really shouldn't do that). I think after this, the partion map becomes corrupt. When later found and execute the diskutil apfs delteContainer disk0s2, it returned the error: Couldn't read partition map.

Here are the result of the command: gpt -r show disk0 and diskutil list (I couldn't get the text to another computer, so it's an screenshot. Sorry for the inconvenience.)

If more information is needed, please tell me. Thank you for any help or suggestion.

disk0 and disk1 is the internal SSD(I don't know why there're two identifier for it). disk2 is the bootable usb installer.

disk partition info

External displays keep getting back in the wrong order

Posted: 26 Apr 2022 11:21 PM PDT

I work with my macbook (16", 10.15.7) closed and plugged into two external monitors, with two Apple USB-C Multiport Adapter.

One adapter has HDMI, Power and USB-A plugged, and is connected to my main display (the one that should be on the left on the image below.)

The other adapter has only HDMI plugged and is connected to my secondary display (the one that should be on the right on the image below.)

And almost every single time I plug the adapters, the displays are set in the wrong order (left and right are swapped) and I have to go to System Preferences > Displays to organize them correctly again.

Even If I unplug the one that should be on the right, wait and plug it again, macOS keep setting it on the left.

I successfully reset the NVRAM/PRAM but it does not resolve this behavior.

Does anybody have an idea on how to solve this problem?

Display issue

How to properly (quickly) iterate over Reminders using AppleScript/osascript?

Posted: 26 Apr 2022 04:03 PM PDT

What is the proper, efficient way to iterate over Reminders using AppleScript? The script below works as expected, but takes 18 seconds to iterate over 180 Reminders when run from the command line using osascript! (This same script takes only 2-3 seconds when run from within the ScriptEditor.)

# Find all Reminders whose name contains "Alumni"  set findMe to "Alumni"  set answer to "Maches: "    tell application "Reminders"      set names to name of every reminder  end tell    repeat with name in names      if name contains findMe then          set answer to answer & " --- " & name      end if  end repeat    return answer  

I've run this script two ways from the command line: As a compiled script: osascript testReminders2.scrpt and as a text file: ./testReminders2.applescript (where this file begins with #! /usr/bin/osascript. Both versions take about the same amount of time.

macOS Catalina does not allow incoming connections from local network. Firewall is down

Posted: 26 Apr 2022 03:01 PM PDT

I starting facing this issue some days ago. Even when the firewall is down, I can't reach my mac from my local network. Ping is not responding neither. Some test I've done:

From my console

nrossi@~$ netstat -an | grep 8080                                                tcp46      0      0  *.8080                 *.*                    LISTEN     nrossi@~$ sudo /usr/libexec/ApplicationFirewall/socketfilterfw --getglobalstate  Firewall is disabled. (State = 0)    nrossi@~$ ifconfig | grep "inet " | grep -Fv 127.0.0.1 | awk '{print $2}'   10.1.2.123    nrossi@~$ curl -I 10.1.2.123:8080                                                HTTP/1.1 200   Content-Type: text/html;charset=UTF-8  Transfer-Encoding: chunked  Date: Thu, 18 Mar 2021 13:06:46 GMT  

From other computers

nrossi@~$ curl -I 10.1.2.123:8080  curl: (7) Failed to connect to 10.1.2.123 port 8080: Operation timed out    nrossi@~$ ping 10.1.2.123  PING 10.1.2.123 (10.1.2.123): 56 data bytes  Request timeout for icmp_seq 0  

Any help ?

Is there any way to write an automation or program on an iPad except Shortcuts?

Posted: 26 Apr 2022 09:06 PM PDT

I would like to build an interface - a set of menus, for example - which presents information from an app or a webpage and allows me to read and interact with it in a different way than it is presented or accessible in that app or website. I am working on an iPad, so I am considering trying to write some kind of web scraping Shortcut which returns information from the website.

I was curious, is there any other hypothetical way to create an automation, on an iPad? Could there be any tool which could override, control and automate the iPad, even if Apple has made it very difficult to do so?

Sending mouse to different monitors for all sides

Posted: 26 Apr 2022 08:07 PM PDT

So I have external monitors set up like this (one vertical)

enter image description here

And as you can see I am only able to send a mouse to another screen via lower half of each sides. I want to be able to send mouse not just the bottom half but upper half as well.

Is there a way to this? I understand there is a keyboard shortcut approach but I'd prefer to be able to move mouse straight to another monitor.

How to accept Apple Music Family invite without iOS/macOS?

Posted: 26 Apr 2022 10:08 PM PDT

A couple of days ago I upgraded my Apple Music subscription to family mainly so my sisters could access music from their iPhones. Since my dad is avid music listener I decided to set up Apple Music for him also on his Windows laptop.

I sent the invite via email and then we created an Apple ID for him with this same email address. But there seems to be no way how to accept this invite without owning Apple device or at least Android one. This seems odd since iTunes is basically the Apple Music for macOS/Windows.

In my family sharing settings I still see the invite as sent and when I open iTunes on his Windows machine there is no indication that there is Apple Music family invite.

Have I missed anything or is this simply impossible?

EDIT: I found a solution. I created new user account on my Mac, signed in with dad's Apple ID and the Family Sharing invitation popped right up. iTunes on Windows now works fine.

Still would be nice to know if it is possible to accept invitation without Mac or spare iOS device..

Command-line stop MacBook from sleeping when lid is closed?

Posted: 27 Apr 2022 12:44 AM PDT

I've used Caffeine before and it can stop my MacBook from sleeping when the lid is closed (sometimes I want to continue listening to something through headphones while moving around)

Is there a command that can be run from the terminal that will do the same thing?

I've tried caffeinate but it does nothing. InsomniaX does stop the MacBook from sleeping when the lid is closed, is there a way to implement this same functionality from the terminal though?

What is the 'deleted' daemon in macOS?

Posted: 26 Apr 2022 02:12 PM PDT

Since installing macOS 10.12 I noticed a flood of messages from deleted in the logs. I haven't been able to find any information about this daemon. Could anyone enlighten me what this does?

This copy of the Install OS X El Capitan application can't be verified. It may have been corrupted or tampered with during downloading

Posted: 26 Apr 2022 05:22 PM PDT

Macbook Pro 13" 2015 with OS X Yosemite on board. I've been trying to install OS X El Capitan, but always get the following message: "This copy of the Install OS X El Capitan application can't be verified. It may have been corrupted or tampered with during downloading."

By the way this is not a date time issue, date is correct on my computer.

enter image description here

How can I fix this? Who knows the solution, please help.

Why Does a Shell Script Trapping SIGTERM Work When Run Manually, But Not When Run via launchd?

Posted: 26 Apr 2022 08:48 PM PDT

Okay, quite simply I have a shell script that needs to wait for something to happen, but it has a lock-file and some child-processes that I need to ensure are tidied up if the script is interrupted.

I've achieved this without issue by using the trap command to set some appropriate actions, and have come up with a script that looks a bit like this:

#!/bin/sh  LOG="$0.log"    # Create a lock-file to prevent simultaneous access  lockfile -l 86400 "$LOG.lock" || $(echo 'Locking failed' >&2 && exit 3)    # Create trap for interrupt and cleanup  on_complete() {      echo $(date +%R)' Ended.' >> "$LOG"      kill $(jobs -p)      rm -f "$LOG.lock"      exit  }  trap 'on_complete 2> /dev/null' SIGTERM SIGINT SIGHUP EXIT    # Do nothing  echo $(date +%R)' Running…' >> "$LOG"  sleep 86400 &  while wait; do sleep 86400 &; done  

This can be run just fine in a terminal via sh Example.sh, and terminating it with Ctrl + C, causing it to remove its lock-file without any fuss.

I then tried creating a launchd job for this script like so:

<?xml version="1.0" encoding="UTF-8"?>  <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">  <plist version="1.0">  <dict>      <key>Label</key>      <string>org.example</string>      <key>ProgramArguments</key>      <array>          <string>sh</string>          <string>~/Downloads/Example.sh</string>      </array>      <key>RunAtLoad</key>      <true/>      <key>EnableGlobbing</key>      <true/>  </dict>  </plist>  

Creating Example.sh and Example.plist from the above in the ~/Downloads folder allows me to run the launchd job via launchd load ~/Downloads/Example.plist and end it via launchd unload ~/Downloads/Example.plist. However, ending the job doesn't cause a SIGTERM to reach the script, which is instead SIGKILL'd after the 20 second timeout.

So what I'd like to know is; why isn't my script receiving SIGTERM, and how I can ensure it does?

Is there a way to Split one 42 Inch TV into Multiple Displays or Virtual Displays?

Posted: 26 Apr 2022 02:55 PM PDT

I am a video editor and I want to split up my 42 inch TV into multiple desktops. I want to shrink the display into multiple shrunk sections, so the Mac Pro thinks that there are 2 or 4 monitors hooked up but there is actually only one super freaking huge TV, made to look like 4 monitor displays. I want to have sharper resolution. Just having a bigger screen isn't doing it for me. I need 2 monitors for Final Cut Pro - not just big Final Cut Pro windows. I do not want to "Size Up" or Split the screen into multiple windows, I want multiple displays. I want to trick my monitor into thinking that there more than one display. Any ideas. It looks like Microsoft has similar programs but nothing for Mac.

Print HTML to PDF while retaining hyperlinks

Posted: 26 Apr 2022 02:23 PM PDT

I'm trying to create a PDF document from an HTML document.

Of course it's easy to do this using the built-in PDF Printer, however, this does not retain hyperlinks.

I've tried wkhtmltopdf which looked very promising, but it crashes on every attempt.

Is anyone aware of any other options for generating a PDF document from an HTML document while retaining URL links?

No comments:

Post a Comment