gpt4 book ai didi

startup - 如何在 xterm 启动时运行命令?

转载 作者:行者123 更新时间:2023-12-01 03:40:46 29 4
gpt4 key购买 nike

如何在 xterm 启动时运行命令,即当 xterm 终端启动时命令已经执行?

我编辑了 .bashrc 文件以添加这一行:

xterm "ls"

但这不起作用。

请建议我该怎么做才能实现这一目标。

谢谢。

最佳答案

我用这个:

-e /bin/bash -login

-e command [arguments]

Run the command with its command-line arguments in the rxvt window; also sets the window title and icon name to be the basename of the program being executed if neither -title (-T) nor -n are given on the command line. If this option is used, it must be the last on the command-line. If there is no -e option then the default is to run the program specified by the SHELL environment variable or, failing that, sh(1).



http://linux.die.net/man/1/rxvt

关于startup - 如何在 xterm 启动时运行命令?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31088981/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com