sesman.ini(5)

πŸŽ€ sesman.ini(5) πŸŽ€

okay bestie πŸ’– this is the config file for xrdp-sesman(8) β€” the sesman man page, part 1. Let's get into it. ✨


✨ NAME ✨

sesman.ini β€” Configuration file for xrdp-sesman(8) 🫢


🌸 DESCRIPTION 🌸

sesman.ini is giving "several sections" energy. Every section starts with the section name in square brackets, then a list of parameter=value lines. The sections we recognize are:

  • [Globals] β€” Global configuration 🌍
  • [Logging] β€” Logging subsystem πŸ“
  • [Sessions] β€” Session management πŸ–₯️
  • [Security] β€” Access control πŸ”’
  • [Chansrv] β€” Settings for xrdp-chansrv(8) πŸ› οΈ
  • [ChansrvLogging] β€” Logging settings for xrdp-chansrv(8) πŸ“‹
  • [SessionVariables] β€” Environment variables for the session 🌱

Important vibe check: all parameters and values β€” except for file names and paths β€” are case insensitive, and they're described in detail below. If any parameter is specified more than once, the last entry will be used. Options specified outside their proper section will be ignored. periodt. πŸ’…


πŸ‘‘ GLOBALS πŸ‘‘

Following parameters can be used in the [Globals] section.

  • ListenPort=path-to-socket β€” UNIX domain socket for xrdp-sesman(8) to listen on. 🎧

The default value of this setting is 'sesman.socket'.

An absolute path can be specified by starting this parameter with a /. In this instance, the system administrator is responsible for ensuring the socket can only be created by a suitably privileged process.

If the parameter does not start with a /, a name within /run/xrdp is used.

  • EnableUserWindowManager=[true|false] β€” If set to 1, true or yes, this option enables user specific startup script. That is, xrdp-sesman will execute the script specified by UserWindowManager if it exists. πŸͺŸ
  • UserWindowManager=filename β€” Path of the startup script relative to the user's home directory. If present and enabled by EnableUserWindowManager, that script is executed instead of DefaultWindowManager. 🏠
  • DefaultWindowManager=filename β€” Full path or relative path of the default startup script used by xrdp-sesman to start a session. If the path is not a full path, it will be resolved as relative path to /etc/xrdp. If not specified, defaults to /etc/xrdp/startwm.sh. πŸš€
  • ReconnectScript=filename β€” Full path or relative path if the script which executed when users reconnects to the existing session. If the path is not a full path, it will be resolved as relative path to /etc/xrdp. If not specified, defaults to /etc/xrdp/reconnectwm.sh. πŸ”„

πŸ¦‹ LOGGING πŸ¦‹

Following parameters can be used in the [Logging] and [ChansrvLogging] sections.

  • LogFile=filename β€” Log file path. It can be either absolute or relative. If not specified, defaults to ./sesman.log. If set to <stdout>, log will go to stdout. Use for debugging only πŸ“

It is ignored in the [ChansrvLogging] section since the channel server creates one log file per display and instead uses the following log file naming convention xrdp-chansrv.${DISPLAY}.log. For details of the chansrv log file location, see LogFilePath.

  • LogFilePath=string β€” Directory for storing the chansrv log file. This setting only applies to chansrv. The sesman log file is always created in /var/log. πŸ“‚

Created if it doesn't exist. If first character is not a /, this is relative to $HOME, where chansrv is normally started.

The following substitutions are made in this string:

  • %U - Username
  • %u - Numeric UID
  • %% - Percent character

This is most useful if you are using NFS-mounted home directories, and wish to move the chansrv log file to the local disk.

If this parameter isn't specified, the log file is stored in one of the following locations:

  • $CHANSRV_LOG_PATH
  • $XDG_DATA_HOME/xrdp
  • $HOME/.local/share/xrdp
  • LogLevel=level β€” This option can have one of the following values:
    • CORE or 0 - Log only core messages. Those messages are logged regardless of the selected logging level. 🧊
    • ERROR or 1 - Log only error messages. ❌
    • WARNING, WARN or 2 - Logs warnings and error messages. ⚠️
    • INFO or 3 - Log errors, warnings and informational messages. ℹ️
    • DEBUG or 4 - Log everything. If xrdp-sesman is compiled in debug mode, this options will output many more low-level messages. πŸ›
  • EnableSyslog=[true|false] β€” If set to 1, true or yes, this option enables logging to syslog. πŸ“‘
  • SyslogLevel=level β€” Logging level for syslog. It can have the same values as LogLevel. Defaults to DEBUG. πŸ“Š
  • EnableConsole=[true|false] β€” If set to 1, true or yes, this option enables logging to the console (ie. stdout). πŸ–₯️
  • ConsoleLevel=level β€” Logging level for the console. It can have the same values as LogLevel. Defaults to DEBUG. 🎚️
  • EnableProcessId=[true|false] β€” If set to 1, true or yes, this option enables logging the process id in all log messages. Defaults to false. πŸ†”

πŸ’œ SESSIONS πŸ’œ

Following parameters can be used in the [Sessions] section.

  • X11DisplayOffset=number β€” The first X display number available for xrdp-sesman. This prevents xrdp-sesman from interfering with real X11 servers. If not specified, defaults to 10. πŸ–ΌοΈ
  • MaxSessions=number β€” Sets the maximum number of simultaneous sessions. If not set or set to 0, unlimited session are allowed. ♾️
  • MaxDisplayNumber=number β€” Sets the maximum number which can be assigned to an X11 $DISPLAY. The default is compatible with IANA TCP port allocations. If you are not allowing TCP connections to your X servers you may safely increase this number. πŸ”’
  • KillDisconnected=[true|false] β€” If set to 1, true or yes, every session will be killed within DisconnectedTimeLimit seconds after the user disconnects. This setting currently only works with xorgxrdp sessions. πŸ”ͺ
  • DisconnectedTimeLimit=number β€” Sets the time limit for KillDisconnected to a value greater than 60. Values less than 60 are to be overridden with 60. This setting currently only works with xorgxrdp sessions. ⏳
  • IdleTimeLimit=number β€” Sets the time limit (in seconds) before an idle session is disconnected. Idle means no keyboard inputs and no mouse moves/clicks here. If set to 0, idle sessions will never be disconnected by timeout. This works only with xorgxrdp sessions. Moreover, xorgxrdp must be v0.2.9 or later. 😴
  • Policy=[Default|Separate|{UBDI}] β€” Session allocation policy. Used to decide when to allocate a new session. Set to one of the following values:
    • Default - Currently the same as "UB" for all session types
    • Separate - All sessions are separate. Sessions can never be rejoined, and will need to be cleaned up manually, or automatically by setting other sesman options.

Alternatively combine one-or-more of the following options

  • U - Sessions are separated per user
  • B - Sessions are separated by bits-per-pixel
  • D - Sessions are separated by initial display size
  • I - Sessions are separated by IP address

Note that the U and B criteria cannot be turned off. DisplaySize refers to the initial geometry of a connection, as actual display sizes can change dynamically. πŸ“

πŸ” SECURITY πŸ”

Bestie, this section is the bouncer at the club door. The [Security] section takes all these parameters:

  • AllowRootLogin=[true|false] β€” set it to 1, true or yes and root is allowed to log in on the terminal server. Yes, that root. πŸ‘‘
  • MaxLoginRetry=number β€” how many login attempts are allowed on the terminal server. Set it to 0 and it's unlimited attempts (chaos, honestly). If you don't specify it at all, it defaults to 3.
  • TerminalServerUsers=group β€” only users in this group can log in on the terminal server. If it's unset, or set to a group that's invalid or doesn't even exist, then login is enabled for all users. So like… no group, no filter, everybody in. πŸ’€
  • TerminalServerAdmins=group β€” heads up: this option is currently ignored! Only members of this group can have session management rights.
  • RestrictOutboundClipboard=[all|none|text|file|image] β€” set it to all and it restricts the clipboard outbound from the server, so data copied inside the xrdp session can't get pasted into the client. Default value is none. You can also control text/file/image transfer restrictions respectively, and it accepts a comma separated list like text,file,image. Here's the menu:
    • none β€” no restriction about copying inbound clipboard data.
    • all β€” restrict to copy inbound clipboard data.
    • text β€” restrict to copy only inbound text clipboard data.
    • file β€” restrict to copy only inbound file clipboard data.
    • image β€” restrict to copy only inbound image clipboard data.

To keep compatibility, these aliases are also available: true is an alias of all, false is an alias of none, and yes is an alias of all.

  • RestrictInboundClipboard=[none|all|text|file|image] β€” set it to all and it restricts the clipboard inbound from the client, so data copied inside the client can't get pasted into the xrdp session. Default value is none. Same deal as above, you can control text/file/image transfer restrictions respectively, and it accepts a comma separated list such as text,file,image:
    • none β€” no restriction about copying inbound clipboard data.
    • all β€” restrict to copy inbound clipboard data.
    • text β€” restrict to copy only inbound text clipboard data.
    • file β€” restrict to copy only inbound file clipboard data.
    • image β€” restrict to copy only inbound image clipboard data.

And for compatibility, the same aliases exist: true is an alias of all, false is an alias of none, yes is an alias of all.

  • AlwaysGroupCheck=[true|false] β€” set it to 1, true or yes and group membership is required even if the group specified in TerminalServerUsers doesn't exist. Strict mode activated. 🫑
  • AllowAlternateShell=[true|false] β€” set to 1, true or yes to let users specify alternate shells. Let them cook.
  • PassShellAsEnv=<name-of-environment-variable> β€” when this is set, alternate shells aren't actioned directly β€” instead they get passed in to the default window manager inside the specified environment variable. This lets the system manager have more control over exactly what alternate shells are permitted. ✨

Heads up: this will override any setting of the same environment variable in the [SessionVariables] section.

  • XorgNoNewPrivileges=[true|false] β€” only applicable on Linux. If set to 0, false or no, don't use the kernel's no_new_privs restriction when invoking the Xorg X11 server. The whole point of no_new_privs is to prevent issues caused by a setuid Xorg executable. But if a kernel security module (like AppArmor) is used to confine xrdp, no_new_privs may interfere with transitions between confinement domains.
  • SessionSockdirGroup=group β€” sets the group owner of the directories holding session sockets. This MUST be the same as runtime_group in xrdp.ini, or xrdp will not be able to connect to any sessions. No cap, this one's important. ⚠️

πŸ–₯️ X11 SERVER πŸ–₯️

These parameters can be used in the [Xvnc] and [Xorg] sections.

  • param=string β€” multiple param lines are supported. The first line specifies the path to the X11 server executable. The following lines specify command line arguments passed to the X11 server.

🌈 CHANSRV 🌈

These parameters can be used in the [Chansrv] section.

  • FuseMountName=string β€” the directory for drive redirection. It gets created if it doesn't exist. If not specified, it defaults to xrdp_client. If the first character isn't a /, then it's relative to $HOME.

These substitutions are made in this string:

  • %U β€” Username
  • %u β€” Numeric UID
  • %d β€” Numeric display number (ex 10)
  • %D β€” Display environment variable (ex :10.0)
  • %% β€” Percent character

A couple things, bestie:

  1. The directory path permissions MUST be configured correctly by the system administrator or the system itself β€” xrdp-chansrv will not do this for you (although it will create the final directories owned by the user).
  2. The desktop may not automatically display a link for the redirected drive. To fix that, go consult the docs for your chosen desktop.
  • FuseMountNameColonCharReplacement=string β€” the character to replace colon in redirected drive mount point names. If not specified, no colon will not be replaced. If empty, then colon will be replaced by null character. If it's longer than one character, only the first character is used. Only the last colon is replaced.
  • FuseDirectIO=[false|true] β€” defaults to false. Set it to true to disable page caching in FUSE when opening files on a redirected drive. Lowkey though, direct I/O can impact the performance of file operations.
  • FileUmask=mode β€” additional umask to apply to files in the FuseMountName directory. The default value of 077 prevents other users on the system from reading files on your redirected drives. That might not be appropriate for every environment, so you can change this value to let other users access your remote files if you need to.
  • EnableFuseMount=[true|false] β€” defaults to true. Set it to false to disable xrdp-chansrv's use of the FUSE system feature, even if it's been built with this feature enabled.

Setting this to false will disable these application features:

  • drive redirection
  • copying-and-pasting of files
  • UseNautilus3FlistFormat=[false|true] β€” defaults to false. Set it to true to make file copy-paste compatible with Nautilus from GNOME 3 versions later than 3.29.92. Do not use this for any other reason, okay? πŸ‘€

This setting will be removed in a later version of xrdp, when GNOME 3 is no longer supported.

  • FuseRootReportMaxFree=[false|true] β€” okay so the existing FUSE implementation reports free space on remote drives in a way that can confuse some file managers if they check for free space at the FUSE mountpoint before copying files. KDE Dolphin is affected by this, and will report 'no space available' when you try to copy to remote drives. 😭

Setting this option makes the FUSE filesystem report a very large amount of free space for the root of the FUSE mountpoint. That lets Dolphin copy files to remote drives β€” but it introduces a risk that the remote filesystem will run out of space during the copy. Pick your poison.

This setting will be removed in a later version of xrdp, when remote drives receive unique mountpoints.

  • SoundNumSilentFramesAAC=number β€” sets the number of silent frames sent to the client before the close message is sent, when AAC is selected. If set to 0, no silent frame is sent. If not specified, defaults to 4.
  • SoundNumSilentFramesMP3=number β€” sets the number of silent frames sent to the client before the close message is sent, when MP3 is selected. If set to 0, no silent frame is sent. If not specified, defaults to 2.
  • SoundMsecDoNotSend=number β€” sets the duration (msec). Sound data is not sent to the client during that number of millisecond(s) after the close message is sent, when AAC/MP3 is selected. If set to 0, all the data is sent. If not specified, defaults to 1000.

🌸 SESSIONS VARIABLES 🌸

Every single entry in the [SessionVariables] section gets set as environment variables in the user's session. That's the whole vibe. πŸ’…


πŸ“ FILES πŸ“

/etc/xrdp/sesman.ini

πŸ‘€ SEE ALSO πŸ‘€

xrdp-sesman(8), xrdp-sesrun(8), xrdp(8), xrdp.ini(5)

For more info on xrdp see http://www.xrdp.org/


and that's the whole page, bestie!! πŸŽ€βœ¨ this lil masterpiece came from the xrdp team, version 0.10.6.1, and it's sesman.ini(5) β€” go forth and configure responsibly, mwah πŸ’–πŸ¦‹

πŸ“¦ where this page comes from