The socksdir directory - matt335672/xrdp GitHub Wiki

Introduction

The socksdir contains file sockets used to link user session components together.

Contents

The directory is currently a flat directory containing names qualified by the local X display number for the session. At the time of writing, the following sockets can be found in this directory:-

File Created by? Used by? More info
xrdpapi_$DISPLAY chansrv session applications see below
xrdp_chansrv_$DISPLAY chansrv XRDP process see below
xrdp_chansrv_audio_in_socket_$DISPLAY chansrv session pulseaudio server see below
xrdp_chansrv_audio_out_socket_$DISPLAY chansrv session pulseaudio server see below
xrdp_display_$DISPLAY xorgxrdp module XRDP process see below
xrdp_disconnect_display_$DISPLAY xorgxrdp module session applications see below

An up-to-date list can be found in the source file common/xrdp_sockets.h.

xrdpapi_$DISPLAY

Socket used for communicating with chansrv by libxrdpapi applications (e.g. vrplayer)

xrdp_chansrv_$DISPLAY

This socket is connected to by the XRDP process (xrdp(8)). It carries virtual channel data between XRDP and chansrv.

xrdp_chansrv_audio_*

These sockets are connected to by the pulseaudio server in the user's session. See the pulseaudio-module-xrdp wiki for more information on this facility.

xrdp_display_$DISPLAY

This socket is only present for Xorg-based sessions. This socket is connected to by the XRDP process. It carries RDP data between XRDP and the X server.

xrdp_disconnect_display_$DISPLAY

This socket is only present for Xorg-based sessions. This socket can be used to disconnect a session. It is used by xrdp-dis(1).

Directory permissions

In order to create the sockets, the directory needs to be writeable by:-

  • The user session component chansrv (see xrdp-chansrv(8))
  • The Xorg X server for Xorg-based sessions only.

The directory (and the sockets) need to be readable and readable by:-

  • The XRDP process
  • Other session applications

On a normal install, these conditions are satisfied by:-

  • Running XRDP as root so that any socket in the directory can be accessed.
  • Setting the permissions on the sockdir to 01777. The presence of the sticky bit restricts socket access to the UID creating the sockets.