使用命令行在gnome-terminal中打开一个新选项卡 [英] Open a new tab in gnome-terminal using command line
问题描述
写入时
gnome-terminal --tab
,我希望它在同一个终端窗口中打开一个新的标签页。但它打开了一个新的窗口。
我发现它的意图是在新窗口中打开一个新标签页,即如果我写
gnome-terminal --tab --tab
它会打开一个带有两个标签的新窗口。
所以,问题是,如何打开一个新标签在 gnome-terminal
?
使用Ubuntu 9.04 x64。
#!/ bin / sh
WID = $(xprop -root | grep_NET_ACTIVE_WINDOW(WINDOW)| awk'{print $ 5}')
xdotool windowfocus $ WID
xdotool键ctrl + shift + t
wmctrl -i -a $ WID
这将自动确定相应的终端并相应地打开标签。 / p>
When I write
gnome-terminal --tab
at the terminal, I expect it to open a new tab in the same terminal window. But it opens a new window instead.
I found out that its intention is to open a new tab in a new window, i.e., if I write
gnome-terminal --tab --tab
it will open a new window with two tabs.
So, the question is, how can I open a new tab in the current window using a command in gnome-terminal
?
I'm using Ubuntu 9.04 x64.
#!/bin/sh
WID=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)"| awk '{print $5}')
xdotool windowfocus $WID
xdotool key ctrl+shift+t
wmctrl -i -a $WID
This will auto determine the corresponding terminal and opens the tab accordingly.
这篇关于使用命令行在gnome-terminal中打开一个新选项卡的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!