![TigerVNC 无法在 Fedora 上运行](https://linux22.com/image/201392/TigerVNC%20%E6%97%A0%E6%B3%95%E5%9C%A8%20Fedora%20%E4%B8%8A%E8%BF%90%E8%A1%8C.png)
这是单用户设置,在该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