在屏幕中,您可以按ctrl+a c
在同一屏幕会话中创建新终端。现在我必须自动执行此活动并从我的bash脚本执行相同的操作:
dbus-launch screen
finch
ctrl+a c <--------- HOW TO CHANGE THAT LINE?
python myscript
任何提示?
答案 0 :(得分:0)
screen -S <session> -X screen <command to run in the new window>
首次创建屏幕会话时,您应该添加会话标记。
示例:
# Create screen session named myscreen and detach.
dbus-launch screen -S myscreen -d -m
# Do something
# ...
# Create a new screen window and launch python on it.
screen -S myscreen -X screen python -v