The socketdir directory - neutrinolabs/xrdp GitHub Wiki

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.

This page applies to v0.10.x of xrdp. If you're using v0.9.x, consult earlier versions of this page.

Contents and permissions

The directory is owned by root:root with permissions of 755.

The xrdp-sesman daemon manages all top-level contents of the directory.

At the time of writing, the following entities can be found in this directory.

The symbol $UID means a numeric user-ID and the symbol $SockdirGroup is the setting of SessionSockdirGroup within sesman.ini.

File Permissions Owner:group More info
sesman.socket 666 root:root Used to contact sesman
.sesman.socket.lock 600 root:root Lock file for sesman.socket
<uid> 2750 $uid:$SockdirGroup Per-user sesson sockets (one per user)

The setgid bit is set on the per-user directories. This allows the sockets created within these directories to have a group ownership of $SockdirGroup rather than the primary group of the user - see #3011 for details.

The group ownership of $SockdirGroup is intended to let the xrdp process access these directories. This process does not run as $uid.

Within each of the per-user directories, the following socket files can be found.

Sockets are owned by $uid:$SockdirGroup with a permissions mask of 660.

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/pipewire server see below
xrdp_chansrv_audio_out_socket_$DISPLAY chansrv session pulseaudio/pipewire 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).

⚠️ **GitHub.com Fallback** ⚠️