WASdev / azure.websphere-traditional.image

Apache License 2.0
1 stars 7 forks source link

unable to use GUIs (xterm, xclock, IBM Installation Manager) #106

Open ajleonar opened 7 months ago

ajleonar commented 7 months ago

xterm / xclock failing with the below errors:

[ ~]$ xclock Error: Can't open display: localhost:10.0 [ ~]$ xterm xterm: Xt error: Can't open display: localhost:10.0

Is X11 supported on this image?

edburns commented 7 months ago

Hello @ajleonar,

While the base VM does not have the X11 packages installed by default, this guidance shows how to install them.

Install dependencies

   # dependencies for X server access
   yum install -y libXtst libSM libXrender

   # dependencies for GUI installation
   yum install -y gtk2 gtk3 libXtst xorg-x11-fonts-Type1 mesa-libGL
ajleonar commented 7 months ago

Hi @edburns

Thanks for your help. I forwarded your response to the customer and they have some additional questions:

"At https://learn.microsoft.com/en-us/azure/developer/java/migration/migrate-websphere-to-azure-vm-manually?tabs=in-bash%2Cwas-nd-v9#create-a-windows-vm-and-set-up-an-x-server, it creates a Windows VM as a jump box to run X11. It makes me feel the jump box is mandatory to X11 Linux in Azure.

Could you reach to the IBM image and ask if they know any client using X11 by any chance? Is the jump box solution is a must?"

felixxie99 commented 6 months ago

Hi @edburns,

I installed all the packages and still have the same error. Any further help?

Thanks, Felix

galiacheng commented 6 months ago

Hello @felixxie99 I am Haixia from Ed's team. Could you please answer the following question to help me learn more about the problem.

  1. Please share your RHEL version.
  2. Are your Windows machine and the RHEL machine in the same VNET (your corporation network)?
  3. Have you open TCP port 6000 in the Windows machine? The X Server uses this port for connections.
  4. What kind of SSH client did you use, Putty or other SSH client?
  5. Did you use private IP or public IP to access the RHEL machine?
  6. Please share the SSH connection log, if you use ssh command, you can print the log with -v, e.g. ssh -X -Y -v user@rhelmachine.

I would suggest you try VcXsrv Windows X Server, I double confirmed it worked with RHEL 9 and RHEL 8. Make sure the following dependencies are installed.

# dependencies for X server access
yum install -y libXtst libSM libXrender

# dependencies for GUI installation
yum install -y gtk2 gtk3 libXtst xorg-x11-fonts-Type1 mesa-libGL

Thank you.

galiacheng commented 6 months ago

I am able to use X11 forwarding by defining the DISPLAY variable with private IP. See

image

It didn't work with Public IP. So please make sure your Windows machine is in the same VNET with RHEL. Otherwise, use a jump box following the guidance.

You can find the address from Xming log (Right click Xming icon, select View log). The following example is XdmcpRegisterConnection: newAddress 10.1.0.4.

Welcome to the Xming X Server
Vendor: Colin Harrison
Release: 6.9.0.31
FreeType2: 2.3.4
Contact: http://sourceforge.net/forum/?group_id=156984

Xming :0 -multiwindow -clipboard -ac 

XdmcpRegisterConnection: newAddress 10.1.0.4
winAdjustVideoModeShadowGDI - Using Windows display depth of 32 bits per pixel
winAllocateFBShadowGDI - Creating DIB with width: 2560 height: 1440 depth: 32
winInitVisualsShadowGDI - Masks 00ff0000 0000ff00 000000ff BPRGB 8 d 24 bpp 32
glWinInitVisuals:1596: glWinInitVisuals
glWinInitVisualConfigs:1503: glWinInitVisualConfigs glWinSetVisualConfigs:1581: glWinSetVisualConfigs
init_visuals:1055: init_visuals
null screen fn ReparentWindow
null screen fn RestackWindow
InitQueue - Calling pthread_mutex_init
InitQueue - pthread_mutex_init returned
InitQueue - Calling pthread_cond_init
InitQueue - pthread_cond_init returned
winInitMultiWindowWM - Hello
winInitMultiWindowWM - Calling pthread_mutex_lock ()
winMultiWindowXMsgProc - Hello
winMultiWindowXMsgProc - Calling pthread_mutex_lock ()
glWinScreenProbe:1390: glWinScreenProbe
fixup_visuals:1303: fixup_visuals
init_screen_visuals:1336: init_screen_visuals
(--) 3 mouse buttons found
(--) Setting autorepeat to delay=500, rate=31
(--) winConfigKeyboard - Layout: "00000409" (00000409) 
(--) Using preset keyboard for "English (USA)" (409), type "4"
Could not init font path element C:\Program Files (x86)\Xming/fonts/misc/, removing from list!
Could not init font path element C:\Program Files (x86)\Xming/fonts/TTF/, removing from list!
Could not init font path element C:\Program Files (x86)\Xming/fonts/Type1/, removing from list!
Could not init font path element C:\Program Files (x86)\Xming/fonts/75dpi/, removing from list!
Could not init font path element C:\Program Files (x86)\Xming/fonts/100dpi/, removing from list!
Could not init font path element C:\Program Files\Xming\fonts\dejavu, removing from list!
Could not init font path element C:\Program Files\Xming\fonts\cyrillic, removing from list!
Could not init font path element C:\WINDOWS\Fonts, removing from list!
winInitMultiWindowWM - pthread_mutex_lock () returned.
winInitMultiWindowWM - pthread_mutex_unlock () returned.
winInitMultiWindowWM - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - pthread_mutex_lock () returned.
winMultiWindowXMsgProc - pthread_mutex_unlock () returned.
winMultiWindowXMsgProc - DISPLAY=127.0.0.1:0.0
winProcEstablishConnection - Hello
winInitClipboard ()
winProcEstablishConnection - winInitClipboard returned.
winClipboardProc - Hello
DetectUnicodeSupport - Windows Vista
winClipboardProc - DISPLAY=127.0.0.1:0.0
winMultiWindowXMsgProc - XOpenDisplay () returned and successfully opened the display.
winInitMultiWindowWM - XOpenDisplay () returned and successfully opened the display.
winClipboardProc - XOpenDisplay () returned and successfully opened the display.