If you experience problems running on wayland hyprland with wofi or from terminal properly displaying that it can’t connect to screen, then go to the .desktop file in
/usr/share/applications/vmware-workstation.desktop
and have it run a script of yours (use doas/sudo and your text editor)
[Desktop Entry]
Encoding=UTF-8
Name=VMware Workstation
Comment=Run and manage virtual machines
#Exec=/usr/bin/vmware %U
Exec=/home/username/scripts/vmware-run.sh
Terminal=false
Type=Application
Icon=vmware-workstation
StartupNotify=true
StartupWMClass=vmware
Categories=System;
MimeType=application/x-vmware-vm;application/x-vmware-team;application/x-vmware-enc-vm;x-scheme-handler/vmrc;
instead of Exec=/usr/bin/vmware %U
have it run Exec=/home/username/scripts/vmware-run.sh
or any path of your following script
that the script contents will have the following
export GDK_BACKEND=wayland,x11
/usr/bin/vmware %U
Have fun!