我已经安装了PyCharm Community Edition 2017.2.1和Arch Linux with 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时,它正常工作。 如何让终端正常运行?
答案 0 :(得分:0)
转到文件 - >设置 - >工具 - >终端并取消选中“Shell集成”复选框,然后单击“确定”。终端应该正常运行。
这种情况正在发生,因为当检查“Shell集成”时,PyCharm(和IntelliJ IDEA)会在PyCharm发行版的插件下找到位于终端文件夹中的.zshrc文件。
来自https://www.jetbrains.com/help/pycharm/terminal.html:
Shell集成:
如果选择此选项,则首先加载终端 自定义rc配置文件(位于插件下的终端文件夹中) PyCharm发行版)提供了额外的设置,然后 用户的rc文件。请注意,目前的shell集成适用于 Bash / sh(bashrc),zsh(zshrc)和fish shell(config.fish)。
另一种解决方案是在/opt/pycharm-professional/plugins/terminal/.zshrc
中注释掉这段代码:
if [ -n $LOGIN_SHELL ]; then
if [ -f "$DOTDIR/.zlogin" ]; then
source "$DOTDIR/.zlogin"
fi
fi