当前位置:网站首页>Multipass Chinese document - setting graphical interface
Multipass Chinese document - setting graphical interface
2022-06-30 18:36:00 【But the teacher】
General catalogue ( To be translated and perfected )
1. overview
2. course
3. Directions for use
3.1 install Multipass
3.1.1 be based on Linux
3.1.2 be based on macOS
3.1.3 be based on Windows
3.2 Manage instances
3.2.1 Create examples
3.2.2 Modify instance
3.2.3 Using examples
3.2.4 Use the instance command alias
3.2.5 Share data with instances
3.2.6 Remove instance
3.3 management Multipass
3.3.1 Set the drive
3.3.2 Authorize the client to use Multipass service
3.3.3 Remote use Multipass
3.3.4 Improve mount performance
3.3.5 Use Packer pack Multipass Mirror image
3.3.6 Set up a graphical interface
3.3.7 Use different macOS terminal
3.4 Troubleshoot problems
3.4.1 Connection log
3.4.2 Network troubleshooting
How to set the graphical interface
There are many ways to view the graphical desktop . In this document , We described 2 In the way : RDP(Remote Display Protocol< Remote display protocol >) And the general X11 forwarding. Other ways are VNC Or in the X11 forwarding Up operation Mir shell( So stated ).
Content :
Use RDP
Multipass The image used does not have a graphical desktop installed . therefore , Need to install desktop environment ( We use ubuntu-desktop, But other options are available such as Ubuntu Same flavor ), Use RDP The server ( We use here xrdp, But there are still other options, such as freerdp). So , We first need to log in Multipass example :
$ multipass shell headbanging-squid
also , Once you enter the instance ,
$ sudo apt update
$ sudo apt install ubuntu-desktop xrdp
then , We need an account and password to log in . One possible way is to give default ubuntu User set password .
$ sudo passwd ubuntu
We will be asked to enter and re-enter the password . In this way, we have finished on the server .
And then we use logout Command to exit... On the instance Ubuntu shell, Then find the host IP Address connection :
$ multipass list
Name State IPv4 Image
headbanging-squid Running 10.40.93.209 Ubuntu
after , We can use IP Address 10.49.93.209 Connect to... On the instance RDP The server .
️ If the instance is IP The address is not in
multipass listIs displayed in the output of , It can be obtained directly in the instance , Use commandip addrThat's all right. .
Linux
stay Linux in , There are, for example Remmina The application can visualize the desktop ( Make sure your console is installed with remmina And its package remmina-plugin-rdp).
Run the following command to start the client directly :
$ remmina -c rdp://10.49.93.209
The system will ask for the account name set above (ubuntu) And password , Then, in the example Ubuntu The desktop will show .
macOS
stay macOS On the connection , We can use Mac App Store Inside "Microsoft Remote Desktop"( Microsoft Remote Desktop ).
Windows
stay Windows On , We can use "Remote Desktop Connection"( Remote Desktop Connection ) Applications connect to RDP The server . after , We enter the address of the virtual machine , Set up XOrg process , Enter the account name and password created in the previous steps . Then we finished … A graphical desktop !
Use X11 forwarding
One possible scenario is , We just need Multipass Start an application to see the window , You don't need a complete desktop . The result is that this setting is better than RDP The method should be simple , Because we don't need Multipass Instance deployment complete desktop . Instead, , We can use the host graphics capabilities and X11 Connect instance applications .
Linux
Linux and MacOS Default run X And examples , So the host does not need any additional software . We use X forwarding Authorization of , Comparable Windows It's a little safer . However , We can penetrate (forward through)ssh To avoid contact with xauth What kind of entanglement . Unfortunately , multipass shell Users are not allowed to give ssh Passing extra parameters , So we can't use shell through Multipass. We will let the host user pass ssh Log in to Multipass example , By copying the public key , stay ~/.ssh/id_rsa.pub File to instance authorized key , stay ~/.ssh/authorized_keys In file . We can do this with the following command ( Replace the case name in the case with your case name ):
$ multipass exec rocking-squirrel -- bash -c "echo `cat ~/.ssh/id_rsa.pub` >> ~/.ssh/authorized_keys"
If the file ~/.ssh/id_rsa.pub non-existent , That means creating SSH secret key . Use ssh-keygen Create the key and try copying the code .
then , Use multipass info rocking-squirrel Check the example IP Address . Last , We can use X forwarding Log in to the instance
# Use the IP Address replacement `xx.xx.xx.xx`
$ ssh -X [email protected]
Then test running some programs in an example :
$ sudo apt install x11-apps
$ xlogo &

With a X logo A small window will be displayed . complete !
macOS
MacOS The steps on are the same as Linux Almost unanimously , But I don't have any Mac To test . Welcome to contribute 
Windows
Windows have no idea of X, So we need to install X The server . Here we use VcXsrv. Other options can be used Xming( However , The latest version requires a fee , But older versions are still available from their website SourceForge site As a free download ) Or in the Cygwin Install in X The server .
The first step is to install VcXsrv And create a new entry in the start menu "XLaunch" function X The server . Some options will be displayed . The first window , We should choose "Multiple windows" And set the display quantity ; Keep him -1 Is a safer choice . “Next" The button will take us to "Client Startup" window , Here we should choose "Start noclinet”. “Next" Will be displayed "Extra Settings”, Then we should activate "Disable access control" Options . Press down "Next" Will let us choose to save the settings , Finally we can start X The server . An icon will appear on the taskbar : We're done X The server .
We need a host IP Address to configure the client ( namely Multipass example ), IP The address can be from console command ipconfig obtain . Then start the instance , Host computer IP Set up DISPLAY Environment variables to server display .
# Use the... Obtained above IP Address replacement `xx.xx.xx.xx`
$ export DISPLAY=xx.xx.xx.xx:0.0
We finished , Then we can go to Windows Some use xlogo test forwarding.

Link to the original text
边栏推荐
- Volcano engine was selected into the first "panorama of edge computing industry" in China
- Elastic 8.0: opening a new era of speed, scale, relevance and simplicity
- Conception d'un centre commercial en ligne basé sur SSH
- Vulnerability recurrence ----37. Apache unomi Remote Code Execution Vulnerability (cve-2020-13942)
- 秉持'家在中国'理念 2022 BMW儿童交通安全训练营启动
- 剑指 Offer 17. 打印从1到最大的n位数
- How to solve the lock-in read-only alarm of AutoCAD Chinese language?
- MySQL cannot find mysql Temporary solution of sock file
- Oneortwo bugs in "software testing" are small things, but security vulnerabilities are big things. We must pay attention to them
- If you want to learn software testing, you must see series, 2022 software testing engineer's career development
猜你喜欢

挑选智能音箱时,首选“智能”还是“音质”?这篇文章给你答案

Post office - post office issues (dynamic planning)

Vulnerability recurrence ----- 38. Thinkphp5 5.0.23 Remote Code Execution Vulnerability

漏洞复现----35、uWSGI PHP 目录遍历漏洞 (CVE-2018-7490)

php利用队列解决迷宫问题

The new Post-00 Software Test Engineer in 2022 is a champion

基于SSH的网上商城设计

MySQL advanced - basic index and seven joins

LeetCode之合并二叉树

Post penetration file system + uploading and downloading files
随机推荐
【云驻共创】Huawei iConnect使能物联终端一触即联
Flink series: checkpoint tuning
100 examples of bug records of unity development (the first example) -- shader failure or bug after packaging
What will be the game changes brought about by the meta universe?
The secondary menu of the magic article system v5.4.0 supports the optimization of form display
Tide - 基于 async-std 的 Rust-web 框架
清华只能排第3?2022软科中国大学AI专业排名发布
煤炭行业数智化供应商管理系统解决方案:数据驱动,供应商智慧平台助力企业降本增效
Simulation of campus network design based on ENSP
云安全日报220630:IBM数据保护平台发现执行任意代码漏洞,需要尽快升级
助力极致体验,火山引擎边缘计算最佳实践
先写API文档还是先写代码?
Switching routing (VLAN) experiment
Oneortwo bugs in "software testing" are small things, but security vulnerabilities are big things. We must pay attention to them
Deep understanding of JVM (II) - memory structure (II)
Compilation problems and solutions of teamtalk winclient
Daily interview 1 question - how to prevent CDN protection from being bypassed
Php8.0 environment detailed installation tutorial
力扣解法汇总1175-质数排列
基于eNSP的校园网设计的仿真模拟