Results 1 to 7 of 7

Thread: X Windows - how to listen on a port

  1. #1
    Join Date
    Jan 2010
    Beans
    698

    X Windows - how to listen on a port

    It appears that X Windows under Ubuntu (or Gnome?) is started to listen to a Unix named socket, instead of a TCP port number, for client connections. That's what SSH is forwarding when it does X forwarding.

    I need to start X applications on a remote machine, and then close the SSH connection. So I need to make the connections directly. This is within a LAN on private IPs, so security is not an issue.

    I searched on help.ubuntu.com, but there appears to be no particular document that covers this. Anyone know where this is configured to enable it to listen on a TCP port like the usual 6000?
    Wanted: Linux supported HD-SDI capture card to I-Frame-Only VP9

  2. #2
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: X Windows - how to listen on a port

    Code:
    $ grep nolisten /etc/X11/*/*
    /etc/X11/xinit/xserverrc:exec /usr/bin/X -nolisten tcp "$@"
    You can try editing that file and take out the "-nolisten tcp".

  3. #3
    Join Date
    Jan 2010
    Beans
    698

    Re: X Windows - how to listen on a port

    Quote Originally Posted by gmargo View Post
    Code:
    $ grep nolisten /etc/X11/*/*
    /etc/X11/xinit/xserverrc:exec /usr/bin/X -nolisten tcp "$@"
    You can try editing that file and take out the "-nolisten tcp".
    There's no GUI config for that?
    Wanted: Linux supported HD-SDI capture card to I-Frame-Only VP9

  4. #4
    Join Date
    Jan 2010
    Beans
    698

    Re: X Windows - how to listen on a port

    Quote Originally Posted by gmargo View Post
    Code:
    $ grep nolisten /etc/X11/*/*
    /etc/X11/xinit/xserverrc:exec /usr/bin/X -nolisten tcp "$@"
    You can try editing that file and take out the "-nolisten tcp".
    It did not work. That option must be coming from somewhere else.

    Code:
    lorentz/root /root 6# cat /etc/X11/xinit/xserverrc
    #!/bin/sh
    exec /usr/bin/X "$@"
    lorentz/root /root 7# time find /etc /usr /var -type f -exec egrep -l 'nolisten[[:space:]]*tcp' '{}' ';'
    /etc/X11/xinit/xserverrc-original
    /usr/share/gnome/help/gdm/C/gdm.xml
    /usr/share/gnome/help-langpack/gdm/en_GB/gdm.xml
    /usr/share/doc/nvidia-current/html/framelock.html
    /usr/bin/x11vnc
    [[ 4m55s real 295.434 - user 2.840 - sys 18.220 - 7.12% ]]
    lorentz/root /root 8#
    Wanted: Linux supported HD-SDI capture card to I-Frame-Only VP9

  5. #5
    Join Date
    Dec 2006
    Beans
    810

    Re: X Windows - how to listen on a port

    Check the gdm desktop manager settings. gdm starts the X server.

    On a squeeze machine I have:

    defaults: /usr/share/gdm/defaults.conf
    custom: /etc/gdm/gdm.conf

    Code:
    # If true this will basically append -nolisten tcp to every X command line, a
    # good default to have (why is this a "negative" setting? because if it is
    # false, you could still not allow it by setting command line of any particular
    # server).  It's probably better to ship with this on since most users will not
    # need this and it's more of a security risk then anything else.
    # Note: Anytime we find a -query or -indirect on the command line we do not add
    # a "-nolisten tcp", as then the query just wouldn't work, so this setting only
    # affects truly attached sessions.
    DisallowTCP=true
    Your distro's gdm configuration files may be different.

  6. #6
    Join Date
    Feb 2010
    Location
    Silicon Valley
    Beans
    1,898
    Distro
    Xubuntu 12.04 Precise Pangolin

    Re: X Windows - how to listen on a port

    It is documented in the gdm help, which is a pain to find. (I found it by grepping through /usr and found it in /usr/share/gnome/help-langpack/gdm/en_GB/gdm.xml.)

    Add the following to /etc/gdm/custom.conf:
    Code:
    [security]
    DisallowTCP=false
    Last edited by gmargo; February 8th, 2011 at 04:49 PM.

  7. #7
    Join Date
    Jan 2010
    Beans
    698

    Re: X Windows - how to listen on a port

    Quote Originally Posted by gmargo View Post
    It is documented in the gdm help, which is a pain to find. (I found it by grepping through /usr and found it in /usr/share/gnome/help-langpack/gdm/en_GB/gdm.xml.)

    Add the following to /etc/gdm/custom.conf:
    Code:
    [security]
    DisallowTCP=false
    That worked. The file did not exist, so I added it with just that content alone. The name "custom" seems to imply that would be the thing to do.
    Wanted: Linux supported HD-SDI capture card to I-Frame-Only VP9

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •