Content-type: text/html Manpage of WEBPIC

WEBPIC

Section: LCFG (8)
Updated: 10/02/15 15:33:32
Index man2html
 

NAME

webpic - The LCFG webpic component  

DESCRIPTION

The webpic component is designed to configure a login 'greeter' image by filling a source HTML template and rendering it into an image using the PhantomJS scriptable browser.  

CAUTION

Please exercise caution in the use of this component - its resources can be directed to feed data directly from the Internet, presenting a unique vector for content to be passed to the renderer as root. Implementors should still make sure to use only trusted (root file system or verified https) sources; a denial of service by resource exhaustion would be trivial to achieve.

Future versions will drop privileges but the advice remains.  

RESOURCES

 

Operational resources

The resources in this section control how the final image is rendered; its content is controlled with resources in the next section.
rasterize_bin
The path to the rasterizer script. Typically this is the one provided by this component, which calls on PhantomJS to perform the rendering. In theory however any transformative script could be used here.
rasterize_args
The arguments to send to the rasterizer script. It is not recommended to alter this value unless you are using an alternative rasterize script.
src_tmpl
The source template. Typically this would be the one provided by the component, and is provided mainly for reference. If this resource is empty the component will, sensibly enough, not attempt to transform it.
html_tmpl
The intermediate template produced by "sxprof" from the source template. The file referred to by this resource is passed to the rasterize script.
image_file
The final location of the output image (or arbitrary file if "rasterize_bin" is overridden). This should be passed to downstream components such a "lightdm.greeterbg"
width
An integer number of pixels representing the width of the output image.

It is expected that monitor headers might define this and "height". If not, the image will default to 1024x768. Depending on the mechanism used to finally display the image (e.g. lightdm) crop / stretch behaviour may vary, particularly if the aspect ratio does not match.

Remember, these values are irrespective of the size of the input background image.

height
An integer number of pixels representing the height of the output image. See "width" for comments on sizing.
getres_bin
A commandline invoked to get the current screen resolution, in preference to the resolution defined by "width" and "height". This script should return X and Y coordinates in the form ``<x> <y>\n''. See dice-getres for an example.
getres_args
The arguments to send to the "getres" script.
getres_env
The environment to set before running the "getres" script. This is usually important as a component won't typically be able to access the X display without the DISPLAY and XAUTHORITY variables set.
 

Template configuration

These resources control the interpolation of the template values and content of the generated image.
fgcolour
The foreground (text) colour presented to the user. This can be overridden in textual resources using standard HTML. Any colour rendered by CSS is acceptable, if not attractive. Defaults to University Blue.
bgcolour
The base background colour, to be used in the absence of a background image, or if the background image doesn't stretch to fit. Any colour rendered by CSS is acceptable. Also defaults to University Blue.
boxcolour
Text is rendered in semi-opaque boxes which overlay the background. Any colour rendered by CSS is accaptable. These are ``nearly white'' by default.
bgimg_uri
This resource controls the background image of the template. Any url() resource accepted by CSS can be used; I'd anticipate this to be a file:/// URL in most deployments.
css_uri
If you would like to completely alter the appearance of the HTML template you can do so with an arbitrary CSS file, which can be located wherever you please. Any HREF attribute value, including file:///, is acceptable.
head
The primary header text, rendered in large type.
head_sub
The sub-header text, rendered in smaller type directly above the header. This can be altered if desired by overriding the source template (or CSS, if you're clever).
logo_uri
The path to a logo image, presented in the top-right of the image. Any url() resource accepted by CSS can be used; I'd anticipate this to be a file:/// URL in most deployments.
foot1, foot2, foot3
Three lines of footer text. Wrapping behaviour of each line is undefined.
 

METHODS

This component has no new methods, and performs all of its templating within configure. It does its best not to write an empty or corrupt file, and will attempt to "Fail" if it detects one.  

SEE ALSO

PhantomJS
http://phantomjs.org
lcfg-lightdm
Suggested usage is in setting a PNG background image using the "lightdm.greeterbg" resource.
dice-getres
Package which provides the "getres" script to provide the current screen resolution.
 

PLATFORMS

SL6, EL7  

AUTHOR

``Graham Dutton'' <gdutton at inf.ed.ac.uk>  

LICENSE

This software is distributed under the GPLv2 license.


 

Index

NAME
DESCRIPTION
CAUTION
RESOURCES
Operational resources
Template configuration
METHODS
SEE ALSO
PLATFORMS
AUTHOR
LICENSE

This document was created by man2html, using the manual pages.
Time: 12:06:20 GMT, February 24, 2015