12to11

NAME
12to11 - Wayland to X protocol translator

SYNOPSIS
12to11 [-class class] [-name name] [-xrm resourcestring...]

DESCRIPTION
12to11 starts a Wayland compositor on the next available socket; Wayland programs will then be displayed through the X server.

OPTIONS
Some X Toolkit library-style command-line arguments are also accepted, despite the protocol translator being implemented without using a toolkit. These options are:

-class class
    This option specifies the resource class under which resources are to be obtained. When not set, it defaults to the string ``12to11''. The resource class and name used by the protocol translator are not set as the WM_CLASS property on windows created by the protocol translator; instead, those windows get the classes and names assigned to them by their individual Wayland clients.

-name name
    This option specifies the instance name under which resources are to be obtained. When not set, it defaults to the executable file name.

-help
    This option causes the protocol translator to print a message describing options it accepts. The protocol translator will then exit after printing the message.

-xrm resourcestring
    This option specifies a resource string to be used. This is especially useful for setting resources that do not have separate command line options.

-printsocket
    This option makes the protocol translator print the name of the Wayland socket to standard output.

RESOURCES
12to11 understands some resource names and classes that can be used to specify various settings that affect its behavior. Those resources are listed below:

ximFont (class XimFont)
    Specifies the font to be used for displaying the preedit or status areas of an input method.

    In many input methods, the preedit (a.k.a composition or preconversion) string and/or a status window is displayed on screen while typing by the input method server. The client is supposed to determine the font used by the input method server to display -- however, the Wayland protocol does not allow Wayland clients to specify that themselves, so the protocol translator has to do that by itself.

ximStyles (class XimStyles)
    Specifies the default input method styles used by the protocol translator.

    X input methods can support different editing styles, which affect how preconversion and status text is displayed while typing. These styles are named:

overTheSpot
    In ``over the spot'', the preedit string is displayed in a window created by the input method at a location specified by the Wayland client, typically the text insertion point.

offTheSpot
    In ``off the spot'', the preedit string is displayed in a window created by the input method at some location away from the text insertion point. Often, this type of window is placed at the bottom of the preedit window.

rootWindow
    In the ``root window'' editing style, the preedit string is displayed in a popup window created by the input method.

onTheSpot
    In the ``on the spot'' editing style, the preedit string is displayed inside the text itself by the Wayland client.

    Not all input methods support all editing styles. In the real world, most only support one or two of the styles listed above. The protocol translator will search for a style supported by the input method when initializing input method support. The ximStyles resource is used to control the order in which the protocol translator searches for input styles, and should be a comma separated list of input names, which are searched in left-to-right order. For example,

        overTheSpot,rootWindow

    will result in the protocol translator searching for the ``over the spot'' input style, and if that is not present, the ``root window'' style. Whitespace must not be present inside the comma-separated list. When ximStyles is not specified, it defaults to:

        overTheSpot,offTheSpot,rootWindow,onTheSpot

renderer (class Renderer)
    Specifies the rendering backend the protocol translator uses to composite the contents of Wayland surfaces onto X windows. This can either be picture (the XRender based compositor) or egl (the OpenGL ES 2.0 based compositor).

useDirectPresentation (class UseDirectPresentation)
    If ``True'' or ``true'', this resource enables the use of direct presentation on unredirected windows. This is not yet complete pending the installation of required functionality in the X server.

wmProtocols (class WmProtocols)
    Comma-separated list of window manager protocols, similar to inputStyles, that the protocol translator should enable or disable. The current (and default) list of supported protocols are: netWmPing.

idleInhibitCommand (class IdleInhibitCommand)

idleIntervalCommand (class IdleInhibitCommand)

idleDeinhibitCommand (class IdleDeinhibitCommand)
    These are commands that run when a focused Wayland client asks to inhibit the screen saver or screen locker, usually because a video is being played and does not require user interaction. idleInhibitCommand specifies a command that is run when one such client becomes focused or starts inhibiting the screen saver; idleIntervalCommand is a command that is run every several seconds (by default 60) while the screen saver is inhibited, and idleDeinhibitCommand is a command that is run once such a client stops inhibiting the screen saver or loses the input focus.

    Since there are several different screen saver inhibition protocols used by different X desktops, the protocol translator refrains from implementing any of them. Instead, it provides the ability to run any command necessary to inhibit and de-inhibit the screen saver. For example, an XScreenSaver(1) user may wish to apply the following resources:

        12to11.IdleInhibitCommand: xscreensaver-command -deactivate

    The commands specified are expected to finish. If the process corresponding to one command is still running by the time another command should have been run, the other command will be queued until the first process exits.

idleCommandInterval (class IdleCommandInterval)
    The number of seconds the protocol translator waits between invocations of the command specified in idleIntervalCommand. Defaults to 60.

additionalModifiersOfScreenNUMBER (class AdditionalModifiers)
    A comma-separated list of additional DRM modifiers that can be applied to each format. These modifiers must be specified by their names inside the `drm_fourcc.h' system header, and should be used if your X graphics driver fails to report which modifiers are available. NUMBER should be replaced with the number of the screen on which the protocol translator is running. On 9th Generation Intel systems, for example, you may want to set this to:

        12to11.AdditionalModifiers: I915_FORMAT_MOD_X_TILED,DRM_FORMAT_MOD_LINEAR

ENVIRONMENT
Several environment variables exist that modify the behavior of the protocol translator in one way or another. Most of these are used for debugging, but some may be relevant to users as well.

The USE_BUILTIN_RESIZE environment variable, if set, forces the use of the built-in drag-to-resize support provided by the protocol translator, even if the X window manager provides its own.

The DEBUG_REFRESH_PREDICTION environment variable, if set, forces the frame clock to predict the presentation deadline of the X compositing manager. This is used to debug code that is otherwise not run without subsurfaces being present.

The DISABLE_FRAME_SYNCHRONIZATION environment variable, if set, disables frame synchronization with the X compositing manager. Setting this variable is probably not a good idea.

The SYNCHRONIZE environment variable, if set, causes the X library to check for errors immediately after issuing a request. The resulting backtraces from the error handler then reflect the protocol request that actually caused the error, instead of some unpredictable request in the future.

The APPLY_STATE_WORKAROUND environment variable, if set, causes the protocol translator to handle toplevel window state changes differently. If Wayland programs do not make the transition between fullscreen and maximized states correctly, try setting this variable.

The GLOBAL_SCALE environment variable, if set to an integer, overrides the global program scale factor normally provided by the Gdk/WindowScalingFactor X setting.

The OUTPUT_SCALE environment variable, if set to an integer, overrides the output scale factor that is otherwise set to the global program scale factor. Setting this option is only useful to debug Wayland program downscaling.

The DIRECT_STATE_CHANGES variable, if set, forces ConfigureNotify events from the window manager to be handled directly, without waiting some time for a corresponding _NET_WM_STATE event to arrive. This is only useful for debugging the window resizing logic.

The RENDERER variable, if set, controls the rendering backend used by the protocol translator. When set to help it prints a list of available rendering backends instead. This takes precedence over the renderer resource whenever set.

The RENDER_VISUAL variable, if set to a number, contains the ID of the visual used when the EGL rendering backend is in use.

CONFORMING TO
The protocol translator aims to comply with the specifications of the following Wayland interfaces:
Protocol | Version
wl_output | 2
wl_compositor | 5
wl_shm | 1
xdg_wm_base | 5
wl_subcompositor | 1
wl_seat | 8
wl_data_device_manager | 3
zwp_linux_dmabuf_v1 | 4
zwp_primary_selection_device_manager_v1 | 1
wp_viewporter | 1
zxdg_decoration_manager_v1 | 1
zwp_text_input_manager_v3 | 1
wp_single_pixel_buffer_manager_v1 | 1
zwp_pointer_constraints_v1 | 1
zwp_relative_pointer_manager | 1
zwp_idle_inhibit_manager_v1 | 1

When the protocol translator is built with EGL support, the following protocol is also supported:
Protocol | Version
zwp_linux_explicit_synchronization_v1 | 2

When the X server supports version 1.6 or later of the X Resize, Rotate and Reflect Extension, the following Wayland protocol is also supported:
Protocol | Version
wp_drm_lease_device_v1 | 1

When the X server supports version 2.4 or later of the X Input Extension, the following Wayland protocol is also supported:
Protocol | Version
zwp_pointer_gestures_v1 | 3

However, Wayland clients are allowed to continue to access data from the CLIPBOARD and PRIMARY selections even when they do not have the keyboard focus, against the restrictions put out in the relevant protocol specifications. It is the opinion of the authors that such ``security'' does not come with any real benefit.

BUGS
There is a hard to catch bug where Wayland programs leaving the fullscreen or maximized state may abruptly return to their maximized size. Setting the APPLY_STATE_WORKAROUND environment variable may help.

Using this protocol translator under a window manager that does not at least support the _NET_WM_SYNC_REQUEST window manager protocol will result in Wayland programs running badly.

SEE ALSO
X(7), Xorg(1)

AUTHORS
Various contributors.