Force vncserver started by lightdm to localhost on ubuntu 14.04












2















I am using vncserver with lightdm on ubuntu 14.04 on an amazon EC2 instance. I created a lightdm.conf:



#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# port = TCP/IP port to listen for connections on
#
[VNCServer]
enabled=true
port=5901
width=1024
height=768
depth=8


However the vncserver is started to listen on any ip:



netstat -atn:

...
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
...


I can start the vncserver manually with the -localhost flag.



How do I tell lightdm or vncserver to listen only to locahost?










share|improve this question























  • This is not currently possible. See bugs.launchpad.net/bugs/1390808

    – Robert Ancell
    Nov 9 '14 at 20:54
















2















I am using vncserver with lightdm on ubuntu 14.04 on an amazon EC2 instance. I created a lightdm.conf:



#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# port = TCP/IP port to listen for connections on
#
[VNCServer]
enabled=true
port=5901
width=1024
height=768
depth=8


However the vncserver is started to listen on any ip:



netstat -atn:

...
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
...


I can start the vncserver manually with the -localhost flag.



How do I tell lightdm or vncserver to listen only to locahost?










share|improve this question























  • This is not currently possible. See bugs.launchpad.net/bugs/1390808

    – Robert Ancell
    Nov 9 '14 at 20:54














2












2








2








I am using vncserver with lightdm on ubuntu 14.04 on an amazon EC2 instance. I created a lightdm.conf:



#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# port = TCP/IP port to listen for connections on
#
[VNCServer]
enabled=true
port=5901
width=1024
height=768
depth=8


However the vncserver is started to listen on any ip:



netstat -atn:

...
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
...


I can start the vncserver manually with the -localhost flag.



How do I tell lightdm or vncserver to listen only to locahost?










share|improve this question














I am using vncserver with lightdm on ubuntu 14.04 on an amazon EC2 instance. I created a lightdm.conf:



#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# port = TCP/IP port to listen for connections on
#
[VNCServer]
enabled=true
port=5901
width=1024
height=768
depth=8


However the vncserver is started to listen on any ip:



netstat -atn:

...
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
...


I can start the vncserver manually with the -localhost flag.



How do I tell lightdm or vncserver to listen only to locahost?







localhost ubuntu-14.04 vncserver






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Aug 26 '14 at 7:29









Johannes Maria FrankJohannes Maria Frank

1116




1116













  • This is not currently possible. See bugs.launchpad.net/bugs/1390808

    – Robert Ancell
    Nov 9 '14 at 20:54



















  • This is not currently possible. See bugs.launchpad.net/bugs/1390808

    – Robert Ancell
    Nov 9 '14 at 20:54

















This is not currently possible. See bugs.launchpad.net/bugs/1390808

– Robert Ancell
Nov 9 '14 at 20:54





This is not currently possible. See bugs.launchpad.net/bugs/1390808

– Robert Ancell
Nov 9 '14 at 20:54










1 Answer
1






active

oldest

votes


















0














As of November 2014 or December 2015 (depending on perspective), LightDM has added the listen-address configuration option to the [VNCServer] section.



So the section in your lightdm.conf (or the file in lightdm.conf.d) would change to:



#
# VNC Server configuration
#
# enabled = True if VNC connections should be allowed
# command = Command to run Xvnc server with
# port = TCP/IP port to listen for connections on
# listen-address = Host/address to listen for VNC connections (use all addresses if not present)
# width = Width of display to use
# height = Height of display to use
# depth = Color depth of display to use
#
[VNCServer]
enabled=true
port=5901
listen-address=localhost
width=1024
height=768
depth=8





share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "3"
    };
    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%2fsuperuser.com%2fquestions%2f803057%2fforce-vncserver-started-by-lightdm-to-localhost-on-ubuntu-14-04%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    As of November 2014 or December 2015 (depending on perspective), LightDM has added the listen-address configuration option to the [VNCServer] section.



    So the section in your lightdm.conf (or the file in lightdm.conf.d) would change to:



    #
    # VNC Server configuration
    #
    # enabled = True if VNC connections should be allowed
    # command = Command to run Xvnc server with
    # port = TCP/IP port to listen for connections on
    # listen-address = Host/address to listen for VNC connections (use all addresses if not present)
    # width = Width of display to use
    # height = Height of display to use
    # depth = Color depth of display to use
    #
    [VNCServer]
    enabled=true
    port=5901
    listen-address=localhost
    width=1024
    height=768
    depth=8





    share|improve this answer




























      0














      As of November 2014 or December 2015 (depending on perspective), LightDM has added the listen-address configuration option to the [VNCServer] section.



      So the section in your lightdm.conf (or the file in lightdm.conf.d) would change to:



      #
      # VNC Server configuration
      #
      # enabled = True if VNC connections should be allowed
      # command = Command to run Xvnc server with
      # port = TCP/IP port to listen for connections on
      # listen-address = Host/address to listen for VNC connections (use all addresses if not present)
      # width = Width of display to use
      # height = Height of display to use
      # depth = Color depth of display to use
      #
      [VNCServer]
      enabled=true
      port=5901
      listen-address=localhost
      width=1024
      height=768
      depth=8





      share|improve this answer


























        0












        0








        0







        As of November 2014 or December 2015 (depending on perspective), LightDM has added the listen-address configuration option to the [VNCServer] section.



        So the section in your lightdm.conf (or the file in lightdm.conf.d) would change to:



        #
        # VNC Server configuration
        #
        # enabled = True if VNC connections should be allowed
        # command = Command to run Xvnc server with
        # port = TCP/IP port to listen for connections on
        # listen-address = Host/address to listen for VNC connections (use all addresses if not present)
        # width = Width of display to use
        # height = Height of display to use
        # depth = Color depth of display to use
        #
        [VNCServer]
        enabled=true
        port=5901
        listen-address=localhost
        width=1024
        height=768
        depth=8





        share|improve this answer













        As of November 2014 or December 2015 (depending on perspective), LightDM has added the listen-address configuration option to the [VNCServer] section.



        So the section in your lightdm.conf (or the file in lightdm.conf.d) would change to:



        #
        # VNC Server configuration
        #
        # enabled = True if VNC connections should be allowed
        # command = Command to run Xvnc server with
        # port = TCP/IP port to listen for connections on
        # listen-address = Host/address to listen for VNC connections (use all addresses if not present)
        # width = Width of display to use
        # height = Height of display to use
        # depth = Color depth of display to use
        #
        [VNCServer]
        enabled=true
        port=5901
        listen-address=localhost
        width=1024
        height=768
        depth=8






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 21 at 20:28









        AmirAmir

        35228




        35228






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Super User!


            • 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%2fsuperuser.com%2fquestions%2f803057%2fforce-vncserver-started-by-lightdm-to-localhost-on-ubuntu-14-04%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

            Probability when a professor distributes a quiz and homework assignment to a class of n students.

            Aardman Animations

            Are they similar matrix