我正在使用GNOME运行Fedora 27桌面版。我已尝试过来自网络上的说明,但没有找到任何可让我设置与远程用户共享屏幕的内容。任何人都可以帮我这个吗?
非常感谢您的回复。
到目前为止,这是故事:
======
我最初尝试过:
Activies -> Show Application -> Settings -> Sharing
并看到了选项:
File Sharing
Media Sharing
Remote Login
但是没有找到Screen Sharing
的选项,一页建议应该出现。
======
我看过:
https://docs.fedoraproject.org/f27/system-administrators-guide/Wayland.html
并运行
$ echo $WAYLAND_DISPLAY
产生
wayland-0
但我无法找到如何使用此信息来解决我的问题。我也没有找到在Fedora 27下Wayland上的屏幕共享工作的文档。
======
在我尝试过的众多解决方案中,我按照https://docs.fedoraproject.org/f27/system-administrators-guide/infrastructure-services/TigerVNC.html上的说明取得了最佳进展
以下命令有效:
sudo dnf install tigervnc-server
sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service
然后我修改了/etc/systemd/system/vncserver@.service
,用以下两行中的用户名替换<USER>
:
ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i -geometry 1280x1024"
PIDFile=/home/<USER>/.vnc/%H%i.pid
然后我跑了:
sudo systemctl daemon-reload
并设置密码:
vncpasswd
接下来网站的说明告诉我:
使用有效的显示编号,执行以下命令:
sudo systemctl enable vncserver@:display_number.service
我尝试过使用显示数字0,1和2。
例如,如果显示编号为1,则根据SELinux是设置为Enforcing
还是Permissive
,我会收到不同的错误消息。
sudo systemctl start vncserver@:1.service
使用'Enforcing':
Job for vncserver@:1.service failed because the service did not take the steps required by its unit configuration.
See "systemctl status vncserver@:1.service" and "journalctl -xe" for details.
尝试SELinux建议的以下步骤后:
sudo ausearch -c 'systemd' --raw | audit2allow -M my-systemd
semodule -i my-systemd.pp
和
sudo ausearch -c 'geoclue' --raw | audit2allow -M my-geoclue
sudo semodule -i my-geoclue.pp
错误消息更改为与'Permissive'中给出的相同:
Job for vncserver@:1.service failed because the control process exited with error code.
See "systemctl status vncserver@:1.service" and "journalctl -xe" for details.
systemctl status vncserver@:1.service
的输出如下:
● vncserver@:1.service - Remote desktop service (VNC)
Loaded: loaded (/etc/systemd/system/vncserver@.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2018-03-26 12:24:12 EDT; 3min 4s ago
Process: 23294 ExecStart=/usr/sbin/runuser -l jazcap53 -c /usr/bin/vncserver :1 (code=exited, status=98)
Process: 23292 ExecStartPre=/bin/sh -c /usr/bin/vncserver -kill :1 > /dev/null 2>&1 || : (code=exited, status=0/SUCCESS)
Mar 26 12:24:12 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...
Mar 26 12:24:12 localhost.localdomain systemd[1]: vncserver@:1.service: Control process exited, code=exited status=98
Mar 26 12:24:12 localhost.localdomain systemd[1]: Failed to start Remote desktop service (VNC).
Mar 26 12:24:12 localhost.localdomain systemd[1]: vncserver@:1.service: Unit entered failed state.
Mar 26 12:24:12 localhost.localdomain systemd[1]: vncserver@:1.service: Failed with result 'exit-code'.
而且sudo journalctl -xe
产生了:
Mar 26 12:27:41 localhost.localdomain systemd[1]: Started SSSD Kerberos Cache Manager.
-- Subject: Unit sssd-kcm.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sssd-kcm.service has finished starting up.
--
-- The start-up result is done.
Mar 26 12:27:41 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=sssd-kcm c
Mar 26 12:27:41 localhost.localdomain sssd[kcm][23679]: Starting up
Mar 26 12:27:41 localhost.localdomain systemd[1]: Started SSSD Secrets Service responder.
-- Subject: Unit sssd-secrets.service has finished start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit sssd-secrets.service has finished starting up.
--
-- The start-up result is done.
Mar 26 12:27:41 localhost.localdomain audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=sssd-secre
Mar 26 12:27:41 localhost.localdomain sssd[secrets][23680]: Starting up
Mar 26 12:30:04 localhost.localdomain sudo[23858]: jazcap53 : TTY=pts/0 ; PWD=/home/jazcap53 ; USER=root ; COMMAND=/bin/journalctl -xe
Mar 26 12:30:04 localhost.localdomain audit[23858]: USER_CMD pid=23858 uid=1001 auid=1001 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg
Mar 26 12:30:04 localhost.localdomain audit[23858]: CRED_REFR pid=23858 uid=0 auid=1001 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg='
Mar 26 12:30:04 localhost.localdomain sudo[23858]: pam_systemd(sudo:session): Cannot create session: Already occupied by a session
Mar 26 12:30:04 localhost.localdomain audit[23858]: USER_START pid=23858 uid=0 auid=1001 ses=3 subj=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 msg=
Mar 26 12:30:04 localhost.localdomain sudo[23858]: pam_unix(sudo:session): session opened for user root by (uid=0)
答案 0 :(得分:1)
如果您没有安装Vino
,GNOME将不会显示“屏幕共享”。
sudo dnf install vino
应该这样做。然后,您可以按照初次尝试设置屏幕共享。