当前位置:网站首页>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
边栏推荐
- 秉持'家在中国'理念 2022 BMW儿童交通安全训练营启动
- TCP session hijacking based on hunt1.5
- Only black-and-white box test is required for test opening post? No, but also learn performance test
- TeamTalk WinClient编译问题及解决方案
- Post office - post office issues (dynamic planning)
- autocad中文语言锁定只读警报怎么解决?
- Rhai 脚本引擎的简单应用示例
- OneFlow源码解析:算子签名的自动推断
- Redis (V) - advanced data types
- 漏洞复现----38、ThinkPHP5 5.0.23 远程代码执行漏洞
猜你喜欢

What does software testing need to learn? Test learning outline sorting

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

CODING 正式入驻腾讯会议应用市场!

LeetCode动态规划经典题(一)

In distributed scenarios, do you know how to generate unique IDs?

Redis (II) -- persistence

C# Winform程序界面优化实例

LRN local response normalization

Multipass中文文档-设置图形界面

Hcip (Huawei Senior Network Security Engineer) (Experiment 8) (MPLS basic experiment)
随机推荐
力扣解法汇总1175-质数排列
Php8.0 environment detailed installation tutorial
使用excel快速生成sql语句
医疗行业企业供应链系统解决方案:实现医疗数智化供应链协同可视
Flink系列:checkpoint调优
Redis (IV) - delete policy
大佬们目前flinksql, cdcmysql跟Kafka双流join,结果放到mysql 或者ka
Communication network electronic billing system based on SSH
C# Winform程序界面优化实例
Daily interview 1 question - how to prevent CDN protection from being bypassed
Tensorflow2 深度学习十必知
Flink series: checkpoint tuning
Only black-and-white box test is required for test opening post? No, but also learn performance test
Tensorflow2 深度学习十必知
C# Winform程序界面优化实例
ASP. Net generate verification code
Vs Code treeview TreeView
分布式场景下,你知道有几种生成唯一ID的方式嘛?
Redis (VIII) - enterprise level solution (I)
MySQL找不到mysql.sock文件的臨時解