Ubuntu设置终端的默认窗口大小和位置坐标【OK】

(一)原理

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

  • 1
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值