Link to home
Start Free TrialLog in
Avatar of Ermanno Piergiacomi
Ermanno Piergiacomi

asked on

Java problem on X11 with Linux

on linux centos 7 this: https://www.midvisioncloud.com/ibm-websphere-on-microsoft-azure/ibm-bpm-microsoft-azure/
i try to install DB2 Developer https://www.ibm.com/it-it/marketplace/ibm-db2-direct-and-developer-editions

I have configure GUI for server using this web resource: https://linuxconfig.org/how-to-install-gui-gnome-on-centos-7-linux-system

I install xrdp and I started server with GUI and xrdp server
I open firewall ports 3389 and I login in server with rdp access

when i try to install DB2 Developer setup i found:

[root@OpificioBPM server_dec]# ./db2setup
DBI1190I  db2setup is preparing the DB2 Setup wizard which will guide
      you through the program setup process. Please wait.


Exception in thread "main" java.awt.HeadlessException:
No X11 DISPLAY variable was set, but this program performed an operation which requires it.
      at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:217)
      at java.awt.Window.<init>(Window.java:547)
      at java.awt.Frame.<init>(Frame.java:431)
      at java.awt.Frame.<init>(Frame.java:396)
      at LoadingGraphic.<init>(Unknown Source)
      at LoadingGraphic.main(Unknown Source)

The DISPLAY variable is not set properly.  Ensure that the DISPLAY variable is set properly and that permissions are set properly to open windows on the display specified, then rerun the command.

I try to set DISPLAY variable with this values:
export DISPLAY=IP SERVER:0.0
export DISPLAY=localhost:0.0
export DISPLAY=localhost:0
export DISPLAY=:0

BUT I ALWAYS X11 ERROR ON RUN ./db2setup  

I try to exec xhost + but I found error: unable to open display
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Not quite sure why you'd be trying (if that's what you're doing) to have a GUI on a server machine.

Anyway, your error is probably caused by the fact that X is probably not running on that server
Set the DISPLAY variable to the IP address of the workstation you use to install the DB2 product (export DISPLAY=<ip-address>:0.0).

For example, export DISPLAY=192.168.1.2:0.0

From here and here.
Avatar of dfke
dfke

Hi,

first make sure that you have installed all the required packages:

yum install -y xorg-x11-server-Xorg xorg-x11-xauth xorg-x11-apps

Open in new window

Cheers
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.