FastX Event Listeners


The following Event Listeners are available on the Xrdp DOM document.

Note

Users have access to these options in the xrdp menu at the top of a session.  If you are creating your own menu, or want to hide the menu, add the following to your css

#xrdp-menu{
    display:none
}

snSendSetConfigOptionsRequest

Sets the Xrdp Speed settings

Options

  • BandwidthThrottleAdjust   — Enable Auto Network Detection (set to false to enable other options)
  • FPSLimit  — Set the Frame Rate ( 1 – 60 )
  • FrameAcknowledgeWindow  — Maximum number of Frames to Buffer
  • Compression  — Set Compression Level (0 lowest – 7 highest )
  • mouseUpdates  — send mouse updates every N ms (1 – 200)

Example

document.dispatchEvent(new CustomEvent('snSendSetConfigOptionsRequest',{
    detail:{
        BandwidthThrottleAdjust:false,
        FPSLimit:30,
        FrameAcknowledgeWindow:10,
        Compression:0,
        mouseUpdates:100
    }
}));

snSendResizeRequest

Resize the remote window

Options

  • width — new width
  • height — new height

Example

document.dispatchEvent(new CustomEvent('snSendResizeRequest',{
    detail:{
        width:1024,
        height:768
    }
}));

snRequestRemoteClipboardData

Request the clipboard data from the remote server.  This option just requests the data.  When the data is available the snClipboardData event is fired.

Options

none

Example

document.dispatchEvent(new CustomEvent('snRequestRemoteClipboardData'));

snSetRemoteClipboardData

Send Data to the remote clipboard

Options

String of the text you want to send

Example

document.dispatchEvent(new CustomEvent('snSetRemoteClipboardData',{
    detail:"Send this \n Data to the remote Clipboard"
}));

snClipboardData

Event that is fired when the data is ready

Example

document.addEventListener('snClipboardData',function(e){
    //Do something with the data
    var myData = e.detail; 
});