display:weston.ini文件配置

http://manpages.org/westonini/5

INTRODUCTION

Weston obtains configuration from its command line parameters and the configuration file described here.

weston有两种方式获取参数,一是启动weston命令时添加对应参数,具体可通过weston -h查看;另一个是启动过程中,通过读取weston.ini获取对应参数设置。

DESCRIPTION

Weston使用名为weston.ini的配置文件进行设置。当服务器启动,该weston.ini配置文件在以下位置之一搜索,

$XDG_CONFIG_HOME/weston.ini   (if $XDG_CONFIG_HOME is set)
$HOME/.config/weston.ini      (if $HOME is set)
weston/weston.ini in each
    $XDG_CONFIG_DIR           (if $XDG_CONFIG_DIRS is set)
/etc/xdg/weston/weston.ini    (if $XDG_CONFIG_DIRS is not set)
<current dir>/weston.ini      (if no variables were set)

其中环境变量$ HOME是用户的主目录,$ XDG_CONFIG_HOME是用户特定的配置目录,而$ XDG_CONFIG_DIRS是用冒号':'分隔的配置基础目录,例如/ etc / xdg-foo:/ etc / xdg

weston.ini文件由多个部分,其可存在于任何顺序的,或者省略,以使用缺省配置值。每个部分具有以下形式

[SectionHeader]
Key1=Value1
Key2=Value2
    ...

注释行将被忽略:

#comment

The section headers are:

core           The core modules and options
libinput       Input device configuration
shell          Desktop customization
launcher       Add launcher to the panel
output         Output configuration
input-method   Onscreen keyboard input
keyboard       Keyboard layouts
terminal       Terminal application options
xwayland       XWayland options
screen-share   Screen sharing options

可能的值类型为字符串,带符号和无符号的32位整数以及布尔值。字符串不能加引号,不支持任何转义序列,并且一直运行到行尾。整数可以十进制(例如123),八进制(例如0173)和十六进制(例如0x7b)的形式给出。布尔值只能是“ true”或“ false”。

一般的,weston.ini的存放位置可以是上述几处。weston.ini配置参数写法也比较容易。

CORE SECTION

The core section is used to select the startup compositor modules and general options.

关于shell的选取,一般来说多为desktop模式,故设置desktop-shell居多,当然也有如ivi-shell,fullscreen-shell可供选择

shell=desktop-shell.so

specifies a shell to load (string). This can be used to load your own implemented shell or one with Weston as default. Available shells in the /usr/lib/x86_64-linux-gnu/weston directory are:

desktop-shell.so

modules=xwayland.so,cms-colord.so

specifies the modules to load (string). Available modules in the /usr/lib/x86_64-linux-gnu/weston directory are:

xwayland.so
cms-colord.so
screen-share.so

backend=headless-backend.so

overrides defaults backend. Available backend modules in the /usr/lib/x86_64-linux-gnu/weston directory are:

drm-backend.so
fbdev-backend.so
headless-backend.so
rdp-backend.so
rpi-backend.so
wayland-backend.so
x11-backend.so

repaint-window=N

设置重新绘制窗口的近似长度(以毫秒为单位)。重绘窗口用于控制和减少客户端的输出延迟。如果窗口长于输出刷新周期,则上一次重新绘制完成后,将立即进行下一次重新绘制,而不在其间处理客户端请求。如果重绘窗口太短,则合成器可能会错过目标垂直空白,从而增加输出延迟。默认值为7毫秒。允许的范围是-10到1000毫秒。使用负值将迫使合成器始终错过目标vblank。

询问同事得到的理解:

我理解是用延时增加composition的时间间隔,从而让client有更多时间绘制

如果client来不及绘制但server已经要合成了,就会造成空的commit,导致掉帧

client绘画和serverrepaint没关系,这个应该就是预估的repanit事件。但是这个值是人为给出的,和真正的repaint时间其实并无关联

repaint-window=N + msec_rel[weston在weston_output_fisinsh_frame计算出的时间,指示的是间隔多少ms以后调用timer_dispatch] =16ms 大概是这个样子。

gbm-format=format

sets the GBM format used for the framebuffer for the GBM backend. Can be xrgb8888, xrgb2101010, rgb565. By default, xrgb8888 is used.

默认的显示gbm格式,xrgb8888

idle-time=seconds

sets Weston's idle timeout in seconds. This idle timeout is the time after which Weston will enter an "inactive" mode and screen will fade to black. A value of 0 disables the timeout.

Important : This option may also be set via Weston's '-i' command line option and will take precedence over the current .ini option. This means that if both weston.ini and command line define this idle-timeout time, the one specified in the command-line will be used. On the other hand, if none of these sets the value, default idle timeout will be set to 300 seconds.

默认的熄屏时间,300s

 

LIBINPUT SECTION

The libinput section is used to configure input devices when using the libinput input device backend.

Available configuration are:

enable_tap=true

enables tap to click on touchpad devices

 

 

SHELL SECTION

The shell section is used to customize the compositor. Some keys may not be handled by different shell plugins.

The entries that can appear in this section are:

client=file

sets the path for the shell client to run. If not specified weston-desktop-shell is launched (string).

background-image=file

sets the path for the background image file (string).

background-type=tile

determines how the background image is drawn (string). Can be scale, scale-crop or tile (default). Scale means scaled to fit the output precisely, not preserving aspect ratio. Scale-crop preserves aspect ratio, scales the background image just big enough to cover the output, and centers it. The image ends up cropped from left and right, or top and bottom, if the aspect ratio does not match the output. Tile repeats the background image to fill the output.

background-color=0xAARRGGBB

sets the color of the background (unsigned integer). The hexadecimal digit pairs are in order alpha, red, green, and blue.

clock-format=format

sets the panel clock format (string). Can be none, minutes, seconds. By default, minutes format is used.

panel-color=0xAARRGGBB

sets the color of the panel (unsigned integer). The hexadecimal digit pairs are in order transparency, red, green, and blue. Examples:

 

0xffff0000    Red
0xff00ff00    Green
0xff0000ff    Blue
0x00ffffff    Fully transparent

panel-location=top

sets the location of the panel (string). Can be top, none.

locking=true

enables screen locking (boolean).

animation=zoom

sets the effect used for opening new windows (string). Can be zoom, fade, none. By default, no animation is used.

close-animation=fade

sets the effect used when closing windows (string). Can be fade, none. By default, the fade animation is used.

startup-animation=fade

sets the effect used for opening new windows (string). Can be fade, none. By default, the fade animation is used.

focus-animation=dim-layer

sets the effect used with the focused and unfocused windows. Can be dim-layer, none. By default, no animation is used.

allow-zap=true

whether the shell should quit when the Ctrl-Alt-Backspace key combination is pressed

binding-modifier=ctrl

sets the modifier key used for common bindings (string), such as moving surfaces, resizing, rotating, switching, closing and setting the transparency for windows, controlling the backlight and zooming the desktop. Possible values: none, ctrl, alt, super (default)

num-workspaces=6

defines the number of workspaces (unsigned integer). The user can switch workspaces by using the binding+F1, F2 keys. If this key is not set, fall back to one workspace.

cursor-theme=theme

sets the cursor theme (string).

cursor-size=24

sets the cursor size (unsigned integer).

lockscreen-icon=path

sets the path to lock screen icon image (string). (tablet shell only)

lockscreen=path

sets the path to lock screen background image (string). (tablet shell only)

homescreen=path

sets the path to home screen background image (string). (tablet shell only)

LAUNCHER SECTION

There can be multiple launcher sections, one for each launcher.

icon=icon

sets the path to icon image (string). Svg images are not currently supported.

path=program

sets the path to the program that is run by clicking on this launcher (string). It is possible to pass arguments and environment variables to the program. For example:

path=GDK_BACKEND=wayland gnome-terminal --full-screen

 

OUTPUT SECTION

There can be multiple output sections, each corresponding to one output. It is currently only recognized by the drm and x11 backends.

name=name

sets a name for the output (string). The backend uses the name to identify the output. All X11 output names start with a letter X. All Wayland output names start with the letters WL. The available output names for DRM backend are listed in the weston-launch(1) output. Examples of usage:

 

LVDS1    DRM backend, Laptop internal panel no.1
VGA1     DRM backend, VGA connector no.1
X1       X11 backend, X window no.1
WL1      Wayland backend, Wayland window no.1

See weston-drm(7) for more details.

mode=mode

sets the output mode (string). The mode parameter is handled differently depending on the backend. On the X11 backend, it just sets the WIDTHxHEIGHT of the weston window. The DRM backend accepts different modes:

 

WIDTHxHEIGHT    Resolution size width and height in pixels
preferred       Uses the preferred mode
current         Uses the current crt controller mode
off             Disables the output

Optionally, an user may specify a modeline, such as:

 

173.00  1920 2048 2248 2576  1080 1083 1088 1120 -hsync +vsync

It consists of the refresh rate in Hz, horizontal and vertical resolution, options for horizontal and vertical synchronisation. The program cvt(1) can provide suitable modeline string.

transform=normal

The transformation applied to screen output (string). The transform key can be one of the following 8 strings:

 

normal        Normal output.
90            90 degrees clockwise.
180           Upside down.
270           90 degrees counter clockwise.
flipped       Horizontally flipped
flipped-90    Flipped and 90 degrees clockwise
flipped-180   Flipped upside down
flipped-270   Flipped and 90 degrees counter clockwise

scale=factor

The scaling multiplier applied to the entire output, in support of high resolution ("HiDPI" or "retina") displays, that roughly corresponds to the pixel ratio of the display's physical resolution to the logical resolution. Applications that do not support high resolution displays typically appear tiny and unreadable. Weston will scale the output of such applications by this multiplier, to make them readable. Applications that do support their own output scaling can draw their content in high resolution, in which case they avoid compositor scaling. Weston will not scale the output of such applications, and they are not affected by this multiplier.

An integer, 1 by default, typically configured as 2 or higher when needed, denoting the scaling multiplier for the output.

seat=name

The logical seat name that that this output should be associated with. If this is set then the seat's input will be confined to the output that has the seat set on it. The expectation is that this functionality will be used in a multiheaded environment with a single compositor for multiple output and input configurations. The default seat is called "default" and will always be present. This seat can be constrained like any other.

INPUT-METHOD SECTION

path=/usr/libexec/weston-keyboard

sets the path of the on screen keyboard input method (string).

KEYBOARD SECTION

This section contains the following keys:

keymap_rules=evdev

sets the keymap rules file (string). Used to map layout and model to input device.

keymap_model=pc105

sets the keymap model (string). See the Models section in xkeyboard-config(7).

keymap_layout=us,de,gb

sets the comma separated list of keyboard layout codes (string). See the Layouts section in xkeyboard-config(7).

keymap_variant=euro,,intl

sets the comma separated list of keyboard layout variants (string). The number of variants must be the same as the number of layouts above. See the Layouts section in xkeyboard-config(7).

keymap_options=grp:alt_shift_toggle,grp_led:scroll

sets the keymap options (string). See the Options section in xkeyboard-config(7).

repeat-rate=40

sets the rate of repeating keys in characters per second (unsigned integer)

repeat-delay=400

sets the delay in milliseconds since key down until repeating starts (unsigned integer)

numlock-on=false

sets the default state of the numlock on weston startup for the backends which support it.

vt-switching=true

Whether to allow the use of Ctrl+Alt+Fn key combinations to switch away from the compositor's virtual console.

TERMINAL SECTION

Contains settings for the weston terminal application (weston-terminal). It allows to customize the font and shell of the command line interface.

font=DejaVu Sans Mono

sets the font of the terminal (string). For a good experience it is recommended to use monospace fonts. In case the font is not found, the default one is used.

font-size=14

sets the size of the terminal font (unsigned integer).

term=xterm-256color

The terminal shell (string). Sets the $TERM variable.

XWAYLAND SECTION

path=/usr/bin/Xwayland

sets the path to the xserver to run (string).

SCREEN-SHARE SECTION

command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize

sets the command to start a fullscreen-shell server for screen sharing (string).

 

http://manpages.org/westonini/5

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值