Skip to content

The socketdir directory

matt335672 edited this page Feb 1, 2021 · 3 revisions

Introduction

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

At compile time, the directive --with-socketdir= can be used to set the socketdir to a suitable location for the system.

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_socket_$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_socket_$DISPLAY

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

This socket is only present in the file system while chansrv is awaiting a connection from xrdp(8). The listening socket is removed when xrdp(8) connects to prevent concurrent connections to chansrv. It is re-created when the connection to xrdp(8) is closed.

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.
Clone this wiki locally