개발

Raspi 4B 모니터 없이 셋업 중 VNC Viewer 'Cannot currently show the dekstop'

Hugh Q Lee 2022. 5. 30. 12:32

문제: VNC Viewer로 raspi 연결시 'Cannot currently show the dekstop'라는 검은 화면이 뜬다.

해결 1. (보통 구글링하면 나오는 방법)

터미널에서

sudo raspi-config

으로 띄운 설정창에서

-> 2 Display Options

-> D5 VNC Resolution

-> 640x480 (minimum), 1024x768, 1280x720 1920x1080 (maximum)으로 변경해서 재부팅 시도해봤으나 (나는/내경우는) 효과없음.

 

그냥 모니터 hdmi 꽂아놓고 재부팅하니 VNC Viewer도 해결됨.

(근데 이럴거면 뭐하러 VNC 쓰나? 방법 없어서 이렇게 쓰고있었음. 해결 2로 드디어 해결.)

해결 2. (안되서 찾고 찾다 찾은 방법)

터미널에서

cd ..
cd ..
ls

해서 directory를 boot 폴더가 있는 곳으로 바꾸고,

sudo nano boot/config.txt

로 에디터 실행해서 config.txt파일을 아래 코드와 같이 수정한다.

(터미널에서 동작한다. 조금 생소함. 그래도 ctrl+s, ctrl+x 단축키만 쓰면 되서 어렵지 않게 할 수 있다.)

이제 재부팅을 하면 짜쟌~

# For more options and information see
# http://rpf.io/configtxt
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=16
#overscan_right=16
#overscan_top=16
#overscan_bottom=16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
hdmi_group=2
hdmi_mode=82

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
#dtparam=i2s=on
#dtparam=spi=on

# Uncomment this to enable infrared communication.
#dtoverlay=gpio-ir,gpio_pin=17
#dtoverlay=gpio-ir-tx,gpio_pin=18

# Additional overlays and parameters are documented /boot/overlays/README

# Enable audio (loads snd_bcm2835)
dtparam=audio=on

[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
max_framebuffers=2

[all]
disable_overscan=1
gpu_mem=256
start_x=1
enable_uart=1
#hdmi_enable_4kp60=1

https://stackoverflow.com/questions/66875411/vnc-on-raspberry-pi-shows-cannot-currently-show-the-desktop

 

VNC on Raspberry Pi shows Cannot Currently Show the Desktop

I am trying to use VNC in a headless install on my Raspberry Pi 4, running Raspberry Pi OS, installed via Raspberry Imager. The install is more or less vanilla, as the only changes I have made are ...

stackoverflow.com

 

728x90