-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvnc_set01
41 lines (34 loc) · 1.04 KB
/
vnc_set01
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
echo "确保已切换到root,否则退出,切换到root再执行"
sleep 10
apt update
apt install language-pack-zh-hans -y
file=/etc/environment
echo LANG=\"zh_CN.UTF-8\" >> $file
echo LANGUAGE=\"zh_CN:zh:en_US:en\" >> $file
file=/etc/profile
echo LANG=\"zh_CN.UTF-8\" >> $file
echo LANGUAGE=\"zh_CN:zh:en_US:en\" >> $file
file=/root/.bashrc
echo LANG=\"zh_CN.UTF-8\" >> $file
echo LANGUAGE=\"zh_CN:zh:en_US:en\" >> $file
apt install tigervnc-standalone-server -y
#精简安装
apt-get install -y --no-install-recommends xubuntu-desktop
#不安装这个会报错Failed to execute child process “dbus-lauch”(xxxxx)
apt install dbus-x11 -y
#安装中文字体 ,否则会出现乱码
apt install fonts-wqy-microhei -y
#安装中文语言名和fcitx中文输入法
apt install -y \
gnome-user-docs-zh-hans \
language-pack-gnome-zh-hans \
fcitx \
fcitx-pinyin \
fcitx-table-wubi
# 修改为文件夹所有者
path=$(ls /home/)
chown -R $path:$path /home/$path
su $path -c "vncpasswd"
file=$(find /home/ -name "vnc_set02")
su $path -s /bin/bash $file
exit