腾讯云Ubuntu服务器安装图形化界面

登录腾讯云

➜  ~ ssh ubuntu@www.cctv3.net
The authenticity of host 'www.cctv3.net (110.42.253.75)' can't be established.
ED25519 key fingerprint is SHA256:1gTaZcgrHg5VDYmQSC+OwD7G/RNHv1HTuB/zYrOt2eM.
This host key is known by the following other names/addresses:
~/.ssh/known_hosts:7: 110.42.253.75
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'www.cctv3.net' (ED25519) to the list of known hosts.
ubuntu@www.cctv3.net's password:
Welcome to Ubuntu 18.04.4 LTS (GNU/Linux 4.15.0-213-generic x86_64)

* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage

System information as of Mon Jan 22 19:38:33 CST 2024

System load: 0.0 Processes: 105
Usage of /: 4.3% of 98.31GB Users logged in: 0
Memory usage: 6% IP address for eth0: 10.0.4.9
Swap usage: 0%

* Strictly confined Kubernetes makes edge and IoT secure. Learn how MicroK8s
just raised the bar for easy, resilient and secure K8s cluster deployment.

https://ubuntu.com/engage/secure-kubernetes-at-the-edge

* Canonical Livepatch is available for installation.
- Reduce system reboots and improve kernel security. Activate at:
https://ubuntu.com/livepatch
New release '20.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


Last login: Mon Jan 22 11:05:47 2024 from 58.60.186.1
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

Sudo

sudo su root

更新软件源

root@VM-4-9-ubuntu:/home/ubuntu# apt-get update
Hit:1 http://mirrors.tencentyun.com/ubuntu bionic InRelease
Hit:2 http://mirrors.tencentyun.com/ubuntu bionic-security InRelease
Hit:3 http://mirrors.tencentyun.com/ubuntu bionic-updates InRelease
Reading package lists... Done
root@VM-4-9-ubuntu:/home/ubuntu#

安装 VNC Server

安装 VNC4Server

apt-get install vnc4server

启动 VNC

vncserver

New ‘VM-4-9-ubuntu:1 (root)’ desktop is VM-4-9-ubuntu:1

说明启动成功。

安装 GUI -> Gnome

GNOME 是一个自由开源的桌面环境,是 Linux 操作系统中最常用的桌面环境之一。GNOME 的目标是为 Linux 系统提供现代、易用的桌面环境,以提高用户的体验和生产力。它提供了一个用户友好的界面和许多常用的应用程序,如文件管理器、文本编辑器、终端、图形图像处理程序等。GNOME 还支持许多第三方应用程序,用户可以根据自己的需要自定义桌面环境。

安装 X-windows

sudo apt-get install x-window-system-core

安装登录管理器

sudo apt-get install gdm3

安装 Ubuntu 界面

sudo apt-get install ubuntu-desktop

剩余工作

安装 Gnome 相关配套软件

sudo apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

修改 VNC 配置

vi ~/.vnc/xstartup

#!/bin/sh
# Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

重启 VNC

  • 杀掉原来进程。
vncserver -kill :1
  • 生成新的会话
vncserver :1

好了,经过以上步骤,就能用 VNC 客户端梳理连接啦 …

腾讯云Ubuntu服务器安装图形化界面

https://www.cctv3.net/static/20240122/ubuntu-install-gui.html

作者

江北饮马、江南折花

发布于

2024-01-22

更新于

2024-02-03

许可协议

评论