I have elementary OS 5.1.5 Hera installed in VirtualBox 6.1.10. The display size 1920x1080 is not offered in the display settings. I have done the following to temporarily add the option.
In terminal I input:
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
I used the display panel to select the new 1920x1080 option and everything looked just as expected. However, even after adding the code to .profile using:
gedit ~/.profile
The changes to the display settings did not survive a restart. How can I accomplish this? Thank you!