CentOS VncServer怎样修改为预设root登入窗口管理

2023-04-14 03:14:00 窗口 登入 预设

如何在CentOS中修改VncServer预设的root登入窗口管理

为了修改VncServer的root登入窗口管理,您需要编辑/etc/sysconfig/vncservers文件。

打开/etc/sysconfig/vncservers文件,找到下面的行:

# The VNCSERVERS variable is a list of display:user pairs.

#

# Uncomment the lines below to run VNC server on display :2

# as my 'myusername' (adjust this to your own). You will also

# need to set a VNC password; run 'man vncpasswd' to see how

# to do that.

#

# DO NOT RUN THIS SERVICE if your local area network is

# untrusted! For a secure way of using VNC, see below.

# VNCSERVERS="2:myusername"

# VNCSERVERARGS[2]="-geometry 800x600"

将其改为:

# The VNCSERVERS variable is a list of display:user pairs.

#

# Uncomment the lines below to run VNC server on display :2

# as my 'myusername' (adjust this to your own). You will also

# need to set a VNC password; run 'man vncpasswd' to see how

# to do that.

#

# DO NOT RUN THIS SERVICE if your local area network is

# untrusted! For a secure way of using VNC, see below.

VNCSERVERS="2:root"

VNCSERVERARGS[2]="-geometry 800x600"

保存并退出。

接下来,您需要重新启动VncServer服务:

service vncserver restart

现在,您应该能够通过使用root帐户的密码登录到VncServer了。

相关文章