Monday, January 3, 2022

Recent Questions - Ask Different

Recent Questions - Ask Different


Writing a '\t' to the Clipboard (macOS/cross platform)

Posted: 03 Jan 2022 12:08 PM PST

I'm currently trying to write the results of an HTML table to the clipboard, for pasting to spreadsheets such as Excel. I've got a JavaScript function that handles this with some jQuery. Testing has revealed that the results are being pasted to a single column on macOS devices (works fine on Windows).

Relevant excerpt from my function:

var tblText = "";    tblCells.each(function (e) {      tblText += tblCells[e].innerText;      tblText += (e % tblColumnCount == (tblColumnCount - 1) ? '\r\n' : '\t');  });    navigator.clipboard.writeText(tblText);  

Is there an equivalent char representing horizontal tabulation for macOS? Preferably one that is also recognized by Windows?

Macbook - Aliases in iCloud

Posted: 03 Jan 2022 12:12 PM PST

I am very new to macOS. Yesterday I cleaned up my iCloud documents on my Macbook (I had various files that were duplicates etc) this morning when logged in I found that almost all of the folders I have are now aliases. When I click on them I get the following message:

The alias "Folder Name" can't be opened because the original item can't be found.

Does anyone know how I can fix this problem and prevent it from reoccurring? Thanking you

Files-app stopped working with Samba-server again

Posted: 03 Jan 2022 12:12 PM PST

This used to work for me, but now trying to browse the same server (smb://servername) throws an "Unknown Error" popup first, then shows a blank list.

The smb.conf hasn't changed in months, here is the [global]-section, as output by testparm:

[global]          client min protocol = NT1          dns proxy = No          lanman auth = Yes          log file = /var/log/samba/log.%m          max log size = 50          ntlm auth = ntlmv1-permitted          security = USER          server min protocol = NT1          server string = Meow Samba Server          socket options = SO_RCVBUF=8192 SO_SNDBUF=8192          unix charset = koi8-u          workgroup = Meow          fruit:copyfile = yes          idmap config * : backend = tdb          hosts allow = 192.168.1. 127.          vfs objects = catia fruit streams_xattr zfsacl  

There are no obvious errors in the server-side logs, the login works, my account's Unix-groups are enumerated... Upgrading Samba -- from 4.13.8 to 4.13.14 and then to 4.13.15 -- didn't help.

Any clues? Do I need to enable some more of the vfs objects, perhaps?

Default Heart Rate Data on Apple Watch

Posted: 03 Jan 2022 10:41 AM PST

This question is about an Apple Watch 5 running the latest watchOS as of 3rd Jan, 2021. I recently purchased an external heart rate monitor as the built in heart rate monitor on the watch seems inaccurate and it has a lower bit-rate or resolution for my purposes. I connected the external one to the watch using Bluetooth successfully and it seems to work. From the Watch app on my iPhone I went to the "Workout" settings and turned off the "Power Saving Mode". This is supposed to turn off the built in HR monitor during walking and running workouts. I prefer this setting since the external HR monitor is doing that job now hence also extending the watch's battery. However, during a running workout on this setting the real time Heart Rate data is not showed on the Watch Faces/Complications anymore. Why is this the case?

I'm thinking I should turn on Power Saving Mode to remedy the situation [Either I'm stupid for not knowing what to do or this is really stupid on Apple's part not allowing me to see the HR data with an external monitor]. But in this case there will be two sources of data for the Heart rate. Which one will the watch prioritize? Is there a way I can tell it to prioritize the external HR monitor data?

I wish there was a way to just disable the apple watch's heart rate monitoring and just use the external monitor and still see real time heart rate on the watch face during workouts. Is there?

How to find a Bluetooth Mouse

Posted: 03 Jan 2022 10:38 AM PST

I have lost my Magic Mouse. To be clear, it's somewhere in my home office and it's powered on. I can pair with it via bluetooth. I just can't find the physical object. Does anyone know of a way to make it beep or flash or something so I can locate it?

vmware fusion 12 and virtual os works inside kvm

Posted: 03 Jan 2022 10:18 AM PST

I'm trying to run some virtual softwares inside linux KVM(eve-ng) for example windows server or cisco viptela or cisco firewall.

i already enabled vmware fusion vt-x settings but i still can't run these virtual operation systems with linux kvm.

anyone have experience with that ?

thanks.

Switch users issue on MacOS Monterey

Posted: 03 Jan 2022 10:16 AM PST

After I upgraded my MBP 2017 to Monterey 12.1 I noticed that switching between two Users over UI stopped working stably. Both users are Admin on the MBP. When after a reboot one users logs in and works for a while and then I switch to another user it often happens then I see Rainbow-spin-of-death. The macOS just hangs and I can only move the cursor on the screen. After that I need to reboot to make it work again.

How can I debug or fix the issue?

Show tags for each file in Finder icon view

Posted: 03 Jan 2022 11:37 AM PST

Goal: In macOS Monterey, using the Finder icon view, I want to show three things for each file, listed below. I want them close together visually. I only can show the first two, not the third:

  • ☑︎ icon
  • ☑︎ filename
  • ☐ its tags

Workaround: the only way I know to see tags is by having the preview sidebar open. I don't like this because I can't quickly see all the tags for the files.

Questions:

  • Is it currently possible (or not) to show the tags like I want?
  • Is there some other way to accomplish a similar goal: seeing all tags for each file in a Finder view?
  • Do you highly recommend another program to accomplish this?

So far, I've had no luck yet finding this on the splinternets.

Is there any to fix or restore data from a Fusion Drive, when it kernel panic loops but drives are ok? Even crashes with cloned drives

Posted: 03 Jan 2022 09:22 AM PST

iMac 2013 27" 1Tb HD & 128Gb SSD Fusion Drive Error message is:

panic(cpu 0 caller 0xffffff800ec1d80d): "CoreStorage: load_lfs_from_seg: ran out of free segments\n"@/System/Volumes/Data/SWE/macOS/BuildRoots/d7e177bcf5/Library/Caches/com.apple.xbs/Sources/CoreStorage/CoreStorage-554.140.2/core/lfs.cpp:3218

It will reboot and loop the iMac on startup and any other mac that the two drives are plugged into and give the same kernel panic.

One of the drives on it's own is ok (but not mounted)but as soon as you plug in the other it panics.

Tested both drives individually with Disk Util, Disk Warrior, Drive Genius Surface Test; both ok.

Even the cloned drive versions will do the same. So must be related to the CoreStorage system?

Would like to know what this means: "CoreStorage: load_lfs_from_seg: ran out of free segments"

Thanks

Dave

Cannot access IMac OS (2009 X Snow Leopard) from Window 7 Bootcamp Control Panel or option key

Posted: 03 Jan 2022 09:59 AM PST

I'm currently using an Imac 2009 running (Mac OS X Snow Leopard 10.6.6) and I wish to switch from my Windows 7 to my Mac OS and make that the default OS. Using the option key does not work. Bootcamp control panel can't find it either. It seems I'm unable to get back into Mac and this didn't seem to be an issues a year or ago?

enter image description here

It appears that my Mac HD still exists here, and I still have the install disk and often back up my files using time machine.

enter image description here

What would be the best solution for this, is there away to get back into my Mac or will I have to reinstall and back up from time machine (Unfortunately I know longer have the Windows 7 install disc) thank you in advanced.

NB I did look at the below link but wasn't sure if it was relevant to my issue as I'm essentially locked out of my Mac OS. Boot Camp Control Panel macOS partition doesn't show up

Lower latency on facetime HD camera

Posted: 03 Jan 2022 11:32 AM PST

I'm trying to use the built-in camera on my Macbook pro as part of an application I'm building. I'm wondering two things:

  1. What is the latency of the camera? (How many milliseconds after I perform an action does the camera capture it)

  2. Is there any way to decrease latency?

I tried decreasing the default image resolution (using cv2 in python) from 720x1280 to 480x640, but I can't tell if this reduces or increases latency.

The application needs to run in as close to real time as possible, so any reduction in latency, no matter how small would be great.

macOS randomly says Exchange password is needed but actually isn't

Posted: 03 Jan 2022 10:05 AM PST

I know there have been bugs that cause macOS (or the Mail app) to ask for the Exchange password repeatedly, but this is different from those. The issue I'm having is that I receive a notification for the Exchange password and can click the notification's Continue button to make it display the Internet Accounts window but it never actually prompts me to enter a password. When I view the entry for the Exchange account in Keychain Access, what it has is correct. I have deleted the account entirely and re-added it to no avail, and I've also replaced the Keychain entry with an app-specific password to make sure that MFA wasn't interfering somehow. I still receive the notifications. Nothing is actually broken that I can find (I still receive mail and calendar events without any issues), so I'm fairly certain this is just an annoyance/cosmetic bug. Has anyone got any ideas what could be the cause for this and how to resolve it?

I'm on a MacBook Pro (14-inch, 2021) with an Apple M1 Pro running macOS 12.1 (21C52).

Does my Mac support 'DisplayPort Alternate Mode' so I can use a KVM?

Posted: 03 Jan 2022 11:40 AM PST

I'd like to buy a new monitor and have been looking at models that have an in-built KVM switch functionality as this would both reduce cabling/connections and enable me to use the monitor for home and Work-From-Home easily. I'm aware I could get a separate KVM, but one that's already in the monitor seems ideal.

I have a home MacMini (2020, M1) and a work MacBook Pro (16" late 2019, Intel). Both have USB-C connectors with Thunderbolt 3 which both state:

Native DisplayPort output over USB‑C

in the technical specs (linked above).

I'm aware that I may need specific cables such as Apple Thunderbolt 3 (USB-C) Cable

Before buying the monitor, is there any way to verify that at least one of the Macs has the required feature/signalling to communicate to the monitor so that it can use the KVM feature?

This whole question was brought up by a review of the monitor which mentioned the DisplayPort Alt Mode issue.

Iterm2 Text Stacking on Itself

Posted: 03 Jan 2022 07:19 AM PST

I cannot figure out how to fix my iterm2 window. The text is simply overlapping itself when the window is anything except maxed out:

overlapped text editor

Of course, I can't use iterm2 like this, so fixing would be great. I've checked out similar stack exchange questions and other resources with similar problems, but none had the same problem or a solution that fixed this. Thanks in advance.

Difference between root ('/') and "Computer"

Posted: 03 Jan 2022 07:26 AM PST

If I open the finder and navigate to Go>Computer, then I am presented with all the mounts, while navigating to the root / using Shift+Command+G seems to be a different directory. In particular it seems to be only the main drive. Activating show path bar in the "view" of the finder does not help. The question is: what is the path to the Go>Computer view (as this seems to be the only way to navigate to mounts). Or: where are mounts located on the Mac?

It should not be so frustrating to simply access a mounted volume from the finder. And how can I put the Go>Computer folder into my favourites?

update: Below is a picture of the "documents" mount created by cryptomator. Which was not in the "Favourites" until I dragged it there from the "Computer" view and also does not appear to be located in /Volumes. Also the path in the bar just says "documents"

enter image description here

update 2: the preferences should result in all mounts being displayed in locations but the "documents" volume is not.

enter image description here

Issue restoring iPhone from Mac backup using Finder

Posted: 03 Jan 2022 11:47 AM PST

Edit: I upgraded to Monterey 12.1 and am still seeing the same issue. I've also updated the iPhone to the latest software version.

I have two phones, both iPhone XS running the latest iOS (15.1 or 15.2), that I backed up to my Mac yesterday from Finder. My Mac is on macOS Monterey 12.0.1. I am now having issues restoring those backups. I am experiencing the exact same issues restoring backup 1 to a new iPhone 13 and restoring backup 2 to an iPhone XS. So, the below applies to both phones:

Issue 1: When I plug my phone in and then select "Restore Backup" in Finder, the Finder hangs on "Erasing Phone", even though I can see that the phone has been erased and is now on the new phone setup screen. After waiting 30 minutes with no changes in Finder, I unplugged the phone (eject didn't work) and plugged it back in, and then Finder recognized the phone (the name updated to the name from the backup) and automatically shows "Restoring iPhone from backup". Nice. Maybe this isn't an issue, but I wanted to include these details

Issue 2: When the phone starts restoring from backup, the Finder initially shows the progress bar moving left and right (i.e. it feels like it's doing something but still deciding how long it will take), but after maybe 10-20 seconds, the progress bar shows completely filled, and there's no animation or indication that anything is happening. This is what I see:

Restoring from backup with progress bar filled

Meanwhile, my phone just shows the "Connect to Mac or to a PC with iTunes" screen and gives no indication that a restore is in progress. I can even tap "Back" and continue with setup.

I left my phone connected for several hours just in case it was working, but the screens never changed, so I disconnected my phone, and it is still in the initial setup state.

For Phone 1, I gave up and tried restoring from the old phone with Quick Start (holding the phones next to each other), and that failed three times in a row after almost two hours each time. I ended up backing up the old phone to iCloud and restoring that way, which worked great.

For phone 2, I no longer have the old phone, so restoring from this Mac backup is my only option.

Macos some Tabs (Window) are black in the tabbar (and not able to close that window?

Posted: 03 Jan 2022 05:12 AM PST

I am using a Macbook pro

Some Tabs (Window) are black and don't show anything (tabbar or anything) and I am not able to close that window?

Show tabbar

Does anyone else face the same issue?

How to iterate over an Photos.app album (or a container) using Javascript?

Posted: 03 Jan 2022 07:34 AM PST

How can I iterate over the media items of an album in Photos.app?

By copying and editing online code, I got this far:

for (const album of Application("Photos").albums()) {      console.log("Processing album '" + album.name() + "'")      for (var idx in album) {          console.log(idx)       }   }  

However, this doesn't work. I know that each album in Application("Photos").albums() is a container, but I couldn't find an example how to iterate over its content using javascript.
In other code, I have already created a javascript Map where each key is the filename(+size+ratio) and it contains lists of duplicates (all but one to be deleted).
Iterating through the albums, I want to extract the properties of the media items to check whether an item is to be deleted and if yes, replace them with the non-deleted duplicates.

Any help or pointers to examples greatly appreciated!

How come my MacBook Air won't let me sign in to my apple ID?

Posted: 03 Jan 2022 04:54 AM PST

I just got a new MacBook Air and I was in App Store, trying to download some stuff. But then, it tells me to sign in to my Apple ID, so I did. But it tells me to review my account information and I did. And then it tells me to do that again and again. What should I do?

Using a Python String on a Mac for a Non-Coder?

Posted: 03 Jan 2022 10:23 AM PST

I'm thrilled to find Navddeep's solution here How to convert an epub package to regular epub? yet two essential questions arise as I try to implement it.

  1. What in the string must I change to identify my unique paths, or anything else?

  2. How can I convert this string—not yet a py file—into something I can test and use as an executable? I'm driving Catalina on a MacBook Pro. I've worked in Mac IT for 20 years but I'm no coder and I'm certain Applescript hates me.The Python string is below.

# Convert epub packages to epub files  import os  import subprocess    filenames = []  path_to_files = ""  #   Function to store all filenames in a list  def extract_filename(path_to_files):    # "/Users/****/Desktop/Old_epubs"      os.chdir(path_to_files)      books = os.getcwd()      for f in os.listdir(books):          f_name, f_ext = os.path.splitext(f)          if f_ext == ".epub":              filenames.append(f_name)        filenames.sort()    #   Function to generate new epub files  def create_epub(path_to_new_files): # "/Users/****/Desktop/new_epubs/"      total_files = len(filenames)      for i in range(total_files):          epub_path = "cd " + path_to_files          filename = filenames[i] + ".epub"          zipping = " zip -X -r " + path_to_new_files + filename + " mimetype *"          plist = "rm iTunesMetadata.plist"          comm = epub_path + filename + "; " + plist + "; " + zipping          p1 = subprocess.run(comm, capture_output = True, text = True, shell = True)          success = p1.returncode          if success == 0:              rem_files = total_files - i + 1              print("File #", i+1, " has been processed successfully. Remaining files: ", rem_files)    #   Enter the paths  extract_filename("/Users/****/Desktop/Books")   # Path to directory containing epub packages  create_epub("/Users/****/Desktop/new_epubs/")   # Path to store new epub files in  

knowledgeC.db could not be backed up

Posted: 03 Jan 2022 11:33 AM PST

My Time Machine backups keep failing.

I get the message

Time Machine couldn't complete the backup to "NAS server"

"/private/var/db/CoreDuet/Knowledge/knowledgeC.db" could not be backed up.

/private/var/db/CoreDuet/Knowledge/knowledgeC.db

The issue started a couple of days ago, but now it recurs regularly. Rebooting does not help.

I'm running macOS Monterey 12.1 on a MacBook Pro 2021 (M1).

The file in question seems to be used by Siri to track app usage. It appears I am not alone in having this problem, but I haven't been able to find any solution. Is there one? Would deleting the file have any adverse effects?

Format external SSD for transferring files from old PC to mac

Posted: 03 Jan 2022 10:28 AM PST

So, I bought a SanDisk Extreme Portable SSD thinking I can just plop the old PC files (pictures, schoolwork, old code repositories) onto it and then use the SSD with my new Macbook Pro. Turns out the format matters.

I did some digging around, and it seems that most people recommend ExFAT for cross-platform external drives. However, after reading this thread and running the Blackmagicdesign Disk Speed Test on both formats (APFS is ~130MB/s faster), it seems that APFS has more benefits if I want to just use this drive with my Macbook Pro, which will probably be the case.

I am thinking that the best strategy is to partition my SSD into one half for ExFAT and then the other for APFS. So, I would write a portion of my PC files into the ExFAT partition, copy it into my Macbook, then copy it back into the APFS partition. Once I've done this will all my PC files, I would delete the ExFAT partition. Would this work?

Also, when would I want case-sensitivity? When would I want encryption (I know security but it seems that no one really does it)? If I do encryption, can I edit files directly on the SSD?

Or should I just ditch all this and use the Windows Migration Assistant to transfer my files, format all of my SSD for APFS, and then copy the files onto my SSD?

Merge partition on external hard drive

Posted: 03 Jan 2022 10:01 AM PST

I wanted to format and merge 2 partitions on my external hard drive. I used the command :

diskutil erasevolume "Free Space" "" /dev/disks4s4.   

But now I lost 30go on 2TB and I can't merge the 30go I deleted.

So now it looks like this:

/dev/disk4 (external, physical):     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:      GUID_partition_scheme                        *2.0 TB     disk4     1:                        EFI ⁨EFI⁩                     209.7 MB   disk4s1     2:                  Apple_HFS ⁨Maxtor⁩                  299.6 GB   disk4s2                      (free space)                         134.3 MB   -     3:       Microsoft Basic Data ⁨Donné⁩                   1.7 TB     disk4s3                      (free space)                         30.9 GB    -  

How can I merge the 30,9go to "Donné" which is in ExFat without losing data in "Donné"

Time Machine without any external disks

Posted: 03 Jan 2022 12:06 PM PST

So, for various security reasons my company doesn't allow attaching backup drives or doing any external backups -- mostly we have cloud things and use git for backup. But Time Machine lets me use the SSD and local storage for backups.

enter image description here

So I'd like to use Time Machine to just let me revert to recent things (like a file I accidentally delete or similar). Is there any way to configure that?

brother hl-2280dw works as printer but not scanner in big sur

Posted: 03 Jan 2022 09:21 AM PST

Is there a way to get the scanner functionality to work? For a printer it works without any extra drivers needed (just click "add printer" and it works with "generic PCL printer"). The drivers say they only support 10.15?

Thanks!

How to fix Macbook trackpad's click feeling?

Posted: 03 Jan 2022 09:06 AM PST

For the past several days, I noticed that the trackpad on Macbook Pro does not move/press down when I click with my finger. Previously, when I used to click, I felt that the trackpad moved down by a tiny bit, e.g. around half a millimeter. But now, it does not.

I went to Trackpad settings and made sure that "Tap to click" is enabled. Restarting the computer did not fix the issue either.

How can I get it to work like before?

mac OS microphone only works when System Preferences Dictation pane is open

Posted: 03 Jan 2022 06:57 AM PST

When using my Mac on various apps (Zoom, Quicktime audio recorder, Skype etc.), the input from all microphones is extremely quiet and voices become inaudible.

This occurs for the inbuilt microphone, for Bluetooth headphones, and for AUX headphones.

The input volume is turned up to max (see pic below)

enter image description here

But very strangely, when I open the Dictation Preference Pane (pic below), the microphone then works normally in all apps.

Dictation Preference Pane

Anyone have any ideas why this might be occuring? And how I can fix it so that the microphone input works normally all the time?

Voice control custom command with variable?

Posted: 03 Jan 2022 11:02 AM PST

I'd like to be able to declaim "Keyword foo" and have voice control, on hearing this, type :foo for me.

Many of the built-in commands take 'parameters' (i.e., some following speech), so if it were possible to make a user defined command as such it would look like keyword <phrase>, i.e., a 'variable' goes into the command (that variable being "phrase").

Is there a way to make a user-defined command which takes a variable as input, as many of the built-in commands do? That would be super useful.

I'm looking into whether it would be feasible to write code in an IDE (in my case, Clojure & Intellij) using only voice control (and perhaps an on screen control pad for help where needed e.g. that provided by the wacom cintiq), thus, keyboard free! - it would be amazing if this were possible.

I haven't yet explored what can be done with "run workflow". (I don't see any indication as yet that those can take variables, though).

I've found the location of the default workflows: /System/Library/PrivateFrameworks/SpeechObjects.framework/Versions/A/Frameworks/DictationServices.framework/Versions/A/Resources/Workflows

mbp:Workflows m$ ll  total 0  drwxr-xr-x  12 root  wheel   384B 14 Dec  2019 ./  drwxr-xr-x  65 root  wheel   2.0K 12 Oct 16:30 ../  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 New Audio Recording.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 New Screen Recording.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 New Video Recording.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Show Me Apple Website.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Show Me Top Albums.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Show Me Top Family Movies.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Show Me Top Movies.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Show Me Top Music Videos.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Show Me Top Songs.workflow/  drwxr-xr-x   3 root  wheel    96B 14 Dec  2019 Take My Picture.workflow/  

Update: realised I may be able to get half way to this by defining a command "To keyword", which could issue Alt+<- , press ':', then issue Alt+->. But that's not just a 'keyboard shortcut', it's three presses. I haven't used automator yet but guess that might be able to do this.

Weird characters appear when pressing command-A,C,V

Posted: 03 Jan 2022 11:12 AM PST

I'm not using Mac keyboard however it did work properly before. I changed the Command key to Ctrl. Until today, using this Ctrl key yield extremely odd characters. When pressing

  • Ctrl-A yields å
  • Ctrl-V yields √
  • Ctrl-C yields ç

And I have no idea where these characters come from? So how could I fix this issue? Can anyone please help? Thanks.

EDIT
Here is my screenshot

screenshot of keyboard preferences

How can I mount an ext4 file system on OS X?

Posted: 03 Jan 2022 06:35 AM PST

Is there a safe, stable application for reading from and writing to ext4 file systems on Mac OS X?

If not, what's the best way to access the contents of an ext4 file system on Mac OS X?

No comments:

Post a Comment