Different use cases exist where a Workstation VM's multiple-monitor setting should be set ahead of time, used at every boot, and not have to be set each time by the user who may not be familiar with Workstation or that they are even using a virtual machine, especially when the VM is started from the command line.
Alternatively, there should be some programmatic/scriptable method to externally tell the powered-on VM to "Cycle Multiple Monitors" without requiring the user to do it through the View menu which may be purposefully hidden from them in full screen mode.
This request has been mentioned several times since 2012:
In VirtualBox, the vboxmanage modifyvm command can be used to set the monitorcount property of the VM. Every time the VM is started full-screen, it automatically goes full-screen on each monitor and the Guest OS is aware of the monitor topology. Frankly, it works flawlessly, especially when starting a VM from the command line, and it's frustrating that Workstation does not support this after so many years.
Using vmrun, vmplayer, or vmware to start the VM in Workstation or Player mode, full screen, does not remember the previously used Monitor topology when "Use host settings for monitors" is set and "Cycle Multiple Monitors" has been used previously and successfully on the VM.
If I change the VM's Display option "Specify settings for monitors" to a forced number of displays, the Guest OS then knows there are the set number of monitors but Workstation console does not place full screen consoles for these other monitors on any of the other connected displays (nor are there multiple console windows [for each monitor] on the first display.) Only the primary Guest desktop is displayed. It will only full-screen across multiple displays if "Cycle Multiple Monitors" is used from the View menu.
Is there any hope for this 8-year old feature request to become reality? We simply want to start a VM from the command line, in full screen, across multiple monitors. It works just fine if we have the user "Cycle Multiple Monitors", but that ask of the user is inefficient.
Can't you roll your own solution using something like Auto-IT to script it? I wrote a small macro program to launch multiple instances of a SCADA software and had them on different virtual desktops, and cycled through each one to display on the monitor every 30 seconds. Only took me a few hours to write and debug it.
Can't you roll your own solution using something like Auto-IT to script it? I wrote a small macro program to launch multiple instances of a SCADA software and had them on different virtual desktops, and cycled through each one to display on the monitor every 30 seconds. Only took me a few hours to write and debug it.
Great idea. Haven't thought about AutoIt in a long time. However, the platform is Ubuntu so AutoIt would not be an option. However, there may be some Linux AutoIt-alternatives that might work, as a workaround until this feature request is available.
Circling back on this, here is a snippet of a script that will start Workstation, wait some time, and then use 'xte' to send CTRL+ALT+M to Cycle Multiple Monitors.
Add additional 'xte' lines for 3+ monitors.
'xte' comes from the 'xautomation' package available in Ubuntu (sudo apt-get install xautomation).
vmware -q -X ${VMX_PATH} &
VMWARE_PID=$!
echo "$(date) vmware has started as PID ${VMWARE_PID}"
# Send F9 to hide the Workstation Library
xte 'sleep 4' 'key F9'
echo "$(date) Sent F9 to VMware to hide Library"
# Send CTRL+ALT+M using xte from xautomation to enable multiple-monitor mode in VMware
echo "$(date) Waiting for VM to start to send CTRL+ALT+M to VMware"
xte 'sleep 27' 'keydown Control_L' 'keydown Alt_L' 'key m' 'keyup Alt_L' 'keyup Control_L'
echo "$(date) Sent CTRL+ALT+M"
xte 'sleep 2' 'keydown Control_L' 'keydown Alt_L' 'key m' 'keyup Alt_L' 'keyup Control_L'
echo "$(date) Sent CTRL+ALT+M"
xte 'sleep 2' 'keydown Control_L' 'keydown Alt_L' 'key m' 'keyup Alt_L' 'keyup Control_L'
echo "$(date) Sent CTRL+ALT+M"
xte 'sleep 2' 'keydown Control_L' 'keydown Alt_L' 'key m' 'keyup Alt_L' 'keyup Control_L'
echo "$(date) Sent CTRL+ALT+M"
xte 'sleep 2' 'keydown Control_L' 'keydown Alt_L' 'key m' 'keyup Alt_L' 'keyup Control_L'
echo "$(date) Sent CTRL+ALT+M"
This does not work with VMware Player because while it does have a button on the float-down bar to Cycle Multiple Monitors, it does not have CTRL+ALT+M as a keyboard shortcut to do the same.
Additionally, this method probably requires the floatdown bar to be visible to "receive" the synthetic keypress.
Synthetically clicking the mouse "in" the VM console will cause the floatdown bar to disappear so this should be sent after they xte keydown/key/keyup combinations.
xte 'sleep 1' 'mousemove 100,100' 'mouseclick 1'
Ideally, VMware would implement the ability to automatically cycle multiple monitors at boot because this workaround is kludgy and depends on timing and no interruption by the user or anything else that may be happening on the Linux desktop.
Additionally, the 'marco' x-window-manager was the only one xorg window manager where VMware Workstation seemed to support 3+ monitors.
Learned that the 'xdotool' package on Ubuntu has xdotool which seems to be more reliable for interacting with Workstation than xte.
Start vmware as a background process, then sleep a period of time and send CTRL+ALT+M:
xdotool sleep 17 key "ctrl+alt+m"
Can also do other things like send F9 to hide the Library and click the mouse to hide the float-down toolbar:
xdotool sleep 3 key "F9"
xdotool sleep 2 mousemove 500 500 click 1
if the user does not have administrative rights, Auto it can not talk to vmware workstation pro 16 as it is run in an elevated permission window.
If anyone has a work around to this, please post.
