Saturday, July 3, 2021

Recent Questions - Ask Different

Recent Questions - Ask Different


VBoxManage: error: Failed to create the host-only adapter on Mac M1

Posted: 03 Jul 2021 03:43 AM PDT

I installed vagrant and virtualbox to my M1 Mac, but when I tried to lunch the virtual machine I got this error

There was an error while executing `VBoxManage`, a CLI used by Vagrant                                                                                                    for controlling VirtualBox. The command and stderr is shown below.                                                                                                          Command: ["hostonlyif", "create"]                                                                                                                                           Stderr: 0%...  Progress state: NS_ERROR_FAILURE  VBoxManage: error: Failed to create the host-only adapter  VBoxManage: error: VBoxNetAdpCtl: Error while adding new interface: VBoxNetAdpCtl: ioctl failed for /dev/vboxnetctl: Inappropriate ioctl for devic  VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component HostNetworkInterface, interface IHostNetworkInterface  VBoxManage: error: Context: "int handleCreate(HandlerArg*, int, int*)" at line 66 of file VBoxManageHostonly.cpp  

I searched about the issue on the net, and I found some solution like using this command plus click to the ALLOW button on System Preferences > Security & Privacy

sudo "/Library/Application Support/VirtualBox/LaunchDaemons/VirtualBoxStartup.sh" restart  

but I can't find this button (ALLOW), I tried all methods without any solution, any one solved this issue?

Copy by keypress, Paste by keyrelease

Posted: 03 Jul 2021 02:08 AM PDT

Is there a way in MacOS(BigSur or later) to program a certain native keyboard key to behave as Copy(cmd-c) when pressed and Paste(cmd-v) when released?

Thx!

Is it possible to have a partitioned RAID 1 Drive

Posted: 03 Jul 2021 01:12 AM PDT

|So... I've used Disk Utility to create a RAID 1 mirrored set of two 4TB external drives for backups.

However, I wanted to also store previous backups and old photo libraries in this RAID set.

Firstly I copied my older backups onto the RAID, no problem.

When I then pointed Time Machine to this drive it demanded to erase the entire drive in order to create backups of my iMac. I obliged.

Now when I try to copy across my other backups it won't allow it... saying it's now a Time Machine only.

My question therefore is, how do I reserve a part of this backup system for all of my previous backups, but also have Time Machine use it too?

Seems a simple thing but, was wondering if a partition should be created before the Time Machine is using it?

Look forward to any ideas.

cheers Paul OSX 11.4

Ssd won't show up

Posted: 02 Jul 2021 11:25 PM PDT

I recently bought a 2012 macbook pro retina 15 inch version. The ssd worked perfectly when i bought it and the seller reset the device. When i went home and tried to install the os via internet recovery, the ssd wont show up as available. I tries diskutil liat command and still it wont show up. I plugged in my 32 gb usb drive to check and it showed up perfectly. I then installed catalina on the usb deive and the device turned on but still the ssd isnt available. Could this be an issue with the ssd? I dont have a spare apple ssd to check if it ia an issue with the board.the ssd in question is a sandisk 512gb that came with the laptop.

diskutil list result

32BG drive is the usb drive that I'm currently using as my boot device.

the disk utility window looks like this:

diskutility window

How to edit PATH in zsh

Posted: 03 Jul 2021 01:53 AM PDT

I recently bought a mac and now I want to change the search PATH in zsh. I am able to change it temporarily but not permanently as I am not able to find the environment file for Zshell. I tried looking into /etc/zprofile but there are no variables there. I also created my own .zshrc file but then that is being treated as environment file and all the other variables are gone. Can I find a file like .bash_profile or .bashrc which has all the environment variables. This is my /etc/zprofile file:

if [ -x /usr/libexec/path_helper ]; then          eval `/usr/libexec/path_helper -s`  fi  

I also looked into ~/.zprofile, this also has no variable set. I want to know where these environment variables are coming from when I do printenv, and also how can I make change to this file.

How to fix Logitech mouse (M510) that switches to device status "inactive" all the time?

Posted: 02 Jul 2021 05:15 PM PDT

I'm using a Logitech M510 mouse on a MacBookPro (MacOS 10.14.2), connected via the Logitech Unifying Receiver. It was working completely fine for a long time.

Recently, it started to switch to Device Status = inactive frequently (as shown in the Logitech Unifying Software dialog).

Basically, it switches on and off all the time, and is unusable. As a side effect, it uses up batteries within 3 days.

I have already replaced the batteries. Any hints, what I might try otherwise?

How to stop iPhone from offloading ebooks?

Posted: 02 Jul 2021 04:42 PM PDT

Sometimes I download ebooks in the Books app on my iPhone 7 running the latest iOS.

And then when I try to read them later without internet connection... I cannot

How can I force them to stay on my device so that I can read them when I am offline?

disable mbp internal keyboard AT BOOT TIME (2015 mbp retina Mojave)

Posted: 02 Jul 2021 03:58 PM PDT

I have beenb using karibiner elements to disable my internal mbp keyboard when i connect my bluetooth magic keyboard. the system randomly accepts input still from the internal keyboard even with karibiner enabled. karibiner element also complains that I need to press the T key on my internal keyboard before it wil continue - that key is physically broken and can't be pressed. i also cannot use upper-case t at any time - from the external ketboard, or from the keyboard on screen thingy, - nothing works. i have to copy and paste in a capital T. i do not have karibiner running at the moment.

what other possible ways are there to disable the internal keyboard, if any?

i've been looking into ways of disab;ing the internal keyboard altogether since I can't reboot my mac because the T key is stuck! - so the mbp wanst to boot in target disk mode. i can't reset the pram or smc because the t key is stuck.

Trying the kext remove trick doesn't seem to work anymore.

Tims-MacBook-Pro:PlugIns tim$ sudo kextunload -v 5 /System/Library/Extensions/AppleUSBTopCase.kext/Contents/PlugIns/AppleUSBTCKeyboard.kext/  Password:  Kext user-space log filter changed from 0xff2 to 0xfff.  Kext kernel-space log filter changed from 0xff2 to 0xfff.  Kext library architecture set to x86_64.  Requesting unload of com.apple.driver.AppleUSBTCKeyboard (with termnation of IOServices).  (kernel) User-space log flags changed from 0x0 to 0xfff.  (kernel) Received 'Unload' request from user space.  (kernel) Kext com.apple.driver.AppleUSBTCKeyboard not found for unload request.  Kernel error handling kext request - (libkern/kext) not found.  Failed to unload com.apple.driver.AppleUSBTCKeyboard - (libkern/kext) not found.    

i can;t physically decable inter internal keyboard because then i can't power the mbp on.

sorry about the spelling there is a 1 second delay between pressong keys on the keyboard and anything appearing on screen. i'd like to reset pram/smc to see if that fixes it but i can't reboot very easily. still trying to figure out any possible software might be doing it. i have removed every startup item and launch agent I can find, i suspect it is receiving and trying to filter keyboard events from the internal keyboard or something?

Connecting an M1 Mac Mini to monitor via DVI?

Posted: 02 Jul 2021 02:19 PM PDT

I have a new M1 Mac Mini and when I connect it to a monitor with HDMI or Thunderbolt 3 to Displayport it works fine. I've tried 3 different DVI adapters (two from HDMI one from Thunderbolt) and two different monitors, but my display is always distorted.

Distortion

If I use the cables or monitors with my Mac Book Pro (Intel based) then they work fine. This is the latest Thunderbolt to DVI cable I tried. There was a review that said it worked with the M1 as well.

Is there a configuration change I need to make or does the M1 Mac Mini just not like DVI?

Fix/restore "Print to PDF" to preset location in Big Sur

Posted: 03 Jul 2021 02:05 AM PDT

Recently updated to Big Sur. Previously in Catalina (and prior) I was able to open a print dialog box, select the PDF drop down and choose a preset folder I had saved (Dropbox/Receipts folder) where macOS would then generate a PDF of whatever I was trying to print and drop it into that folder.

~/Library/PDF Services still has this folder alias but when I select it to "print" to, there is no PDF file generated.

I've read some stuff about PDF Services changing in Big Sur but no conclusive answer how to bring back this essential function where I can print anything to PDF to a preset folder with like 3 clicks.

Accidentally changed my own UID and now I can't run sudo. How can I fix this?

Posted: 02 Jul 2021 12:04 PM PDT

I ran the command sudo dscl . -change /Users/YourUserName UniqueID 503 1001 while I was logged in as YourUserName. If I try to change it back with sudo dscl . -change /Users/YourUserName UniqueID 1001 503 I get an eDSPErmissionError. Any idea how I can change the ID back?

How to toggle the macbook menu bar battery/wifi icon on/off via the command line

Posted: 02 Jul 2021 12:21 PM PDT

I know I can go into system preferences and for network and battery toggle the display of the icon on and off there. But I am looking for a way to do this from the command line. For example I have a monitoring script running that knows if I am using battery or not. I'd love to toggle the battery icon off when connected via AC power and back on when using battery power.

Any ideas?

How to display the full command history in terminal?

Posted: 02 Jul 2021 08:46 PM PDT

Since updating to Big Sur, the history command (terminal) shows only the last 16 commands. Do you have any ideas how to get the full history back?

Is there a way to sync audio messages in iMessage between iPhone and Mac?

Posted: 03 Jul 2021 01:42 AM PDT

My text messages are automatically synced between my iPhone and Mac. Is there a way to get my audio messages to sync too? Sometimes when I look back in a message thread it's hard to follow because either I or the other has sent an audio message instead of texting.

Can I run Virtualbox on new M1 Macbook Air? [closed]

Posted: 03 Jul 2021 04:03 AM PDT

I am trying to run a kali Linux machine on Oracle virtual box. But I see an error "virtualization is not enabled in the host machine". I want to know if virtualization can be enabled on M1 CPU?

"Disk you attached not readable" - PMBR/MBR corrupted?

Posted: 02 Jul 2021 12:36 PM PDT

Background:

Purchased 2 12TB WD Gold drives about 2 years ago and have been using them in an external enclosure without problem.

After upgrading my Mac mini server to 11.4, the message "The disk you attached is not readable" was displayed for this one drive post-boot. All other attached drives are fine, including it's twin 12TB drive. The message follows the bad drive to other Macs.

Both 12TB drives are encrypted and APFS. They're simply used for storage, so they've never been partitioned or set up for booting.

Since I have a twin drive (note: not a RAID pair, just an identical physical drive), I've compared them side by side, and the main issue that I've found so far is that it appears that the PMBR in sector 0 has been corrupted somehow.

Here's output from gpt for the bad drive:

New-iMac:~ user$ sudo gpt -vv -r show /dev/disk2  Password:  gpt show: /dev/disk2: mediasize=12000138625024; sectorsize=512; blocks=23437770752  gpt show: /dev/disk2: MBR not found at sector 0  gpt show: /dev/disk2: Pri GPT at sector 1  gpt show: /dev/disk2: Sec GPT at sector 23437770751          start         size  index  contents              0            1                       1            1         Pri GPT header              2           32         Pri GPT table             34            6                      40       409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B         409640  23437098928      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC    23437508568       262151             23437770719           32         Sec GPT table    23437770751            1         Sec GPT header  

The good, twin drive:

iMac:~ user$ sudo gpt -vv -r show /dev/disk5  Password:  gpt show: /dev/disk5: mediasize=12000138625024; sectorsize=512; blocks=23437770752  gpt show: /dev/disk5: PMBR at sector 0  gpt show: /dev/disk5: Pri GPT at sector 1  gpt show: /dev/disk5: Sec GPT at sector 23437770751          start         size  index  contents              0            1         PMBR              1            1         Pri GPT header              2           32         Pri GPT table             34            6                      40       409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B         409640  23437098928      2  GPT part - 7C3457EF-0000-11AA-AA11-00306543ECAC    23437508568       262151             23437770719           32         Sec GPT table    23437770751            1         Sec GPT header  

When I look at sector 0 on the good drive, I see what appear to be good/reasonable values when using iBored (old time Mac disk too which can read disk sectors, and show values for MBR partition table).

iBored MBR output - good disk

When I look at sector 0 on the bad drive, it (sector 0 only) is zeroed out completely.

All of the remaining sectors appear to be present (some other corruption notwithstanding). That is, data exists where I would expect it to exist and zeros exist where I expect zeros to exist. You can see that besides sector 0, gpt generates the exact same output that the good disk does.

My intuition - which I freely admit could be completely wrong - is that I may be able to edit sector 0 on the bad drive to match the values found on the good drive and then be able to at least try to mount the drive at that point.

However, I haven't done anything yet other than looking. TIA for any help!

sshfs under autofs from Debian 10.9 to macOS 11.0 fails, but sshfs without autofs from and to same works fine

Posted: 02 Jul 2021 08:04 PM PDT

I am attempting to set up autofs to spawn an sshfs.

The autofs is on a Debian 10.9 system.

The remote sshd I want it to connect to is on a mac running Big Sur.

When I try to ls the intended (auto)mountpoint, I just get: No such file or directory

I can ssh in fine, without a password, both as myself and as root. I want the sshfs to use root.

I changed /etc/ssh/sshd_config to allow root login with a password. Other than that, the mac's sshd is untweaked.

Also, this works fine on the Debian system:

$ sshfs root@daniels-mac-mini:/System/Volumes/Data /mnt  $ ls /mnt  <files>  

...making it even more weird that sshfs isn't working but only when attempted under autofs.

If I look in the mac's logs, I see a lot of:

comp.apple.xpc.launchd[1] (com.openssh.sshd...): Service exited with abnormal code: 255  

And if I use launchctl to shut down the sshd on the mac, and then run:

/usr/sbin/sshd -d  

...in a terminal, I get a lot of output, including (retyped, I don't have cut and paste happy yet) :

attempt 6 failures 5 [preauth]  Failed password for root from 192.168.1.96 port 33336 ssh2  maximum authentication attempts exceeded for root form 192.168.1.96 port 33336 ssh2 [preauth]  Disconnecting authenticating user root 192.168.1.96 port 33336: Too many authentication failures [preauth]  

...which is strange, because it should be using public key authentication, not a password. I know passwordless is working fine in other circumstances between these two hosts.

I've tried a number of things in /etc/auto.mymount on the Debian system, from complex but well-explored-in-Linux-land to as simple as:

daniels-mac-mini -fstype=fuse,allow_other :sshfs\#root@daniels-mac-mini\:/System/Volumes/Data  

Any suggestions folks? I'm about out of ideas.

Thanks!

iTunes restore error 4014

Posted: 02 Jul 2021 10:04 PM PDT

My iPad PRO (model with home button) has the black screen of death, holding down power+home buttons does not force a reboot, not does holding volume buttons and power button.

When plugged into latest iTunes, iTunes reports that the iPad needs to be restored. The iPad is detected with Serial Number as n/a.

enter image description here

When I proceed to restore the iPad, iTunes prepares the files, and tries to restore the device.

But then I get Error 4014.

enter image description here

System log is below:

default 09:31:59.590611 -0700   iTunes  TCP Conn 0x60000036ef40 event 1. err: 0  default 09:31:59.590923 -0700   iTunes  TCP Conn 0x60000036ef40 complete. fd: 39, err: 0  default 09:31:59.591126 -0700   iTunes  TCP Conn 0x60000036ef40 starting SSL negotiation  default 09:31:59.594592 -0700   icdd    #ICDebug - 205:{ICResourceManager.m} (43504944-3A38-3031-3120-435052563A31|Apple Mobile Device (DFU Mode)|MANUFACTURER:Apple Inc.;MODEL:Apple Mobile Device (DFU Mode)|SW=FALSE|)  default 09:31:59.595456 -0700   icdd    #ICDebug - 457:{ICDDMessageCenter.m} (+Add Apple Mobile Device (DFU Mode) - 0x0/0x0/0x0 - 0x14100000 - ICDeviceDescriptionInferior)  default 09:31:59.608164 -0700   iTunes  TCP Conn 0x60000036ef40 SSL Handshake DONE  default 09:31:59.643858 -0700   iTunes  TCP Conn 0x60000036ef40 canceled  default 09:31:59.644125 -0700   iTunes  [65 <private> stream, pid: 394] cancelled      [65.1 C62BF7BF-9D59-44F4-AEE5-0835F0416D38 <private>.49430<-><private>]      Connected Path: satisfied (Path is satisfied), interface: en0, ipv4, dns      Duration: 0.128s, DNS @0.000s took 0.059s, TCP @0.060s took 0.015s      bytes in/out: 1543/1063, packets in/out: 4/5, rtt: 0.014s, retransmitted packets: 0, out-of-order packets: 0  default 09:31:59.652092 -0700   MobileDeviceUpdater Known, supported, and restorable device. Continuing...  default 09:32:01.001261 -0700   iTunes  tid:27a1b - iTunes: Restore error 4014  

I also see this line, which I think could be telling:

iTunes tid:21b1b - Unexpected device state 'DFU' expected 'RestoreOS'

Anything else I can do with this out-of-warranty iPad PRO, other than the thrash bin?

Why is Cron not running the enable wifi command?

Posted: 03 Jul 2021 03:09 AM PDT

I'm trying to use crontab to schedule the 'enable wifi' command: networksetup -setairportpower en0 on.

I've been entering this command in the required format in the cron file, eg.:

05 15 * * * networksetup -setairportpower en0 on

However, it isn't working. This command works when I use it normally, and I've used crontab to successfully run other commands. Why is the command not running as intended, and what should I do to fix it?

Random kernel panic. Service found no problems

Posted: 03 Jul 2021 02:00 AM PDT

I have a mac book pro 2014 with MacOs 11.2.3

The kernel panics are driving me crazy and impacting my work seriously.
The usual pattern is the mac freezing followed by the question mark folder. It happens often after awaking, but also while is on since a while. The most common error is "Could not recover SATA HDD after 5 attempts. Terminating" but they are quite varied.
Also the frequency is quite random: sometimes is fine for days, sometimes it's every hour, with no discernible pattern in my usage.
I sent it to service to an authorized seller (unfortunately no apple stores nearby) and they said they found no hardware problems, only a lot of dust inside and a worn-out thermal paste. I run all possible apple tests and solution and just once the diagnostic tool showed a disk related problem, then never again.

I started to collect the panic log, maybe one of you will notice something recurring.

https://www.dropbox.com/s/52c9ckrfzsu5qx2/kernel_panic.txt?dl=0

UPDATE I had an intuition and stopped using the airpods for one week. In that period no kernel panics occurred. As soon I started using them again the panics restarted (albeit at a lower frequency). So I'm starting to have compelling evidence it's them or the Bluetooth.

Apple does not seem to acknowledge the problem and insist about the SSD failing...

Accessing fine-grained volume control using external keyboard volume wheel

Posted: 03 Jul 2021 12:07 AM PDT

In macOS, the Volume keys change the volume in full steps, but it is possible make fine-grained changes using Option-Shift-Volume{Up,Down}.

I have an external keyboard connected which provides a volume wheel. Moving this wheel modifies the volume very quickly, in full steps. Pressing Option-Shift while moving the wheel is the perfect precision for me.

Is it possible to configure macOS (or the external keyboard) so the internal keyboard behavior isn't affected but the VolumeUp/VolumeDown keys from the external keyboard act in small steps, without pressing Option-Shift?

Otherwise, is it possible to modify the entire behavior so volume control always acts in small steps? (regardless of whether it's the internal or external keyboard)

Can I back up one external hard drive to a smaller external hard drive via Time Machine?

Posted: 02 Jul 2021 05:04 PM PDT

So I've just had an external hard drive (5TB Seagate Backup Plus Portable) fail on me, the 3rd such time in 5 years. This is not unexpected behaviour in my experience: each of these hard drives has been read & written from basically 24/7, has failed at a point with less than 10% free space available, and I am always adding more data to them.

I back up all of my data via Time Machine to a second external hard drive (8TB Seagate Backup Plus Desktop), which I've had for about 5 years now; it is still working, despite having run out of storage space on two prior occasions, necessitating some cleaning up of old backups. A checkup with Disk Utility reveals no problems.

I am looking at replacing the failed hard drive with a larger one, which will necessitate buying a desktop drive, since no manufacturer currently makes a 6TB+ USB powered hard drive (except LaCie, but that drive is USB-C powered, and I only have regular USB 3.0 ports). My plan is to purchase a 10TB desktop drive, as 8TB desktop drives are not available in stores where I live at the moment.

The question is:

  1. Can a 10TB drive be backed up via Time Machine to an 8TB drive if it is only partially full (in this case, roughly 4.5TB of data)?
  2. If so, how long can I expect the 8TB drive to last if it continues to be used almost entirely for backups? (In the best case scenario, I would need to be able to continue using it for 2 to 3 years until data needs force me to get a larger one.)

Is Chromium installed on my Mac or not?

Posted: 02 Jul 2021 01:46 PM PDT

I have Chrome installed on my Mac and use it as my default Browser. I remember, a few weeks ago I got a notification that said something like "Allow notificatoins from Chromium...". I quickly swiped it away (reflex), so I don't know much about that. I never installed Chromium on my Mac, and I also search everywhere, didn't find it.

I've read on the internet there are viruses that pretend to be Chromium on Macs, that's why I came here.

Now when I wanted to select an application to open a .pdf file, Chromium appeared in the list, see for yourself on the screenshot.

I can't find Chromium in my ApplicationS folderS (both of them), I also can't find it with command+space.

Do I have a virus on my Mac?

Screenshot: Open With menu

Does QuickTime automatically record stereo audio into mono?

Posted: 02 Jul 2021 06:00 PM PDT

I connect Zoom h4n Pro to my Mac via USB as audio interface. I then record audios with QuickTime.

The input of h4n is stereo; the right & left inputs are not exactly the same. But it seems that QuickTime automatically mixes the left & right channels; as a result, the generated audio file has same volumes from left and right.

Could anyone confirm me that it is true?

Reformatted Windows HDD shows up twice in Disk Utility

Posted: 02 Jul 2021 07:00 PM PDT

Had a 1TB hard drive in a Windows laptop that I replaced with an SSD. I've put the old hard drive in a USB enclosure so I can use it as an external drive.

I plugged it into my Mac and opened disk utility where I saw two new mounted drives:

WINDOWS  RECOVERY  

I clicked on the WINDOWS drive (981.9GB) and erased it to the ExFat format. However, the RECOVERY drive is still there (16.85GB).

I've tried unplugging it, using the MacOS format, etc. but they still show up as separate drives.

How can I merge these into one external hard drive?

Why aren't 2 external monitors working with MBP (mid 2014)?

Posted: 02 Jul 2021 11:07 AM PDT

So I have 2 external monitors; One is hdmi, the other is DisplayPort.

I have a MBP mid-2014 model which contains 2 Thunderbolt 2 ports as well as an HDMI port.

Theoretically I would have thought I could plug in two miniDP to HDMI cables, run one to monitor #1, and run the second one to an HDMI to DisplayPort adapter -> monitor #2.

That did not work, and I since realized only one of the miniDP ports can support video at a time.

I then read running an HDMI and a miniDP at the same time would work, so I tried that, miniDP->HDMI monitor #1, and then HDMI->HDMI to DP adapter -> monitor #2. Still does not work. Only one monitor shows video.

For the life of me, I cannot figure out why this is so difficult to do. I have seen others use USB adapters but would prefer not to sacrifice any CPU usage with the second display.

What possible options do I have for using my 2 external monitors in extended view?

Thank you for any help!

How can I change the default programs that open Outlook email attachments?

Posted: 02 Jul 2021 02:00 PM PDT

On my MacOS Catalina I chose already to always open JSON files with VSCode. This works from Finder.

But from Outlook (for Mac v16.35), when I get receive an email with a JSON attachment, the file icon shows the Xcode icon and the Open context menu or the double click on the attachment open Xcode.

How can I change the default programs such that even Outlook opens it using my system default application for that file.

I tried and did not work:

  • restarting Outlook after making VScode the default application for JSON files

Chrome: Keyboard shortcut to leave address bar and focus browsing area?

Posted: 02 Jul 2021 06:32 PM PDT

Related: Chrome: Keyboard shortcut to go to Address Bar?

You can go to address bar by +l / Ctrl+l, but how can I go back to, or focus, the browsing area again?

No comments:

Post a Comment