(一)原理:
Ubuntu下的启动终端窗口的命令为:gnome-terminal,可以通过--geometry 参数用来修改启动的行列数与窗口坐标:
$ gnome-terminal --help-window-option
Usage:
gnome-terminal [OPTION...]
Window options; if used before the first --window or --tab argument, sets the default for all windows:
--show-menubar Turn on the menubar
--hide-menubar Turn off the menubar
--maximize Maximise the window
--full-screen Full-screen the window
--geometry=GEOMETRY Set the window size; for example: 80x24, or 80x24+200+200 (ROWSxCOLS+X+Y)
--role=ROLE Set the window role
--active Set the last specified tab as the active one in its window
(二)修改步骤:
1. 打开一个终端窗口,将它的位置和大小调整到你希望它启动时默认的位置;
2. 执行命令:xwininfo,记下输出的最后一行;
3. 执行命令:gconf-editor,打开gnome配置编辑器, 找到如下键:
/desktop/gnome/applications/terminal/exec
并修改该项的值为:
gnome-terminal --geometry 120x30+154+70
说明:
90: 宽度
46: 高度
154:横坐标
70: 纵坐标
或者下面的简单的方法
1、打开一个终端,把它调整到自己想要的大小和位置
2、在终端内执行xwininfo,此时鼠标变成十字,等待你用鼠标点击终端窗口,点击终端窗口后就会出现终端窗口的信息,注意最后一行,比如:-geometry 76x11-33-24
3、System - Preferences - keyboard Shortcuts,点击Add按钮,Name:"打开一个终端(自定义)",Command:
gnome-terminal --geometry=76x11-33-24 --working-directory=~
注意--geometry=76x11-33-24的值就是通过第2步获得的
4、给这个自定义的command设置快捷键,比如ctrl+alt+T