当前位置:网站首页>[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
[stepping on the pit] MELD in win11 wsl2 cannot be used normally. Problem repair
2022-04-23 06:39:00 【mightbxg】
Win11 Has been used by default in wslg To display WSL2 Medium GUI, No additional opening is required Xserver, This is really a very convenient and practical function , But at the moment, (2021.12) It doesn't seem particularly perfect yet . In the process of experience, I encountered a problem of egg pain :meld Exception occurred while comparing files .
meld Is an open source file for comparison / Folder tools , similar Beyond Compare. It can be set to git merge.tool, So as to solve git Conflict during merge . Before Win10+WSL2+Xserver Use... In the environment meld I haven't had any problems , But in Win11 But it will report a lot of mistakes :
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 34, in do_realize
self._handle1.realize(self)
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 270, in realize
attr.cursor = Gdk.Cursor.new_for_display(widget.get_display(),
TypeError: constructor returned NULL
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 46, in do_map
self._handle1.set_visible(True)
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 288, in set_visible
self._window.show()
AttributeError: 'NoneType' object has no attribute 'show'
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 201, in do_size_allocate
self._handle1.set_visible(mapped and wlink1 > 0)
File "/usr/lib/python3/dist-packages/meld/diffgrid.py", line 288, in set_visible
self._window.show()
AttributeError: 'NoneType' object has no attribute 'show'
...
I haven't found a solution to this problem on the internet yet , Looks like GTK The problem of , The closest post is :TypeError constructor returned NULL in wayland session. It happened that wslg Also used wayland, With a try mentality , I opened the /usr/lib/python3/dist-packages/meld/diffgrid.py, Place the third of them 270 Change line to :
#attr.cursor = Gdk.Cursor.new_for_display(widget.get_display(),
# Gdk.CursorType.
# SB_H_DOUBLE_ARROW)
attr.cursor = Gdk.Cursor.new_from_name(widget.get_display(), "col-resize")
The test again , Everything is all right ~~
版权声明
本文为[mightbxg]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546583251.html
边栏推荐
猜你喜欢

对象的动态建立和释放,赋值和复制

【UDS统一诊断服务】三、应用层协议(1)

for()循环参数调用顺序

Robocode教程7——雷达锁定
![C [document operation] PDF files and pictures are converted to each other](/img/6b/0742aa3eb45fbca091d6d20bc55326.png)
C [document operation] PDF files and pictures are converted to each other
![[untitled]](/img/03/0ece1ea11558b9b6dd0644bb508987.png)
[untitled]

For() loop parameter call order

【UDS统一诊断服务】一、诊断概述(3)— ISO 15765体系结构
![[UDS unified diagnostic service] II. Network layer protocol (2) - data transmission rules (single frame and multi frame)](/img/4f/315a9b4cd85ebaad39cfa985dea45b.png)
[UDS unified diagnostic service] II. Network layer protocol (2) - data transmission rules (single frame and multi frame)

进程管理命令
随机推荐
Graduation project, viewing screenshots of epidemic psychological counseling system
C语言实用小技巧合集(持续更新)
Jeu de devinettes
MySQL groups are sorted by a field, and the first value is taken
sqlite编译
vs中能编译通过,但是会有红色下划线提示未定义标示符问题
Robocode教程7——雷达锁定
四元数乘法
Camera calibration: key point method vs direct method
Graduation project, curriculum link, student achievement evaluation system
gcc ,g++,gdb的安装
LaTeX配置与使用
对象的动态建立和释放,赋值和复制
安装pyshp库
C语言进阶要点笔记4
[ThreadX] h743 + ThreadX + Filex migration record
产生随机数
圆整 round 的一点点小细节
生成快捷方式
Uniapp encapsulates request