이는 단일 사용자 설정이며 해당 systemctl start vncserver@:display_number.service
단계에서 display_number를 적절하게 변경하면 다음 메시지가 표시됩니다.
Job for vncserver@:0.service failed because the control process exited with error code.
See "systemctl status vncserver@:0.service" and "journalctl -xeu vncserver@:0.service" for details.
첫 번째 명령을 실행한 후:
× vncserver@:0.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/[email protected]; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2022-01-24 04:09:20 CET; 10s ago
Process: 7899 ExecStart=/sbin/runuser -l (MY USERNAME HERE, REMOVED FOR PRIVACY) -c /usr/bin/vncserver :0 -geometry 1920x1080 (code=exited, status=203/EXEC)
CPU: 1ms
Jan 24 04:09:20 fedora systemd[1]: Starting Remote desktop service (VNC)...
Jan 24 04:09:20 fedora systemd[7899]: vncserver@:0.service: Failed to execute /sbin/runuser: Permission denied
Jan 24 04:09:20 fedora systemd[7899]: vncserver@:0.service: Failed at step EXEC spawning /sbin/runuser: Permission denied
Jan 24 04:09:20 fedora systemd[1]: vncserver@:0.service: Control process exited, code=exited, status=203/EXEC
Jan 24 04:09:20 fedora systemd[1]: vncserver@:0.service: Failed with result 'exit-code'.
Jan 24 04:09:20 fedora systemd[1]: Failed to start Remote desktop service (VNC).
어떻게 해야 합니까? 다른 사람들도 비슷한 문제를 겪는 것을 본 적이 있지만 이 특정 파일에 관한 한 누구도 완전히 동일하지 않습니다.
답변1
동일한 가이드를 따랐을 때 Fedora 36에서 귀하와 동일한 문제에 직면했습니다.
작동하게 하려면 먼저 복사를 실행 취소하세요. 기본적으로 문제가 다시 발생했습니다./etc/systemd/system/[email protected]
# cp /lib/systemd/system/[email protected] /etc/systemd/system/[email protected]
그런 다음 다음도 수행해야 합니다.
vi ~/.vnc/config
# create new
# session=(display manager you use)
# securitytypes=(security options)
# geometry=(screen resolution)
session=gnome
securitytypes=vncauth,tlsvnc
geometry=800x600
그리고
vi /etc/tigervnc/vncserver.users
# add to the end
# specify [:(display number)=(username] as comments
# display number 1 listens port 5901
# display number n + 5900 = listening port
#
# This file assigns users to specific VNC display numbers.
# The syntax is <display>=<username>. E.g.:
#
# :2=andrew
# :3=lisa
:1=fedora
:2=redhat
자세한 내용은 다음을 참조하세요.https://www.server-world.info/en/note?os=Fedora_34&p=desktop&f=6
이제 실행하면 sudo systemctl status vncserver@:1.service
다음을 볼 수 있습니다.
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/[email protected]; enabled; vendor preset: disabled)
Active: active (running) since Wed 2022-06-22 22:56:07 CEST; 18s ago
Process: 7877 ExecStartPre=/usr/libexec/vncsession-restore :1 (code=exited, status=0/SUCCESS)
Process: 7890 ExecStart=/usr/libexec/vncsession-start :1 (code=exited, status=0/SUCCESS)
Main PID: 7897 (vncsession)
Tasks: 0 (limit: 9190)
Memory: 1.0M
CPU: 48ms
CGroup: /system.slice/system-vncserver.slice/vncserver@:1.service
‣ 7897 /usr/sbin/vncsession USER :1