1.更新软件库 apt-get update 2.升级软件 apt-get upgrade 3.安装桌面 apt-get install ubuntu-desktop
华为云登陆进去是guest用户,不能选择登陆用户且不须要密码就便可登陆。html
登陆进去会以下警告信息:linux
在putty上经过SSH登录云服务器:shell
、ubuntu
对如下目录文件进行修改:vim
注意:下载及登录putty的操做是必须的!由于远程进入华为云服务器,只能使用guest账号,可是guest账号是没有权限修改这个文件的。因此,须要在windows端,使用上面提到的putty工具,以root账号(使用putty工具进入能够指定登陆用户),远程登陆进入,这样才能够修改文件。windows
vim /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf
# 修改前 [Seat:*] user-session=ubuntu # 修改后 [Seat:*] user-session=ubuntu greeter-show-manual-login=true allow-guest=false
重启以后就能够用root用户登陆,可是登陆后仍是有警告,这个须要修改 /root/.profile 文件:bash
vim /root/.profile
# 文件 /root/.profile # 文件修改前 # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi mesg n || true # 文件修改后 # ~/.profile: executed by Bourne-compatible login shells. if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi tty -s && mesg n || true
reboot 重启后便可。服务器
每次都经过web进行登陆很不方便,并且桌面的反应也比较慢。所以能够安装Teamviwer/vnc4server来实现远程登陆。session
无需过多配置,一键安装!
windows及linux版本均可安装。
使用以下:
安装vnc4server
apt-get install vnc4server -y
运行命令开启VNC服务并设置链接密码
vnc4server
运行命令确认服务是否启动
ps –ef|grep vnc
修改xstartup文件
若是不修改VNC Viewer会找不到启动桌面的文件。在修改以前作好备份!
cp ~/.vnc/xstartup ~/.vnc/xstartup.bak
杀掉原来的桌面进程:
vncserver –kill :1
修改vnc的启动文件 :
vi ~/.vnc/xstartup
修改内容根据本身安装的图形界面的不一样而不同。
能够自行查阅相关内容,此处略去。
保存退出后,再次进入vnc远程链接:
vncserver :1
vncviwer 传送门 服务器地址这样写 公网IP:1