Tuesday, January 11, 2022

Recent Questions - Ask Different

Recent Questions - Ask Different


How to make usb to shut down Mac Mini

Posted: 11 Jan 2022 03:52 AM PST

I have an old Mac mini and I want to use it as my home server. I don't want to connect any display, keyboard or mouse to it. I will be using it as a wifi router and local server. But I will shut down it sometimes when I go out to keep it safe. Pressing the physical button each time can damage the system, because it is force shutdown. I want to shutdown as usual, but without the mouse,display or keyboard. I think USB is the best solution for it.

I think I need to create something like a daemon or automator that will detect the USB connection and if the usb name is "ShutDown" will call "shut down". Please help me to get it right. I am a developer but I have no experience with AppleScripting.

switch back and forth between Chrome windows using Apple Script

Posted: 11 Jan 2022 04:56 AM PST

I'd like to have a script that gets some input on one Chrome window, switches to another Chrome Window to process it, and then returns to the original window.

I can get the Chrome window title from the original window, process on the second window, but I'm failing to return to the original window.

this is the working code to get the Window title:

my getCurrentWindowTitle()    my returnToOriginalWindow()    global frontApp, frontAppName, windowTitle    set windowTitle to ""    on getCurrentWindowTitle()      tell application "System Events"          set frontApp to first application process whose frontmost is true          set frontAppName to name of frontApp          tell process frontAppName              tell (1st window whose value of attribute "AXMain" is true)                  set windowTitle to value of attribute "AXTitle"               end tell          end tell      end tell  end getCurrentWindowTitle  

And this is the code bit which I'm struggling to tweak so I can return to the original window:

on returnToOriginalWindow()      tell application "Google Chrome" to set index of window 1 where title contains windowTitle to 1      delay 0.05      do shell script "open -a Google\\ Chrome"  end returnToOriginalWindow    

Any insights on how to test, develop, fix this are really appreciated.

Storage issues and odd volume layout on macOS Monterey

Posted: 11 Jan 2022 04:45 AM PST

new mac user here running Monterey 12.1 (21C52) and I wanted to know if this Drive/ Volume layout is normal. In the last couple of days I noticed that there was something off about my storage. The numbers that disk utility, system information, storage management and onyx were giving me were not the same.

It is not a local snapshot issue, i already got rid of every snapshot.

System information tells me that i have ~90gb free space on my mac while disk utility tells me that its ~70gb,onyx says its <60gb and storage management is more along the lines of ~85gb. I cannot imagine what the issue could be, thats why im going to tackle it down one by one.

I must also mention that I had an issue with macos big sur which led to me reinstalling macos couple of months ago. There is a chance that it has something to do with all of this but i dont know how, or where i should start fixing the problem.

First of all, is this volume "layout" normal?

enter image description here

Second, my system data since very large. Im coming from windows and i dont know if this is normal.

enter image description here

And last but not least is this overly large block of data that i found using disk inventory x that cannot be found.

enter image description here

Thanks for any help

Serial Ports in Parallels on M1

Posted: 11 Jan 2022 01:36 AM PST

It seems Parallels 17 on M1 has some trouble emulating serial ports.

I've got two VMs, Win 11 ARM Beta, and Debian Buster arm64.

I've connected two identical FTDI USB-RS-485 converters (https://www.robot-electronics.co.uk/usb-rs485.html) to each other, and plugged them both into my M1 16" MacBook Pro. I get mixed results:

macOS screen Debian screen Win 11 ARM PuTTY
macOS screen Y
Debian screen N 1
Win 11 ARM PuTTY N 2 Y

Note 1: Adding two serial ports to the guest Debian, and using two screen instances to communicate with each, one screen shows nothing, the other shows local echo and characters typed into the first.

Note 2: PuTTY seems to reliably show characters sent to it. Debian screen, however, does not.

Connecting to emulated port #1 (/dev/ttyAMA0), Debian never shows characters sent to it. Connecting to emulated port #2 (/dev/ttyAMA1), using the same host port, show characters if they are typed slowly enough (much slower than 19200 baud). This behavior exhibits regardless of whether or not the remote end is Debian screen or Windows PuTTY.

Has anyone encountered this behavior, and found a solution?

Unable to install Windows 10 on Catalina with enough free space, Blank Volume has 250GB while Macintosh has 11GB in diskutil

Posted: 11 Jan 2022 01:17 AM PST

I have been unable to install windows 10 on my MacBook Pro 13" 2017 running macOS Catalina. It says that I need 42GB of free space to install, but I have 46GB free so it shouldn't have this issue. I looked online and its says its because the free space is not concurrent in my volume. Is there some way I can fix this?enter image description here

Screen Capture isn't saved. macOS Monterey

Posted: 11 Jan 2022 05:30 AM PST

In macOS (latest version) I can take screenshots and they will get saved to Desktop.

But whenever I take a video recording I don't see them saved on the Desktop. Plus, the small window on the right bottom seems grayed.

I did the following:

  • Press Shift-Cmd-5 to bring up the onscreen controls
  • Click on Options
  • Currently defined target for recordings is displayed on the top of the Options menu.

And all I saw was: Desktop.

Where my recording are located? I have recording really important meetings.


Please Note, I did system restart 10s of times, still same "bug".

I had this "bug" for the past 2 months Even after system update it didn't go away.

Disable hide cursor in macOS Monterey

Posted: 10 Jan 2022 11:47 PM PST

As I am type here, my mouse cursor(the pointer to show where user is interacting with GUI with mouse/trackpad) is hidden automatically. In the contrary, when I type in Chrome omnibox(AKA, address bar), the cursor is showing up correctly.

In windows, we can manually control this behaviour, but in Mac OS, after asked Apple service, it seems impossible.

What Can I do to stop my cursor from hiding? Should I just fill a feature request on their official webpage? Thanks.

How to avoid Any Desk auto start with macos

Posted: 10 Jan 2022 11:44 PM PST

Any desk auto start with mac os, How to avoid this.

Why does globbing not work on X* or x*?

Posted: 11 Jan 2022 01:18 AM PST

Due to a bug in Monterey, TextEdit quarantines any file it changes. xattr can fix it, and since I didn't know where such might be, I tried to do xattr -rc ~

But something in ~/Library prevents that from completing¹, so I tried xattr -rc {A..K}* {M..Z}* {a..z}* That failed with the complaint that x* doesn't exist—but it does! (I created an empty file for every letter of the alphabet to avoid this error.)

When I fix that, it complained about X* but it has no problem globbing a * after any other letter:

user@mac ~ % xattr -rc {A..K}* {M..Z}* {a..w}* {y,z}  zsh: no matches found: X*  user@mac ~ % xattr -rc {A..K}* {M..W}* {Y,Z}* {a..w}* {y,z}  xattr: No such file: Bible/002_John_1,1-18,nl,HTB.txt  

(Second error is because of a bad symlink)

What is special about X* that disables globbing?

¹Probably a looping circle of symlinks. I've seen that in some frameworks in /System/Library

OS X partition was somehow erase by windows clean install on bootcamp

Posted: 10 Jan 2022 10:55 PM PST

I used a original Windows 7 Ultimate disk to repair windows 7 ultimate bootcamp partition on a MBP 1TB drive which had also a OS X Sierra partition. But instead of repairing the Windows 7 bootcamp partition, the installation disk seems to have reinstaled Windows 7 entirely over the entire disk. Somehow, it manage to erased or crush OS X Sierra partition entirely as if the fat partition erased the journaled partition. Still when looking at the info window the entire partition is now journaled.

Now, when I try to repair the disk in disk utility I get: invalid B tree node size repair failed (-69845).

When I boot using option no disk will appear to choose from. Booting using command r to internet recovery does work but the partition name is now disk0s2 (total space is 1TB SSD). It use to be 500GB OSX Sierra and 500GB bootcamp Windows 7 ultimate.

Now, everything seems to be gone. I am simply trying to recover a video conference recording from quicktime on the sierra which was left on the desktop of the erased partition.

I have tried recovering app like diskdril, softpro, etc but they don't seem to find anything about the OS X sierra partition during deep scan, but they do for the windows, which may mean the Sierra partition was actually kind of erased entirely by the Windows repair disk.

But why? I don't get it. Maybe because I use the original CD and it does not make any difference between the partitions? He seems to have treated the repair as a clean install over the entire disk instead of only use the bootcamp partition.

Is there any way I can get this diskos2 repaire? Or, is there any command line, recover app which can do the job to recover Sierra data?

The application "OpenVPN Connect" is not open anymore

Posted: 10 Jan 2022 10:39 PM PST

I am trying to run "OpenVPN Connect" but it shows the following window

enter image description here

What can this mean? Pressing questionmark shows empty window.

I wiped my hard drive and installed Linux on my MacBook Pro. Can I put OS X back on my computer for free? [closed]

Posted: 10 Jan 2022 10:00 PM PST

Can I get a free copy of OS X from my Macbook Pro's serial number or something? I'd like to reinstall macOS on this computer.

Fastest way to warmup macbook when the device is very cold

Posted: 10 Jan 2022 07:54 PM PST

I like to go code in my backyard but sometimes my macbook gets really really cold. I wrote a python script that basically for loops thousands of times recursively doing multiplication to make the cpu work at full capacity to heat the macbook up quickly.

  1. Is this damaging to the computer to put it under such intense stress while cold?
  2. Are there better ways to heat up the computer?
  3. Is it even bad if the macbook gets too cold?(Canadian temperature...)

Specs.

enter image description here

Cannot trigger an applescript by ssh to a network mac

Posted: 11 Jan 2022 05:22 AM PST

I face a vexing problem on my home set-up involving a Server mac advising a Client mac that a task (a back-up task) was successfully implemented. The purpose of this instruction is to trigger through the Client mac automation software the shut down of the backup disk power supply, to save energy. Both macs are running high Sierra and the Client mac must run the following applescript upon receipt of the appropriate instruction from Server (xtension.app is a home automation software with applescript interface).

sPowerDownD2.scpt ("apple_script")

Tell application "xTension"  execute script "TurnOffD2"  end Tell  

The above applescript, located in any directory of the Client mac, works when addressed manually and locally: I can trigger it (1) locally on the Client mac by hand on the applescript or (2) it works by a local manual command to a shell script located in a directory of the same Client mac the job of which being to trigger the applescript or (3) by the below line of command in terminal ("shellScript") .

osascript /path_to_apple_script/apple_script

To trigger the applescript from the Server mac (away from the Client mac), I have first tested a ssh shell script having root privileges on both machines

ssh -i /var/root/.ssh/jxxxxxx_rsa root@iMacdexTension.local

This script works when requested to execute simple tasks on the Client mac (like listing files seen in a directory), but fails when used to trigger the applescript above, directly using osascript or indirectly.

Example: any attempt to indirectly trigger the applescript through a shell script command fails.

ssh -i /var/root/.ssh/jxxxxxx_rsa root@iMacdexTension.local /path_to_shellScript/shellScript

ERROR MESSAGE ON FAILURE It fails with the error code : "execution error: An error of type -10829 has occurred. (-10829)

Second example: any attempt to directly trigger the applescript also fails.

ssh -i /var/root/.ssh/jxxxxxx_rsa root@iMacdexTension.local osascript /path_to_apple_script/apple_script  

MY ATTEMPTS TO CORRECT

I have verified permissions on files and directories (tried different combinations as well)

I also have tried to correct possible privilege issues and, to do that, tried to use the recommended shell commmand

password "pswd" with administrator privileges

Whatever I do, the best I can get is the -10829 error message..

What could I do wrong ?

Thanks in advance for any suggestion or doubt.

Is there a way to prevent a bad actor from using your AirTag to track you?

Posted: 10 Jan 2022 11:40 PM PST

Scenario:

You have an AirTag in your purse or wallet. You go to a crowded location, like a bar. A bad actor, with an iPhone, gets an alert about an unknown AirTag in the vicinity and decides to add your AirTag to their device. Later the bad actor uses the AirTag to locate your home and perpetrate a crime.

Questions:

  • Is there a way to identify how many devices are registered to an AirTag? I don't see anything in "Find My" about this.
  • Is there a mechanism to lock the AirTag's registration to prevent unauthorized registration?
  • When a second device in my home registered my AirTag, an alert wasn't sent to me. Shouldn't there have been one?

How to extract .gz file in macbook. Archive utility, termial are giving errors [closed]

Posted: 11 Jan 2022 03:47 AM PST

i have a data stored in file with .gz extension. Right clicked on file there were two options Archive utility it is giving error 79 and the other option console, by right clicked on that file is opned and i can see data stored in file. But there is no option yo save yhe filr in .trd format. So that i can import that inti excel. The gunzip command in terminal, there is an error, file directory not found. i want to extract .gz file on macbook m1 and save the data in ms excel. is there anyway?

No spring/inertia in horizontal scrolling in Finder on M1 Mac in MacOS Monterey

Posted: 10 Jan 2022 10:01 PM PST

I'm using macOS Monterey 12.0.1 with M1 MacBook Pro 14". The horizontal scrolling in Finder is choppy. It does not have the normal spring/inertia, the motion stops immediately when I lift fingers from the track pad. Is there a fix for it?

Horizontal scrolling has no inertia on Monterey/M1 Mac

Converting from .jpg to .pdf yields blank pages

Posted: 11 Jan 2022 02:04 AM PST

I have some problems converting 180 JPG files into a single PDF. I'm using ImageMagick.

First, I resize the JPG files using mogrify -resize 75% *.jpg and the result looks fine. After that, I run convert *.jpg converted.pdf and it works fine for the first 3-4 (out of 180) JPG files.

I don't understand why some of the images are properly converted, while most of them are blank...

LE: It won't even convert one image, it will still yield a single blank page PDF.

Keeping a remote disk mounted

Posted: 10 Jan 2022 11:28 PM PST

I have a website that I maintain mounted locally on a MacBook Pro with Monterey 12.0.1, using MacFUSE and SSHFS.  From time to time, an operation involving a directory there fails with "device not configured."  The fix is to umount and then mount it again, which takes a few seconds.

I think what triggers it is the laptop going to sleep, but it could be a timeout.  If a timeout, a background process accessing the mount point periodically would prevent it, but that would of course fail when the laptop sleeps.

Is there a better solution? (Hosting provider says SMB and NFS will not work).

how to restore data from iphone backup without physical iphone

Posted: 11 Jan 2022 04:30 AM PST

I recently lost my iPhone. I know I have done full backups with iTunes (now Music.app)? I don't have a physical iPhone and am not interested in getting one right now. How do I restore data from those backups?

Thanks

How to distribute custom app using Apple Business manager?

Posted: 10 Jan 2022 08:08 PM PST

We trying to distribute the custom app using the apple business manager, we purchased the app in the business manager. And we are trying to add the device to the business manager account. We didn't find any documentation on 'How to add the device to the business manager?'.

Please guide us through the process of enrolling the device.

Can't "Click lock to make changes" after update to BigSur

Posted: 11 Jan 2022 05:01 AM PST

After I updated my MacBook Pro (15-inch, 2018) to BigSur 11.1 something went wrong. I can log in, I can change the admin users password, I can access my keychain and I can run sudo with no issues.

What I can't do though is to click the padlock to make changes in System Preferences. Even when I enter the correct password the dialog behaves as if I entered the wrong password.

Any help appreciated.

USB-C to lightning cable plugged into

Posted: 11 Jan 2022 03:06 AM PST

The iPhone 12 now ships with a USB-C to Lightning cable. Is it safe to plug this into a USB-C charger on one end and an old iPhone, like an iPhone 5, on the other end? Obviously the iPhone 5 would have no idea that something like USB-C exist. So would it cause damage, or would it charge at slow USB-A speed, or would it use the maximum charging power that the iPhone can handle?

Would it also be Ok if the charger is high powered, like a 90 Watt charger used to charge a MacBook?

Facebook messenger calls, show only short name

Posted: 10 Jan 2022 10:06 PM PST

When someone calls me on my FB messenger I can only see their short name. I noticed this change after I updated my iPhone to iOS14. Does anyone know how can I change it back? I have multiple people with the same short name and it is very difficult for me to understand who is who.

I'm positive that I configured contacts properly like this yet messenger refuses to show full names.

WiFi + LAN network bridging issue

Posted: 11 Jan 2022 04:05 AM PST

I'm trying to bridge a wifi network to some devices that are network connected directly to my MacPro but am running into problems.

Both networks work fine on their own but when bridged both go inactive, and I also lose WiFi controls i.e. what network to choose in my available area.

Is there something i'm doing wrong? I couldn't find any meaningful Apple documentation on the feature. enter image description here enter image description here enter image description here

Macbook Pro camera still not working (green light on) - tried heaps of suggested solutions to no avail

Posted: 11 Jan 2022 02:07 AM PST

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?

How can I gain access to the Windows 10 BitLocker encrypted drive on Mac OSX?

Posted: 11 Jan 2022 12:34 AM PST

My friends send me a USB drive which has been encrypted with a password in Windows 10 before. There are many important photos for our travel. But when I inserted it on my MacBook. It gave me the windows that the disk was not readable by this computer. I have the password and can not access the drive to get what I want!! Bad mood.

Can anyone give me suggestions? I search online and found there is a tool called iSunshare BitLocker Genius. Did anyone use it before? I know nothing about computer, just want the simplest way to get the photos and share the happy times with my family. Help!

Deselect text using keyboard shortcut or prevent selection of word/link on right click

Posted: 11 Jan 2022 12:31 AM PST

I often copy links in Chrome with the context menu, to paste into a chat window (Adium). This process selects the link on copy. When I cmd+tab back to my browser window, the text is still selected and it interferes with keyboard control of the given website. This forces me to move my hand back to the trackpad, find some non-active space (page bg usually), and click to deselect. I'd rather not have to move my hand from the keyboard to do this.

I've tested this in Chrome, Safari, and TextEdit. I could maybe solve it in Chrome with a userscript, but I'd like a more general solution for other programs as well.

edit Another way of looking at this problem is that OSX selects the word or link on right click with a context menu, but doesn't clear the selection when the context menu is closed. Is there a way to force deselection of text on context menu close?

How can I find my IP address - not my company's router, but my local machines

Posted: 11 Jan 2022 01:50 AM PST

I run rails servers at ports 3000 and 5000.

What do I use (or how do I find) the IP address of my Mac?

Not the one used for web browsing which is my companies host supplied IP but rather my local machine one.

I imagine it would be 192.168.x.x?

No comments:

Post a Comment