当前位置: 首页 > >

CentOS 7°²×°XfceºÍVNC

发布时间:

CentOS 7°²×°XfceºÍVNC

ºÜ¶àVPSÉÌÌṩµÄCentOS 7¾µÏñÖ»ÓÐ×îС»¯°²×°£¬ÕâÑù¾ÍÖ»ÄÜÔÚÃüÁîÐÐϲÙ×÷£¬Èç¹ûÒªµ÷ÊÔ´úÂëµÄ»°£¬»¹ÊÇͼÐλ¯½çÃæ·½±ã£¬¶øÇÒCentOS×Ô´øµÄGnomeºÍKDE¶¼±È½ÏÕ¼ÄÚ´æ¡¢Æô¶¯×ÀÃæºó¾ÍÕ¼ÓÃÁË400MBÒÔÉÏÄÚ´æÁË£¬¶ÔÓÚСÄÚ´æµÄVPSÀ´Ëµ£¬Ö»Õ¼Óü¸Ê®MBÄÚ´æµÄXfce±È½ÏºÏÊÊ¡£


°²×°Xfce
°²×°¶îÍâyumÔ´

yum install epel-release

¿ÉÒÔʹÓÃyum grouplistÀ´²é¿´Ä¿Ç°ÓÐÄÄЩ¿ÉÓÃÔ´


°²×°Xfce

yum groupinstall xfce
°²×°ÖÐÎÄ×ÖÌ壨¿ÉÑ¡£©

¿ÉÒÔͨ¹ýyum search fontsÀ´ËÑË÷ÓÐÄÄЩ×ÖÌ壬˳´øһ˵yum searchµÄ×÷ÓÃÊÇËÑË÷yum°ü¡£


yum install cjkuni-ukai-fonts
yum install google-noto-sans-simplified-chinese-fonts.noarch

°²×°ÖÐÎÄÊäÈë·¨£¬ÍøÉÏËѵķ½·¨£¬¿ÉÊÇÎÒ°²×°ÁË»¹ÊÇû·¨Çл»µ½ÖÐÎÄÊäÈë


yum install ibus
yum install ibus-libpinyin
yum install ibus-gtk2
yum install ibus-gtk3
yum install im-chooser
yum install gtk2-immodule-xim
yum install gtk3-immodule-xim

СÌùÊ¿

²é¿´¿ÉÓÃyumÔ´¿ÉÒÔʹÓÃÃüÁîyum grouplist


ËÑË÷yum°ü¿ÉÒÔʹÓÃÃüÁîyum search ¹Ø¼ü×Ö


°²×°VNC·þÎñ
°²×°VNC·þÎñ¶Ë³ÌÐò

yum install vnc-server
ÅäÖÃVNC

Ê×ÏÈ¿½±´ÅäÖÃÎļþ


cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service

/etc/systemd/systemÏÂÃæµÄ¡¢vncserver@ºóÃæµÄðºÅÊý×Ö£¬±íʾ·þÎñʵÀý±àºÅ£¬¿ÉÒÔÅäÖöà¸ö·þÎñʵÀý£¬Ö¸¶¨²»Í¬µÄ±àºÅµÄ¼´¿É¡£VNCµÄ·þÎñ¶Ë¿Ú´Ó5900¿ªÊ¼£¬¸ù¾Ý·þÎñʵÀý±àºÅÔö¼Ó£¬±ÈÈçʾÀýµÄvncserver@:1.service£¬¶ÔÓ¦µÄ¶Ë¿ÚºÅ¾ÍÊÇ5901£¬Èç¹ûÊÇvncserver@:12.service£¬ÄǶÔÓ¦µÄ¶Ë¿ÚºÅ¾ÍÊÇ5912¡£


È»ºóÐÞ¸ÄÅäÖÃÎļþ


vi /etc/systemd/system/vncserver@:1.service

½«


ExecStart=/sbin/runuser -l -c "/usr/bin/vncserver %i"
PIDFile=/home//.vnc/%H%i.pid

ÕâÁ½ÐÐÖеÄÌ滻ΪÐèҪͨ¹ývncÔ¶³ÌµÇ¼µÄÓû§Ãû¡£µÚ¶þÐеÄ/home/ÊÇÓû§µÄhomeĿ¼£»Èç¹ûÊÇrootÔòÊÇ/root£¬PIDFile=/root/.vnc/%H%i.pid¡£


ÉèÖÃvncÃÜÂ루ֻӰÏìÖ´ÐÐÃüÁîµÄÓû§£¬±ÈÈ統ǰÊÇrootÓû§£¬¾ÍÖ»ÉèÖÃÁËrootµÄvncµÇ¼ÃÜÂ룩


vncpasswd

ˢзþÎñ¡¢ÉèÖÃ×ÔÆô¡¢Æô¶¯·þÎñ


systemctl daemon-reload
systemctl enable vncserver@:1.service
systemctl start vncserver@:1.service

ÉèÖ÷À»ðǽ£¨Èç¹û¿ªÆôÁË·À»ðǽ£©


firewall-cmd --permanent --add-service vnc-server
systemctl restart firewalld.service

Õâ¸öʱºò£¬ÒѾ­¿ÉÒÔͨ¹ývnc¿Í»§¶ËÁ¬½ÓÁË£¬²»¹ýµÇ¼ºóÖ»ÄÜ¿´¼ûÒ»¸ö¿Õ°××ÀÃ棬ʲô¶¼²»ÄܲÙ×÷£¬ÐèÒªÐÞ¸ÄÓû§homeĿ¼/.vnc/xstartup£¬´ËʱÎÒÃÇÊÇroot£»Èç¹ûÊÇÆäËûÓû§ÔòÊÇÐÞ¸Ä/home//.vnc/xstartup¡£


vi /root/.vnc/xstartup

½«ÎļþÄÚÈÝÌ滻Ϊ


#!/bin/sh
# Uncomment the following two lines for normal desktop:
unset SESSION_MANAGER
#exec /etc/X11/xinit/xinitrc
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
startxfce4 &

Ö*ô·þÎñÉúЧ


systemctl restart vncserver@:1.service
¿Í»§¶ËÅäÖÃ

¿ÉÒÔÓÃ?Tightvnc viewer?»ò?Realvnc viewer?µÈ¿Í»§¶ËÀ´Á¬½Ó·þÎñÆ÷¡£


ÎÒÔÚWindowsÏÂÓõÄRealvnc viewer£¬Ö»ÓÃÏÂÔØviewer¾ÍºÃ£¬¾ÍÒ»¸öexe£¬Ð½¨Á¬½ÓÖ¸¶¨IPµØÖ·ºÍ¶Ë¿Ú¾ÍÄÜÁ¬ÉÏ·þÎñÆ÷ÁË¡£Ä¬ÈÏÏÔʾÊÇ6λɫ£¬ÔÚÁ¬½ÓµÄProperties-ExpertÀïÃ棬°ÑColorLevel¸Ä³Érgb888¾ÍÄÜÒÔ24λɫÏÔʾÁË¡£


相关推荐


友情链接: