/etc/rc.local write xrdp-sesrun 127.0.0.1 brainet neuron128 1280 1024 24

Sometimes it is necessary to run multiple Xrdp sessions assigning them to different people that insist on the same user. For example, you have a user on your remote server, called johnny and you want to let the johnny@remote_host be accessed by three different guys in your lab. You can assign different ports to different guys by explicitly modifying the /etc/xrdp/

http://serverfault.com/questions/727057/how-to-find-disconnected-xrdp-sessions

How to find disconnected xrdp sessions

alias xrdp-list-sessions="sudo lsof  -b -w -n -c /^Xvnc$/b -a -iTCP:5900-5999"

sudo apt-get install xprintidle

#!/bin/bash

displays=`ps aux | grep Xvnc | grep -v 'grep\|sed' | sed -r 's|.*(Xvnc :[0-9]*).*|\1|' | cut -d' ' -f 2`
limit=180

date
echo "Checking for inactive sessions!"
while read -r d; do
    export DISPLAY=$d
    idle=`xprintidle`
    idleMins=$$(($$idle/1000/60))
    if [[ $$idleMins -gt $$limit ]]; then
        echo "WARN Display $$d is logged in for longer than $${limit}min (${idleMins}m)"
    else
        echo "INFO Display $$d is still ok ($${idleMins}m)"
    fi  
done <<< "$displays"

Further reading

Read more in the tech topic.

Let's talk!

I'm Carlo Nicolini — I am interested on the reliability of AI reasoning systems (interpretability, inference-time methods, probabilistic language programming) and on quantitative portfolio optimization (I am a maintainer of skfolio). If you're working on something in these areas and think we might collaborate, chat, discuss, I'm happy to talk about it!

The best way to reach me is on via DM on LinkedIn.