CentOS 7---vnc起動と文字化けしの問題
1769 ワード
1、文字化けしの問題(1)cp/etc/locale.を先にバックアップする.conf/etc/locale.conf.bak(2)vim/etc/locale.conf#LANG="zh_CN.UTF-8"LANGUAGE="zh_CN.UTF-8:zh_CN.GB2312:zh_CN"SUPPORTED="zh_CN.UTF-8:zh_CN:en_US.UTF-8:en_US:en"SYSFONT="lat0-sun16"
2、サーバー起動問題#エラーメッセージ●vncserver@:1.service - Remote desktop service (VNC)Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)Active: inactive (dead) since Mon 2018-04-16 17:58:44 CST; 1s agoProcess: 47975 ExecStop=/usr/bin/vncserver -kill %i (code=exited, status=2)Process: 47939 ExecStart=/sbin/runuser -l root -c/usr/bin/vncserver %i (code=exited, status=0/SUCCESS)Process: 47937 ExecStartPre=/usr/bin/vncserver -kill %i (code=exited, status=2)Main PID: 47939 (code=exited, status=0/SUCCESS)
解決策[Unit]Description=Remote desktop service(VNC)After=syslog.target network.target
systemctl daemon-reload
systemctl restart vncserver@:1.service
転載先:https://blog.51cto.com/shenlian/2104078
2、サーバー起動問題#エラーメッセージ●vncserver@:1.service - Remote desktop service (VNC)Loaded: loaded (/etc/systemd/system/vncserver@:1.service; enabled; vendor preset: disabled)Active: inactive (dead) since Mon 2018-04-16 17:58:44 CST; 1s agoProcess: 47975 ExecStop=/usr/bin/vncserver -kill %i (code=exited, status=2)Process: 47939 ExecStart=/sbin/runuser -l root -c/usr/bin/vncserver %i (code=exited, status=0/SUCCESS)Process: 47937 ExecStartPre=/usr/bin/vncserver -kill %i (code=exited, status=2)Main PID: 47939 (code=exited, status=0/SUCCESS)
Apr 16 17:58:41 localhost.localdomain systemd[1]: Starting Remote desktop service (VNC)...
Apr 16 17:58:41 localhost.localdomain vncserver[47937]: vncserver: The HOME environment variable is not set.
Apr 16 17:58:41 localhost.localdomain systemd[1]: Started Remote desktop service (VNC).
Apr 16 17:58:44 localhost.localdomain vncserver[47975]: vncserver: The HOME environment variable is not set.
解決策[Unit]Description=Remote desktop service(VNC)After=syslog.target network.target
[Service]
Type=simple # simple
#User=root
### Clean any existing files in /tmp/.X11-unix environment
ExecStartPre=-/usr/bin/vncserver -kill %i
ExecStart=/sbin/runuser -l root -c "/usr/bin/vncserver %i"
PIDFile=/home/root/.vnc/%H%i.pid
ExecStop=-/usr/bin/vncserver -kill %i
systemctl daemon-reload
systemctl restart vncserver@:1.service
転載先:https://blog.51cto.com/shenlian/2104078