当前位置:网站首页>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
边栏推荐
- Vscode status bar statusbar
- Volcano engine was selected into the first "panorama of edge computing industry" in China
- 国内离线安装 Chrome 扩展程序的方法总结
- Deep understanding of JVM (II) - memory structure (II)
- Flink系列:checkpoint调优
- C# Winform程序界面优化实例
- The company was jailed for nonstandard bug during the test ~ [cartoon version]
- Redis (VIII) - enterprise level solution (I)
- Compilation problems and solutions of teamtalk winclient
- 漏洞复现----38、ThinkPHP5 5.0.23 远程代码执行漏洞
猜你喜欢

Redis (IX) - enterprise level solution (II)

程序员女友给我做了一个疲劳驾驶检测

煤炭行业数智化供应商管理系统解决方案:数据驱动,供应商智慧平台助力企业降本增效

漏洞复现----37、Apache Unomi 远程代码执行漏洞 (CVE-2020-13942)

Tsinghua only ranks third? 2022 release of AI major ranking of Chinese Universities of soft science

Redis (III) - transaction

Deep understanding of JVM (V) - garbage collection (II)

ASP. Net authentication code login

Oneortwo bugs in "software testing" are small things, but security vulnerabilities are big things. We must pay attention to them

C# Winform程序界面优化实例
随机推荐
Deep understanding of JVM (IV) - garbage collection (I)
如何利用AI技术优化独立站客服系统?听听专家怎么说!
autocad中文语言锁定只读警报怎么解决?
Unity开发bug记录100例子(第1例)——打包后shader失效或者bug
基于SSH的网上商城设计
Tide - 基于 async-std 的 Rust-web 框架
Elastic 8.0: opening a new era of speed, scale, relevance and simplicity
Communication network electronic billing system based on SSH
Redis (IV) - delete policy
Post penetration file system + uploading and downloading files
Deep understanding of JVM (V) - garbage collection (II)
Unity实战之一个脚本实现雷达图
hdfs上的数据导入到clickhouse用什么方式最快呢?spark通过jdbc导入,还是hdfs
VScode 状态条 StatusBar
【云驻共创】Huawei iConnect使能物联终端一触即联
Redis (IX) - enterprise level solution (II)
How to solve the lock-in read-only alarm of AutoCAD Chinese language?
Redis (V) - advanced data types
MySQL cannot find mysql Temporary solution of sock file
Nft: unlimited possibilities to open the era of encryption Art