Open RavitejaAmruthapu opened 2 months ago
Hi, did you try using the environment variable -e
?
Example:
docker run -it -e DISPLAY_WIDTH=1920 -e DISPLAY_HEIGHT=1080 mcr.microsoft.com/windows/servercore:ltsc2022
Thanks for replay.
tried with above env variables and it is not setting the resolution.
docker run -it -e DISPLAY_WIDTH=1920 -e DISPLAY_HEIGHT=1080 mcr.microsoft.com/dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 powershell
Hi, I dug a little deeper and it looks like setting the display resolution in a Windows Container is not supported. Could we learn more about your use case or why this would be beneficial?
Hi, we are running automation testcases on dotnet based web app which will launch browser and access the application. Automation test framework is executing seamlessly when we run in windows server VM of 5 with resolution 1920X1080 but where as failing in windows server container as we are unable to set display resolution. we can parallelize the tests case execution in windows server containers instead of running in VM's.
I'm not sure this will work, but can you try the same with the Server image? You will need to install the .Net components in it as there's not native .Net image for Server, but since that image has the GUI APIs, it might work.
thanks for replay. will try there and let you know the status
Using the PowerShell command, Set-DisplayResolution, inside of a container won't work. There's a check that compares the session desktop vs calling thread desktop and it'll always fail. (I don't know whether the GUI APIs help us go around this desktop check though).
This issue has been open for 30 days with no updates. @ntrappe-msft, please provide an update or close this issue.
Hi,
How to setup the dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 windows server core docker container display resolution to 1920X1080?
please help me to setup
Thanks & Regards, Raviteja