如何让Xfce终端启动时运行命令?

Gal*_*axy 5 xfce4-terminal

我希望 Xfce 终端在打开时运行命令,例如打印欢迎消息或一些系统统计信息。我希望此消息仅在 Xfce 终端仿真器启动时打印在它上,而不是在其他一些终端仿真器上打印。通过修改文件可以达到这样的效果吗terminalrc?如何?

Gal*_*axy 0

我找到了解决方案。我将此代码添加到.bashrc文件中。

if [ $COLORTERM == "xfce4-terminal" ]
then
   echo "Welcome to the Xfce4 Terminal"
fi
Run Code Online (Sandbox Code Playgroud)