LoginSignup
8
6

More than 5 years have passed since last update.

Xquartz.appを起動したときにxtermが自動起動されるのをやめたい

Posted at

インストールしたてのXquartz.appを起動するとxtermが起動しますが、正直…OS X付属のTerminalで満足しているので、起動する必然性はあまりありません。

では、xtermを起動しないようにするにはどうしたらいいのでしょうか。

このページをもとに試してみました。

まずはXquartz.app起動時に自動実行されるアプリケーションのデフォルトを調べます。

h12o@exegesis:~$ defaults read org.macosforge.xquartz.X11
{
    SULastCheckTime = "2013-09-19 07:38:42 +0000";
    "app_to_run" = "/opt/X11/bin/xterm";
    "apps_menu" =     (
                (
            Wireshark,
            "/usr/local/bin/wireshark",
            w
        )
    );
    "cache_fonts" = 1;
    "done_xinit_check" = 1;
    "login_shell" = "/bin/sh";
    "no_auth" = 0;
    "nolisten_tcp" = 1;
    "startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
}
h12o@exegesis:~$ 

「"app_to_run" = "/opt/X11/bin/xterm";」がそれです。

そこで以下を実行します。

h12o@exegesis:~$ defaults write org.macosforge.xquartz.X11 app_to_run ""

ついでにログインシェルもOS Xのデフォルトにそろえておきます。

h12o@exegesis:~$ defaults write org.macosforge.xquartz.X11 login_shell "/bin/bash"

すると以下の通りとなります。

h12o@exegesis:~$ defaults read org.macosforge.xquartz.X11
{
    SULastCheckTime = "2013-09-19 07:38:42 +0000";
    "app_to_run" = "";
    "apps_menu" =     (
                (
            Wireshark,
            "/usr/local/bin/wireshark",
            w
        )
    );
    "cache_fonts" = 1;
    "done_xinit_check" = 1;
    "login_shell" = "/bin/bash";
    "no_auth" = 0;
    "nolisten_tcp" = 1;
    "startx_script" = "/opt/X11/bin/startx -- /opt/X11/bin/Xquartz";
}
h12o@exegesis:~$ 

これでXquartz.appを起動しても、Xベースのアプリケーションは起動しなくなりました。

8
6
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
8
6