Skip to content

Fix vnc configuration on wayland#38

Merged
zzambers merged 1 commit intorh-openjdk:mainfrom
zzambers:fix-vnc-wl
Oct 15, 2025
Merged

Fix vnc configuration on wayland#38
zzambers merged 1 commit intorh-openjdk:mainfrom
zzambers:fix-vnc-wl

Conversation

@zzambers
Copy link
Collaborator

There are test failures in wayland jobs on our infra. After further investigation, I have found, that windows of some programs (eclipse, jmc) do not show up in vnc, but directly on desktop. Seems like these are using SWT, which in turn uses GTK and defaults to wayland.

This should fix that problem and make all windows use x11 display of vnc (on wayland desktop).

@judovana
Copy link
Collaborator

This should fix that problem and make all windows use x11 display of vnc (on wayland desktop).

... instead of wayland? Maybe limit this to swt apps only?

@zzambers
Copy link
Collaborator Author

This should fix that problem and make all windows use x11 display of vnc (on wayland desktop).

... instead of wayland? Maybe limit this to swt apps only?

I have realized that vnc is not be used, when display is set. However all windows interesting to us still have to use x11, because import can only capture x11 ones (wayland gui is invisible to it). So this workaround is required always when wayland is used, not only for vnc (I need to fix that).

Anyway, maybe it makes sense to do this for swt apps only, I'll think about it.

@zzambers zzambers reopened this Oct 15, 2025
@judovana
Copy link
Collaborator

It seems that you have thought about it ;)

@zzambers
Copy link
Collaborator Author

Sorry I made another branch with different change, but forgot to commit it, and force-pushed it. So there were no new commits and it auto closed PR. Reopened :)

@zzambers
Copy link
Collaborator Author

It seems that you have thought about it ;)

Yes, it is probably good idea do it this way :)

@judovana
Copy link
Collaborator

Thanx. Jsut to clarify - now all tests are running via X, through vnc even if there is jsut wayland compositor. And it is not a regrerssion, becasue the vnc was always X only. Right?

@zzambers
Copy link
Collaborator Author

Thanx. Jsut to clarify - now all tests are running via X, through vnc even if there is jsut wayland compositor. And it is not a regrerssion, becasue the vnc was always X only. Right?

True, actually, I have found out, that import does not work on Xwayland, with confusing error message:

import -window root root.png
import: missing an image filename `root.png' @ error/import.c/ImportImageCommand/1276.

However as Xwayland is basically x11 server in "rootless" mode (i.e. without root window), it is not that surprising not being able to make screensot of root window:

tester      3015  0.0  0.6 196244 51888 ?        S    13:39   0:00 /usr/bin/Xwayland :0 -rootless -noreset -accessx -core -auth /run/user/1000/.mutter-Xwaylandauth.U9FZD3 -listenfd 4 -listenfd 5 -displayfd 6 -initfd 7

So I guess on wayland we need to stay on vnc (at least for now).

@judovana
Copy link
Collaborator

Thanx a lot for digging. Ok to merge after gh finishes.

@zzambers zzambers merged commit c994cd0 into rh-openjdk:main Oct 15, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants