- A+
所属分类:未分类
首先安装vnc和桌面这里选择的是Xfce桌面
1:apt-get update2:aptitude install --without-recommends xorg xfce4 alsa-base alsa-utils cpufrequtils gamin xdg-utils desktop-base gnome-brave-icon-theme dmz-cursor-theme##没有aptitude的使用 apt-get install aptitude 安装3:aptitude install vnc4server4:vnc4server ##设置VNC验证密码(2次)回车
这样XFCE和vnc安装完成,但是,还需要设置桌面启动:
执行下列命令:
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/.Xresourcesxsetroot -solid greyvncconfig -iconic &#xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#twm &startxfce4 &
最后执行xstartup 赋予可执行权限和重启VPS
chmod +x ~/.vnc/xstartupreboot
再次使用VNCviewer来连接你的VPS,如果你发现VNC被拒绝连接,还需要进入SSH开启服务:
vncserver
#某些需要成功连接了VNC后,sudo apt-get install xfce4
这里是一个xp安装代码 :
我自己弄得一键代码脚本:
wget https://www.vrrmr.net/code/debianxp.shsh debianxp.sh#有的os出现特殊情况下需要在sources.list添加#
1
sudo apt-get install xubuntu-desktop #ubuntu +xfce
sudo apt-get install language-pack-zh-hant language-pack-zh-hans &安装中文语言包
sudo vim /etc/environment #配置环境变量
(在文件中增加语言和编码的设置:
LANG="zh_CN.UTF-8"
LANGUAGE="zh_CN:zh:en_US:en")sudo dpkg-reconfigure locales#重新设置本地配置:
系统语言:
locale -a
安装缺少的语言
sudo locale-gen zh_CN.UTF-8
vim ~/.profile
# 添加下面内容
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"locale

我的QQ群
这是我的QQ群扫一扫