本文介绍了prevent Gnome终端从退出后执行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你如何从给定的命令后退出prevent GNOME终端已经退出?
How do you prevent gnome-terminal from exiting after its given command has exited?
我打电话的gnome-终端从一个cronjob,以创造对用户终端进行访问。终端最初给出了具体的程序来运行。例如。
I'm calling gnome-terminal from a cronjob, in order to create a terminal accessible to the user. The terminal is initially given a specific program to run. e.g.
gnome-terminal --tab -e "/usr/bin/myprog"
这工作得很好,除了当MYPROG退出,所以没有GNOME终端。我如何保持运行,只是回落到一个终端提示?
This works fine, except that when "myprog" exits, so does the gnome-terminal. How do I keep it running, but just drop back to a terminal prompt?
推荐答案
试试这个:
gnome-terminal --tab -e "/bin/bash -c '/usr/bin/myprog; exec /bin/bash -i'"
这篇关于prevent Gnome终端从退出后执行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!