The platform does not provide a desktop by default. If you need a desktop service, you can install and use it according to the following document steps. The platform provides an Ubuntu xfce4
desktop in the installation document.
install desktop
Execute the following command to perform desktop installation.
#下载安装脚本
~# curl -OL https://download.gpushare.com/download/platform/install_desktop/install_desktop
#安装脚本赋于执行权限
~# chmod +x ./install_desktop
#执行安装桌面脚本,安装速度取决于实例带宽,最快需要5-10分钟,最慢可能需要30-60分钟。
~# ./install_desktop
#安装到最后会提示输入VNC密码,该密码需要自己去定义,后面需要通过VNC登录桌面使用,文档中使用gpushare作为VNC密码。
请输入VNC连接密码,该密码需要自定义: gpushare
您的VNC密码是: gpushare
spawn vncpasswd
Password:
Verify:
Would you like to enter a view-only password (y/n)? n
start desktop
After the desktop is installed, it needs to be managed through VNC, so after starting the VNC service, connect to the instance desktop through VNC.
#执行manage_vnc命令查看使用方法
~# manage_vnc
usage:
1): VNC Server 启动命令
manage_vnc start
2): VNC Server 关闭命令
manage_vnc stop
#然后执行manage_vnc start来启动VNC服务
~# manage_vnc start
VNC服务器已成功启动!
access desktop
After the VNC service is started, it occupies 8080
the port of the instance by default. Open the console - "click the custom service to access the desktop service through the browser.
Click vnc.html to enter the VNC page
After entering the VNC page, click Connect
Enter the VNC password that was customized at the end of the desktop service installation, and then click Send Credentials
to log in.
If the following is displayed, the desktop has been successfully logged in
Desktop settings (important)
1. Modify the instance desktop off-screen time
By default, if the desktop is not operated for a long time, the screen will be turned off. After the screen is turned off, the desktop cannot be activated by clicking the mouse, but the VNC service can only be restarted. Therefore, the first thing to do after accessing the desktop is to modify the desktop off-screen time to be permanent Screen.
Click Applications
-> Settings
-> in the upper left corner Light Locker Settings
, and then modify the following options to Never
.
2. Create a browser shortcut
When the desktop service is installed above, Firefox and Chrome browsers are installed at the same time. Here, they are created as shortcuts to the desktop.
(Create a Chrome browser shortcut) Click the right mouse button ->Create Launcher
There are several options as follows, the Name option is filled in Chrome, and then the Chrome browser will pop up, just click the browser that pops up below. Command is the command to start the browser, you need to add –no-sandbox
a command after the automatically generated command, otherwise the Chrome browser will crash when it starts.
(Create a Firefox browser shortcut) Click the right mouse button ->Create Launcher
Fill in Firefox for the Name option, jump out of the Firefox browser, and click the browser that pops up below. There is no need to change the Command command of the Firefox browser, just click Create in the lower right corner.
After the creation is complete, the desktop will display the icons of the two created browsers, just click to run.
Tip: Modify your browser search engine
After the browser is installed, the default is the Google search engine, which needs to be changed to a domestically accessible search engine, otherwise the search will time out.
installation tool (optional)
Install VScode
#下载VsCode
~# sudo wget https://az764295.vo.msecnd.net/stable/30d9c6cd9483b2cc586687151bcbcd635f373630/code_1.68.1-1655263094_amd64.deb
#安装VsCode
~# sudo chmod +x code_1.68.1-1655263094_amd64.deb
~# sudo apt-get install ./code_1.68.1-1655263094_amd64.deb
Create a VsCode desktop shortcut, fill in the name with code, then select the VsCode that pops up, and then add --no-sandbox
the command to start Command.
Then click VsCode added to the desktop to use