/etc/X11/xinit/xinitrc的3条内容求指点

sh/bash/dash/ksh/zsh等Shell脚本
回复
糊涂的小强
帖子: 71
注册时间: 2014-04-28 14:33
系统: ubuntu12&centos6

/etc/X11/xinit/xinitrc的3条内容求指点

#1

帖子 糊涂的小强 » 2014-05-15 14:45

下面执行这3个操作是干什么用的,主要是看不懂后面跟的参数代表什么意思
[ -x /usr/bin/xsetroot ] && /usr/bin/xsetroot -solid '#222E45'
[ -x /usr/bin/xclock ] && /usr/bin/xclock -geometry 100x100-5+5 &
[ -x /usr/bin/xterm ] && xterm -geometry 80x50-50+150 &
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: /etc/X11/xinit/xinitrc的3条内容求指点

#2

帖子 astolia » 2014-05-15 19:55

还没学会看man?

代码: 全选

man xsetroot
-solid color
This sets the background of the root window to the specified
color. This option is only useful on color servers.

代码: 全选

man xterm
-geometry geometry
This option specifies the preferred size and position of the
VT102 window; see X(7).

代码: 全选

man 7 X
GEOMETRY SPECIFICATIONS

One of the advantages of using window systems instead of hardwired
terminals is that applications don't have to be restricted to a
particular size or location on the screen. Although the layout of
windows on a display is controlled by the window manager that the user
is running (described below), most X programs accept a command line
argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH,
HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and
location for this application's main window.

The WIDTH and HEIGHT parts of the geometry specification are usually
measured in either pixels or characters, depending on the application.
The XOFF and YOFF parts are measured in pixels and are used to specify
the distance of the window from the left or right and top and bottom
edges of the screen, respectively. Both types of offsets are measured
from the indicated edge of the screen to the corresponding edge of the
window. The X offset may be specified in the following ways:

+XOFF The left edge of the window is to be placed XOFF pixels in from
the left edge of the screen (i.e., the X coordinate of the
window's origin will be XOFF). XOFF may be negative, in which
case the window's left edge will be off the screen.

-XOFF The right edge of the window is to be placed XOFF pixels in
from the right edge of the screen. XOFF may be negative, in
which case the window's right edge will be off the screen.

The Y offset has similar meanings:

+YOFF The top edge of the window is to be YOFF pixels below the top
edge of the screen (i.e., the Y coordinate of the window's
origin will be YOFF). YOFF may be negative, in which case the
window's top edge will be off the screen.

-YOFF The bottom edge of the window is to be YOFF pixels above the
bottom edge of the screen. YOFF may be negative, in which case
the window's bottom edge will be off the screen.

Offsets must be given as pairs; in other words, in order to specify
either XOFF or YOFF both must be present. Windows can be placed in the
four corners of the screen using the following specifications:

+0+0 upper left hand corner.

-0+0 upper right hand corner.

-0-0 lower right hand corner.

+0-0 lower left hand corner.

In the following examples, a terminal emulator is placed in roughly the
center of the screen and a load average monitor, mailbox, and clock are
placed in the upper right hand corner:

xterm -fn 6x10 -geometry 80x24+30+200 &
xclock -geometry 48x48-0+0 &
xload -geometry 48x48-96+0 &
xbiff -geometry 48x48-48+0 &
糊涂的小强
帖子: 71
注册时间: 2014-04-28 14:33
系统: ubuntu12&centos6

Re: /etc/X11/xinit/xinitrc的3条内容求指点

#3

帖子 糊涂的小强 » 2014-05-15 22:11

astolia 写了:还没学会看man?

代码: 全选

man xsetroot
-solid color
This sets the background of the root window to the specified
color. This option is only useful on color servers.

代码: 全选

man xterm
-geometry geometry
This option specifies the preferred size and position of the
VT102 window; see X(7).

代码: 全选

man 7 X
GEOMETRY SPECIFICATIONS

One of the advantages of using window systems instead of hardwired
terminals is that applications don't have to be restricted to a
particular size or location on the screen. Although the layout of
windows on a display is controlled by the window manager that the user
is running (described below), most X programs accept a command line
argument of the form -geometry WIDTHxHEIGHT+XOFF+YOFF (where WIDTH,
HEIGHT, XOFF, and YOFF are numbers) for specifying a preferred size and
location for this application's main window.

The WIDTH and HEIGHT parts of the geometry specification are usually
measured in either pixels or characters, depending on the application.
The XOFF and YOFF parts are measured in pixels and are used to specify
the distance of the window from the left or right and top and bottom
edges of the screen, respectively. Both types of offsets are measured
from the indicated edge of the screen to the corresponding edge of the
window. The X offset may be specified in the following ways:

+XOFF The left edge of the window is to be placed XOFF pixels in from
the left edge of the screen (i.e., the X coordinate of the
window's origin will be XOFF). XOFF may be negative, in which
case the window's left edge will be off the screen.

-XOFF The right edge of the window is to be placed XOFF pixels in
from the right edge of the screen. XOFF may be negative, in
which case the window's right edge will be off the screen.

The Y offset has similar meanings:

+YOFF The top edge of the window is to be YOFF pixels below the top
edge of the screen (i.e., the Y coordinate of the window's
origin will be YOFF). YOFF may be negative, in which case the
window's top edge will be off the screen.

-YOFF The bottom edge of the window is to be YOFF pixels above the
bottom edge of the screen. YOFF may be negative, in which case
the window's bottom edge will be off the screen.

Offsets must be given as pairs; in other words, in order to specify
either XOFF or YOFF both must be present. Windows can be placed in the
four corners of the screen using the following specifications:

+0+0 upper left hand corner.

-0+0 upper right hand corner.

-0-0 lower right hand corner.

+0-0 lower left hand corner.

In the following examples, a terminal emulator is placed in roughly the
center of the screen and a load average monitor, mailbox, and clock are
placed in the upper right hand corner:

xterm -fn 6x10 -geometry 80x24+30+200 &
xclock -geometry 48x48-0+0 &
xload -geometry 48x48-96+0 &
xbiff -geometry 48x48-48+0 &
额 现在好像没有去man的意识,另外我的centos6.5 man xclock和xterm 都提示No manual entry for xterm或xclock
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: /etc/X11/xinit/xinitrc的3条内容求指点

#4

帖子 astolia » 2014-05-15 23:00

要么是没装软件包,要么是没装文档包。
可以直接查网页版: http://manpages.ubuntu.com/ http://www.linuxmanpages.com/ 等等
糊涂的小强
帖子: 71
注册时间: 2014-04-28 14:33
系统: ubuntu12&centos6

Re: /etc/X11/xinit/xinitrc的3条内容求指点

#5

帖子 糊涂的小强 » 2014-05-16 10:19

astolia 写了:要么是没装软件包,要么是没装文档包。
可以直接查网页版: http://manpages.ubuntu.com/ http://www.linuxmanpages.com/ 等等
厉害 :em11
回复