How do I set up xrdp session that reuses an existing session?












53














I have been trying to set up a RDP terminal server on precise using xrdp and have been having significant trouble getting a working configuration. When a user logs on, I need it to connect to that users existing session if it exists, otherwise starting a new session, and any started session must start LXDE. What changes to the default configuration do I need to make in order for this to work?










share|improve this question
























  • On my XRDP config (except I'm running Unity on desktop sessions and Unity2D for remote sessions), logging in as a user automatically picks up their old sessions. Is each user getting a new session every time they connect?
    – agc93
    May 31 '12 at 11:58










  • The best explanation/solution I've found on the internet can be found at this location c-nergy.be/blog/?p=2879 Give it a try I hope this information help
    – gyest
    Jul 21 '13 at 7:59
















53














I have been trying to set up a RDP terminal server on precise using xrdp and have been having significant trouble getting a working configuration. When a user logs on, I need it to connect to that users existing session if it exists, otherwise starting a new session, and any started session must start LXDE. What changes to the default configuration do I need to make in order for this to work?










share|improve this question
























  • On my XRDP config (except I'm running Unity on desktop sessions and Unity2D for remote sessions), logging in as a user automatically picks up their old sessions. Is each user getting a new session every time they connect?
    – agc93
    May 31 '12 at 11:58










  • The best explanation/solution I've found on the internet can be found at this location c-nergy.be/blog/?p=2879 Give it a try I hope this information help
    – gyest
    Jul 21 '13 at 7:59














53












53








53


20





I have been trying to set up a RDP terminal server on precise using xrdp and have been having significant trouble getting a working configuration. When a user logs on, I need it to connect to that users existing session if it exists, otherwise starting a new session, and any started session must start LXDE. What changes to the default configuration do I need to make in order for this to work?










share|improve this question















I have been trying to set up a RDP terminal server on precise using xrdp and have been having significant trouble getting a working configuration. When a user logs on, I need it to connect to that users existing session if it exists, otherwise starting a new session, and any started session must start LXDE. What changes to the default configuration do I need to make in order for this to work?







remote-desktop lxde rdp






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 30 '12 at 4:10









Jorge Castro

36k105422617




36k105422617










asked May 7 '12 at 17:47









nloewennloewen

366136




366136












  • On my XRDP config (except I'm running Unity on desktop sessions and Unity2D for remote sessions), logging in as a user automatically picks up their old sessions. Is each user getting a new session every time they connect?
    – agc93
    May 31 '12 at 11:58










  • The best explanation/solution I've found on the internet can be found at this location c-nergy.be/blog/?p=2879 Give it a try I hope this information help
    – gyest
    Jul 21 '13 at 7:59


















  • On my XRDP config (except I'm running Unity on desktop sessions and Unity2D for remote sessions), logging in as a user automatically picks up their old sessions. Is each user getting a new session every time they connect?
    – agc93
    May 31 '12 at 11:58










  • The best explanation/solution I've found on the internet can be found at this location c-nergy.be/blog/?p=2879 Give it a try I hope this information help
    – gyest
    Jul 21 '13 at 7:59
















On my XRDP config (except I'm running Unity on desktop sessions and Unity2D for remote sessions), logging in as a user automatically picks up their old sessions. Is each user getting a new session every time they connect?
– agc93
May 31 '12 at 11:58




On my XRDP config (except I'm running Unity on desktop sessions and Unity2D for remote sessions), logging in as a user automatically picks up their old sessions. Is each user getting a new session every time they connect?
– agc93
May 31 '12 at 11:58












The best explanation/solution I've found on the internet can be found at this location c-nergy.be/blog/?p=2879 Give it a try I hope this information help
– gyest
Jul 21 '13 at 7:59




The best explanation/solution I've found on the internet can be found at this location c-nergy.be/blog/?p=2879 Give it a try I hope this information help
– gyest
Jul 21 '13 at 7:59










9 Answers
9






active

oldest

votes


















43














I had this same problem, and I just found an easy solution. I originally just installed xrdp using the standard proceedure:



apt-get install xrdp


After that, its all about your xrdp.ini file, which is located here:



/etc/xrdp/xrdp.ini


To open and edit the xrdp's configuration file use:



sudo nano /etc/xrdp/xrdp.ini


by default the first xrdp session handling script looks like this:



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


The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:



[xrdp1]
name=customsessionname
lib=libvnc.so
username=myusername
password=ask
ip=127.0.0.1
port=5912


Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.






share|improve this answer



















  • 2




    This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
    – VeeTheSecond
    Nov 17 '13 at 22:29






  • 6




    that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
    – stu
    Nov 2 '14 at 0:04






  • 3




    got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
    – Maxym
    Apr 16 '15 at 8:28






  • 1




    This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
    – Denys S.
    Nov 5 '15 at 16:59






  • 1




    The default port is 5910, see askubuntu.com/a/527975/592751
    – Pedi T.
    Dec 12 '17 at 15:52



















13














I'd like to improve on an existing answer. The top voted answer was to edit the xrdp.ini file to change port to a fixed value in place of the -1 wildcard to find an open port.



I tried that, but got an error connecting the first time, so ended up switching back to the -1 value. Frustration quickly set in though with the issue remaining of not resuming so I looked at the ini file again.



What worked for me, and was really just something I was curious about was this:



Edit the /etc/xrdp/xrdp.ini



Under [xrdp1] where port=-1 I noticed user name and password were set to ASK. If you set port=ask you will be given the option at the login prompt with username and password to choose a port.



Rather than install additional packages I found the easiest fix to be to set the ask option, connect the FIRST session (if I don't have one running already) on port -1 at the login with username and password.

After disconnecting the session, to resume an existing session always log in on the default port: 5910 and you will resume your existing session until you restart the remote computer or end the session when logging off.



To summarize:




  • Edit the xrdp.ini file

  • set port = ask

  • connect from the remote machine, and at login if you have no existing session, specify port -1

  • to resume a session enter the default of 5910






share|improve this answer























  • Worked for me. Although I will not remember 5910 going forward.
    – Vesanto
    Apr 30 '16 at 19:04






  • 7




    I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
    – hoekma
    Nov 28 '16 at 18:04








  • 2




    ^that is the best solution i have found as well.
    – Nacht
    Jan 6 '17 at 0:55










  • On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
    – SDsolar
    Jan 29 '17 at 20:23












  • If you then do it again but give it a port number of -1 it gives you a new session.
    – SDsolar
    Jan 29 '17 at 20:24





















7





+50









I hate to be the guy who just drops a link, but I followed the guide here and it worked really well. I can now log into an RDP session from Linux and Windows hosts and reconnects me to my old session if I've logged in before. This is the best guide to the install I've found. Unfortunately, the standard package install causes a lot more problems than doing it from source.



The author of that link has also made an automatic tool to install and configure it, but I haven't tried it, so be careful.



Hope that helps you out.






share|improve this answer





















  • Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
    – Jan
    Jun 1 '12 at 9:46










  • I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
    – agc93
    Jun 12 '12 at 5:49










  • check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
    – user91632
    Sep 22 '12 at 8:13










  • I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
    – artificerpi
    Aug 10 '17 at 5:08





















3














Problem is that xrdp does not always connect to the same port. In case it didn't and you forgot the port number, you could login a ssh session and find out the number by



netstat -tulpn | grep vnc


and you will get something like the following



tcp        0      0 127.0.0.1:5911          0.0.0.0:*               LISTEN      5365/Xvnc


and then you know 5911 was the port you connected to.






share|improve this answer





























    2














    on the log in screen with the xrdp box when you first connect to the remote desktop there should be a drop down box, from here choose "vnc-any" then input the ip address of the computer and the password but leave the port at what it is, this should help :)






    share|improve this answer





















    • That looks like the easiest one and works for me. Great. No complicated install, compile etc.
      – josef
      Nov 24 '13 at 8:48



















    0














    I ran into this problem on a Debian machine. Used X11RDP-o-Matic to build xrdp 0.7 packages. Prior to upgrading to systemd, xrdp session reconnect worked fine.



    Looking at the process tree I could see that the sessions were no longer children of xrdp-sesman. Turned out to be a permissions issue when using systemd. Google found a patch that fixes the problem.



    How do you identify a working reconnect? Run ps axf and look at the process tree for xrdp-sesman. X11rdp, xrdp-chansrv, xrdp-sessvc should all be running as a child. If they are not, xrdp-sesman will not know how to reconnect to the session.



    Here's what it looks like when working:



    good xrdp session process






    share|improve this answer





























      0














      If you encountered the problem of "password failed", you might take a look at the two issues in GitHub



      Reconnect to old vnc session - VNC password failed



      VNC Password failed when picking existing session



      In short, they mention that specifying port number no longer works in latest design.






      share|improve this answer





























        0














        1. Modifiy you xrdp.ini:



        sudo vi /etc/xrdp/xrdp.ini


        2.Change the port setting port=ask-1 in your connection rule:



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


        3.Restart your xrdp Service



        sudo service xrdp restart





        You should see the following picture when you login by remote desktop.
        xrdp login window




        1. At first login you can see this port number:



        Port Number



        If you forget this port number, you can using the following command to check:



        netstat -peant | grep 59 | grep Xvnc


        2. You can re-connect the last session by your port number.



        Re-connect the last session





        Ref:
        http://c-nergy.be/blog/?p=5305






        share|improve this answer





























          -1














          This UbuntuForum thread looks useful - I havent tested this myself - however I've copied the solution given here to complete this answer.



          RealVNC setup



          1. Uninstallation of the default Ubuntu VNC server (Vino):



          Go to: System --> Administration --> Synaptic Package Manager
          Search for the "Vino" package, Mark For Removal, Apply.



          2. Installation of TightVNC and XRDP:



          While you are using Synaptic Package Manager, seacrh for "tightvnc" package (be careful, not "xtightvnc") and Mark For Installation. Likewise, search for the "xrdp" package and Mark also For Installation. Apply.
          PS: if you want, you may discard any other "vnc" package that you don't need!



          3. Configuration of XRDP (Optional)



          Open a terminal and type the three following commands:



           cd /etc/xrdp
          cp xrdp.ini xrdp.ini.bak
          sudo gedit /etc/xrdp/xrdp.ini


          Remove Xrdp2-Xrdp6 sections, leave only the Xrdp1 section. Your xrdp.ini should look like this:



          [globals]
          bitmap_cache=yes
          bitmap_compression=yes
          port=3389
          crypt_level=low
          channel_code=1

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


          4. Connecting



          Restart the system and you are ready to connect!



          To connect from another Ubuntu machine, use: Applications --> Internet --> Terminal Server Client, type the IP of your Ubuntu VNC machine, use RDPv5 or RDP, click Connect!



          To connect from a Windows-based machine, use: Start --> Run --> mstsc, type the IP of your Ubuntu VNC machine, click Connect.



          When connected, use your Ubuntu user account credentials (u/n and p/w) and remotely login to your desktop.






          share|improve this answer























          • Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
            – fossfreedom
            May 28 '12 at 5:56












          • @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
            – Rahul Virpara
            May 28 '12 at 7:24










          • You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
            – fossfreedom
            May 28 '12 at 8:28











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "89"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f133343%2fhow-do-i-set-up-xrdp-session-that-reuses-an-existing-session%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          9 Answers
          9






          active

          oldest

          votes








          9 Answers
          9






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          43














          I had this same problem, and I just found an easy solution. I originally just installed xrdp using the standard proceedure:



          apt-get install xrdp


          After that, its all about your xrdp.ini file, which is located here:



          /etc/xrdp/xrdp.ini


          To open and edit the xrdp's configuration file use:



          sudo nano /etc/xrdp/xrdp.ini


          by default the first xrdp session handling script looks like this:



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


          The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:



          [xrdp1]
          name=customsessionname
          lib=libvnc.so
          username=myusername
          password=ask
          ip=127.0.0.1
          port=5912


          Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.






          share|improve this answer



















          • 2




            This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
            – VeeTheSecond
            Nov 17 '13 at 22:29






          • 6




            that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
            – stu
            Nov 2 '14 at 0:04






          • 3




            got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
            – Maxym
            Apr 16 '15 at 8:28






          • 1




            This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
            – Denys S.
            Nov 5 '15 at 16:59






          • 1




            The default port is 5910, see askubuntu.com/a/527975/592751
            – Pedi T.
            Dec 12 '17 at 15:52
















          43














          I had this same problem, and I just found an easy solution. I originally just installed xrdp using the standard proceedure:



          apt-get install xrdp


          After that, its all about your xrdp.ini file, which is located here:



          /etc/xrdp/xrdp.ini


          To open and edit the xrdp's configuration file use:



          sudo nano /etc/xrdp/xrdp.ini


          by default the first xrdp session handling script looks like this:



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


          The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:



          [xrdp1]
          name=customsessionname
          lib=libvnc.so
          username=myusername
          password=ask
          ip=127.0.0.1
          port=5912


          Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.






          share|improve this answer



















          • 2




            This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
            – VeeTheSecond
            Nov 17 '13 at 22:29






          • 6




            that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
            – stu
            Nov 2 '14 at 0:04






          • 3




            got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
            – Maxym
            Apr 16 '15 at 8:28






          • 1




            This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
            – Denys S.
            Nov 5 '15 at 16:59






          • 1




            The default port is 5910, see askubuntu.com/a/527975/592751
            – Pedi T.
            Dec 12 '17 at 15:52














          43












          43








          43






          I had this same problem, and I just found an easy solution. I originally just installed xrdp using the standard proceedure:



          apt-get install xrdp


          After that, its all about your xrdp.ini file, which is located here:



          /etc/xrdp/xrdp.ini


          To open and edit the xrdp's configuration file use:



          sudo nano /etc/xrdp/xrdp.ini


          by default the first xrdp session handling script looks like this:



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


          The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:



          [xrdp1]
          name=customsessionname
          lib=libvnc.so
          username=myusername
          password=ask
          ip=127.0.0.1
          port=5912


          Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.






          share|improve this answer














          I had this same problem, and I just found an easy solution. I originally just installed xrdp using the standard proceedure:



          apt-get install xrdp


          After that, its all about your xrdp.ini file, which is located here:



          /etc/xrdp/xrdp.ini


          To open and edit the xrdp's configuration file use:



          sudo nano /etc/xrdp/xrdp.ini


          by default the first xrdp session handling script looks like this:



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


          The important line is port=-1, this makes xrdp always look for a free port to connect. If you set a fixed port here, the xrdp will always go back and connect to the same session. I changed mine so it looks like this:



          [xrdp1]
          name=customsessionname
          lib=libvnc.so
          username=myusername
          password=ask
          ip=127.0.0.1
          port=5912


          Thats it, I think you could get away with just changing the port=-1 to port=5912. My xrdp always re-connects to existing session always using the same port.







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Jan 4 '18 at 20:07









          Community

          1




          1










          answered Oct 18 '13 at 7:39









          jeffery_the_windjeffery_the_wind

          71331122




          71331122








          • 2




            This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
            – VeeTheSecond
            Nov 17 '13 at 22:29






          • 6




            that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
            – stu
            Nov 2 '14 at 0:04






          • 3




            got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
            – Maxym
            Apr 16 '15 at 8:28






          • 1




            This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
            – Denys S.
            Nov 5 '15 at 16:59






          • 1




            The default port is 5910, see askubuntu.com/a/527975/592751
            – Pedi T.
            Dec 12 '17 at 15:52














          • 2




            This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
            – VeeTheSecond
            Nov 17 '13 at 22:29






          • 6




            that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
            – stu
            Nov 2 '14 at 0:04






          • 3




            got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
            – Maxym
            Apr 16 '15 at 8:28






          • 1




            This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
            – Denys S.
            Nov 5 '15 at 16:59






          • 1




            The default port is 5910, see askubuntu.com/a/527975/592751
            – Pedi T.
            Dec 12 '17 at 15:52








          2




          2




          This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
          – VeeTheSecond
          Nov 17 '13 at 22:29




          This solution works well for me, but I should point out that anyone who connects to the same machine will get the same session, even if someone else logged in under that session.
          – VeeTheSecond
          Nov 17 '13 at 22:29




          6




          6




          that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
          – stu
          Nov 2 '14 at 0:04




          that only works if there's already an existing session though. The first time in, there's no session so it fails to connect to port 5912.
          – stu
          Nov 2 '14 at 0:04




          3




          3




          got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
          – Maxym
          Apr 16 '15 at 8:28




          got the same issue.. seems that by default it tries to open a connection using 5911port (you can notice it when xrpd is connecting). So I changed from port=-1 to port=ask5911. This way 5911 is used by default but you can change that port when you enter user/password while connecting (so no need to reconfigure anything in case of errors..)
          – Maxym
          Apr 16 '15 at 8:28




          1




          1




          This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
          – Denys S.
          Nov 5 '15 at 16:59




          This behavior depends strictly on vnc server implementation. Under centos i'm using tigervnc, which always joins to existing session or creates one with port=-1 setting. However, under ubuntu the default is tightvncserver, which doesn't have same behavior. Just play with vnc implementations, if anything.
          – Denys S.
          Nov 5 '15 at 16:59




          1




          1




          The default port is 5910, see askubuntu.com/a/527975/592751
          – Pedi T.
          Dec 12 '17 at 15:52




          The default port is 5910, see askubuntu.com/a/527975/592751
          – Pedi T.
          Dec 12 '17 at 15:52













          13














          I'd like to improve on an existing answer. The top voted answer was to edit the xrdp.ini file to change port to a fixed value in place of the -1 wildcard to find an open port.



          I tried that, but got an error connecting the first time, so ended up switching back to the -1 value. Frustration quickly set in though with the issue remaining of not resuming so I looked at the ini file again.



          What worked for me, and was really just something I was curious about was this:



          Edit the /etc/xrdp/xrdp.ini



          Under [xrdp1] where port=-1 I noticed user name and password were set to ASK. If you set port=ask you will be given the option at the login prompt with username and password to choose a port.



          Rather than install additional packages I found the easiest fix to be to set the ask option, connect the FIRST session (if I don't have one running already) on port -1 at the login with username and password.

          After disconnecting the session, to resume an existing session always log in on the default port: 5910 and you will resume your existing session until you restart the remote computer or end the session when logging off.



          To summarize:




          • Edit the xrdp.ini file

          • set port = ask

          • connect from the remote machine, and at login if you have no existing session, specify port -1

          • to resume a session enter the default of 5910






          share|improve this answer























          • Worked for me. Although I will not remember 5910 going forward.
            – Vesanto
            Apr 30 '16 at 19:04






          • 7




            I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
            – hoekma
            Nov 28 '16 at 18:04








          • 2




            ^that is the best solution i have found as well.
            – Nacht
            Jan 6 '17 at 0:55










          • On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
            – SDsolar
            Jan 29 '17 at 20:23












          • If you then do it again but give it a port number of -1 it gives you a new session.
            – SDsolar
            Jan 29 '17 at 20:24


















          13














          I'd like to improve on an existing answer. The top voted answer was to edit the xrdp.ini file to change port to a fixed value in place of the -1 wildcard to find an open port.



          I tried that, but got an error connecting the first time, so ended up switching back to the -1 value. Frustration quickly set in though with the issue remaining of not resuming so I looked at the ini file again.



          What worked for me, and was really just something I was curious about was this:



          Edit the /etc/xrdp/xrdp.ini



          Under [xrdp1] where port=-1 I noticed user name and password were set to ASK. If you set port=ask you will be given the option at the login prompt with username and password to choose a port.



          Rather than install additional packages I found the easiest fix to be to set the ask option, connect the FIRST session (if I don't have one running already) on port -1 at the login with username and password.

          After disconnecting the session, to resume an existing session always log in on the default port: 5910 and you will resume your existing session until you restart the remote computer or end the session when logging off.



          To summarize:




          • Edit the xrdp.ini file

          • set port = ask

          • connect from the remote machine, and at login if you have no existing session, specify port -1

          • to resume a session enter the default of 5910






          share|improve this answer























          • Worked for me. Although I will not remember 5910 going forward.
            – Vesanto
            Apr 30 '16 at 19:04






          • 7




            I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
            – hoekma
            Nov 28 '16 at 18:04








          • 2




            ^that is the best solution i have found as well.
            – Nacht
            Jan 6 '17 at 0:55










          • On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
            – SDsolar
            Jan 29 '17 at 20:23












          • If you then do it again but give it a port number of -1 it gives you a new session.
            – SDsolar
            Jan 29 '17 at 20:24
















          13












          13








          13






          I'd like to improve on an existing answer. The top voted answer was to edit the xrdp.ini file to change port to a fixed value in place of the -1 wildcard to find an open port.



          I tried that, but got an error connecting the first time, so ended up switching back to the -1 value. Frustration quickly set in though with the issue remaining of not resuming so I looked at the ini file again.



          What worked for me, and was really just something I was curious about was this:



          Edit the /etc/xrdp/xrdp.ini



          Under [xrdp1] where port=-1 I noticed user name and password were set to ASK. If you set port=ask you will be given the option at the login prompt with username and password to choose a port.



          Rather than install additional packages I found the easiest fix to be to set the ask option, connect the FIRST session (if I don't have one running already) on port -1 at the login with username and password.

          After disconnecting the session, to resume an existing session always log in on the default port: 5910 and you will resume your existing session until you restart the remote computer or end the session when logging off.



          To summarize:




          • Edit the xrdp.ini file

          • set port = ask

          • connect from the remote machine, and at login if you have no existing session, specify port -1

          • to resume a session enter the default of 5910






          share|improve this answer














          I'd like to improve on an existing answer. The top voted answer was to edit the xrdp.ini file to change port to a fixed value in place of the -1 wildcard to find an open port.



          I tried that, but got an error connecting the first time, so ended up switching back to the -1 value. Frustration quickly set in though with the issue remaining of not resuming so I looked at the ini file again.



          What worked for me, and was really just something I was curious about was this:



          Edit the /etc/xrdp/xrdp.ini



          Under [xrdp1] where port=-1 I noticed user name and password were set to ASK. If you set port=ask you will be given the option at the login prompt with username and password to choose a port.



          Rather than install additional packages I found the easiest fix to be to set the ask option, connect the FIRST session (if I don't have one running already) on port -1 at the login with username and password.

          After disconnecting the session, to resume an existing session always log in on the default port: 5910 and you will resume your existing session until you restart the remote computer or end the session when logging off.



          To summarize:




          • Edit the xrdp.ini file

          • set port = ask

          • connect from the remote machine, and at login if you have no existing session, specify port -1

          • to resume a session enter the default of 5910







          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Feb 28 '18 at 9:00









          n611x007

          310114




          310114










          answered Dec 4 '15 at 4:46









          QuestionRealityQuestionReality

          315410




          315410












          • Worked for me. Although I will not remember 5910 going forward.
            – Vesanto
            Apr 30 '16 at 19:04






          • 7




            I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
            – hoekma
            Nov 28 '16 at 18:04








          • 2




            ^that is the best solution i have found as well.
            – Nacht
            Jan 6 '17 at 0:55










          • On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
            – SDsolar
            Jan 29 '17 at 20:23












          • If you then do it again but give it a port number of -1 it gives you a new session.
            – SDsolar
            Jan 29 '17 at 20:24




















          • Worked for me. Although I will not remember 5910 going forward.
            – Vesanto
            Apr 30 '16 at 19:04






          • 7




            I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
            – hoekma
            Nov 28 '16 at 18:04








          • 2




            ^that is the best solution i have found as well.
            – Nacht
            Jan 6 '17 at 0:55










          • On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
            – SDsolar
            Jan 29 '17 at 20:23












          • If you then do it again but give it a port number of -1 it gives you a new session.
            – SDsolar
            Jan 29 '17 at 20:24


















          Worked for me. Although I will not remember 5910 going forward.
          – Vesanto
          Apr 30 '16 at 19:04




          Worked for me. Although I will not remember 5910 going forward.
          – Vesanto
          Apr 30 '16 at 19:04




          7




          7




          I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
          – hoekma
          Nov 28 '16 at 18:04






          I was able to successfully change the entry to: [xrdp1] . . . port=ask5910 This defaults the port to 5910 so you don't have to remember it like Vesanto said (I would never remember it either, Vesanto!) but also gives you the option to change it if you wanted to spawn a new desktop session on, say port 5911. I tested this on Ubuntu 16.04.
          – hoekma
          Nov 28 '16 at 18:04






          2




          2




          ^that is the best solution i have found as well.
          – Nacht
          Jan 6 '17 at 0:55




          ^that is the best solution i have found as well.
          – Nacht
          Jan 6 '17 at 0:55












          On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
          – SDsolar
          Jan 29 '17 at 20:23






          On a freshly booted Rpi3 I started a new session with port -1 and I then came in with a different computer and used port 5910 - it picked up the same session. When you move things on one computer you can see it happen on the other.
          – SDsolar
          Jan 29 '17 at 20:23














          If you then do it again but give it a port number of -1 it gives you a new session.
          – SDsolar
          Jan 29 '17 at 20:24






          If you then do it again but give it a port number of -1 it gives you a new session.
          – SDsolar
          Jan 29 '17 at 20:24













          7





          +50









          I hate to be the guy who just drops a link, but I followed the guide here and it worked really well. I can now log into an RDP session from Linux and Windows hosts and reconnects me to my old session if I've logged in before. This is the best guide to the install I've found. Unfortunately, the standard package install causes a lot more problems than doing it from source.



          The author of that link has also made an automatic tool to install and configure it, but I haven't tried it, so be careful.



          Hope that helps you out.






          share|improve this answer





















          • Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
            – Jan
            Jun 1 '12 at 9:46










          • I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
            – agc93
            Jun 12 '12 at 5:49










          • check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
            – user91632
            Sep 22 '12 at 8:13










          • I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
            – artificerpi
            Aug 10 '17 at 5:08


















          7





          +50









          I hate to be the guy who just drops a link, but I followed the guide here and it worked really well. I can now log into an RDP session from Linux and Windows hosts and reconnects me to my old session if I've logged in before. This is the best guide to the install I've found. Unfortunately, the standard package install causes a lot more problems than doing it from source.



          The author of that link has also made an automatic tool to install and configure it, but I haven't tried it, so be careful.



          Hope that helps you out.






          share|improve this answer





















          • Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
            – Jan
            Jun 1 '12 at 9:46










          • I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
            – agc93
            Jun 12 '12 at 5:49










          • check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
            – user91632
            Sep 22 '12 at 8:13










          • I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
            – artificerpi
            Aug 10 '17 at 5:08
















          7





          +50







          7





          +50



          7




          +50




          I hate to be the guy who just drops a link, but I followed the guide here and it worked really well. I can now log into an RDP session from Linux and Windows hosts and reconnects me to my old session if I've logged in before. This is the best guide to the install I've found. Unfortunately, the standard package install causes a lot more problems than doing it from source.



          The author of that link has also made an automatic tool to install and configure it, but I haven't tried it, so be careful.



          Hope that helps you out.






          share|improve this answer












          I hate to be the guy who just drops a link, but I followed the guide here and it worked really well. I can now log into an RDP session from Linux and Windows hosts and reconnects me to my old session if I've logged in before. This is the best guide to the install I've found. Unfortunately, the standard package install causes a lot more problems than doing it from source.



          The author of that link has also made an automatic tool to install and configure it, but I haven't tried it, so be careful.



          Hope that helps you out.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 31 '12 at 12:04









          agc93agc93

          635313




          635313












          • Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
            – Jan
            Jun 1 '12 at 9:46










          • I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
            – agc93
            Jun 12 '12 at 5:49










          • check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
            – user91632
            Sep 22 '12 at 8:13










          • I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
            – artificerpi
            Aug 10 '17 at 5:08




















          • Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
            – Jan
            Jun 1 '12 at 9:46










          • I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
            – agc93
            Jun 12 '12 at 5:49










          • check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
            – user91632
            Sep 22 '12 at 8:13










          • I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
            – artificerpi
            Aug 10 '17 at 5:08


















          Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
          – Jan
          Jun 1 '12 at 9:46




          Thank you for providing the link. Does this imply, that no working deb package exits for for xrdp?
          – Jan
          Jun 1 '12 at 9:46












          I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
          – agc93
          Jun 12 '12 at 5:49




          I did see one sometime ago, but it didn not work correctly with newer versions of Ubuntu. As far as I am aware, there is no working .deb package for XRDP on Ubuntu versions post 10.04. Happy to be proven wrong of course, as this method is disappointingly irritating.
          – agc93
          Jun 12 '12 at 5:49












          check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
          – user91632
          Sep 22 '12 at 8:13




          check my solution which is super automatic on script for ubuntu 12 64bit http://askubuntu.com/questions/190838/how-to-install-x11rdp-on-ubuntu-12-04/190855#190855
          – user91632
          Sep 22 '12 at 8:13












          I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
          – artificerpi
          Aug 10 '17 at 5:08






          I think what it makes sense for this question is creating your own .xsession file in your home dir. For example, if you use gnome-desktop, run echo gnome-session >> ~/.xsession
          – artificerpi
          Aug 10 '17 at 5:08













          3














          Problem is that xrdp does not always connect to the same port. In case it didn't and you forgot the port number, you could login a ssh session and find out the number by



          netstat -tulpn | grep vnc


          and you will get something like the following



          tcp        0      0 127.0.0.1:5911          0.0.0.0:*               LISTEN      5365/Xvnc


          and then you know 5911 was the port you connected to.






          share|improve this answer


























            3














            Problem is that xrdp does not always connect to the same port. In case it didn't and you forgot the port number, you could login a ssh session and find out the number by



            netstat -tulpn | grep vnc


            and you will get something like the following



            tcp        0      0 127.0.0.1:5911          0.0.0.0:*               LISTEN      5365/Xvnc


            and then you know 5911 was the port you connected to.






            share|improve this answer
























              3












              3








              3






              Problem is that xrdp does not always connect to the same port. In case it didn't and you forgot the port number, you could login a ssh session and find out the number by



              netstat -tulpn | grep vnc


              and you will get something like the following



              tcp        0      0 127.0.0.1:5911          0.0.0.0:*               LISTEN      5365/Xvnc


              and then you know 5911 was the port you connected to.






              share|improve this answer












              Problem is that xrdp does not always connect to the same port. In case it didn't and you forgot the port number, you could login a ssh session and find out the number by



              netstat -tulpn | grep vnc


              and you will get something like the following



              tcp        0      0 127.0.0.1:5911          0.0.0.0:*               LISTEN      5365/Xvnc


              and then you know 5911 was the port you connected to.







              share|improve this answer












              share|improve this answer



              share|improve this answer










              answered Aug 12 '16 at 20:18









              YH WuYH Wu

              411




              411























                  2














                  on the log in screen with the xrdp box when you first connect to the remote desktop there should be a drop down box, from here choose "vnc-any" then input the ip address of the computer and the password but leave the port at what it is, this should help :)






                  share|improve this answer





















                  • That looks like the easiest one and works for me. Great. No complicated install, compile etc.
                    – josef
                    Nov 24 '13 at 8:48
















                  2














                  on the log in screen with the xrdp box when you first connect to the remote desktop there should be a drop down box, from here choose "vnc-any" then input the ip address of the computer and the password but leave the port at what it is, this should help :)






                  share|improve this answer





















                  • That looks like the easiest one and works for me. Great. No complicated install, compile etc.
                    – josef
                    Nov 24 '13 at 8:48














                  2












                  2








                  2






                  on the log in screen with the xrdp box when you first connect to the remote desktop there should be a drop down box, from here choose "vnc-any" then input the ip address of the computer and the password but leave the port at what it is, this should help :)






                  share|improve this answer












                  on the log in screen with the xrdp box when you first connect to the remote desktop there should be a drop down box, from here choose "vnc-any" then input the ip address of the computer and the password but leave the port at what it is, this should help :)







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Apr 11 '13 at 8:47









                  Dewi JonesDewi Jones

                  1215




                  1215












                  • That looks like the easiest one and works for me. Great. No complicated install, compile etc.
                    – josef
                    Nov 24 '13 at 8:48


















                  • That looks like the easiest one and works for me. Great. No complicated install, compile etc.
                    – josef
                    Nov 24 '13 at 8:48
















                  That looks like the easiest one and works for me. Great. No complicated install, compile etc.
                  – josef
                  Nov 24 '13 at 8:48




                  That looks like the easiest one and works for me. Great. No complicated install, compile etc.
                  – josef
                  Nov 24 '13 at 8:48











                  0














                  I ran into this problem on a Debian machine. Used X11RDP-o-Matic to build xrdp 0.7 packages. Prior to upgrading to systemd, xrdp session reconnect worked fine.



                  Looking at the process tree I could see that the sessions were no longer children of xrdp-sesman. Turned out to be a permissions issue when using systemd. Google found a patch that fixes the problem.



                  How do you identify a working reconnect? Run ps axf and look at the process tree for xrdp-sesman. X11rdp, xrdp-chansrv, xrdp-sessvc should all be running as a child. If they are not, xrdp-sesman will not know how to reconnect to the session.



                  Here's what it looks like when working:



                  good xrdp session process






                  share|improve this answer


























                    0














                    I ran into this problem on a Debian machine. Used X11RDP-o-Matic to build xrdp 0.7 packages. Prior to upgrading to systemd, xrdp session reconnect worked fine.



                    Looking at the process tree I could see that the sessions were no longer children of xrdp-sesman. Turned out to be a permissions issue when using systemd. Google found a patch that fixes the problem.



                    How do you identify a working reconnect? Run ps axf and look at the process tree for xrdp-sesman. X11rdp, xrdp-chansrv, xrdp-sessvc should all be running as a child. If they are not, xrdp-sesman will not know how to reconnect to the session.



                    Here's what it looks like when working:



                    good xrdp session process






                    share|improve this answer
























                      0












                      0








                      0






                      I ran into this problem on a Debian machine. Used X11RDP-o-Matic to build xrdp 0.7 packages. Prior to upgrading to systemd, xrdp session reconnect worked fine.



                      Looking at the process tree I could see that the sessions were no longer children of xrdp-sesman. Turned out to be a permissions issue when using systemd. Google found a patch that fixes the problem.



                      How do you identify a working reconnect? Run ps axf and look at the process tree for xrdp-sesman. X11rdp, xrdp-chansrv, xrdp-sessvc should all be running as a child. If they are not, xrdp-sesman will not know how to reconnect to the session.



                      Here's what it looks like when working:



                      good xrdp session process






                      share|improve this answer












                      I ran into this problem on a Debian machine. Used X11RDP-o-Matic to build xrdp 0.7 packages. Prior to upgrading to systemd, xrdp session reconnect worked fine.



                      Looking at the process tree I could see that the sessions were no longer children of xrdp-sesman. Turned out to be a permissions issue when using systemd. Google found a patch that fixes the problem.



                      How do you identify a working reconnect? Run ps axf and look at the process tree for xrdp-sesman. X11rdp, xrdp-chansrv, xrdp-sessvc should all be running as a child. If they are not, xrdp-sesman will not know how to reconnect to the session.



                      Here's what it looks like when working:



                      good xrdp session process







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Dec 31 '13 at 22:20









                      h0tw1r3h0tw1r3

                      1114




                      1114























                          0














                          If you encountered the problem of "password failed", you might take a look at the two issues in GitHub



                          Reconnect to old vnc session - VNC password failed



                          VNC Password failed when picking existing session



                          In short, they mention that specifying port number no longer works in latest design.






                          share|improve this answer


























                            0














                            If you encountered the problem of "password failed", you might take a look at the two issues in GitHub



                            Reconnect to old vnc session - VNC password failed



                            VNC Password failed when picking existing session



                            In short, they mention that specifying port number no longer works in latest design.






                            share|improve this answer
























                              0












                              0








                              0






                              If you encountered the problem of "password failed", you might take a look at the two issues in GitHub



                              Reconnect to old vnc session - VNC password failed



                              VNC Password failed when picking existing session



                              In short, they mention that specifying port number no longer works in latest design.






                              share|improve this answer












                              If you encountered the problem of "password failed", you might take a look at the two issues in GitHub



                              Reconnect to old vnc session - VNC password failed



                              VNC Password failed when picking existing session



                              In short, they mention that specifying port number no longer works in latest design.







                              share|improve this answer












                              share|improve this answer



                              share|improve this answer










                              answered Jul 3 '18 at 10:12









                              waiwaiwaiwai

                              1




                              1























                                  0














                                  1. Modifiy you xrdp.ini:



                                  sudo vi /etc/xrdp/xrdp.ini


                                  2.Change the port setting port=ask-1 in your connection rule:



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


                                  3.Restart your xrdp Service



                                  sudo service xrdp restart





                                  You should see the following picture when you login by remote desktop.
                                  xrdp login window




                                  1. At first login you can see this port number:



                                  Port Number



                                  If you forget this port number, you can using the following command to check:



                                  netstat -peant | grep 59 | grep Xvnc


                                  2. You can re-connect the last session by your port number.



                                  Re-connect the last session





                                  Ref:
                                  http://c-nergy.be/blog/?p=5305






                                  share|improve this answer


























                                    0














                                    1. Modifiy you xrdp.ini:



                                    sudo vi /etc/xrdp/xrdp.ini


                                    2.Change the port setting port=ask-1 in your connection rule:



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


                                    3.Restart your xrdp Service



                                    sudo service xrdp restart





                                    You should see the following picture when you login by remote desktop.
                                    xrdp login window




                                    1. At first login you can see this port number:



                                    Port Number



                                    If you forget this port number, you can using the following command to check:



                                    netstat -peant | grep 59 | grep Xvnc


                                    2. You can re-connect the last session by your port number.



                                    Re-connect the last session





                                    Ref:
                                    http://c-nergy.be/blog/?p=5305






                                    share|improve this answer
























                                      0












                                      0








                                      0






                                      1. Modifiy you xrdp.ini:



                                      sudo vi /etc/xrdp/xrdp.ini


                                      2.Change the port setting port=ask-1 in your connection rule:



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


                                      3.Restart your xrdp Service



                                      sudo service xrdp restart





                                      You should see the following picture when you login by remote desktop.
                                      xrdp login window




                                      1. At first login you can see this port number:



                                      Port Number



                                      If you forget this port number, you can using the following command to check:



                                      netstat -peant | grep 59 | grep Xvnc


                                      2. You can re-connect the last session by your port number.



                                      Re-connect the last session





                                      Ref:
                                      http://c-nergy.be/blog/?p=5305






                                      share|improve this answer












                                      1. Modifiy you xrdp.ini:



                                      sudo vi /etc/xrdp/xrdp.ini


                                      2.Change the port setting port=ask-1 in your connection rule:



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


                                      3.Restart your xrdp Service



                                      sudo service xrdp restart





                                      You should see the following picture when you login by remote desktop.
                                      xrdp login window




                                      1. At first login you can see this port number:



                                      Port Number



                                      If you forget this port number, you can using the following command to check:



                                      netstat -peant | grep 59 | grep Xvnc


                                      2. You can re-connect the last session by your port number.



                                      Re-connect the last session





                                      Ref:
                                      http://c-nergy.be/blog/?p=5305







                                      share|improve this answer












                                      share|improve this answer



                                      share|improve this answer










                                      answered Dec 6 '18 at 3:41









                                      W. DanW. Dan

                                      11




                                      11























                                          -1














                                          This UbuntuForum thread looks useful - I havent tested this myself - however I've copied the solution given here to complete this answer.



                                          RealVNC setup



                                          1. Uninstallation of the default Ubuntu VNC server (Vino):



                                          Go to: System --> Administration --> Synaptic Package Manager
                                          Search for the "Vino" package, Mark For Removal, Apply.



                                          2. Installation of TightVNC and XRDP:



                                          While you are using Synaptic Package Manager, seacrh for "tightvnc" package (be careful, not "xtightvnc") and Mark For Installation. Likewise, search for the "xrdp" package and Mark also For Installation. Apply.
                                          PS: if you want, you may discard any other "vnc" package that you don't need!



                                          3. Configuration of XRDP (Optional)



                                          Open a terminal and type the three following commands:



                                           cd /etc/xrdp
                                          cp xrdp.ini xrdp.ini.bak
                                          sudo gedit /etc/xrdp/xrdp.ini


                                          Remove Xrdp2-Xrdp6 sections, leave only the Xrdp1 section. Your xrdp.ini should look like this:



                                          [globals]
                                          bitmap_cache=yes
                                          bitmap_compression=yes
                                          port=3389
                                          crypt_level=low
                                          channel_code=1

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


                                          4. Connecting



                                          Restart the system and you are ready to connect!



                                          To connect from another Ubuntu machine, use: Applications --> Internet --> Terminal Server Client, type the IP of your Ubuntu VNC machine, use RDPv5 or RDP, click Connect!



                                          To connect from a Windows-based machine, use: Start --> Run --> mstsc, type the IP of your Ubuntu VNC machine, click Connect.



                                          When connected, use your Ubuntu user account credentials (u/n and p/w) and remotely login to your desktop.






                                          share|improve this answer























                                          • Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
                                            – fossfreedom
                                            May 28 '12 at 5:56












                                          • @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
                                            – Rahul Virpara
                                            May 28 '12 at 7:24










                                          • You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
                                            – fossfreedom
                                            May 28 '12 at 8:28
















                                          -1














                                          This UbuntuForum thread looks useful - I havent tested this myself - however I've copied the solution given here to complete this answer.



                                          RealVNC setup



                                          1. Uninstallation of the default Ubuntu VNC server (Vino):



                                          Go to: System --> Administration --> Synaptic Package Manager
                                          Search for the "Vino" package, Mark For Removal, Apply.



                                          2. Installation of TightVNC and XRDP:



                                          While you are using Synaptic Package Manager, seacrh for "tightvnc" package (be careful, not "xtightvnc") and Mark For Installation. Likewise, search for the "xrdp" package and Mark also For Installation. Apply.
                                          PS: if you want, you may discard any other "vnc" package that you don't need!



                                          3. Configuration of XRDP (Optional)



                                          Open a terminal and type the three following commands:



                                           cd /etc/xrdp
                                          cp xrdp.ini xrdp.ini.bak
                                          sudo gedit /etc/xrdp/xrdp.ini


                                          Remove Xrdp2-Xrdp6 sections, leave only the Xrdp1 section. Your xrdp.ini should look like this:



                                          [globals]
                                          bitmap_cache=yes
                                          bitmap_compression=yes
                                          port=3389
                                          crypt_level=low
                                          channel_code=1

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


                                          4. Connecting



                                          Restart the system and you are ready to connect!



                                          To connect from another Ubuntu machine, use: Applications --> Internet --> Terminal Server Client, type the IP of your Ubuntu VNC machine, use RDPv5 or RDP, click Connect!



                                          To connect from a Windows-based machine, use: Start --> Run --> mstsc, type the IP of your Ubuntu VNC machine, click Connect.



                                          When connected, use your Ubuntu user account credentials (u/n and p/w) and remotely login to your desktop.






                                          share|improve this answer























                                          • Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
                                            – fossfreedom
                                            May 28 '12 at 5:56












                                          • @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
                                            – Rahul Virpara
                                            May 28 '12 at 7:24










                                          • You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
                                            – fossfreedom
                                            May 28 '12 at 8:28














                                          -1












                                          -1








                                          -1






                                          This UbuntuForum thread looks useful - I havent tested this myself - however I've copied the solution given here to complete this answer.



                                          RealVNC setup



                                          1. Uninstallation of the default Ubuntu VNC server (Vino):



                                          Go to: System --> Administration --> Synaptic Package Manager
                                          Search for the "Vino" package, Mark For Removal, Apply.



                                          2. Installation of TightVNC and XRDP:



                                          While you are using Synaptic Package Manager, seacrh for "tightvnc" package (be careful, not "xtightvnc") and Mark For Installation. Likewise, search for the "xrdp" package and Mark also For Installation. Apply.
                                          PS: if you want, you may discard any other "vnc" package that you don't need!



                                          3. Configuration of XRDP (Optional)



                                          Open a terminal and type the three following commands:



                                           cd /etc/xrdp
                                          cp xrdp.ini xrdp.ini.bak
                                          sudo gedit /etc/xrdp/xrdp.ini


                                          Remove Xrdp2-Xrdp6 sections, leave only the Xrdp1 section. Your xrdp.ini should look like this:



                                          [globals]
                                          bitmap_cache=yes
                                          bitmap_compression=yes
                                          port=3389
                                          crypt_level=low
                                          channel_code=1

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


                                          4. Connecting



                                          Restart the system and you are ready to connect!



                                          To connect from another Ubuntu machine, use: Applications --> Internet --> Terminal Server Client, type the IP of your Ubuntu VNC machine, use RDPv5 or RDP, click Connect!



                                          To connect from a Windows-based machine, use: Start --> Run --> mstsc, type the IP of your Ubuntu VNC machine, click Connect.



                                          When connected, use your Ubuntu user account credentials (u/n and p/w) and remotely login to your desktop.






                                          share|improve this answer














                                          This UbuntuForum thread looks useful - I havent tested this myself - however I've copied the solution given here to complete this answer.



                                          RealVNC setup



                                          1. Uninstallation of the default Ubuntu VNC server (Vino):



                                          Go to: System --> Administration --> Synaptic Package Manager
                                          Search for the "Vino" package, Mark For Removal, Apply.



                                          2. Installation of TightVNC and XRDP:



                                          While you are using Synaptic Package Manager, seacrh for "tightvnc" package (be careful, not "xtightvnc") and Mark For Installation. Likewise, search for the "xrdp" package and Mark also For Installation. Apply.
                                          PS: if you want, you may discard any other "vnc" package that you don't need!



                                          3. Configuration of XRDP (Optional)



                                          Open a terminal and type the three following commands:



                                           cd /etc/xrdp
                                          cp xrdp.ini xrdp.ini.bak
                                          sudo gedit /etc/xrdp/xrdp.ini


                                          Remove Xrdp2-Xrdp6 sections, leave only the Xrdp1 section. Your xrdp.ini should look like this:



                                          [globals]
                                          bitmap_cache=yes
                                          bitmap_compression=yes
                                          port=3389
                                          crypt_level=low
                                          channel_code=1

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


                                          4. Connecting



                                          Restart the system and you are ready to connect!



                                          To connect from another Ubuntu machine, use: Applications --> Internet --> Terminal Server Client, type the IP of your Ubuntu VNC machine, use RDPv5 or RDP, click Connect!



                                          To connect from a Windows-based machine, use: Start --> Run --> mstsc, type the IP of your Ubuntu VNC machine, click Connect.



                                          When connected, use your Ubuntu user account credentials (u/n and p/w) and remotely login to your desktop.







                                          share|improve this answer














                                          share|improve this answer



                                          share|improve this answer








                                          edited May 28 '12 at 8:28









                                          fossfreedom

                                          148k37326372




                                          148k37326372










                                          answered May 28 '12 at 3:40









                                          Rahul VirparaRahul Virpara

                                          6,643103347




                                          6,643103347












                                          • Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
                                            – fossfreedom
                                            May 28 '12 at 5:56












                                          • @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
                                            – Rahul Virpara
                                            May 28 '12 at 7:24










                                          • You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
                                            – fossfreedom
                                            May 28 '12 at 8:28


















                                          • Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
                                            – fossfreedom
                                            May 28 '12 at 5:56












                                          • @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
                                            – Rahul Virpara
                                            May 28 '12 at 7:24










                                          • You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
                                            – fossfreedom
                                            May 28 '12 at 8:28
















                                          Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
                                          – fossfreedom
                                          May 28 '12 at 5:56






                                          Have you actually tested this? It looks like you have just copy and pasted the link verbatim. If you do copy and paste, please acknowledge the source in your answer.
                                          – fossfreedom
                                          May 28 '12 at 5:56














                                          @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
                                          – Rahul Virpara
                                          May 28 '12 at 7:24




                                          @fossfreedom nope, I haven't tested but tried to help. BTW I have already mentioned source in this may help you.
                                          – Rahul Virpara
                                          May 28 '12 at 7:24












                                          You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
                                          – fossfreedom
                                          May 28 '12 at 8:28




                                          You perhaps should be more explicit then as to your source and the veracity of the answer. See my edit.
                                          – fossfreedom
                                          May 28 '12 at 8:28


















                                          draft saved

                                          draft discarded




















































                                          Thanks for contributing an answer to Ask Ubuntu!


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.





                                          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                          Please pay close attention to the following guidance:


                                          • Please be sure to answer the question. Provide details and share your research!

                                          But avoid



                                          • Asking for help, clarification, or responding to other answers.

                                          • Making statements based on opinion; back them up with references or personal experience.


                                          To learn more, see our tips on writing great answers.




                                          draft saved


                                          draft discarded














                                          StackExchange.ready(
                                          function () {
                                          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f133343%2fhow-do-i-set-up-xrdp-session-that-reuses-an-existing-session%23new-answer', 'question_page');
                                          }
                                          );

                                          Post as a guest















                                          Required, but never shown





















































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown

































                                          Required, but never shown














                                          Required, but never shown












                                          Required, but never shown







                                          Required, but never shown







                                          Popular posts from this blog

                                          Biblatex bibliography style without URLs when DOI exists (in Overleaf with Zotero bibliography)

                                          ComboBox Display Member on multiple fields

                                          Is it possible to collect Nectar points via Trainline?