如何用linux本身的应用打开wine微信里面的文件
Tofloor
poster avatar
hosea1008
deepin
2020-03-06 06:49
Author
我最近由于deepin 15.11连接不了我的蓝牙耳机,最近用的系统是manjaro+KDE,使用了deepin-wine-wechat,发现有一个问题就是微信中的大部分文件无法点击打开,右键->在文件夹中显示则会调用wine的文件浏览器打开所在目录,点击微信中的txt文件则会用wine的记事本打开。

而联想到此前在deepin上用wine微信的时候是可以做到在微信中点击文件就调用deepin本身的软件直接打开的,右键->在文件夹中显示也是调用dde-filemanager而不是wine的文件浏览器,因此觉得deepin应该是有办法解决这个问题的,想请教一下各位大神,该如何修改可以使得能用linux本身的应用打开wine微信里面的文件?比如直接调用xdg-open?

在网上搜索查找到有以下类似方法:

https://askubuntu.com/questions/516307/how-do-i-change-default-wine-browser-to-native-ubuntu-browser-instead-of-ie

是通过修改wine注册表来实现的,因此猜测deepin中的微信是否也是通过修改注册表实现的呢?想请教请教


Reply Favorite View the author
All Replies
avatar
hosea1008
deepin
2020-03-06 20:37
#1
普通文件关联可以通过修改wine注册表解决:

编辑文件linuxnative.reg


  1. REGEDIT4

  2. [HKEY_CLASSES_ROOT\.doc]

  3. @="linuxnative"

  4. "Content Type"="application/linuxnative"

  5. [HKEY_CLASSES_ROOT\.rtf]

  6. @="linuxnative"

  7. "Content Type"="application/linuxnative"

  8. [HKEY_CLASSES_ROOT\.odt]

  9. @="linuxnative"

  10. "Content Type"="application/linuxnative"

  11. [HKEY_CLASSES_ROOT\.pdf]

  12. @="linuxnative"

  13. "Content Type"="application/linuxnative"

  14. [HKEY_CLASSES_ROOT\.tif]

  15. @="linuxnative"

  16. "Content Type"="application/linuxnative"

  17. [HKEY_CLASSES_ROOT\.doc]

  18. @="linuxnative"

  19. "Content Type"="application/linuxnative"

  20. [HKEY_CLASSES_ROOT\.docx]

  21. @="linuxnative"

  22. "Content Type"="application/linuxnative"

  23. [HKEY_CLASSES_ROOT\.ppt]

  24. @="linuxnative"

  25. "Content Type"="application/linuxnative"

  26. [HKEY_CLASSES_ROOT\.pptx]

  27. @="linuxnative"

  28. "Content Type"="application/linuxnative"

  29. [HKEY_CLASSES_ROOT\.xls]

  30. @="linuxnative"

  31. "Content Type"="application/linuxnative"

  32. [HKEY_CLASSES_ROOT\.xlsx]

  33. @="linuxnative"

  34. "Content Type"="application/linuxnative"

  35. [HKEY_CLASSES_ROOT\.zip]

  36. @="linuxnative"

  37. "Content Type"="application/linuxnative"

  38. [HKEY_CLASSES_ROOT\.rar]

  39. @="linuxnative"

  40. "Content Type"="application/linuxnative"

  41. [HKEY_CLASSES_ROOT\linuxnative]

  42. [HKEY_CLASSES_ROOT\linuxnative\shell]

  43. [HKEY_CLASSES_ROOT\linuxnative\shell\open]

  44. [HKEY_CLASSES_ROOT\linuxnative\shell\open\command]

  45. @="C:\\windows\\system32\\winebrowser.exe -nohome \"%1\""
Copy the Code


通过命令
  1. env WINEPREFIX="$HOME/.deepinwine/Deepin-WeChat" wine regedit linuxnative.reg
Copy the Code

导入注册表,可以使得点击微信中的文件直接调用linux上的软件打开

参考链接:

https://askubuntu.com/questions/51325/how-to-associate-all-file-types-within-wine-with-its-corresponding-native-applic

但是,wine微信中“打开所在文件夹”还是通过wine的文件浏览器打开,没找到办法调用linux的文件管理器打开。请各位大神赐教!

Reply View the author
avatar
hohocheyan
deepin
2020-05-21 20:20
#2
我也在寻找这个方法,deepin打包的微信不光解决了关联,还能作到保存/打开时,直接调用系统自带的文件管理器,这点很好用。
wine自带的文件浏览器实在是太难用了。
Reply View the author