<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Mac on Margrop Blog</title>
    <link>https://blog.margrop.net/en/tag/mac/</link>
    <description>Recent content in Mac on Margrop Blog</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-US</language>
    <lastBuildDate>Tue, 28 Apr 2026 18:40:00 +0800</lastBuildDate>
    <atom:link href="https://blog.margrop.net/en/tag/mac/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Debugging Chinese Text Turning into Underscores in tmux &#43; opencode: The Real Culprit Was client_utf8=0</title>
      <link>https://blog.margrop.net/en/post/tmux-opencode-chinese-underscore-fix/</link>
      <pubDate>Tue, 28 Apr 2026 18:40:00 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/tmux-opencode-chinese-underscore-fix/</guid>
      <description>&lt;blockquote&gt;&#xA;&lt;p&gt;&lt;strong&gt;Short version&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;This was not an opencode Chinese rendering bug, and it was not a broken terminal font. The tmux client had been detected as not supporting UTF-8. The decisive evidence was &lt;code&gt;tmux display-message -p &#39;client_utf8=#{client_utf8}&#39;&lt;/code&gt;, which returned &lt;code&gt;client_utf8=0&lt;/code&gt;. In that state, tmux replaces non-ASCII output with underscores, so every Chinese character inside the opencode TUI appeared as &lt;code&gt;_&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;This post documents a small but very typical terminal debugging session. On the same Mac, running &lt;code&gt;opencode&lt;/code&gt; directly displayed Chinese text correctly. But after starting a tmux session first and then running &lt;code&gt;opencode&lt;/code&gt;, all Chinese text became underscores.&lt;/p&gt;&#xA;&lt;p&gt;This kind of problem is easy to misdiagnose. The first instinct is often to blame the font, the terminal emulator, the opencode version, a color theme, Nerd Font configuration, Unicode width handling, or a bug in the TUI framework. In this case, however, the key question was much narrower: &lt;strong&gt;does the current tmux client believe it can write UTF-8 back to the outer terminal?&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;To avoid exposing private environment details, all examples below are generalized. They do not include real hostnames, private addresses, session names, credentials, usernames, or project paths. The only things preserved are the technical facts needed to understand the failure and the fix.&lt;/p&gt;</description>
    </item>
    <item>
      <title>How to Run Multiple Python Scripts on Mac with One Command</title>
      <link>https://blog.margrop.net/en/post/one-command-in-mac-execute-mulit-python-scripts/</link>
      <pubDate>Thu, 25 Feb 2021 15:52:15 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/one-command-in-mac-execute-mulit-python-scripts/</guid>
      <description>&lt;p&gt;There are currently 4 Python scripts, and I want to execute all 4 scripts with a single command. How can I do that?&#xA;My current approach is rather crude. I used 5 shell scripts to achieve it, but I don&amp;rsquo;t know whether there is a better way.&lt;/p&gt;&#xA;&lt;h1 id=&#34;shell-script-runallsh&#34;&gt;shell script &lt;code&gt;runAll.sh&lt;/code&gt;&lt;/h1&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;#!/bin/bash&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#75715e&#34;&gt;&lt;/span&gt;ls&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;open -a Terminal.app run17688821.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;open -a Terminal.app run49763693.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;open -a Terminal.app run857413.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;open -a Terminal.app run856853.sh&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Install Frp client on Mac and use remote desktop</title>
      <link>https://blog.margrop.net/en/post/mac-frpc-install-for-remote-desktop-problem/</link>
      <pubDate>Mon, 18 Jan 2021 13:28:26 +0800</pubDate>
      <guid>https://blog.margrop.net/en/post/mac-frpc-install-for-remote-desktop-problem/</guid>
      <description>You can install it with Homebrew.&#xA;The following section shows the old manual extraction method. Keep reading if you want that approach.&#xA;brew install frpc vi /usr/local/etc/frp/frpc.ini brew services start frpc Download the Darwin package from FRP releases and unzip it omitted Copy the executable sudo mv ~/Downloads/frp_0.34.3_darwin_amd64/frpc /usr/local/bin/ Add the frpc configuration file Adjust server_addr, server_port, and remote_port as needed. Edit the auto-start configuration Commands related to auto-start sudo su cat&amp;gt;/etc/frpc.</description>
    </item>
  </channel>
</rss>
