Score:0

How to make X.org listen to remote connections on port 6000 on Ubuntu 22.04?

ck flag

Does anyone know how to make Xorg listen on port 6000 under Ubuntu 22.04?

22.04 seems to be running gdm3.

I have modified /etc/gdm3/session.conf and rebooted with no success:

$ echo $XDG_SESSION_TYPE
x11
$ ps ax | grep dm
1139 ?        Ssl    0:00 /usr/sbin/gdm3
1878 ?        Sl     0:00 gdm-session-worker [pam/gdm-password]
2835 tty2     Ssl+   0:00 /usr/libexec/gdm-x-session --run-script --allow-remote-connections env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
2837 tty2     Sl+    0:10 /usr/lib/xorg/Xorg vt2 -displayfs 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -novtswitch -verbose 3
4975 pts/0    S+     0:00 grep dm
$ nmap -p6000 127.0.0.1
...
PORT     STATE  SERVICE
6000/tcp closed X11
$ cd /etc/gdm3
$ diff -U 1 custom.conf_org custom.conf
...
@@ -18,2 +18,3 @@
 [security]
+DisallowTCP=false

This question has a "hack" for 19.10. It seems to work but feels like just that, a hack. Is there an official / better way to get X to listen on port 6000?

I am new to this forum and I can't comment in the original question or the one for Ubuntu 19.10 which has a "hack".

us flag
Is there a reason that tunneling it via ssh wouldn't work for you?
Gary Aitken avatar
ck flag
@thomasrutter Not sure. I was hoping to run graphic apps like darktable and freecad as well as shell stuff. I don't know what an ssh tunnel can accomplish in that regard; I've always viewed ssh as a text cmd line tool.
Gary Aitken avatar
ck flag
@Nmath the question you referenced is already referred to in my original post; see the link in "original question". None of those solutions work. I would have added a comment to that but I can't.
karel avatar
sa flag
Does this answer your question? [How to make X.org listen to remote connections on port 6000?](https://askubuntu.com/questions/34657/how-to-make-x-org-listen-to-remote-connections-on-port-6000)
Gary Aitken avatar
ck flag
@nmath Agree, bad wording on my part. The point of the question is that the proposed solution in that article is by the author's admission, a hack. I'm wondering if there is a more proper / better solution. Most of the high-value solutions for earlier OS versions involved modifying the config for the dm, not the Xorg command. If someone with more points wants to move my original question into a comment in that question, fine; otherwise the info for what works and doesn't on 22.04 is lost.
I sit in a Tesla and translated this thread with Ai:

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.