Comment 23 for bug 846407

Revision history for this message
Oleksandr Andrusenko (oleksandr-v-andrusenko) wrote :

I have the same issue on my Ubuntu 12.04.

I have tried the proposed workaround
    echo "gnome-session --session=ubuntu-2d" > ~/.xsession
and found it not working as expected: it successfully creates new session on each connection, although I need to reuse existing local session on DISPLAY :0 .

After some digging, I have found another solution, which not requires to edit ~/.xsession and allows to reuse existing session.
All what you need is to edit /etc/xrdp/xrdp.ini:

in the next section

[xrdp1]
name=sesman-Xvnc
lib=libvnc.so
username=ask
password=ask
ip=127.0.0.1
port=-1

replace the last line on the next one:
port=5900

Well, honestly, I'm not sure.
Maybe you still need additionally one or more things I unsuccessfully tried before that:
1) Re-login locally into your existing session using ubuntu-2d desktop type.
2) Run "sudo xhost +".
3) Remove "you must confirm each access to this machine" int the configuration of "desktop sharing".

Hope that helps.