LoginSignup
4
1

More than 5 years have passed since last update.

Mac の Slack クライアントの自動バージョンアップを outset で無効にする

Posted at

バージョン 2.6 以上の Mac 用 Slack クライアント(Slack 2.6.2 でも確認)では U+0008 などの制御文字が挿入されてしまうため、旧バージョンを使う方法を記載する。
そのままの方法では、旧バージョンを入れても自動バージョンアップされてしまうので、自動更新を止められるバージョン(2.4.1)をインストールした上で、自動バージョンアップを無効にする必要がある。(squirrel を利用している他の App の更新も止まるので注意)

Slack 2.4.1 をダウンロード
https://downloads.slack-edge.com/mac_releases/Slack-2.4.1-macOS.zip

上記を解凍して /Applications にインストール(既に入っている Slack は削除しておく)

launchctl を制御するため outset を使う。

outset (outset-2.0.5.pkg) をダウンロード
https://github.com/chilcote/outset/releases

outset-2.0.5.pkg 実行してインストールする。

outset 用のスクリプト(launchctl の環境変数の定義をするだけ)
https://gist.github.com/grahampugh/bf07f3d2323f2a05c1fa524017678e04

$ wget https://gist.githubusercontent.com/grahampugh/bf07f3d2323f2a05c1fa524017678e04/raw/ff3edbb86ded9f902d7125a542efdf8610716815/disable-squirrel-updates.sh
--2017-05-10 21:55:00--  https://gist.githubusercontent.com/grahampugh/bf07f3d2323f2a05c1fa524017678e04/raw/ff3edbb86ded9f902d7125a542efdf8610716815/disable-squirrel-updates.sh
Resolving gist.githubusercontent.com... 151.101.72.133
Connecting to gist.githubusercontent.com|151.101.72.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 210 [text/plain]
Saving to: ‘disable-squirrel-updates.sh’

disable-squirrel-updates.sh                                         100%[===================================================================================================================================================================>]     210  --.-KB/s    in 0s

2017-05-10 21:55:00 (5.01 MB/s) - ‘disable-squirrel-updates.sh’ saved [210/210]

ダウンロードしたシェル disable-squirrel-updates.sh をログイン時に実行されるように配置する。

# 配置する
$ sudo mv disable-squirrel-updates.sh /usr/local/outset/login-every/

# 所有者を変更し、実行権限を与える
$ sudo chown root: /usr/local/outset/login-every/disable-squirrel-updates.sh
$ sudo chmod a+x /usr/local/outset/login-every/disable-squirrel-updates.sh

# outset でロードする
$ /usr/local/outset/outset --login
Processing /usr/local/outset/login-every/disable-squirrel-updates.sh

確認のため Mac を再起動する(※ Slack をログイン時に自動起動している場合は outset より早く起動されてしまうため OFF にする)

launchctl の環境変数が変わっているのを確認する

$ launchctl getenv DISABLE_UPDATE_CHECK
1

※ boot-every なら自動起動していても大丈夫?(要調査)

[参考] Squirrel Updates, the Slack Mac App and User Environment Variables
https://macops.ca/disabling-squirrel-updates

4
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
1