在 Fedora 27 Desktop 上设置屏幕共享时遇到问题

jaz*_*p53 5 fedora vnc-server screensharing wayland

我正在使用 GNOME 运行 Fedora 27 桌面版。我已经尝试过网络上的所有说明,但没有找到任何可以让我设置与远程用户共享屏幕的内容。谁能帮我这个?

非常感谢您的回复。

这是迄今为止的故事:

========

我最初尝试:

Activies -> Show Application -> Settings -> Sharing

并看到选项:

File Sharing
Media Sharing
Remote Login
Run Code Online (Sandbox Code Playgroud)

但是没有看到 的选项Screen Sharing,建议应该显示哪一页。

========

我看过:

https://docs.fedoraproject.org/f27/system-administrators-guide/Wayland.html

并运行

$ echo $WAYLAND_DISPLAY

这产生

wayland-0

但我不知道如何使用这些信息来解决我的问题。我也没有找到在 Fedora 27 下在 Wayland 上进行屏幕共享的文档。

========

Of the many solutions I've tried, I made the best progress by following instructions at https://docs.fedoraproject.org/f27/system-administrators-guide/infrastructure-services/TigerVNC.html

The following commands worked:

sudo dnf install tigervnc-server
sudo cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@.service 
Run Code Online (Sandbox Code Playgroud)

Then I edited /etc/systemd/system/vncserver@.service, replacing <USER> with my user name in the following two lines:

ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i -geometry 1280x1024"
PIDFile=/home/<USER>/.vnc/%H%i.pid
Run Code Online (Sandbox Code Playgroud)

Then I ran:

sudo systemctl daemon-reload

and set a password with:

vncpasswd

Next the site's instructions told me:

With a valid display number, execute the following command:

sudo systemctl enable vncserver@:display_number.service

I've tried using display numbers 0, 1, and 2.

With display number as 1, for example, I got different error messages depending on whether SELinux was set to Enforcing or Permissive.

sudo systemctl start vncserver@:1.service

With '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.
Run Code Online (Sandbox Code Playgroud)

After trying the following steps suggested by SELinux:

sudo ausearch -c 'systemd' --raw | audit2allow -M my-systemd
semodule -i my-systemd.pp
Run Code Online (Sandbox Code Playgroud)

and:

sudo ausearch -c 'geoclue' --raw | audit2allow -M my-geoclue
sudo semodule -i my-geoclue.pp
Run Code Online (Sandbox Code Playgroud)

the error message changed to be same as given here for '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.
Run Code Online (Sandbox Code Playgroud)

的输出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'.
Run Code Online (Sandbox Code Playgroud)

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)
Run Code Online (Sandbox Code Playgroud)

use*_*717 1

如果尚未Vino安装,GNOME 将不会显示“屏幕共享”选项。

sudo dnf install vino应该这样做。然后,您可以根据您的初始尝试设置屏幕共享。