Can't get X to listen on Port 6000

I am trying to make a simple X-server on Virtual Box (so I can get graphical out from linux runing on LSW.) I have got all this to work using X on TinyCore Linux having exported a suitable DISPLAY so I believe I am doing the right things at the PC end.

I have made a minimal Leap15 installation and added X11 and set the system to boot into terminal. I have killed firewalld while testing. Set “DISPLAYMANAGER_XSERVER_TCP_POT_6000_OPEN” to ‘yes’ in /etc/sysconfig/displaymanager

Runing xinit brings up xterm as expected. Ran

 xhost +

in that window and I can’t connect from from the PC. I just get a Can’t Open Display message when trying to run

xeyes

.

ps -ef | grep listen

confirms that nothing is running with “-nolisten tcp” set.

ss -l | grep 6000

also gives no output which suggests that X is not listening on port 6000

So it looks like X is not listening on port 6000. Any ideas what I am doing wrong?

Thanks.

I don’t know what guide you’re using to set up your X server,
Recommend using the xserver MAN page which covers starting automatically (recommended) by installing and invoking by a Display Manager and manually.

https://linux.die.net/man/1/xserver

You might try using anything other than the default port which you appear to be doing… If there is something you may have overlooked, default configurations may conflict and disable anything else trying to use the same resources, a little of that is discussed here

https://stackoverflow.com/questions/17817968/how-to-determine-what-ports-x-is-listening-on

TSU

You do not tell which Display Manager you use. And I am not sure that all listen to the same configuration file, nor even that all have the same parameters/features.

There is e.g. /etc/lightdm which has several conf files.
And there is /etc/sddm.conf and a directory /etc/sddm.conf.d.

Thus it looks to me that they all do different.

I am not running a display manager on either system. On the PC, where I am running Linux under LSW, I simply set the DISPLAY variable to 192.168.xxx.yyy:0 and then whatever command (like xeyes). I have successfully exported windows to the following X-servers: Xming, TinyX running on TinyCore, Xquartz on an OSX system. Xming falls over with complex stuff like when I try to run LXDE with startlxde. As I say all this is on the PC.

So I want to make my own bomb-proof X-server using openSUSE as that is my distro of choice. As such I don’t want a DM on the SUSE box I just want a vanilla x-server. On the SUSE box I have disabled firewalld, taken account of xhost, removed ‘-nolisten tcp’ by editing the sysconfig file and copied .Xauthority file between the two systems … but still I can’t get a connection.

Hope this makes a bit more sense now.

OK - solved it having found a mint linux post. All that is needed is to start the xserver with:

X -ac -listen tcp

simply removing the “-nolisten tcp” was not sufficient, it needed an explicit listen option.

Makes sense.
The xserver MAN page only recommends using a DM, but isn’t an absolute requirement.

Hope it works out for you,
You might also consider the Wayland approach which is to deprecate the xserver and instead deploy as a socket based service (As far as I can tell, Unix socket for local machine use and network socket for remote network connections). I’m guessing at possible reasons to do it this way, possibly to secure the processes better, possibly more efficient support of multiple displays. These possible reasons are only my personal speculation based only on how I understand systemd works and is not based on any articles, documentation or other info.

TSU