office文档右键怎么增加压缩菜单?

我用的是xfce,os更新到最新版本了。右键单击word、excel等office文件,菜单里没有压缩或者归档的内容,只有解压的,貌似把文件识别为压缩包了(尽管的确是个压缩包 :smile:)。想问问有没有办法增加压缩的右键菜单项,能有归档菜单也行。 :two_hearts:

Hello,
I used a translator :slight_smile:

I use xfce, os has been updated to the latest version. Right click on office files such as word, excel, etc. There is no compressed or archived content in the menu, only the decompressed ones. It seems that the file is recognized as a compressed package (though it is indeed a compressed package: smile :). I would like to ask if there is a way to add a compressed right-click menu item, as well as an archive menu.

On a .docx file in file manager (Thunar or Nemo for me), right click, then "Open with" and select "archive manager" or "Engrampa"

You can add a more direct command, but I don't remind how it can be done.

Denis

1 Like

安装wps office后文件可以正常识别,可以压缩。

不想安装的话,修改下默认打开方式我想也可以。

image
我用pacman安装的wps-cn,右键菜单是这样的,没有压缩的,都是解压缩的, :nauseated_face:

直接点击是用wps打开吗?
如果是的话你可以看看这个。
https://wiki.archlinux.org/index.php/WPS_Office

KDE Plasma中的Microsoft Office文件被识别为Zip
安装WPS Office之后,Microsoft Office文件将被识别为zip,并且无法使用WPS打开。您可以通过删除/ usr / share / packages /中的 mime文件来更改这种识别:

须藤rm /usr/share/mime/packages/wps-office-*.xml
sudo update-mime-database / usr / share / mime

thanks a lot!
image
this is the snap use "archive manager" for a docx file, its the actual content in the docx file. "Engrampa" and "winrar" also show the same content. :sob:

I probably don't understand what you want. Here is what I get with right-click on a .docx file (with Nemo):
LO-docx
or with Thunar :
LO-docx Thunar
I can extract with both or compress it (only with Nemo).

just as u thunar snap, there is no compress menu for a docx file. I just want to know how to add a compress menu in thunar while right click docx file or xlsx file.

换了一个文件管理器pcmanfm,压缩菜单就有了,调用的是Archive Manager。先用着,回头有时间再研究研究thunar为啥没有。
非常感谢楼上大家的帮忙 :two_hearts:,manjaro还是非常好用的,以后还要经常来这里学习才行!

Have you tried thunar-archive-plugin ?
https://docs.xfce.org/xfce/thunar/archive
but it seems that with Thunar and this plugin, either you compress a normal file or you extract files from a compressed one, but you can not compress an already compressed file (as .docx)
so you can install Nemo that does the job, or find in Thunar doc how to add an entry menu.
https://docs.xfce.org/xfce/thunar

Search also in this forum, in archlinux or xfce one for Thunar
https://forum.xfce.org/search.php?search_id=458214452

Have also a look in ~/.config/Thunar/accels.scm or uca.xml

OK ! I change to the pcmanfm, this file manager have the compress menu for .docx,its work perfect, haha!

晚上研究了下官网,在自己机器上一通捣鼓,发现:

  1. thunar-archive-plugin都是默认安装好的,thunar默认使用engrampa作为归档管理器,file-roller也安装了。但是没有找到在哪里设置让thunar默认使用file-roller或ark。

2.利用thunar提供的“配置自定义动作”( Configure custom actions...)菜单,我定义了一个压缩菜单,针对office的文件,虽然有点丑,但是已经可以正常使用。
image
里面的动作命令参考了/usr/lib/xfce4/thunar-archive-plugin下面的几个tap文件。
image
image
效果如下:
image
image
无语的是,xls这样旧格式默认能显示“创建归档文件”的菜单,docx这样新格式却显示的是“解压”的菜单。不过自定义的“压缩”菜单都能正常使用。

  1. 之前安装的pcmanfm有个设置可以选择用哪个包管理器,这个比较好。thunar没有这个设置,可能是在配置文件里,还没有找到在哪里 :thinking:
    image

4.总体来说,曲线救国,用自定义右键菜单解决了问题,也算学了不少。这个自定义菜单功能还是有很多想象空间的 :smile:

再次感谢 @FishHawk@Denis_Pom,提供了非常多的思路,在官网上学到了很多!

1 Like

Well done littlemonk :slight_smile:
and thank for your feedback !

Denis

Forum kindly sponsored by