Share via


How to change the VM default screen resolution?

Question

Thursday, November 20, 2014 1:59 AM

Hi,

How can I set my VMs display resolution to something other than 1024x768 on bootup?    We are running startup programs that take screenshots of the desktop, which means that there is no RDP session present.     I need this setting done on teh VM itself.

All replies (6)

Thursday, November 20, 2014 5:54 AM ✅Answered

Hi;

For  Windows

Resolution

You can change the screen resolution by modifying two registry values. These two values are:

  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Video\GUID\0000\DefaultSettings.XResolution
  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Video\GUID\0000\DefaultSettings.YResolution

Where GUID is a randomly generated GUID.

You can actually specify any XResolution and YResolution value as long as they are hexadecimal.

Note:
In the case of a CRT monitor specifying an absurd resolution might damage your monitor. In the case of a LCD monitor your monitor might not show any user interface anymore.

A good way to change your Screen resolution is to write down the amount of pixels you want to fill your screen width with (this is the XResolution) and the amount of pixels you want on your screen height (the YResolution). The Windows calculator (not available in Server Core , you will have to find another computer or a hardware advanced calculator) offers an easy way to convert decimal amounts to hexadecimal amounts. You can then use these values to modify the corresponding registry values. A restart will make your preferred screen resolution meet reality.

Color Depth

The color depth used on your monitor is captured in the following registry value:

  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Video\GUID\0000\DefaultSettings.BitsPerPel

On my box this hexadecimal value was set to 0x00000008 (8) which meant my screen used an 8 bit color depth. (256 colors) Changing it to 16 bits (0x00000010) will show 65536 colors (High Colors) Other values that are typically available are 24 bits (0x00000018) and 32 bits (0x00000020).

Refresh Rate 

The refresh rate is the amount of times your screen gets fully refreshed and is expressed in Hertz. You can change the following value with your desired amount of Hertz:

  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Video\GUID\0000\DefaultSettings.VRefresh.

Also you could try a third party tool called TightVNC;

Disclaimer: TightVNC is not secure, so if security is an issue, you may need to find a different approach. The whole process will take only a few minutes, so the security hole is small, but there nonetheless.

  1. Install TightVNC Server on the EC2 instance so you can log into the console

  2. Disconnect all user remote desktop sessions and return the session to console

  3. Use the TightVNC Viewer to log into the EC2 instance console, ensuring port 5900 is open for that connection

    • Right-click on the desktop and select "Screen resolution"
    • Select "Advanced settings"
    • Select "List All Modes"
    • Select a higher resolution

Hope this helps.

Warm Regards,

Prasant


Wednesday, November 26, 2014 12:20 AM ✅Answered

Hi,

      Sorry for the late response (I have been out of town).    This method seems to work.    I am on azure BTW and the only step missing that could help someone else was the create the tightVNC's 5900 port as an endpoint on azure for the running VM.    

Tnx much!!!


Thursday, November 20, 2014 5:24 PM

Thank you for the quick response.      I do not seem to have these settings on my win2008 VM on Azure.   This is what my regedit is showing.    Please help!!


Sunday, November 23, 2014 3:33 AM

Hi;

In case if the regedit is not showing the settings, i suggest you install the TightVNC option. I have used it on my test Win 2008 R2 VM and it works.

TightVNC;

Disclaimer: TightVNC is not secure, so if security is an issue, you may need to find a different approach. The whole process will take only a few minutes, so the security hole is small, but there nonetheless.

  1. Install TightVNC Server on the EC2 instance so you can log into the console

  2. Disconnect all user remote desktop sessions and return the session to console

  3. Use the TightVNC Viewer to log into the EC2 instance console, ensuring port 5900 is open for that connection

    • Right-click on the desktop and select "Screen resolution"
    • Select "Advanced settings"
    • Select "List All Modes"
    • Select a higher resolution

Hope this helps.

Warm Regards,

Prasant


Monday, April 23, 2018 3:14 PM

Thanks, but this sounds like an ad for a Mac, or in the case of a VM server, for an Amazon VM.

Seriously, you're asking people to change the registry in order to set a desktop screen resolution?

Sorry, this is not what any developer or admin is paid by a business to spend expensive work cycles on. 


Wednesday, June 27, 2018 8:42 PM

A more secure way that I found that works is team viewer.