Sunday, August 22, 2021

Recent Questions - Ask Different

Recent Questions - Ask Different


AppleScript conditional statement rules

Posted: 21 Aug 2021 10:16 PM PDT

I need a script to run between 9pm and 6am and I'm struggling to understand why this isn't working. I've tried with and without parentheses.

set myTime to time of (current date) as string    if (myTime > 21600) and (myTime < 75600) then      display notification "it's between 6am and 9pm"  else      display notification "it's between 9pm and 6am"  end if  

Why is wifi log filling with Usb Host Notification messages?

Posted: 21 Aug 2021 09:58 PM PDT

occasionally checking logs, on a Mac with now Big Sur, why might the /var/log/wifi.log be filled like so?

Sun Aug 22 00:45:12.451 Usb Host Notification en1 driver available, seqNum 52, Total 1    Sun Aug 22 00:45:12.451 Usb Host Notification Error Apple80211Set:  :    Sun Aug 22 01:16:57.517 Usb Host Notification en1 driver available, seqNum 58, Total 1  

It has been doing this since the rotating log started (August 12). Yesterday I deleted the WiFi network connection from the Network system settings. There is a backup external harddrive attached via USB. I just ejected it, see if that changes it.

Is it possible to edit HTML code of a website on iPadOS?

Posted: 21 Aug 2021 09:06 PM PDT

I find the yellow bar on the side of fandom.com 's new website gives me a bit of a headache. I was wondering if it is possible to remove it or change the couler of it using HTML code on my iPad?

enter image description here

Here's a picture of the yellow bar. (On the right hand side.)

How to use `at` to open a mac desktop application?

Posted: 21 Aug 2021 06:46 PM PDT

Right now, I have a zsh function that's like this

sudo kill "$1" "$2" "$3" && sleep 1800 && open -a 'Freedom'  

However, I'd like to use at

I've tried these commands but they don't seem to open the app

I've also tried with and without quotes

  • echo "open -a '/Applications/Freedom.app'" | at now
  • echo "open -a 'Freedom'" | at now

How to uninstall "Logi Options" utility software in macOS 11.5 Big Sur?

Posted: 21 Aug 2021 08:01 PM PDT

I have given up on trying to use my new Logitech Trackman Marble, as it not recognized by the Logi Options utility software I downloaded from Logitech. With no way to adjust the speed of the pointer, and no way to change behaviors of the buttons, the device is useless.

How can I uninstall Logi Options?

How can I revoke the permissions I gave in the Accessibility pane of System Preferences during that install process? I see no such pane now with a checkbox list of products.

Can i use iphone 7 plus headphones on my samsung

Posted: 21 Aug 2021 05:28 PM PDT

I am an old user of iphone but now i became samsung user I have iphone 7 plus headphones and do not know how to use it on samsung..is there any adaptor, hub,or anything that could help me? I can not plug.. Please do some research before answering me

Can a sheet be made active using AppleScript?

Posted: 21 Aug 2021 04:20 PM PDT

I'm wanting to activate a particular sheet in Numbers using AppleScript. I know that if a table is on the sheet then it can be activated by doing something like this:

tell the table 1 of sheet 2 of document "Document"      set value of cell 1 of column "A" to "x"  end tell  

but what if there isn't a table and only a chart? Is there a way to activate a sheet if it only contains a chart?

Please help me fix error for my system profile on new MacBookPro16 running BigSur 11.5.2

Posted: 21 Aug 2021 04:10 PM PDT

The error code listed below shows up in my Profile on my new MacBookPro16, running the latest version of BigSur:

** Error ** *** -[__NSDictionaryM setObject:forKey:]: object cannot be nil (key: _name)

Can anyone help me resolve it?

Merge All Windows in Current Space in Finder

Posted: 21 Aug 2021 04:01 PM PDT

I use two Spaces for my work. To declutter my screen, I sometimes use "Merge All Windows" in Finder. But this merges all Finder windows, i.e. in both Spaces.

Is there a way (e.g. using AppleScript) to only merge the Finder windows in the current Space?

How to open Google Maps via Intent and go directly to Profile > Offline maps

Posted: 21 Aug 2021 03:21 PM PDT

it is super easy to open Google Maps via Intent

Uri gmmIntentUri = Uri.parse("geo:37.7749,-122.4194");  Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);  mapIntent.setPackage("com.google.android.apps.maps");  if (mapIntent.resolveActivity(getPackageManager()) != null) {    startActivity(mapIntent);  }  

But is there a parameter to open Google Maps and directly open the profile section and offline maps?

Best, Chris

Run Shell Scripts on a Schedule

Posted: 21 Aug 2021 02:39 PM PDT

Is there "a right" way to run shell scripts on a schedule in modern versions of MacOS? My usual go to for this has been using the cron command -- but recent changes make seem like this isn't in the front of Apple's mind these days.

Is there a better option than cron for running programs on a schedule in modern (Big Sur era) MacOS? Is my only option biting the bullet and learning how launchd works or is there something simpler/easier that I can use?

Security settings in preference system for Automator in Big Sur

Posted: 21 Aug 2021 01:49 PM PDT

I have difficults to use Automator. For exemple, the "Extract Images from Selection" service given at http://www.macosxautomation.com/lion/webcontent/index.html (see image http://www.macosxautomation.com/lion/webcontent/gfx/workflow01.png) don't work.

As this page was written long years ago, when security settings were a lot less numerous, perhaps I miss information about how to set the perf pane Security in Big sur.

I seek a comprehensible list, and explanation how to add/change settings.

For example, at Files and folders, I have this: enter image description here

Download folder ("Dossier de téléchargement") is checked (I don't recall how), but I don't find the way to add other folder.

For Accessibility, I have Script Editor checked. Must I add Automator? What are the consequences? enter image description here

No Automator found in "Full disk access" nor "Automation".

At https://macosxautomation.com/automator/security.html I see an image with Automator in the "Automation" section. How can I add it? These is no "+/-" button.

I have unlocked the padlock at bottom of the Security window.

Homebrew is not upgrading all packages

Posted: 21 Aug 2021 11:13 AM PDT

Installed hashcat with brew brew install hashcat it says 6.1.1 version is installed and it's the latest when v6.2.3 stable is already up. How to fix it?

How to use dark mode dock with light mode system

Posted: 21 Aug 2021 04:45 PM PDT

I am using Light appearence on mac OS Big Sur.

We can set specific applications light/dark mode with this terminal code.

For example

defaults write com.google.Chrome NSRequiresAquaSystemAppearance -bool yes

It makes Google Chrome light mode with dark system theme. Similarly to I typed

defaults write com.apple.dock NSRequiresAquaSystemAppearance -bool no to use dark dock and it didn't work. I have checked the com.apple.dock package is exist.

How can I use dark dock on mac OS light mode? Thanks.

Repeat key when editing command lines in "set -o vi" mode

Posted: 21 Aug 2021 07:31 PM PDT

I have set the default shell to bash and have

set -o vi  alias vi=vim  

set in the ~/.bash_profile. I also have With this configuration - and apparently some additional special sauce my prior laptop gave me automatic key repeats when editing bash history. E.g. hitting "h" and keepign it depressed would travel leftwards in the current line as long as the key were depressed.

But on a newly configured mac the auto-repeat does not work on the set -o vi commandline. It does however work when in vi itself.

How can this be fixed in set -o vi mode?

Google Drive macOS client can't dowload files inside mounted dmg virtual drive

Posted: 22 Aug 2021 12:20 AM PDT

I'm trying to let Google Drive client to sync files inside mounted dmg. I've added the folder (mounted dmg) to Google Drive client for backup. Everything works fine: upload of new files from my machine, deletion of files on my machine are propagated to online Google Drive and deletion of files from web are propagated to my machine. But when I create a new file from Google Drive Web inside the folder, Google Drive Desktop client can't create file inside the mounted dmg: it always return 'not enough disk space' .. my free space is more than 200Gbyte and the issue happen with 2 files of 100KB each. The dmg file was created for read and write, I can create files inside dmg on my machine but it seems Google Drive can't ...

Has anyone experienced same problem ?

Thank You

Can't change Apple TV Restrictions, grayed out

Posted: 21 Aug 2021 04:07 PM PDT

I can change Movie restrictions levels, but not TV.

I checked in iTunes and it is the same, grayed out.

How can I change the TV show restrictions levels when they are grayed out?

enter image description here

Renamed an icloud drive folder with the .tmp extension and files have disappeared

Posted: 21 Aug 2021 07:06 PM PDT

I read that I could rename a folder to have the..tmp extension to prevent it syncing over. I did this to a folder that had some confidential files, but I renamed the folder in my icloud drive and the files have all disappeared.

I found a copy of the folder on the desktop, but that was also empty. Any idea where I could locate these files or are they lost?

Music 1.0.5.10 on MacOS Catalina 10.15.7 not showing 'Up Next' list in Mini Player

Posted: 21 Aug 2021 06:02 PM PDT

I click the 'up next' button, I get history. I don't see 'up next'. I see nothing in view, preferences or window menus. Available docs refer to this as the 'up next' button and do not indicate how to switch from/to history. Is there a mystery meat UI control I am missing?

In IOS I note that the UI provides a way to switch from history and up next: after scrolling to the bottom of the history list, the 'up next' list appears beneath it.

Broken ipad power button? Or is this some sort of software problem?

Posted: 21 Aug 2021 12:06 PM PDT

Pressing the power button on my iPad mini 4 doesn't turn the screen on and off... but a long press on the button will still bring up the "slide to power off" prompt (and if I power off the iPad, pressing the power button will turn it back on ).

If nothing worked at all I would figure it's a hardware problem and look into getting it repaired, but the fact the the "power off" feature works even though the power button doesn't seem to sleep/wake the screen has me puzzled.

What's going on here?

RAM disks - can I use APFS and/or compression?

Posted: 21 Aug 2021 08:21 PM PDT

I use a 200MB Ram disk to write some throwaway files that I use repeatedly but can forget from run to run and don't mind losing on a shutdown. I often run out of space however and have to clean house.

This comes from a typical recommendation to mount a RAM disk until Macos:

  • can I use APFS instead? Would there be much benefit in a Ramdisk? Would it compress?

  • can I activate compression by default? I am dumping out a bunch of throw-away diagnostic HTML files that would take a lot less space if there was transparent file system compression like you can do on NTFS.

                  old-school, what about APFS?                       👇  diskutil erasevolume HFS+ 'RAMDisk' `hdiutil attach -nomount ram://409600`  

Diskutil itself doesn't help much:

Not one mention of APFS.

$ diskutil erasevolume -h

Usage:  diskutil eraseVolume format name MountPoint|DiskIdentifier|DeviceNode  Erase a single disk partition or whole, laying down a new file system volume  that will be empty of files. Format is the specific file system personality  name of the new volume, e.g. "Journaled HFS+" or a common alias e.g. "jhfs+".  Name is the new volume name (subject to file system naming restrictions) or  can be specified as %noformat% to skip initialization (to skip newfs). You  cannot erase the boot volume. A pseudo-format of "free" or "Free Space" will  remove the partition altogether, leaving a free space gap in the partition map.  Ownership of the affected disk is required.  Examples: diskutil eraseVolume JHFS+ UntitledHFS /Volumes/SomeDisk            diskutil eraseVolume "Journaled HFS+" FooWholeVolEgRaid disk7            diskutil eraseVolume ms-dos FOO disk0s5            diskutil eraseVolume free free disk0s5  

Not much documentation from Apple - it's terminal stuff.

Looking at man page we still only have old file systems.

Here's what using the GUI has to say:

enter image description here

Compressed Disk Images. what's that?

I have also seen the term compressed disk image with regards to macos. Does it have any relevance here?

giving it a try didn't help much:

Mount a 50MB

diskutil erasevolume APFS 'ram2'hdiutil attach -nomount ram://102400``

output: No clear error, but no disk either:
Started erase on disk2  Unmounting disk  Erasing  Mounting disk  Could not mount disk2 after erase 👈 not good  Finished erase on disk2  
ls /Volumes doesn't show a ram2 disk
total 0  drwxr-xr-x+  4 root  wheel  128 Feb 26 16:03 .  drwxr-xr-x  28 root  wheel  896 Sep 30 13:10 ..  lrwxr-xr-x   1 root  wheel    1 Feb  8 12:51 MacHD -> /  drwxrwxr-x   8 jluc  staff  340 Feb 14 23:01 RAMDisk 👈 existing one  

Removing EFI partition from external Disk?

Posted: 21 Aug 2021 11:37 PM PDT

A few months ago I decided to format an external HD that I wish to use with my Mac mini, but I can not use 100% of it.

In the formatting process, a partition called EFI appeared. When I open the Disk Utility app, the partition is not displayed, but it was displayed by the command line using diskutil.

Here is the Disk Utility:

enter image description here

From the command line: diskutil list

/dev/disk0 (internal, physical):     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:      GUID_partition_scheme                        *1.0 TB     disk0     1:                        EFI EFI                     209.7 MB   disk0s1     2:                  Apple_HFS MAC HD                  881.0 GB   disk0s2     3:         Microsoft Reserved                         16.8 MB    disk0s3     4:       Microsoft Basic Data BOOTCAMP                118.9 GB   disk0s4    /dev/disk1 (external, physical):     #:                       TYPE NAME                    SIZE       IDENTIFIER     0:      GUID_partition_scheme                        *640.1 GB   disk1     1:                        EFI EFI                     209.7 MB   disk1s1     2:       Microsoft Basic Data HD Caio                 639.9 GB   disk1s2  

How can I recover the space lost to disk1s1?

What does the cloud icon with lines underneath mean?

Posted: 21 Aug 2021 11:08 PM PDT

In the iOS Weather app what does the cloud icon with two horizontal lines beneath mean?

screenshot of weather app showing icon I question

Importing Notes from one mac to another?

Posted: 21 Aug 2021 01:32 PM PDT

I was making extensive use of Notes on a loaner laptop for work. I just got my permanent machine, and after updating from the backed up data on CrashPlan, I found my notes didn't make it over. I looked into the issue, saw what I needed to copy over, and asked the build tech to email me the contents of group.com.apple.notes from the old machine. I extracted the zip he sent me, and in Notes ran "import notes" on the directory he sent. It doesn't seem like anything was copied over. Any idea why this might not work? Am I copying the wrong directory, or importing incorrectly or otherwise missing a step? What are the actual files that need to be copied over? Both old machine and new are running El Capitan.

I can't find a setting to disable WINS in Network settings

Posted: 21 Aug 2021 01:49 PM PDT

In my Network settings under WINS I have the NetBios name (elly) that I would like to disable (kill).

The message shows that the "elly"is currently been used ?

By whom, for what ?

There a bunch of messages in the Console with for example elly.local WindowServer ?? what server ? I do not have one ?

My search on Google and here did not help.

I tried deleting the NetBios name, but it comes back!

Also tried the without success!

sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.netbiosd.plist  

I have no local network, nor any workgroup set up, just a lone wifi connection to the world.

Running Hostname in Terminal shows "Elly.Local"

I would not mind using Terminal to kill it, but I'm just wondering whether there's any UI-based way to just turn off all of this stuff. I am not a big fan of running services I'm not using.

MBA 10.8.4

How do I find what packages I've installed via terminal?

Posted: 21 Aug 2021 10:45 PM PDT

I've been learning the shell for a few weeks and have installed several packages. I know/remember what some of them are, like oh-my-zsh and emacs 24 (which was a nightmare to upgrade to), but not sure sure about what else. I've used different methods like curl, wget and Macports.

My question is, if and when I want to do a clean installation of MacOS, how do I backup or script a fresh installation of these packages? In other words, when I do a new install of MacOS I won't be restoring from Time Machine using Migration Assistant: rather I'll install the system and manually restore files. How do I know the installation paths and dependancies of what I've installed in my previous installation using the command line? Is there a txt file somewhere that the system maintains to keep track of what has been installed?

(MacOS 10.8.2)

Running *ix Commandline tools in Macbook Air? VNC? Virtual-machine? Usable or too slow? [closed]

Posted: 21 Aug 2021 10:45 PM PDT

I haven't used OS X since an awful experience with its commandline tools and CD Xcode about 2009, that time getting rid of all Apple stuff but coming back after iPhone/iPad/FaceTime/iCloud/etc. Now I am wondering whether I could solve this problem other way, I love to use tools such as awk, mogrify, imagemagick, etc -- they are pretty integral part of me because I don't like to relearn things. Most of the time, I solve problems with short one-liners so if I cannot do it, my productivity will drop a lot.

So could I run *ix Commandline tools on Macbook Air? I have an old laptop in the same WIFI network so I may be able to connect it for remote control?

Can I get Command-H to hide an Emacs window?

Posted: 21 Aug 2021 10:45 PM PDT

I'm using GNU Emacs 23.4.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 2012-01-29 on bob.porkrind.org on a MacBook Air.

Can I set Command-H to hide Emacs? I currently use M-x customize-group ns and set Command Modifier to no value. I already have a standard key binding to iconify-frame, but that is different from hiding; I'd rather use the native OS X hide capability so I can unhide by clicking on the Emacs icon in the dock.

No comments:

Post a Comment