Discussion:
How to add -listen tcp to Xorg
(too old to reply)
Daniel Braniss
2024-03-03 14:46:46 UTC
Permalink
Hi,
In the past Xorg listen on port 6000 was the default, now it’s disabled.
Some years ago I changed this behavior back to enable, but now
I can’t find my patch, and looking at the latest sources is mind boggling, trying to
set listen tcp is not working.
Any help is most welcome,
Danny



--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gary Jennejohn
2024-03-03 17:10:00 UTC
Permalink
On Sun, 3 Mar 2024 16:46:46 +0200
Hi,
In the past Xorg listen on port 6000 was the default, now it?s disabled.
Some years ago I changed this behavior back to enable, but now
I can?t find my patch, and looking at the latest sources is mind boggling, trying to
set listen tcp is not working.
Any help is most welcome,
Danny
How do you start Xorg? I use xinit with this command line:

/usr/local/bin/xinit -- -listen tcp

Of course, you'll need to have a .xinitrc for that to work.

--
Gary Jennejohn


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Daniel Braniss
2024-03-03 17:29:14 UTC
Permalink
This is the trick that has worked for me since time immemorial:
In /etc/ttys:
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
Post by Gary Jennejohn
On Sun, 3 Mar 2024 16:46:46 +0200
Hi,
In the past Xorg listen on port 6000 was the default, now it?s disabled.
Some years ago I changed this behavior back to enable, but now
I can?t find my patch, and looking at the latest sources is mind boggling, trying to
set listen tcp is not working.
Any help is most welcome,
Danny
/usr/local/bin/xinit -- -listen tcp
Of course, you'll need to have a .xinitrc for that to work.
--
Gary Jennejohn
Gary Jennejohn
2024-03-03 18:05:51 UTC
Permalink
On Sun, 3 Mar 2024 19:29:14 +0200
Post by Daniel Braniss
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
Well, it doesn't work now.

I've never used xdm and have no idea what options it supports.

But I compiled xdm and there's the xdm.8.gz manpage which has a LISTEN
section. Might give you some ideas how to fix things.

--
Gary Jennejohn


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Gary Jennejohn
2024-03-03 19:08:52 UTC
Permalink
On Sun, 3 Mar 2024 13:28:27 -0500
On Sun, 3 Mar 2024 18:05:51 +0000
Post by Gary Jennejohn
On Sun, 3 Mar 2024 19:29:14 +0200
Post by Daniel Braniss
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
Well, it doesn't work now.
I've never used xdm and have no idea what options it supports.
I fixed the problem by editing the file Xservers in /usr/local/etc/X11/xdm
:0 local /usr/local/bin/X :0 -listen tcp
I am using xdm from .../ports/x11/xdm , as opposed to any of the
newer reimplementations.
That's great! I was hoping that a solution like this could work, since
it's similar to xinit passing -listen tcp to the Xserver.

--
Gary Jennejohn


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Cy Schubert
2024-03-04 03:38:46 UTC
Permalink
Post by Gary Jennejohn
On Sun, 3 Mar 2024 13:28:27 -0500
On Sun, 3 Mar 2024 18:05:51 +0000
Post by Gary Jennejohn
On Sun, 3 Mar 2024 19:29:14 +0200
Post by Daniel Braniss
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
Well, it doesn't work now.
I've never used xdm and have no idea what options it supports.
I fixed the problem by editing the file Xservers in /usr/local/etc/X11/x=
dm
:0 local /usr/local/bin/X :0 -listen tcp
I am using xdm from .../ports/x11/xdm , as opposed to any of the
newer reimplementations.
That's great! I was hoping that a solution like this could work, since
it's similar to xinit passing -listen tcp to the Xserver.
For xdm, add -listen tcp to your Xserver specification, i.e., in
/usr/local/etc/X11/xdm/Xservers,

:0 local /usr/local/bin/X -terminate -listen tcp :0

CDE's dtlogin's Xservers file serves the same purpose

The moral of the story is, whatever your desired method of starting your
Xserver, check the man page. Most display managers will have a
configuration file to specify how to invoke the Xserver. I don't know about
gdm, kdm or sddm.

Normally one doesn't need to fiddle around with this as ssh tunnels X.
However, in my experience tunneling through an ssh session is slow. If
you're on a private network, like I am (I'm the only one using my network)
opening an unencrypted X TCP socket is fine. But if you're sharing that
network with other, i.e. work, school, etc., tunnel through ssh. The rule
of thumb is, tunnel through ssh.
--
Cheers,
Cy Schubert <***@cschubert.com>
FreeBSD UNIX: <***@FreeBSD.org> Web: https://FreeBSD.org
NTP: <***@nwtime.org> Web: https://nwtime.org

e^(i*pi)+1=0





--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Daniel Braniss
2024-03-04 05:53:55 UTC
Permalink
thanks to all of you!

adding -listen tcp to /usr/local/etc/X11/xdm/Xservers did it, and both worked
:0 local /usr/local/bin/X -terminate -listen tcp :0
or
:0 local /usr/local/bin/X -terminate :0 -listen tcp

btw, LISTEN in xdm is another thing, it’s about listening for XDMCP requests.
we used it way back in the days of the VAX and Xterminals - i'm giving away the fact that
i’m an old fart :-)
thanks again,
danny
Post by Cy Schubert
Post by Gary Jennejohn
On Sun, 3 Mar 2024 13:28:27 -0500
On Sun, 3 Mar 2024 18:05:51 +0000
Post by Gary Jennejohn
On Sun, 3 Mar 2024 19:29:14 +0200
Post by Daniel Braniss
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
Well, it doesn't work now.
I've never used xdm and have no idea what options it supports.
I fixed the problem by editing the file Xservers in /usr/local/etc/X11/x=
dm
:0 local /usr/local/bin/X :0 -listen tcp
I am using xdm from .../ports/x11/xdm , as opposed to any of the
newer reimplementations.
That's great! I was hoping that a solution like this could work, since
it's similar to xinit passing -listen tcp to the Xserver.
For xdm, add -listen tcp to your Xserver specification, i.e., in
:0 local /usr/local/bin/X -terminate -listen tcp :0
CDE's dtlogin's Xservers file serves the same purpose
The moral of the story is, whatever your desired method of starting your
Xserver, check the man page. Most display managers will have a
configuration file to specify how to invoke the Xserver. I don't know about
gdm, kdm or sddm.
Normally one doesn't need to fiddle around with this as ssh tunnels X.
However, in my experience tunneling through an ssh session is slow. If
you're on a private network, like I am (I'm the only one using my network)
opening an unencrypted X TCP socket is fine. But if you're sharing that
network with other, i.e. work, school, etc., tunnel through ssh. The rule
of thumb is, tunnel through ssh.
--
Cheers,
e^(i*pi)+1=0
Daniel Braniss
2024-03-04 05:32:39 UTC
Permalink
Post by Cy Schubert
Post by Gary Jennejohn
On Sun, 3 Mar 2024 13:28:27 -0500
On Sun, 3 Mar 2024 18:05:51 +0000
Post by Gary Jennejohn
On Sun, 3 Mar 2024 19:29:14 +0200
Post by Daniel Braniss
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
Well, it doesn't work now.
I've never used xdm and have no idea what options it supports.
I fixed the problem by editing the file Xservers in /usr/local/etc/X11/x=
dm
:0 local /usr/local/bin/X :0 -listen tcp
I am using xdm from .../ports/x11/xdm , as opposed to any of the
newer reimplementations.
That's great! I was hoping that a solution like this could work, since
it's similar to xinit passing -listen tcp to the Xserver.
For xdm, add -listen tcp to your Xserver specification, i.e., in
/usr/local/etc/X11/xdm/Xservers,
:0 local /usr/local/bin/X -terminate -listen tcp :0
CDE's dtlogin's Xservers file serves the same purpose
The moral of the story is, whatever your desired method of starting your
Xserver, check the man page. Most display managers will have a
configuration file to specify how to invoke the Xserver. I don't know about
gdm, kdm or sddm.
Normally one doesn't need to fiddle around with this as ssh tunnels X.
However, in my experience tunneling through an ssh session is slow. If
you're on a private network, like I am (I'm the only one using my network)
opening an unencrypted X TCP socket is fine. But if you're sharing that
network with other, i.e. work, school, etc., tunnel through ssh. The rule
of thumb is, tunnel through ssh.
--
Cheers,
e^(i*pi)+1=0
Gary Jennejohn
2024-03-04 07:07:36 UTC
Permalink
On Mon, 4 Mar 2024 07:53:55 +0200
Post by Daniel Braniss
thanks to all of you!
adding -listen tcp to /usr/local/etc/X11/xdm/Xservers did it, and both worked
:0 local /usr/local/bin/X -terminate -listen tcp :0
or
:0 local /usr/local/bin/X -terminate :0 -listen tcp
btw, LISTEN in xdm is another thing, it?s about listening for XDMCP requests.
we used it way back in the days of the VAX and Xterminals - i'm giving away the fact that
i'm an old fart :-)
thanks again,
danny
I'm an old fart too :) But we used serial terminals to talk to the VAX
when I was doing UNIX development in Berkeley and Munich for UniSoft (now
long dead - RIP) from 1984 to 1989.

Xterminals were used at one of the german companies I worked at in Munich.
I also had a few at home. They were useful, but it's much more convenient
to have the Xserver runniing on a GPU IMHO.

--
Gary Jennejohn


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Chris
2024-03-04 16:54:12 UTC
Permalink
Post by Gary Jennejohn
On Sun, 3 Mar 2024 16:46:46 +0200
Hi,
In the past Xorg listen on port 6000 was the default, now it?s disabled.
Some years ago I changed this behavior back to enable, but now
I can?t find my patch, and looking at the latest sources is mind boggling, trying to
set listen tcp is not working.
Any help is most welcome,
Danny
man 7 X
should provide for your needs. :)
..
DISPLAY NAMES
From the user's perspective, every X server has a display name of the
form:

hostname:displaynumber.screennumber
or
protocol/hostname:displaynumber.screennumber

This information is used by the application to determine how it should
connect to the server and which screen it should use by default (on
displays with multiple monitors):

protocol
The protocol specifies the protocol to use for communication.
Exactly which protocols are supported is platform dependent,
but most commonly supported ones are:

tcp TCP over IPv4 or IPv6
inet TCP over IPv4 only
inet6 TCP over IPv6 only
unix UNIX Domain Sockets (same host only)
local Platform preferred local connection method
If the protocol is not specified, Xlib uses whatever it
believes is the most efficient transport.

hostname
..

HTH

--Chris


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Daniel Braniss
2024-03-05 05:22:13 UTC
Permalink
Post by Chris
Post by Gary Jennejohn
On Sun, 3 Mar 2024 16:46:46 +0200
Hi,
In the past Xorg listen on port 6000 was the default, now it?s disabled.
Some years ago I changed this behavior back to enable, but now
I can?t find my patch, and looking at the latest sources is mind boggling, trying to
set listen tcp is not working.
Any help is most welcome,
Danny
man 7 X
should provide for your needs. :)
i didn’t have xorg-docs installed, so I missed that :-)
in any case problem solved,
thanks
danny
Post by Chris
...
DISPLAY NAMES
From the user's perspective, every X server has a display name of the
hostname:displaynumber.screennumber
or
protocol/hostname:displaynumber.screennumber
This information is used by the application to determine how it should
connect to the server and which screen it should use by default (on
protocol
The protocol specifies the protocol to use for communication.
Exactly which protocols are supported is platform dependent,
tcp TCP over IPv4 or IPv6
inet TCP over IPv4 only
inet6 TCP over IPv6 only
unix UNIX Domain Sockets (same host only)
local Platform preferred local connection method
If the protocol is not specified, Xlib uses whatever it
believes is the most efficient transport.
hostname
...
HTH
--Chris
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...