第一步:安装轻量剪贴板工具(终端运行)
sudo apt update && sudo apt install xclip -y第二步:把这段代码添加到 /usr/share/mint-artwork/xfce/Thunar/uca.xml文件中你要的位置,我放在了“搜索”菜单项的上面
<!-- 复制文件地址(Linux Mint 22.3 XFCE 最终版) --><action><icon>edit-copy</icon><name>复制文件地址</name><namexml:lang="zh_CN">复制文件地址</name><command>bash -c "printf %%s \"%F\" | xclip -selection clipboard"</command><description>Copy the full path of the selected file or folder</description><descriptionxml:lang="zh_CN">复制选中文件/文件夹的完整路径</description><patterns>*</patterns><directories/><other-files/><audio-files/><image-files/><text-files/><video-files/></action>
xclip 是 Linux 桌面通用标准(XFCE / Cinnamon / MATE 全都兼容)
体积超小,无依赖
我把命令改成了 printf 安全版,文件名带空格、中文都不会出错
100% 适配 Thunar 文件管理器
第三步:生效
保存 .ual 文件 → 重启文件管理器
thunar -q

linuxmint中文版交流群开通,欢迎大家加入,QQ群号:1014439331
