Section "Device"
    Identifier "XSPICE"
    Driver "spiceqxl"

    # Enable regular port. Either this or SpiceTlsPort, or one of XSPICE_PORT or
    # XSPICE_TLS_PORT environment variables must be specified
    # Defaults to 5900.
    #Option "SpicePort" "5900"

    # Enable a TLS (encrypted) port. Either this or SpicePort must be specified,
    # either here or via environment varialbes or via xspice --port or --tls-port
    #Option "SpiceTlsPort" "5901"
    
    # Listen to a specific interface. Default is to listen to all (0.0.0.0)
    #Option "SpiceAddr" ""

    # Enable usage of SASL supported by spice-gtk client. Not required,
    # defaults to false.
    #Option "SpiceSasl" "True"

    # Do not request any password from client
    #Option "SpiceDisableTicketing" "0"

    # Set directory where cacert, server key and server cert are searched
    # using the same predefined names qemu uses:
    #   cacert.pem, server-key.pem, server-cert.pem
    #Option "SpiceX509Dir" ""

    # Set password client will be required to produce.
    #Option "SpicePassword" ""

    # Set spice server key file.
    #Option "SpiceX509KeyFile" ""

    # Set cert file location.
    #Option "SpiceX509CertFile" ""

    # Set key file password.
    #Option "SpiceX509KeyPassword" ""

    # Set tls ciphers used.
    #Option "SpiceTlsCiphers" ""

    # Set cacert file.
    #Option "SpiceCacertFile" ""

    # Set dh file used.
    #Option "SpiceDhFile" ""

    # Set streaming video method. Options are filter, off, all
    # defaults to filter.
    #Option "SpiceStreamingVideo" ""

    # Set zlib glz wan compression. Options are auto, never, always.
    # defaults to auto.
    #Option "SpiceZlibGlzWanCompression" ""

    # Set jpeg wan compression. Options are auto, never, always
    # defaults to auto.
    #Option "SpiceJpegWanCompression" ""

    # Set image compression. Options are off,auto_glz,auto_lz,quic,glz,lz.
    # defaults to auto_glz.
    #Option "SpiceImageCompression" ""

    # Set to true to only listen on ipv4 interfaces.
    # defaults to false.
    #Option "SpiceIPV4Only" ""

    # Set to true to only listen on ipv6 interfaces.
    # defaults to false.
    #Option "SpiceIPV6Only" ""

    # If non zero, the driver will render all operations to the frame buffer,
    #  and keep track of a changed rectangle list.  The changed rectangles
    #  will be transmitted at the rate requested (e.g. 10 Frames Per Second)
    # This can dramatically reduce network bandwidth for some use cases.
    #Option "SpiceDeferredFPS" "10"

    # If set, the Spice Server will exit when the first client disconnects
    #Option "SpiceExitOnDisconnect" "1"

    # Enable caching of images directly written with uxa->put_image
    # defaults to True
    #Option "EnableImageCache" "True"

    # Enable caching of images created by uxa->prepare_access
    # defaults to True
    #Option "EnableFallbackCache" "True"

    # Enable the use of off screen srufaces
    # defaults to True
    #Option "EnableSurfaces" "True"

    # The number of heads to allocate by default
    # defaults to 4
    #Option "NumHeads" "4"

    #--------------------------------------------------------------
    # Buffer Size notes:
    #  The following buffer sizes are used for Xspice only
    #  If you are using the DFPS mode, surface ram is not used,
    #  and you can set it to 1.
    #  Otherwise, the surface buffer should be at least as large
    #   as the frame buffer, and probably a multiple like 8.
    #  The command buffer ram should also be substantially larger
    #   than the frame buffer, and note that the frame buffer occupies
    #   the front of the command buffer.  Hence, our default size
    #   is a command buffer 7x the size of the frame buffer.
    #  If you see 'Out of memory' errors in your xorg.log, you probably need
    #   to increase the surface or command buffer sizes.
    #--------------------------------------------------------------

    # The amount of surface buffer ram, in megabytes, to allocate
    # defaults to 128
    #Option "SurfaceBufferSize" "128"

    # The amount of command buffer ram, in megabytes, to allocate
    # defaults to 128
    #Option "CommandBufferSize" "128"

    # The amount of frame buffer ram, in megabytes, to reserve
    #  This is reserved out of the CommandBuffer RAM
    #  This governs the maximum size the X screen can be;
    #   4 Heads at 1920x1080 require 32M of RAM
    # defaults to 16
    #Option "FrameBufferSize" "16"

    # Set Spice Agent Mouse
    # defaults to false
    #Option "SpiceAgentMouse" "False"

    # Set Spice Playback compression
    # defaults to true
    #Option "SpicePlaybackCompression" "True"

    # Disable copy and paste
    # defaults to false
    #Option "SpiceDisableCopyPaste" "False"

    # If a directory is given, any file in that
    #  directory will be read for audio data to be sent
    #  to the client.   Default is no mixing.
    #Option "SpicePlaybackFIFODir"  "/tmp/"

    # A unix domain name for a unix domain socket
    #  to communicate with a spiceccid smartcard driver
    #Option "SpiceSmartCardFile"  "/tmp/spice.pcsc.comm"
EndSection

Section "InputDevice"
    Identifier "XSPICE POINTER"
    Driver     "xspice pointer"
EndSection

Section "InputDevice"
    Identifier "XSPICE KEYBOARD"
    Driver     "xspice keyboard"
EndSection

Section "Monitor"
    Identifier    "Configured Monitor"
EndSection

Section "Screen"
    Identifier     "XSPICE Screen"
    Monitor        "Configured Monitor"
    Device        "XSPICE"
    DefaultDepth    24
EndSection

Section "ServerLayout"
    Identifier "XSPICE Example"
    Screen "XSPICE Screen"
    InputDevice "XSPICE KEYBOARD"
    InputDevice "XSPICE POINTER"
EndSection

# Prevent udev from loading vmmouse in a vm and crashing.
Section "ServerFlags"
    Option "AutoAddDevices" "False"
EndSection
