【xrdp配置文件】

这里写自定义目录标题

/etc/xrdp/sesman.ini

;; See man 5 sesman.ini for details

  • 这一行提示用户可以查阅手册页来获取更多关于sesman.ini配置文件的细节信息。

Globals

ListenAddress=127.0.0.1

ListenPort=3350

EnableUserWindowManager=true

; Give in relative path to user's home directory

UserWindowManager=startwm.sh

; Give in full path or relative path to /etc/xrdp

DefaultWindowManager=startwm.sh

; Give in full path or relative path to /etc/xrdp

ReconnectScript=reconnectwm.sh

  • [Globals]部分定义了全局设置。
  • ListenAddress指定了监听地址为本地环回地址,这意味着它只接受来自同一主机的连接请求。
  • ListenPort设定了监听端口为3350,这是xrdp会话管理器默认使用的端口。
  • EnableUserWindowManager选项允许启用用户的窗口管理器脚本。
  • UserWindowManagerDefaultWindowManager都指向启动窗口管理器的脚本startwm.sh,前者是相对于用户主目录的路径,后者是相对于/etc/xrdp的路径。
  • ReconnectScript定义了一个重新连接时执行的脚本。

Security

AllowRootLogin=true

MaxLoginRetry=10

TerminalServerUsers=tsusers

TerminalServerAdmins=tsadmins

; When AlwaysGroupCheck=false access will be permitted

; if the group TerminalServerUsers is not defined.

AlwaysGroupCheck=false

; When RestrictOutboundClipboard=true clipboard from the

; server is not pushed to the client.

RestrictOutboundClipboard=false

  • [Security]部分包含了与安全相关的配置。
  • AllowRootLogin设置为true意味着允许以root身份登录,这对于某些环境来说可能是不安全的选择。
  • MaxLoginRetry限制了登录失败的最大尝试次数为10次。
  • TerminalServerUsersTerminalServerAdmins定义了终端服务器用户组和管理员组的名字。
  • AlwaysGroupCheck当设置为false时,即使没有定义TerminalServerUsers组也允许访问。
  • RestrictOutboundClipboard控制是否限制服务器剪贴板内容传输给客户端。

Sessions

;; X11DisplayOffset - x11 display number offset

; Type: integer

; Default: 10

X11DisplayOffset=10
;; MaxSessions - maximum number of connections to an xrdp server

; Type: integer

; Default: 0

MaxSessions=50
;; KillDisconnected - kill disconnected sessions

; Type: boolean

; Default: false

; if 1, true, or yes, kill session after 60 seconds

KillDisconnected=false
;; DisconnectedTimeLimit - when to kill idle sessions

; Type: integer

; Default: 0

; if not zero, the seconds before a disconnected session is killed

; min 60 seconds

DisconnectedTimeLimit=0
;; IdleTimeLimit (specify in second) - wait before disconnect idle sessions

; Type: integer

; Default: 0

; Set to 0 to disable idle disconnection.

IdleTimeLimit=0
;; Policy - session allocation policy

; Type: enum [ "Default" | "UBD" | "UBI" | "UBC" | "UBDI" | "UBDC" ]

; Default: Xrdp:<User,BitPerPixel> and Xvnc:<User,BitPerPixel,DisplaySize>

; "UBD" session per <User,BitPerPixel,DisplaySize>

; "UBI" session per <User,BitPerPixel,IPAddr>

; "UBC" session per <User,BitPerPixel,Connection>

; "UBDI" session per <User,BitPerPixel,DisplaySize,IPAddr>

; "UBDC" session per <User,BitPerPixel,DisplaySize,Connection>

Policy=Default

  • [Sessions]部分配置了会话管理规则。
  • X11DisplayOffset设置了X11显示编号的偏移量。
  • MaxSessions指定了最大并发连接数为50个。
  • KillDisconnected如果设置为true,则会在断开连接后60秒内终止会话。
  • DisconnectedTimeLimit定义了在断开连接多久之后结束会话的时间限制,这里设置为0表示禁用此功能。
  • IdleTimeLimit同样用于设定空闲会话的超时时间,设为0则不会因为空闲而断开会话。
  • Policy确定了会话分配策略,默认值适用于大多数情况。

Logging

LogFile=xrdp-sesman.log

LogLevel=DEBUG

EnableSyslog=1

SyslogLevel=DEBUG

  • [Logging]部分配置日志记录选项。
  • LogFile指定了日志文件的位置。
  • LogLevel和SyslogLevel都设为了DEBUG级别,意味着记录非常详细的调试信息。
  • EnableSyslog启用或禁用系统日志记录功能。
相关推荐
牢七6 小时前
Linux新
linux
C.咖.7 小时前
Linux环境下——Git 与 GitHub
linux·git·github·远程仓库
Empty_7778 小时前
Ansible进行Nginx编译安装的详细步骤
linux·nginx·ansible
猪在黑魔纹里8 小时前
docker run hello-world失败、报错
linux·docker·容器
路人甲ing..9 小时前
Ubuntu 怎么把树莓派内存卡备份制作成为镜像
linux·运维·ubuntu
獭.獭.10 小时前
Linux -- 线程互斥
linux·互斥锁·mutex·互斥量·线程互斥
Broken Arrows10 小时前
排查网络问题的一些工具的作用和常用使用方法
linux·网络·学习
撒币使我快乐11 小时前
Windows安装Claude Code全流程
linux·windows·claude
longerxin202011 小时前
ubuntu所有版本镜像下载链接
linux·运维·ubuntu
数据雕塑家11 小时前
Linux下的花式「隔空」文件传输魔法
linux·运维·服务器