如何在Ubuntu中的终端中自动运行应用程序?

时间:2008-08-30 11:53:02

标签: bash ubuntu gnome autorun

我在各种USB设备上创建了一些autorun脚本文件,这些脚本在安装时运行bash脚本。这些脚本“在后台运行”,如何让它们在终端窗口中运行? (就像“终端中的应用程序”gnome Launcher类型一样。)

2 个答案:

答案 0 :(得分:5)

将它们作为两个阶段的过程运行,使用“自动运行”脚本在新终端中调用第二个脚本,例如

gnome-terminal -e top --title Testing

将在新的gnome终端窗口中运行程序“top”,标题为“Testing”您可以添加其他参数,例如设置几何图形以确定窗口的大小和位置,结帐 gnome-的手册页终端和“X”手册页了解更多详情

答案 1 :(得分:1)

xterm -e shellscript.sh

或(如果未安装xterm

gnome-terminal -e shellscript.sh

或(如果您使用的是kubuntu / kde)

konsole -e shellscript.sh