|author||Dominik Behr <firstname.lastname@example.org>||Mon Sep 18 19:24:16 2017|
|committer||chrome-bot <email@example.com>||Sat Oct 07 23:58:03 2017|
frecon: do not exit if splash screen fails in daemon mode Do not exit if splash screen fails in daemon mode, so the user could switch to developer console when this happens. BUG=none TEST=none Change-Id: I9f9ec96c54afb04d352763b91454a0f85cb641bb Signed-off-by: Dominik Behr <firstname.lastname@example.org> Reviewed-on: https://chromium-review.googlesource.com/671607 Reviewed-by: Mike Frysinger <email@example.com>
This is a terminal emulator that replaces the kernel Virtual Terminal (VT) console. It uses the Kernel Mode Setting (KMS) support in the kernel. It is similar to the kmscon project: https://www.freedesktop.org/wiki/Software/kmscon
A new project was created (rather than re-using kmscon) because:
However, it‘s not as bad as it sounds! We haven’t re-implemented our own terminal emulator -- we use the same library that kmscon does: libtsm. That's the much more tricky part too.
For even more details, check out the design doc in this repo.
--clear=colorSpecify clear color for splash screen terminal. The color is 32-bit integer in a framebuffer format (ARGB) in any format supported by strtoul.
--enable-gfxEnable image and box drawing OSC escape codes.
--enable-vtsEnable additional terminals in addition to splash screen.
--enable-vt1Enable switching to VT1 (aka splash screen) and keep a terminal on it after finishing splash animation.
--frame-interval=NSpecify default time (in milliseconds) between frames of splash screen animation.
--loop-start=NSpecify frame to start splash animation loop. This option also enables the animation loop.
--loop-count=NSpecify number of splash animation loop repetitions. Default of 0 repeats forever. Looping has to be enabled using
--loop-interval=NSpecify default time (in milliseconds) between frames of loop animation.
--loop-offset=x,ySpecify default offset to centered image in loop.
--no-loginWhen additional terminals are enabled do not display login prompt on them. Can be used by scripts to display debugging information and logs on additional terminals.
--num-vts=NSpecify number of enabled VTs. The default is 4, the maximum is 12.
--offset=x,ySpecify absolute location of the splash image on screen.
--pre-create-vtsNormally VTs are create on demand the the user switches to a VT. In some cases it may be necessary to pre-create them at startup, for instance to write a log or debug output for them while they are not active so it can be examined later. This option allows for that. This option also ensures daemon parent waits for daemon child to finish initalization so consoles are created by the time daemon parent exits.
--print-resolutionPrint detected screen resolution and exit. Deprecated.
--scale=NSet default scale for splash screen images. The scale is a positive integer number. Default scale is 1. 0 has a special meaning - using scale 1 for screens with horizontal resolution lower and equal than 1920 and 2 otherwise. Scale affects image/box size and offset.
--splash-onlyExit immediately after finishing splash animation. Otherwise frecon will wait for DBUS signal (LoginScreenVisible) from Chrome before exiting when extra terminals are not enabled.
--image-hires=/path/to/image.pngor any image file name specified after options Add image to splash screen animation.
--image-hiresare added conditionally depending whether horizontal screen resolution is below or above 1920. This allows frecon to make runtime decision which set of images to use instead running frecon first with
--print-resolutionoption and making this decision in a script that invokes frecon. Free form image file name in the command line are added unconditionally.
Frecon implements rudimentary functionality to display images and draw single color boxes on the terminal screen using OSC (Operating System Command) based terminal escape codes.
The OSC sequences always start with ESC+] (
\033]) and end with either the String Terminator (ST) sequence (
\033\\) or a BEL (
Two escapes are implemented, all escape parameters can be specified in any order.
locationis the absolute location on screen.
offsetis an image offset starting with image centered on screen.
coloris a 32-bit number in the same format as
--clearcommand line argument, it defaults to
sizeis two integer numbers.
scaleis integer scaling factor applied to image size or box size.
printf "\033]image:file=/usr/share/chromeos-assets/images_100_percent/boot_splash_frame18.png\a" > /dev/pts/1 printf "\033]box:color=0xFFFFFFFF;size=100,100\a" > /dev/pts/1
An escape code can be used to enable/disable keyboard input processing on a terminal. The setting is stored per terminal and applies to input “within” terminal. Swithing between terminals, scrolling, backlight control etc remains operational.
onoffis one of: on,1,true or off,0,false
printf "\033]input:on\a" > /run/frecon/vt0 printf "\033]input:off\a" > /run/frecon/vt1
Frecon creates the following files and links in
/run/frecon/pid which contains pid for frecon daemon process (only when
--daemon is specified on command line).
for every VT it creates, a link from
%u is terminal number from 0 to num-vts - 1 so the user can determine which VT uses which pts since pts number assignment is not deterministic.