在Linux CentOS上登录之前启动vino-server(VNC)


4

我正在使用默认的vino-server软件包通过VNC访问我的CentOS 6工作站。

它工作正常,但只有我在本地登录工作站后。我需要在登录前启动vino-server,直接在Gnome登录界面,我选择用户名和密码。

由于个人原因,我需要使用Vino而不是vnc-server或任何其他软件包

我已经试图插入/usr/libexec/vino-server &/etc/gdm/Init/Default但这并没有解决问题。

Answers:


2

创建将启动vino的桌面文件:

# cat > /usr/share/gdm/autostart/LoginWindow/vino-server.desktop << 'EOF'
[Desktop Entry]
Name=Remote Desktop
Comment=GNOME Remote Desktop Server
Exec=/usr/libexec/vino-server
Icon=preferences-desktop-remote-desktop
Terminal=false
Type=Application
EOF

改变一些维诺的设置1GDM用户(维诺运行在它之下):

# su -s /bin/sh -l gdm -c               \
     'gconftool-2 --set --type=bool     \
                  /desktop/gnome/remote_access/enabled true'
# su -s /bin/sh -l gdm -c               \
     'gconftool-2 --set --type=bool     \
                  /desktop/gnome/remote_access/prompt_enabled false'

请注意,您所能做的就是登录。用户登录后,VNC会话结束。在会话结束时,您将能够重新连接到GDM。

您还需要禁用SELinux 2或者更好地编写所需的规则以让用户gdm运行vino-server


1我从“从命令行启用远程VNC?” 的答案中得到了详细信息。来自Ask Ubuntu SE。

2修改/etc/selinux/config以便SELINUX=permissive使用或使用setenforce

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.