办理ubuntu22在 Hyper v无法复制粘贴的问题
1.更新sudo apt-get update 2.安装git
sudo apt install git 3.利用get工具来克隆微软提供的 linux-vm-tools工具
git clone https://hub.fastgit.org/microsoft/linux-vm-tools 4.安装 微软提供的linux-vm-tools
我们可以点击打开这个工具里面的18.04文件夹
再右击利用命令行 Terminal方式
chomd +x install 是将install.sh文件转为可实行文件
./install.sh 就是实行 install.sh文件
时间特殊长我差不多花了15分钟左右
sudo chmod +x install.sh
sudo ./install.shhttps://i-blog.csdnimg.cn/direct/18e90c6d25804b11a4bfd6d221a040bc.jpeghttps://i-blog.csdnimg.cn/direct/ca3dc27c68aa4676a8f3792612cca4ff.pnghttps://i-blog.csdnimg.cn/direct/790c54d7d5b94249b71d6078ef2202a0.pnghttps://i-blog.csdnimg.cn/direct/c506a857f10c44ea998f29667dfeb645.png
5.reboot 重启
https://i-blog.csdnimg.cn/direct/29ff21c1b52943279e7e2136576e20da.png
reboot 6.重启完,需要再次运行 install.sh 这个文件
sudo bash ./install.sh https://i-blog.csdnimg.cn/direct/637b478b107b42ccbcfc6a16ca383546.png
这次实行这个文件呢时间就快了很多,大概5分钟不到吧,三五分钟吧就完成了
完成之后呢再次实行reboot命令重启虚拟机
https://i-blog.csdnimg.cn/direct/105764aa25e44483996d58b173877d11.png
https://i-blog.csdnimg.cn/direct/102f8975d5be4dcba0531a85cff4f2e8.png
7.给ubuntu的root设置暗码
sudo passwd root 上来会要求你输入用户的暗码才可以去给root设置暗码,暗码最少8位,嗯纯数字也可以反正自家用无所谓
改完之后把当前用户改为root用户,如许有了root的权限呢我们就可以来运行一下rdp
su root
systemctl start xrdp 运行完后呢啊报错了,这是正常征象由于我们ubuntu22版本了,ubuntu20.04版以上就会出现这个问题
https://i-blog.csdnimg.cn/direct/c40c2762d8874aa48c43143dcc6be8d5.png
https://i-blog.csdnimg.cn/direct/907c13856eda4a5eb68b243b543fffdd.png
8.办理方法 先将当前用户改回为你的体系用户 我的体系用户是iii
su iii 再卸载xrdp
sudo apt-get purge xrdp
https://i-blog.csdnimg.cn/direct/93ba1c063ee047afb0447d7582d649e3.png
9.手动下载XDP,并解压
打开自带的 FireFox 浏览器,输入 Products | c-nergy.be,下载1.51是可以的,1.51可以适用于ubunt20 22 23 24好几个版本
https://i-blog.csdnimg.cn/direct/038aaf83e2c24c6e85170278d7873339.png
https://i-blog.csdnimg.cn/direct/50c31da9366b4d2289347ac22ca79d80.png
https://i-blog.csdnimg.cn/direct/177a7c210fe84d7d9d5ca651aaff9ed2.png
10.修改为可以实行文件,并实行它
chmod +xxrdp-installer-1.5.1.sh
./xrdp-installer-1.5.1.sh https://i-blog.csdnimg.cn/direct/e0660d94fbd948e587bfc65bd9065787.png
https://i-blog.csdnimg.cn/direct/ecb7d86865b94817b47d6f254fba1e05.png
https://i-blog.csdnimg.cn/direct/175c5eb900f64082b587fc197358cf4e.png
11. 利用 Root的权限 再次再一次restart 重启Xrdp服务, 发现不再报错
su root
systemctl restart xrdp https://i-blog.csdnimg.cn/direct/145756c0421949ae8ce27fe524e82fcd.png
https://i-blog.csdnimg.cn/direct/0f2a937abb1f46cf92167b471b25a207.png
利用status状态检察xrdp,表现running状态而且是激活乐成
systemctl status xrdp https://i-blog.csdnimg.cn/direct/2d227b42cfd34fba897e2e3e513b2071.png
12. 重启 xrdp-sesman服务
systemctl restart xrdp-sesman https://i-blog.csdnimg.cn/direct/050e2d13c4694505a8838323719305b5.png
13.返回体系用户退出root权限,编辑xrdp.ini文件
嗯我装ubuntu时 新建的用户是iii,看你新建用户叫什么名字了
然后用vim来编辑这个xrdp.ini文件
su iii
sudo vim /etc/xrdp/xrdp.ini https://i-blog.csdnimg.cn/direct/ca3a5809920c479ebd03b8d7ddbc854e.png
[*]将 port=3389 修改为 port=vsock://-1:3389 tcp://:3389;
[*]将 security_layer=negotiate 修改为 security_layer=rdp;
[*]按ESC ,敲入 :wq 保存并退出编辑器
https://i-blog.csdnimg.cn/direct/9b5114f2573b4b54a64143c2d5e75cd7.png
https://i-blog.csdnimg.cn/direct/14e124d1d8e445fb817ae21c2364d3ea.png
https://i-blog.csdnimg.cn/direct/a528f2bc186f401ca1d2610bc01a55cb.png
https://i-blog.csdnimg.cn/direct/6d1c40f332de4ae19842dd705b1f199c.png
https://i-blog.csdnimg.cn/direct/98f8a02953c74b9694673a3ee7f3965b.png
14.利用命令关闭ubuntu虚拟机,并且退出Hyper-V
sudo shutdown now https://i-blog.csdnimg.cn/direct/e06bedee649e457ebd8945332efc0e92.png
https://i-blog.csdnimg.cn/direct/a442f8341f96415281f7cb4117f39623.png
15.利用管理员模式运行PowerShell
https://i-blog.csdnimg.cn/direct/40f43910763044fa82ff3311989c550b.png
https://i-blog.csdnimg.cn/direct/83e0bb15854d4920b0814c59c588c4d1.png
<vm-name> 切换为你虚拟机的名称 ,我的取名为ub22
虚拟机名称检察的地方是在这里
https://i-blog.csdnimg.cn/direct/e73d920d801943cca7f8fc10ee59da92.png
以是我的代码是set-vm -vmname ub22 -EnhancedSessionTransportType HvSocket
set-vm -vmname <vm-name> -EnhancedSessionTransportType HvSocket https://i-blog.csdnimg.cn/direct/dc6cda0db0ee49799973309fffa99586.png
实行完不报错就对了.
16.再次打开happy v 启动ubunt虚拟机
认识的分辨率调解窗口就出现了,远程登录
https://i-blog.csdnimg.cn/direct/0515a813b021469eaa3fa0e6280dd414.png
输入你的ubuntu账号暗码就能够登录ubuntu了,如许就可以复制粘贴Host主机上的内容到虚拟机ubuntu里面了
https://i-blog.csdnimg.cn/direct/08e26dacc66c4046ae98d8d128b67872.png
0001.办理ubuntu22在 Hyper v无法复制粘贴的问题
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页:
[1]