小编pie*_*ito的帖子

如何仅在 X 会话的第一个 shell 启动时启动命令?

我在 Pop-OS 上运行 Gnome!20.04。

我正在使用terminatorzsh外壳。我只想fortune在第一次在 X 会话中使用 zsh shell 时启动。

我在以下方面尝试过这些事情.zshrc

### count the lines of
ps -ax | grep zsh
ps -ax | grep /zsh

###
[ -z "$(pidof zsh)" ] && fortune
Run Code Online (Sandbox Code Playgroud)

PS:我很难为这个问题找到合适的标签

zsh x11 session

4
推荐指数
1
解决办法
54
查看次数

标签 统计

session ×1

x11 ×1

zsh ×1