Centos builds graphical interface and VNC

888u

Last update at :2024-05-20,Edit by888u

The installation may cause the DNS to be cleared, so you need to execute the following command first and then follow the steps to install:

  • chattr +i /etc/resolv.conf
  • Installation:

  • yum install -y tigervnc tigervnc-server
  • yum groupinstall “Desktop”
  • yum install gnome-panel
  • yum install nautilus
  • Set the login password (you need to enter it twice to execute the following command):

  • vncpasswd
  • Configuration (check whether the configuration file below is consistent with yours):

  • cat ~/.vnc/xstartup
  • #!/bin/sh
  • [ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
  • export LANG
  • export SYSFONT
  • vncconfig -iconic &
  • unset SEVPSION_MANAGER
  • unset DBUS_SEVPSION_BUS_ADDREVPS
  • OS=`uname -s`
  • if [ $OS = ‘Linux’ ]; then
  • case “$WINDOWMANAGER” in
  • *gnome*)
  • if [ -e /etc/SuSE-release ]; then
  • PATH=$PATH:/opt/gnome/bin
  • export PATH
  • fi
  • ;;
  • esac
  • fi
  • if [ -x /etc/X11/xinit/xinitrc ]; then
  • exec /etc/X11/xinit/xinitrc
  • fi
  • if [ -f /etc/X11/xinit/xinitrc ]; then
  • exec sh /etc/X11/xinit/xinitrc
  • fi
  • [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
  • xsetroot -solid gray
  • xterm -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
  • twm &
  • Start and shut down vnc:

  • vncserver:1
  • vncserver -kill :1
  • Client connection test The client software used is: vnc viewer (1) Enter the external IP of the server: 1 (2) Enter the login password set by vncpasswd (3)Interface after successful connection

    6.Attachment ! This operation is performed under the root user. If you need to create a new account to log in to vnc, please create a system account first, set the vnc login password under this account, and start the vnc service

    Recommended site search: 100m virtual host, European server and American server, Korean virtual host, foreign server, registration-free space, domain name registration website, Tencent cloud server, IP online query, domain name price, domain name registration center,

    Centos builds graphical interface and VNC

    All copyrights belong to 888u unless special state
    取消
    微信二维码
    微信二维码
    支付宝二维码