terminal – Apps suddenly can’t be opened?

I had Terminal and TextEdit open, a couple of Finder windows, and possibly another app or two.

This was a few hours after updating to macOS 11.1 (20C69) in case that is the cause.

In Terminal, I did su - Admin to change permissions on a directory with sudo. I forgot to exit before trying to open a new file with TextEdit, so of course I got an error (one account can’t open windows in another app’s GUI).

Exited Admin and tried again. Got the same error! Quit TextEdit and re-launched—same error!

Restarted laptop and logged in again. Now, Terminal and Safari can’t be launched (possibly others). Pop-up appears and vanishes quickly. After several tries, I finally managed to read the first line: “Application (app) interrupted restart.”

Switched user to Admin to send this question. Safari & Terminal both functioning on this account.

In the Admin account, interestingly, when tried to use sudo, I was rejected. Did id and found that that the shell (in Terminal launched by admin account) was running my non-admin account!!! Had to su to kill processes (see my answer).

Cause and/or solution?

sharepoint online – Modern library, document defaulted to be read only when opened, edit with user choice by column formatting

I have tried in two ways as below. Both are working for Office documents. But When clicked on PDF or video files, are not opening, its redirecting to document library itself. Other than office documents should open. Please help me on this.

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "@currentField",
  "attributes": {
    "target": "_blank",
    "href": "=if(indexOf(($ContentTypeId), '0x0120') >= 0, '?id=' + ($FileRef), @currentWeb + '/_layouts/15/Doc.aspx?sourcedoc='+ ($UniqueId) + '&action=View')"
  }
}

OR

{
  "$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
  "elmType": "a",
  "txtContent": "@currentField",
  "attributes": {
    "target": "_blank",
    "href": "=if(($File_x0020_Type) == '.docx', '?id=' + ($FileRef),@currentWeb + '/_layouts/15/Doc.aspx?sourcedoc='+ ($UniqueId) + '&action=View')"
  }
}

drop down list – Should underlying content be disabled when dropdown menu or custom select control is opened?

As the title of the question, when implementing the drop-down menu or custom select control, should the underlying content rendered on page be disabled or made inaccessible as long as drop-down is open?

Further, should the focus be trapped till the menu is closed?

macos – How to automatically mount network share when iPhone backup screen is opened in Finder?

I would like to trigger a script that mounts a drive when I open the iPhone’s device page in Finder (like shown here).

enter image description here

Currently, I have the iPhone backups in an APFS volume, which is inside a SparseBundle, which is on a SMB share on my NAS.
Before running an iPhone backup, I mount the drive by manually running a shell script.

Since I work on a MacBook the LAN with my NAS is not always available, hence the detour with mounting manually. But triggering the mount process automatically when entering the page in finder seems a good idea.

  • Is there any event fired to attach such a script to?
  • Or maybe there is any other sensible method to mount the drive automatically?

unity – How can I make a chest that can be opened and shut in SteamVR?

I’m working in Unity with SteamVR for a school project. I’m trying to have a chest that can be opened and shut. I tried using a hinge joint but it would break if the attached body was static which is what I want.

I’m now trying to use a circular drive which works better but the lid to the box will move away from the intended position when colliding with the body of the box which is set to static and kinematic.

I can fix this by setting the lid to kinematic but it won’t collide with the body anymore. Both the lid and body are properly colliding with the hand and with a sphere I added to help test collisions.

I’m assuming the issue is that two kinematic objects can’t collide with each other but I don’t know how else to approach this.