Cursor

August 16, 2026 ยท View on GitHub

This subsystem synchronizes the pointer cursor between the server's (often virtual) screen and the client.

The prefix for all packets and capabilities is cursor.

ComponentLink
clientxpra.client.subsystem.cursor
client connectionxpra.server.source.cursor
serverxpra.server.subsystem.cursor
CapabilityTypePurpose
encodingsarray of stringsThe types of cursor packets that the client can handle

The supported encodings are:

  • raw: plain uncompressed BGRA pixel data
  • png: pixel data compressed using lossless full color PNG
  • default: the client can update the default cursor
CapabilityTypePurpose
defaultcursor packet dataThe default cursor to use
default_sizeintegerThe default size of cursors on the server
max_sizepair of integersThe maximum size of the server cursors

Example capabilities

  • Client:
{
  'cursor': {
    'encodings': ['raw', 'default', 'png'],
  },
}
  • X11 seamless server:
{
  'cursor': {
    'default_size': 45,
    'max_size': [64, 64],
  }
}
Packet TypeDirectionArgumentsPurpose
cursor-setclient to serverbooleanTell the server to enable or disable cursors
cursor-dataserver to clientcursor packet dataUse the cursor specified
cursor-defaultserver to clientRestore the default cursor

Cursor Packet Data

cursor-data contains, in order: encoding, width, height, hotspot X, hotspot Y, serial number, encoded bytes and cursor name. raw bytes are BGRA pixels; png bytes contain a PNG image. The hotspot must lie within the cursor image.