Score:0

Ubuntu 20.04.3 LTS - Xorg remote connection refused on port 6000

jp flag

I'm having this error when I try connect (Windows >> Ubuntu).

connection refused on port 6000

I have no idea how to configure Xorg to accept connections on port 6000.

/usr/bin/X

#!/bin/sh
#
# Execute Xorg.wrap if it exists otherwise execute Xorg directly.
# This allows distros to put the suid wrapper in a separate package.

basedir=/usr/lib/xorg
if [ -x "$basedir"/Xorg.wrap ]; then
        exec "$basedir"/Xorg.wrap "$@" -listen tcp
else
        exec "$basedir"/Xorg "$@" -listen tcp
fi

/etc/X11/xinit/xserverrc

#!/bin/sh

exec /usr/bin/X -listen tcp "$@"

/etc/gdm3/custom.conf

# GDM configuration storage
#
# See /usr/share/gdm/gdm.schemas for a list of available options.

[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false

# Enabling automatic login
#  AutomaticLoginEnable = true
#  AutomaticLogin = user1

# Enabling timed login
#  TimedLoginEnable = true
#  TimedLogin = user1
#  TimedLoginDelay = 10

[security]
ServerArguments=-listen tcp

[xdmcp]
DisallowTCP=false

[chooser]

[debug]
# Uncomment the line below to turn on debugging
# More verbose logs
# Additionally lets the X server dump core if it crashes
#Enable=true

nmap scan

Nmap scan report for localhost (127.0.0.1)
Host is up (0.00023s latency).

PORT     STATE  SERVICE
6000/tcp closed X11

i also tried use xhost + and xhost 192.168.0.101 but seems not working. :(

UPDATE

i opened port 6000 stopping gdm3 and start Xorg Xorg :0 -ac -listen tcpbut now i dont have graphic interface.

i tried all consoles "ctrl+alt+"

Johan Palych avatar
us flag
Please describe the configuration in more detail. What is used on Windows (MobaXterm, VcXsrv, Xming, Cygwin/X). How is Windows Defender Firewall configured? Ubuntu 20.04.3 LTS on WSL2 ?
jvictor573 avatar
jp flag
VcXsrv on windows, i can display on ubuntu(bare metal) but not the other way around.
jvictor573 avatar
jp flag
i opened port 6000 stopping gdm3 and start Xorg :0 -ac -listen tcp but now i dont have graphic interface. i tried all consoles ctrl+alt+x
Johan Palych avatar
us flag
Are you using Windows Subsystem for Linux?
jvictor573 avatar
jp flag
nope ubuntu desktop. i can display now but i dont have graphic interface on ubuntu(console 1)
Johan Palych avatar
us flag
Try to test MobaXterm portable, more features. In Ubuntu(sudo apt install socat): socat -d -d TCP-LISTEN:6000,fork,bind=localhost UNIX-CONNECT:/tmp/.X11-unix/X0 & https://askubuntu.com/questions/34657/how-to-make-x-org-listen-to-remote-connections-on-port-6000 https://askubuntu.com/questions/41330/let-xorg-listen-on-tcp-but-only-to-localhost
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.