一、安装图形界面1、安装X-Window图形界面 shell> yum -y groupinstall "X Window System" 2、设置默认启动图形界面 shell> unlink /etc/systemd/system/default.target 3、安装vnc server端 shell> yum -y install tigervnc-server 4、配置VNC 在 /etc/systemd/system/ 目录里创建一个配置文件。我们可以将 /lib/systemd/sytem/vncserver@.service 拷贝一份配置文件范例过来。 shell> cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service 打开vncserver@:1.service,找到下面这几行,替换掉 shell> vim /etc/systemd/system/vncserver@:1.service 如果是root用户则 ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver -geometry 1440x900 %i" 注:修改分辨率在vncserver后添加参数-geometry 1440x900 5、重启systemd shell> systemctl daemon-reload 6、设置vnc密码 shell> vncpasswd 7、设置开机启动 - 关闭防火墙 shell> systemctl stop firewalld.service - 永久开机启动服务 shell> systemctl enable vncserver@:1.service - 启动VNC服务 shell> systemctl start vncserver@:1.service 二、关闭桌面休眠CentOS7图形化关闭屏幕保护 注:可能会因为软件包的升级,界面展现形式略有区别,仅供参考。 操作:Application—System Tools—Setting—Hardware—Power Saving—Blank screen—never 作者:龍龍小宝 原文:https://www.cnblogs.com/91donkey/p/11249668.html |