x11vnc: gdm3 creates a new x11 display after login

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I would like to be able to connect to my computer running Ubuntu 18.04 remotely via a VNC client. I am using x11vnc server-side.



Here is how I start my initial x11vnc session:



sudo x11vnc -rfbauth ~/.x11vnc/passwd -forever -bg -sshxdmsvc -rfbport 5900 -create -auth /run/user/123/gdm/Xauthority -display :0


I found the -auth argument by running the command



ps wwwaux | grep auth


This works properly: with that configuration, I do manage to connect to the vnc server over SSH, and that displays me my login screen managed by gdm3. However, whenever I do enter my password, the screen turns black. When I run the command w, I get:



USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
skasch :1 :1 10:13 ?xdm? 12.27s 0.00s /usr/lib/gdm3/gdm-


And if I stop the x11vnc and restart it with the following configuration:



x11vnc -rfbauth ~/.x11vnc/passwd -forever -sshxdmsvc -rfbport 5900 -create -display :1


then I can correctly connect over SSH to my actual personal session.




However, it is inconvenient and impractical to have to run two different x11vnc daemons to login then connect to my personal session; is there a way to configure x11vnc or gdm3 to allow me to create a single VNC daemon to both login and display my session? This was working properly with Ubuntu 16.04 (and I believe it's because it was relying on lightdm).







share|improve this question


























    up vote
    1
    down vote

    favorite












    I would like to be able to connect to my computer running Ubuntu 18.04 remotely via a VNC client. I am using x11vnc server-side.



    Here is how I start my initial x11vnc session:



    sudo x11vnc -rfbauth ~/.x11vnc/passwd -forever -bg -sshxdmsvc -rfbport 5900 -create -auth /run/user/123/gdm/Xauthority -display :0


    I found the -auth argument by running the command



    ps wwwaux | grep auth


    This works properly: with that configuration, I do manage to connect to the vnc server over SSH, and that displays me my login screen managed by gdm3. However, whenever I do enter my password, the screen turns black. When I run the command w, I get:



    USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
    skasch :1 :1 10:13 ?xdm? 12.27s 0.00s /usr/lib/gdm3/gdm-


    And if I stop the x11vnc and restart it with the following configuration:



    x11vnc -rfbauth ~/.x11vnc/passwd -forever -sshxdmsvc -rfbport 5900 -create -display :1


    then I can correctly connect over SSH to my actual personal session.




    However, it is inconvenient and impractical to have to run two different x11vnc daemons to login then connect to my personal session; is there a way to configure x11vnc or gdm3 to allow me to create a single VNC daemon to both login and display my session? This was working properly with Ubuntu 16.04 (and I believe it's because it was relying on lightdm).







    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I would like to be able to connect to my computer running Ubuntu 18.04 remotely via a VNC client. I am using x11vnc server-side.



      Here is how I start my initial x11vnc session:



      sudo x11vnc -rfbauth ~/.x11vnc/passwd -forever -bg -sshxdmsvc -rfbport 5900 -create -auth /run/user/123/gdm/Xauthority -display :0


      I found the -auth argument by running the command



      ps wwwaux | grep auth


      This works properly: with that configuration, I do manage to connect to the vnc server over SSH, and that displays me my login screen managed by gdm3. However, whenever I do enter my password, the screen turns black. When I run the command w, I get:



      USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
      skasch :1 :1 10:13 ?xdm? 12.27s 0.00s /usr/lib/gdm3/gdm-


      And if I stop the x11vnc and restart it with the following configuration:



      x11vnc -rfbauth ~/.x11vnc/passwd -forever -sshxdmsvc -rfbport 5900 -create -display :1


      then I can correctly connect over SSH to my actual personal session.




      However, it is inconvenient and impractical to have to run two different x11vnc daemons to login then connect to my personal session; is there a way to configure x11vnc or gdm3 to allow me to create a single VNC daemon to both login and display my session? This was working properly with Ubuntu 16.04 (and I believe it's because it was relying on lightdm).







      share|improve this question














      I would like to be able to connect to my computer running Ubuntu 18.04 remotely via a VNC client. I am using x11vnc server-side.



      Here is how I start my initial x11vnc session:



      sudo x11vnc -rfbauth ~/.x11vnc/passwd -forever -bg -sshxdmsvc -rfbport 5900 -create -auth /run/user/123/gdm/Xauthority -display :0


      I found the -auth argument by running the command



      ps wwwaux | grep auth


      This works properly: with that configuration, I do manage to connect to the vnc server over SSH, and that displays me my login screen managed by gdm3. However, whenever I do enter my password, the screen turns black. When I run the command w, I get:



      USER TTY FROM LOGIN@ IDLE JCPU PCPU WHAT
      skasch :1 :1 10:13 ?xdm? 12.27s 0.00s /usr/lib/gdm3/gdm-


      And if I stop the x11vnc and restart it with the following configuration:



      x11vnc -rfbauth ~/.x11vnc/passwd -forever -sshxdmsvc -rfbport 5900 -create -display :1


      then I can correctly connect over SSH to my actual personal session.




      However, it is inconvenient and impractical to have to run two different x11vnc daemons to login then connect to my personal session; is there a way to configure x11vnc or gdm3 to allow me to create a single VNC daemon to both login and display my session? This was working properly with Ubuntu 16.04 (and I believe it's because it was relying on lightdm).









      share|improve this question













      share|improve this question




      share|improve this question








      edited Apr 28 at 1:09

























      asked Apr 28 at 1:02









      skasch

      64




      64

























          active

          oldest

          votes











          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',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          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%2f1029015%2fx11vnc-gdm3-creates-a-new-x11-display-after-login%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1029015%2fx11vnc-gdm3-creates-a-new-x11-display-after-login%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Unable to execute new pre-installation script (/var/lib/dpkg/tmp.ci/preinst)

          Running the scala interactive shell from the command line

          Do not install recommended packages of dependencies