【问题标题】:Opening PyCharm/IntelliJ IDEA terminal starts a new Xorg session打开 PyCharm/IntelliJ IDEA 终端会启动一个新的 Xorg 会话
【发布时间】:2018-02-15 17:02:01
【问题描述】:

我已经安装了 PyCharm Community Edition 2017.2.1 和 Arch Linux,Zsh 作为我的默认 shell,i3 是我的窗口管理器。

当我在 PyCharm 中打开一个新的终端窗口时,它会启动一个新的 Xorg 会话(我认为是exec i3)并切换到一个新的 TTY。当我回到与ctrl+alt+F1 的主会话时,我在终端中看到了这些日志:

X.Org X Server 1.19.3
Release Date: 2017-03-15
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.12.5-1-ARCH x86_64 
Current Operating System: Linux lenovo-laptop 4.12.8-2-ARCH #1 SMP PREEMPT Fri Aug 18 14:08:02 UTC 2017 x86_64
Kernel command line: BOOT_IMAGE=/boot/vmlinuz-linux root=UUID=8efaeb16-67b6-4063-a130-7e1a10cb0d2f rw quiet
Build Date: 13 August 2017  09:37:50PM

Current version of pixman: 0.34.0
        Before reporting problems, check http://wiki.x.org
        to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
        (++) from command line, (!!) notice, (II) informational,
        (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.1.log", Time: Thu Sep  7 09:00:01 2017
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Name Lost. Is Another notification daemon running?
[libi3] ../../i3-4.13/libi3/font.c Using Pango font monospace, size 8
[libi3] ../../i3-4.13/libi3/font.c X11 root window dictates 96.094581 DPI
i3status: trying to auto-detect output_format setting
i3status: auto-detected "i3bar"
(II) AIGLX: Suspending AIGLX clients for VT switch

当我在设置中将 shell 设置为 bash 时,它可以正常工作。 如何让终端正常运行?

【问题讨论】:

    标签: intellij-idea pycharm zsh xorg


    【解决方案1】:

    转到文件 -> 设置 -> 工具 -> 终端并取消选中“Shell 集成”复选框,然后单击确定。终端应该正常运行。

    这正在发生,因为当检查“shell集成”时,Pycharm(和Intellij想法)来源,位于Pycharm分发的插件下的终端文件夹中的。

    来自https://www.jetbrains.com/help/pycharm/terminal.html:

    外壳集成:

    如果选择此选项,终端首先加载 一个自定义的 rc 配置文件(位于插件下的终端文件夹中 PyCharm 发行版),它提供了一个额外的设置,然后 用户的 rc 文件。请注意,目前 shell 集成适用于 Bash/sh (bashrc)、zsh(zshrc) 和鱼壳 (config.fish)。

    另一种解决方案是在/opt/pycharm-professional/plugins/terminal/.zshrc 中注释掉这段代码:

    if [ -n $LOGIN_SHELL ]; then
      if [ -f "$DOTDIR/.zlogin" ]; then
           source "$DOTDIR/.zlogin"
      fi
    fi
    

    【讨论】:

      猜你喜欢
      • 2017-07-09
      • 2019-01-04
      • 2022-07-20
      • 2016-02-14
      • 2021-12-24
      • 2022-06-17
      • 1970-01-01
      • 2021-04-01
      • 2016-11-14
      相关资源
      最近更新 更多