If you are installing Eclipse on CentOS 8 and you encounter this error:

/home/operatorfeitam/Downloads/eclipse-installer
[root@localhost eclipse-installer]# ./eclipse-inst
No protocol specified
Unable to init server: Could not connect: Connection refused
Eclipse Installer: Cannot open display: 
No protocol specified
Unable to init server: Could not connect: Connection refused
Eclipse Installer: Cannot open display: 
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
No protocol specified
Unable to init server: Could not connect: Connection refused
Eclipse Installer: Cannot open display: 
Eclipse Installer:
An error has occurred. See the log file
/home/operatorfeitam/Downloads/eclipse-installer/configuration/1601193243356.log.


This is because it is being installed with the root user, and this root user cannot start the X server by default. Eclipse that requires a graphical environment with a root user should not be installed.


To solve this, what must be done (in this case the /eclipse-installer directory belongs to the root user) is to change the directory and all its subdirectories to a user who can start the X server, in this case operatorfeitam with:

chown operatorfeitam:operatorfeitam -R eclipse-installer

Remaining:


Once this is done, it is run with the appropriate user (operatorfeitam in this example) and the eclipse installer is started with "./eclipse-inst":


And we can continue the Eclipse installation by selecting the options we consider.