For the ease of use , I have a small 5″ screen that I use to test any projet with raspery pi, sepacial when it is being used as headless unit.
Not to say a lot and go directly to what you need, do the following:
- Take your SD card out of the rasppery pi.
- Plug it into your main computer ( I usually use MAC or Windows)
- Go to the boot partition.
- under the partition, you will find “config.txt” file, use your preferred text editor to changes it.
- Input the follwoing lines:
# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1
# uncomment to force a specific HDMI mode (here we are forcing 800x480!)
hdmi_group=2
hdmi_mode=1
hdmi_mode=87
hdmi_cvt 800 480 60 6 0 0 0
For more details refer to this link