@startuml participant "Rdp Client" AS client participant "Xrdp" AS xrdpListner collections "xrdp per client" AS xrdp participant "Session Manager (xrdp-sesman)" AS sesman collections "Xrdp-Session" AS sesmanChild participant "PAM" AS pam participant "Window Manager" AS wm participant "X Server" AS x participant "Channel Server (xrdp-chansrv)" AS chansrv == Session Initialize == activate xrdpListner activate client client -> xrdpListner: connect xrdpListner -> xrdp: fork \n[xrdp_listen_fork(/xrdp/xrdp/xrdp_listen.c)] activate xrdp deactivate xrdpListner client -> xrdp: send credentials xrdp -> sesman: connect with credentials activate sesman sesman -> sesman: search for xrdp-session, \nnone found therefore create new session sesman -> sesmanChild: fork activate sesmanChild sesman -> sesman: listen for Xrdp-Session to terminate deactivate sesman sesmanChild -> pam: PAM session start activate pam sesmanChild -> pam: authenticate sesmanChild <- pam: authentication success sesmanChild -> x: fork activate x sesmanChild -> chansrv: fork activate chansrv chansrv -> x: connect sesmanChild -> wm: fork activate wm wm -> x: connect sesmanChild -> xrdp: X display number sesmanChild -> sesmanChild: wait for window manager process to terminate deactivate sesmanChild xrdp -> x: connect \n[lib_mod_connect(/xrdp/xup/xup.c)] xrdp -> chansrv: connect == Session In Progress == loop until window manager process terminates x -> xrdp: display data xrdp -> client: display data chansrv -> xrdp: channel data xrdp -> client: channel data client -> xrdp: input data xrdp -> x: input data client -> xrdp: channel data xrdp -> chansrv: channel data end == Session End == note right of wm Some event (eg. user input) causes the Window Manager to terminate end note destroy wm wm -> sesmanChild: window manager terminated activate sesmanChild sesmanChild -> pam: end PAM session \n[session_start_fork(/xrdp/sesman/session.c)] destroy pam sesmanChild -> x: send SIGTERM sesmanChild -> x: wait for X server process to terminate destroy x sesmanChild <- x: X server terminated sesmanChild -> chansrv: send SIGTERM sesmanChild -> chansrv: wait for channel server to terminate destroy chansrv sesmanChild <- chansrv: Channel server terminated sesmanChild -> sesmanChild: clean up sockets destroy sesmanChild sesmanChild -> sesman: Xrdp-Session terminated activate sesman sesman -> sesman: remove session from list of active sessions \n[sig_sesman_session_end(/xrdp/sesman/sig.c)] deactivate sesman note right of xrdp I'm not sure how xrdp decides to close a connection. it seems like it might be from [xrdp_process_main_loop(/xrdp/xrdp/xrdp_process.c)] end note xrdp -> client: disconnect xrdp -> x: disconnect \n[mod_exit(/xrdp/xup/xup.c)] note right of xrdp The call chain is: xrdp_process_main_loop() -> set(done_event) -> xrdp_listen_main_loop() -> wait(done_event) -> xrdp_listen_delete_done_pro() -> xrdp_process_delete() -> xrdp_wm_delete() -> xrdp_mm_delete() -> xrdp_mm_module_cleanup() -> mod_exit(/xrdp/xup/xup.c) end note destroy xrdp @enduml
Decode URL
Submit
amiga
aws-orange
black-knight
bluegray
blueprint
cerulean-outline
cerulean
crt-amber
crt-green
cyborg-outline
cyborg
hacker
lightgray
mars
materia-outline
materia
metal
mimeograph
minty
plain
reddress-darkblue
reddress-darkgreen
reddress-darkorange
reddress-darkred
reddress-lightblue
reddress-lightgreen
reddress-lightorange
reddress-lightred
sandstone
silver
sketchy-outline
sketchy
spacelab
spacelab-white
superhero-outline
superhero
toy
united
vibrant
🎉 Discover the future PlantUML Web Editor! 🚀
PNG
SVG
ASCII Art