Categories
Blog

Restart macOS Screen Sharing Service via SSH

Sometimes screen sharing service on your headless Mac mini may crash. This should fix the issue:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.screensharing.plist  
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
Categories
Blog

Change Default Screen Sharing / VNC Port on macOS

sudo vi /etc/services

Search 5900 and edit it.

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.screensharing.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist
Categories
Blog

macOS Sierra Universal Clipboard Issue with VNC (Screen Sharing) Shared Clipboard

If you like me owning more than one Mac and using one of them to control the other via macOS built-in Screen Sharing feature, you may occur this issue after you upgrade your macOS to Sierra.

macOS Sierra introduces a new feature Universal Clipboard which can share the same clipboard among iOS and macOS devices. This sounds cool, but as it’s technically a part of Continuity feature, it would require Bluetooth to work.

So the problem is, when I control my Mac mini from my MacBook Pro via Screen Sharing in the same network, with the Shared Clipboard enabled, the Universal Clipboard would still always try to “sync” copied content via Bluetooth instead of using Screen Sharing Shared Clipboard.

It’s ok if both of your Macs are at your hand, but it’s a disaster if they’re in different rooms, Universal Clipboard via Bluetooth would become really slow to connect to each other, and this issue could even make your VNC drop connection if you copy images to your clipboard.

So here’s the solution, just disable Bluetooth on your Mac mini, and wait Apple to fix this bug.

Categories
Blog

警惕 Mac App Store 上的 QQ for Mac 2.3.0 更新

此次 2.3.0 的更新有如下内容:

中文:

  1. 因为 apple 审核规则限制,我们取消了菜单栏的新建 qq 按钮,仅支持 command+n 快捷键新建 QQ.
  2. 新增文件盒子功能
  3. 新增请求与通知集成面板
  4. 传文件面板界面优化
  5. Retina 下截图支持尺寸选择
  6. 截图功能可独立使用
  7. 新增快速登录插件,支持快速登录腾讯服务
  8. 修复了提取消息卡顿的问题
  9. 修复了 Retina 下头像模糊的问题

「支持 command+n 快捷键新建 QQ」,是不是感觉很牛屄?「新增快速登录插件,支持快速登录腾讯服务」屌爆了有没有?第一次运行后,有如下提示:

当然是全部取消勾选,然后通过 CleanMyMac 2 的检测,我们发现有一个 QQ Login Item:

厉害的是系统中并没有这个:

通过查看 launchctl 的手册我们可以发现,一般开机运行有以下几处:

  • ~/Library/LaunchAgents Per-user agents provided by the user.
  • /Library/LaunchAgents Per-user agents provided by the administrator.
  • /Library/LaunchDaemons System wide daemons provided by the administrator.
  • /System/Library/LaunchAgents OS X Per-user agents.
  • /System/Library/LaunchDaemons OS X System wide daemons.

但在上述目录中完全找不到 QQ 的影子,我们也懒得一点点查了,总之很厉害有没有?

然后我们接着打开系统防火墙,发现了奇怪的东西:

QQPlatform.app 是什么?通过搜索 QQPlatform,我们发现这玩意好像并不是什么好东西,被 多个网站 定义为 Trojan.agent 和 Trojan-Downloader.agent 木马,具体那东西做了啥我们也懒得开 Charles 一点点抓了,总之把 conn 给 block 掉

另外值得一提的是之前提到的「新增快速登录插件,支持快速登录腾讯服务」,是需要去腾讯官网下载的,Sandbox 立功了:

经过以上分析,我们能得出以下结论:

  • 一定要开防火墙
  • OS X 上最好不要安装中国 app,随着 Mac 的越来越流行,国内的大老板们肯定会盯上这块肉
  • 有 Mac App Store 的版本不要用官网下载的版本
  • 如果必须要装,请不要在主力机上装,比如我们就装在 Mac mini with OS X Server 上,要用的时候通过 VNC 来使用