Tangwx

Tangwx

博客网站

Configure 1920x1080 resolution for Ubuntu virtual machine.

Configuring 1920x1080 Resolution for Ubuntu Virtual Machine#

Those who have installed Ubuntu on a virtual machine should know that the initial resolution is frustratingly small and makes it difficult to use. Therefore, it is necessary to adjust the resolution. However, some resolutions may not be available in Ubuntu by default, so we need to customize them ourselves.

Customizing the resolution:

  1. Enter: cvt 1920 1080
    The result returned is:
    image-20230730123907247

  2. Check the name of the display:
    Enter: xrandr
    image-20230730124131374

From this, we can see that the name of my display is Virtual1.

  1. Set the resolution:
    Enter:
    sudo xrandr --newmode "1920x1080_60.00" 173.00 1920 2048 2248 2576 1080 1083 1088 1120 -hsync +vsync
    sudo xrandr --addmode Virtual1 "1920x1080_60.00"

  2. Select the 1920X1080 resolution:
    Go to System Settings -> Displays, and choose 1920X1080 (16:9) in the Resolution section, then click Apply.
    image-20230730131336451

  3. Save the resolution:
    Although the resolution has been set, it will be reset after restarting. To make it permanent, you need to save these two commands:
    Enter: sudo gedit /etc/profile
    Add the above command at the end of the file.
    image-20230730131503943

  4. Restart:
    Congratulations, you're done! Restart to verify the changes.
    image-20230730131607416

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.