<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>MacOS on Nicola Iarocci</title>
    <link>https://nicolaiarocci.com/tags/macos/</link>
    <description>Recent content in MacOS on Nicola Iarocci</description>
    <generator>Hugo -- 0.143.1</generator>
    <language>en</language>
    <copyright>Produced / Written / Maintained by Nicola Iarocci since 2010</copyright>
    <lastBuildDate>Sun, 10 Mar 2024 15:57:16 +0100</lastBuildDate>
    <atom:link href="https://nicolaiarocci.com/tags/macos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Voice dictation on iOS and macOS is underestimated</title>
      <link>https://nicolaiarocci.com/voice-dictation-on-ios-and-macos-is-underestimated/</link>
      <pubDate>Sun, 10 Mar 2024 15:57:16 +0100</pubDate>
      <guid>https://nicolaiarocci.com/voice-dictation-on-ios-and-macos-is-underestimated/</guid>
      <description>&lt;p&gt;Most people likely already know and use the voice dictation feature in iOS and
macOS all day, but I&amp;rsquo;ve only now seen the light.&lt;/p&gt;
&lt;p&gt;Yesterday, I discovered I could dictate text notes to my iPhone, even offline.
It works with Obsidian, WhatsApp, and any other app where I need to enter text,
like the Safari search box. I suck at entering text on the phone. I also hate
WhatsApp audio messages, but I often recur to them as, again, I suck at typing
text on the phone. I can instead dictate those messages, and they will render as
text as if I typed them; what a revelation!&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Most people likely already know and use the voice dictation feature in iOS and
macOS all day, but I&rsquo;ve only now seen the light.</p>
<p>Yesterday, I discovered I could dictate text notes to my iPhone, even offline.
It works with Obsidian, WhatsApp, and any other app where I need to enter text,
like the Safari search box. I suck at entering text on the phone. I also hate
WhatsApp audio messages, but I often recur to them as, again, I suck at typing
text on the phone. I can instead dictate those messages, and they will render as
text as if I typed them; what a revelation!</p>
<p>It&rsquo;s not entirely a discovery; I knew I could do that and did it occasionally,
primarily for quick lookups.  However, I underestimated how good and valuable
the feature is.</p>
<p>This morning, I discovered the obvious: I can do the same on the Mac. The
MacBook keyboard has a microphone function key, and guess what? It&rsquo;s for voice
dictation, and it works seamlessly. I can even start typing on the keyboard,
switch to dictation on the fly, and then go back to typing without interruption.
It works offline and has built-in multi-language support, just like iOS. Voice
dictation will likely change how I take notes, send messages, and perform other
tasks. Take notes, for example; until today, I rarely write them down when away
from the keyboard.</p>
]]></content:encoded>
    </item>
    <item>
      <title>macOS networkQuality tool</title>
      <link>https://nicolaiarocci.com/macos-networkquality-tool/</link>
      <pubDate>Mon, 15 May 2023 07:05:25 +0100</pubDate>
      <guid>https://nicolaiarocci.com/macos-networkquality-tool/</guid>
      <description>&lt;p&gt;Today I learned about a precious little macOS command line tool, &lt;code&gt;networkQuality&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;The networkQuality tool is a built-in tool released in macOS Monterey that can help diagnose network issues and
measure network performance.&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Usage:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;networkQuality -v
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Example output:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-fallback&#34; data-lang=&#34;fallback&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;==== SUMMARY ====
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uplink capacity: 44.448 Mbps (Accuracy: High)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downlink capacity: 162.135 Mbps (Accuracy: High)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Responsiveness: Low (73 RPM) (Accuracy: High)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Idle Latency: 50.125 milliseconds (Accuracy: High)
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Interface: en0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uplink bytes transferred: 69.921 MB
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downlink bytes transferred: 278.340 MB
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Uplink Flow count: 16
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Downlink Flow count: 12
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Start: 13/05/2023, 15:04:13
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;End: 13/05/2023, 15:04:27
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;OS Version: Version 13.3.1 (a) (Build 22E772610a)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;It supports Apple&amp;rsquo;s Private Relay, offers some configuration options and allows setting up your own server. More info
&lt;a href=&#34;https://cyberhost.uk/the-hidden-macos-speedtest-tool-networkquality/&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Today I learned about a precious little macOS command line tool, <code>networkQuality</code>.</p>
<blockquote>
<p>The networkQuality tool is a built-in tool released in macOS Monterey that can help diagnose network issues and
measure network performance.</p></blockquote>
<p>Usage:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>networkQuality -v
</span></span></code></pre></div><p>Example output:</p>
<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-fallback" data-lang="fallback"><span style="display:flex;"><span>==== SUMMARY ====
</span></span><span style="display:flex;"><span>Uplink capacity: 44.448 Mbps (Accuracy: High)
</span></span><span style="display:flex;"><span>Downlink capacity: 162.135 Mbps (Accuracy: High)
</span></span><span style="display:flex;"><span>Responsiveness: Low (73 RPM) (Accuracy: High)
</span></span><span style="display:flex;"><span>Idle Latency: 50.125 milliseconds (Accuracy: High)
</span></span><span style="display:flex;"><span>Interface: en0
</span></span><span style="display:flex;"><span>Uplink bytes transferred: 69.921 MB
</span></span><span style="display:flex;"><span>Downlink bytes transferred: 278.340 MB
</span></span><span style="display:flex;"><span>Uplink Flow count: 16
</span></span><span style="display:flex;"><span>Downlink Flow count: 12
</span></span><span style="display:flex;"><span>Start: 13/05/2023, 15:04:13
</span></span><span style="display:flex;"><span>End: 13/05/2023, 15:04:27
</span></span><span style="display:flex;"><span>OS Version: Version 13.3.1 (a) (Build 22E772610a)
</span></span></code></pre></div><p>It supports Apple&rsquo;s Private Relay, offers some configuration options and allows setting up your own server. More info
<a href="https://cyberhost.uk/the-hidden-macos-speedtest-tool-networkquality/">here</a>.</p>
]]></content:encoded>
    </item>
    <item>
      <title>How to copy a file&#39;s path in macOS Finder</title>
      <link>https://nicolaiarocci.com/how-to-copy-a-files-path-in-macos-finder/</link>
      <pubDate>Mon, 04 Apr 2022 07:05:25 +0100</pubDate>
      <guid>https://nicolaiarocci.com/how-to-copy-a-files-path-in-macos-finder/</guid>
      <description>&lt;p&gt;No matter how long I&amp;rsquo;ve possessed a Mac and how hard I try, there will always
be a helpful keyboard shortcut hidden somewhere that I don&amp;rsquo;t know about.&lt;/p&gt;
&lt;p&gt;Today I learned about holding the &lt;code&gt;Option&lt;/code&gt; key while clicking on the Copy
command in Finder. It activates the super-useful (and super-secret) &amp;ldquo;copy as
pathname&amp;rdquo; feature.&lt;/p&gt;
&lt;p&gt;&lt;img alt=&#34;Credits: Jamie Smith&#34; loading=&#34;lazy&#34; src=&#34;https://nicolaiarocci.com/images/finder-menu-option.gif&#34;&gt;&lt;/p&gt;
&lt;p&gt;I spotted this trick on &lt;a href=&#34;https://www.jamieonkeys.dev/posts/keyboard-shortcuts/&#34;&gt;Jamie Smith&amp;rsquo;s website&lt;/a&gt;, where other handy shortcuts
(and the pretty gif above) reside.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>No matter how long I&rsquo;ve possessed a Mac and how hard I try, there will always
be a helpful keyboard shortcut hidden somewhere that I don&rsquo;t know about.</p>
<p>Today I learned about holding the <code>Option</code> key while clicking on the Copy
command in Finder. It activates the super-useful (and super-secret) &ldquo;copy as
pathname&rdquo; feature.</p>
<p><img alt="Credits: Jamie Smith" loading="lazy" src="/images/finder-menu-option.gif"></p>
<p>I spotted this trick on <a href="https://www.jamieonkeys.dev/posts/keyboard-shortcuts/">Jamie Smith&rsquo;s website</a>, where other handy shortcuts
(and the pretty gif above) reside.</p>
]]></content:encoded>
    </item>
    <item>
      <title>So tired of Homebrew messing up with my stuff</title>
      <link>https://nicolaiarocci.com/so-tired-of-homebrew-messing-up-with-my-stuff/</link>
      <pubDate>Tue, 25 May 2021 08:05:25 +0100</pubDate>
      <guid>https://nicolaiarocci.com/so-tired-of-homebrew-messing-up-with-my-stuff/</guid>
      <description>&lt;p&gt;Pardon me while I&amp;rsquo;m venting out my frustration. I am so tired of Homebrew
messing up with my stuff. It used to be the perfect tool for the right job
until they decided to auto-brew-update-and-cleanup at every new install.
Another day another issue, today with vim not running anymore:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;dyld: Library not loaded: /usr/local/opt/lua/lib/liblua.5.3.dylib
Referenced from: /user/local/bin/vi
Reason: image not found
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Lua has suddenly gone missing. Ah, but of course. I installed something with
Homebrew this morning. The fix is to &lt;code&gt;brew reinstall vim&lt;/code&gt;, which then leads to
the following error:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>Pardon me while I&rsquo;m venting out my frustration. I am so tired of Homebrew
messing up with my stuff. It used to be the perfect tool for the right job
until they decided to auto-brew-update-and-cleanup at every new install.
Another day another issue, today with vim not running anymore:</p>
<pre><code>dyld: Library not loaded: /usr/local/opt/lua/lib/liblua.5.3.dylib
Referenced from: /user/local/bin/vi
Reason: image not found
</code></pre>
<p>Lua has suddenly gone missing. Ah, but of course. I installed something with
Homebrew this morning. The fix is to <code>brew reinstall vim</code>, which then leads to
the following error:</p>
<pre><code>Error: python@3.9 the bottle needs the Apple Command LIne Tools to be installed.
You can install them, if desired, with:
xcode-select --install
</code></pre>
<p>An <code>xcode-select install</code> and another <code>brew reinstall</code> later, vim is back home.
It&rsquo;s only a minor annoyance —only a few wasted minutes, but the point is, they
didn&rsquo;t need to be wasted. If you&rsquo;re frequently installing stuff via Homebrew,
this is quite a common, unpleasant occurrence (python virtual environments
being hit with alarming frequency).</p>
<p>I know that one can disable automatic cleanups by setting the
<code>HOMEBREW_NO_INSTALL_CLEANUP</code> environment variable. I will end up doing that
out of frustration sooner or later. Again, the point is I should not need to do
that.  It all adds unnecessary friction, especially for someone who&rsquo;s been
religiously running manual cleanups (I concede that an un-maintained brew cache
can grow to <em>very</em> sizable dimensions).</p>
<p>Homebrew is still an essential tool; just not so enjoyable anymore. It&rsquo;s not
like we have a valid alternative at hand, anyway.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Quicker window snapping on macOS</title>
      <link>https://nicolaiarocci.com/quicker-window-snapping-on-macos/</link>
      <pubDate>Tue, 06 Apr 2021 07:05:25 +0100</pubDate>
      <guid>https://nicolaiarocci.com/quicker-window-snapping-on-macos/</guid>
      <description>&lt;p&gt;I never see my macOS desktop. It&amp;rsquo;s always cluttered with way too many open
windows. When I spot those fantastic, tidy and clean Desktops on the internet,
I envy their owners. I wonder if and how they manage to keep those desktops
tidy like that the whole workday. It must feel so good.&lt;/p&gt;
&lt;p&gt;I try to keep my windows well arranged. The typical setup might be two windows,
from two different apps, tiled side by side. Maybe the browser, or Postman, on
the right, and my favourite editor on the left. Stuff like that.&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>I never see my macOS desktop. It&rsquo;s always cluttered with way too many open
windows. When I spot those fantastic, tidy and clean Desktops on the internet,
I envy their owners. I wonder if and how they manage to keep those desktops
tidy like that the whole workday. It must feel so good.</p>
<p>I try to keep my windows well arranged. The typical setup might be two windows,
from two different apps, tiled side by side. Maybe the browser, or Postman, on
the right, and my favourite editor on the left. Stuff like that.</p>
<p><a href="https://hookshot.app/">Hookshot</a> is excellent for doing just that. I discovered this tiny little
app a few weeks ago, thanks to <a href="https://www.robinrendle.com/notes/hookshot">Robin Rendle</a>. Before, I was using Moom,
which is also good. I like Hookshot&rsquo;s dead-simple keyboard shortcuts. Once the
single modifier key combo <em>Control+Command</em> clicks, you&rsquo;re done. Rearranging
windows becomes a no-brainer. In a way, the experience reminds me of Vim and
its unique muscle-memory superpower. The ten days trial ended today, and
I purchased the license right away.</p>
]]></content:encoded>
    </item>
    <item>
      <title>Battling with SSH, cron jobs, and macOS Keyring</title>
      <link>https://nicolaiarocci.com/battling-with-ssh-cron-jobs-and-macos-keyring/</link>
      <pubDate>Wed, 17 Mar 2021 07:05:25 +0100</pubDate>
      <guid>https://nicolaiarocci.com/battling-with-ssh-cron-jobs-and-macos-keyring/</guid>
      <description>&lt;p&gt;So today, I was setting up a cronjob on my trusty MacBook Pro. The goal was to
backup some folders from a remote Linux server via rsync. The script is simple.
It goes something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;rsync -avz -e &amp;quot;ssh -i ~/.ssh/my_rsa_keyfile&amp;quot; myuser@myserver:remotedir/ ~/localdir/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Launched by hand, it works seamlessly. Call it from a cron job via crontab, and
I get a permission denied error. I then enabled ssh &lt;code&gt;-v&lt;/code&gt; option to gather
a little intel on what was actually going on. As it turns out, the exact
error was:&lt;/p&gt;</description>
      <content:encoded><![CDATA[<p>So today, I was setting up a cronjob on my trusty MacBook Pro. The goal was to
backup some folders from a remote Linux server via rsync. The script is simple.
It goes something like this:</p>
<pre><code>rsync -avz -e &quot;ssh -i ~/.ssh/my_rsa_keyfile&quot; myuser@myserver:remotedir/ ~/localdir/
</code></pre>
<p>Launched by hand, it works seamlessly. Call it from a cron job via crontab, and
I get a permission denied error. I then enabled ssh <code>-v</code> option to gather
a little intel on what was actually going on. As it turns out, the exact
error was:</p>
<pre><code>`read_passphrase: can't open /dev/tty: Device not configured`
</code></pre>
<p>Quite puzzling. Long story short, the error message was misleading. It took me
an embarrassingly long time to figure out what the real problem was. The
identity file I was using has a passphrase, which is saved in macOS Keyring.
When the <code>ssh -i</code> command is launched via cron, no Keyring is used. Not unless
you explicitly instruct ssh to do. See, my <code>~/.ssh/config</code> file was something
like this:</p>
<pre><code>Host *
    ServerAliveInterval 360
    AddKeysToAgent yes

[...]

Host myserver
    HostName 123.123.123.123
    User myuser
</code></pre>
<p>See, in <code>myserver</code> section there was no <code>Usekeychain</code> option. Launching the
script interactively worked because of <code>AddkeysToAgent</code> in the general section.
It enables the ssh-agent for the current terminal session, for all hosts. But
cron jobs, well, they don&rsquo;t run in the same session, and certainly don&rsquo;t run
the agent. I could eval the agent in the script, of course, but the
simplest solution was to update <code>myserver</code> section:</p>
<pre><code>Host myserver
    HostName 123.123.123.123
    Usekeychain yes
    User myuser
</code></pre>
<p>Now ssh knows it should use the keychain when resolving <code>myserver</code> RSA key,
even when no agent is running. I am not sure why I did not have <code>Usekeychain</code>
there; I do have it enabled for other hosts in the same file. As said, I wasted
way too much time on this issue. At least, I hope my experience will be useful
to someone else, or, more likely, to my future self in a few months or years.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
