This article provides a solution to decrease the GNOME Boxes VM screen resolution for high-resolution small screens, specifically for users who encounter issues with a laptop having a fairly high resolution (3XXXx2XXX) on a 13-inch screen when running a VM with GNOME Boxes using SPICE.
Problem Background
High-resolution small screens can make it difficult to use Virtual Machines (VMs) comfortably, as the default screen resolution may be too large, causing small text and icons, and requiring excessive zooming in and out.
Why Decrease Screen Resolution?
Decreasing the screen resolution allows for better usability on small screens by increasing the size of text and icons, making it easier to navigate and interact with the VM.
How to Decrease Screen Resolution in GNOME Boxes
To decrease the screen resolution in GNOME Boxes, follow these steps:
- Start your VM in GNOME Boxes.
- Press
Ctrl + Altto release the mouse from the VM and go back to your host system. - Click on the VM window titlebar to make sure it's in focus.
- Press
Super + Down(Super key is usually the Windows key) a few times to decrease the screen resolution. Alternatively, you can go toDevices > Display > Resolutionto manually select a lower resolution.
Persisting the Lower Resolution
To make the lower resolution permanent, you can modify the VM's XML configuration file:
- Shut down your VM.
- Run the following command to open the VM's XML file in a text editor:
sudo nano /var/lib/libvirt/images/your-vm.xml
- Find the following line:
<graphics type='vnc' port='-1' listen='0.0.0.0'/>
- Replace it with:
<graphics type='spice' port='5900' autoport='no' listen='0.0.0.0'/>
- Add the following lines inside the
<domain>tag:
<devices>
<display type='spice'>
<mode 'graphics' type='auto'>
<width type=' pixels'>800</width>
<height type='pixels'>600</height>
</mode>
</display>
...
</devices>
- Save and close the file.
- Restart the VM. It should now start with the reduced screen resolution.
Decreasing the screen resolution in GNOME Boxes for high-resolution small screens can significantly improve usability. By following the steps outlined in this article, users can easily modify the VM's XML configuration file to persistently set a lower resolution, making it more comfortable to use on a 13-inch laptop with a fairly high resolution (3XXXx2XXX).