
たとえば、北西の0.0でgnome-terminalを起動し、ウィンドウを736×434ピクセル(明らかにデフォルトは80文字×24文字の端末ウィンドウを許可する)に設定するとします。
これがどれほど重要かはわかりませんが、Ubuntu 11.04とGNOME 3を使用しています。
答え1
私はgnome-terminalについて具体的にはわかりませんが、次のように特定の列と行サイズに標準のxtermを配置できます。
xterm -geometry 80x24+50+100
これは北西のラインが(50、100)の80列、24行xtermです。 X11の座標は(x,y)で、画面の左上は(0,0)で、右と下に行くほど座標が大きくなるようです。
答え2
ターミナルウィンドウのそれ以上を制御するには、他のwmctrl
コマンドラインツールを使用してX
通常のX GUIウィンドウの配置などをスクリプトで作成できますが、開始位置この問題はというアプリケーションによって合理的に解決されましたdevilspie
。 Ubuntuストアにあります。
This tool will find windows as they are created and perform actions
on them, such as resizing, moving to another workspace, or pinning
them to all workspaces.
答え3
wmctrlを使用してすべてのウィンドウを制御できます。スクリプトは複数のmtrウィンドウを開き、一意の名前を付けて画面に配置します。
#!/bin/bash
OPTS='--gtk --interval=30'
function place_mtr
{
host=$1
name=mtr_$1
xpos=$2
ypos=$3
xsize=$4
ysize=$5
mtr $OPTS $host &
sleep 1
wmctrl -r "My traceroute" -N "$name"
wmctrl -r "$name" -e 0,$xpos,$ypos,$xsize,$ysize
}
place_mtr www.debian.org 0 0 710 150
place_mtr www.ubuntu.com 0 203 710 150
place_mtr www.kernel.org 0 390 710 150
place_mtr www.yahoo.com 770 0 710 150
place_mtr www.facebook.com 770 203 710 150
place_mtr www.google.com 770 390 710 150