Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display Resolution setup in dotnet/framework/sdk:4.8-windowsservercore-ltsc2019 windows server core docker image to 1920X1080 #527

Open
RavitejaAmruthapu opened this issue Aug 29, 2024 · 8 comments
Assignees
Labels
🔖 ADO Has corresponding ADO item question Further information is requested

Comments

@RavitejaAmruthapu
Copy link

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

@RavitejaAmruthapu RavitejaAmruthapu added question Further information is requested triage New and needs attention labels Aug 29, 2024
@ntrappe-msft
Copy link
Contributor

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

@ntrappe-msft ntrappe-msft removed the triage New and needs attention label Sep 3, 2024
@RavitejaAmruthapu
Copy link
Author

RavitejaAmruthapu commented Sep 5, 2024

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

image

@ntrappe-msft
Copy link
Contributor

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?

@ntrappe-msft ntrappe-msft added the 🔖 ADO Has corresponding ADO item label Sep 6, 2024
@RavitejaAmruthapu
Copy link
Author

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.

@vrapolinario
Copy link
Contributor

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.

@RavitejaAmruthapu
Copy link
Author

thanks for replay. will try there and let you know the status

@ntrappe-msft
Copy link
Contributor

ntrappe-msft commented Sep 6, 2024

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).

@ntrappe-msft ntrappe-msft self-assigned this Oct 2, 2024
Copy link
Contributor

This issue has been open for 30 days with no updates.
@ntrappe-msft, please provide an update or close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔖 ADO Has corresponding ADO item question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants