关于Avalonia11.3.10写入系统剪切板内容,在dde-file-manager粘贴时报未知错误的讨论 #12655
Replies: 4 comments 8 replies
-
|
ClipboardDemoNew.zip 复现步骤: |
Beta Was this translation helpful? Give feedback.
-
如果你的环境是 UOS 20 的话,建议优先考虑联系商业支持。这里是 deepin (社区版,目前主线版本是 25)相关的开发活动发生的场所,即便你的问题能在 deepin 25 发生,相关的解决方案也有可能不适用于 UOS 20。 如果确实目标环境是 deepin 25 的话,对照一下 dolphin 会正常吗? |
Beta Was this translation helpful? Give feedback.
-
|
感谢回复,已寻求商业支持,有找到一个C操作剪切板的Demo,因我们开发框架是Avalonia,尝试用C#重写未能成功。 |
Beta Was this translation helpful? Give feedback.
-
|
可以用 xclip-pastefile 试试 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
有没有利用C# .Net和Avalonia在UOS下使用过剪切板粘贴文件的大佬,目前已经实现从系统复制,然后在软件内粘贴,可是卡在软件复制,系统粘贴,右键菜单也有显示粘贴项,在粘贴时报错,从-到-是空的
。
查了/var/log/messages日志:
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: url is invalid !!! url = QUrl("")
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: create selected FileInfo failed: "" ""
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: Shred: create dconfig failed: "config is already added"
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: QWidget::insertAction: Attempt to insert null action
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: QWidget::insertAction: Attempt to insert null action
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:41 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:41 bruce-PC kwin_x11[3119]: Length 2 runs past end of data
2025-12-16 16:04:42 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:42 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:43 bruce-PC kwin_x11[3119]: Length 2 runs past end of data
2025-12-16 16:04:43 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:43 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:43 bruce-PC kwin_x11[3119]: Length 2 runs past end of data
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: url is invalid !!! url = QUrl("")
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: create selected FileInfo failed: "" ""
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: Shred: create dconfig failed: "config is already added"
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: QWidget::insertAction: Attempt to insert null action
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: QWidget::insertAction: Attempt to insert null action
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
2025-12-16 16:04:48 bruce-PC dde-desktop[3335]: Length 2 runs past end of data
然后也获取了系统剪切板的内容:
点击按钮创建一个测试文件并剪切
❌ 📋 剪贴板文件信息
操作类型: 复制
文件数量: 1
📄 some.txt
类型: 复制
路径: /home/bruce/Desktop/some.txt
大小: 395
时间: 2025-12-12 15:55:36
❌ 剪贴板Formats: text/plain, Text, TEXT, x-special/gnome-copied-files, x-dfm-copied/file-icons, Files, text/x-moz-url, TIMESTAMP
❌ 剪贴板Formats(byte[28]):
text/plain
{0x2F,0x68,0x6F,0x6D,0x65,0x2F,0x62,0x72,0x75,0x63,0x65,0x2F,0x44,0x65,0x73,0x6B,0x74,0x6F,0x70,0x2F,0x73,0x6F,0x6D,0x65,0x2E,0x74,0x78,0x74 }
❌ 剪贴板Formats(byte[28]):
text/plain
/home/bruce/Desktop/some.txt
❌ 剪贴板Formats(string):
Text
/home/bruce/Desktop/some.txt
❌ 剪贴板Formats(byte[28]):
TEXT
{0x2F,0x68,0x6F,0x6D,0x65,0x2F,0x62,0x72,0x75,0x63,0x65,0x2F,0x44,0x65,0x73,0x6B,0x74,0x6F,0x70,0x2F,0x73,0x6F,0x6D,0x65,0x2E,0x74,0x78,0x74 }
❌ 剪贴板Formats(byte[28]):
TEXT
/home/bruce/Desktop/some.txt
❌ 剪贴板Formats(byte[40]):
x-special/gnome-copied-files
{0x63,0x6F,0x70,0x79,0x0A,0x66,0x69,0x6C,0x65,0x3A,0x2F,0x2F,0x2F,0x68,0x6F,0x6D,0x65,0x2F,0x62,0x72,0x75,0x63,0x65,0x2F,0x44,0x65,0x73,0x6B,0x74,0x6F,0x70,0x2F,0x73,0x6F,0x6D,0x65,0x2E,0x74,0x78,0x74 }
❌ 剪贴板Formats(byte[40]):
x-special/gnome-copied-files
copy
file:///home/bruce/Desktop/some.txt
❌ 剪贴板Formats(byte[102]):
x-dfm-copied/file-icons
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x20,0x00,0x44,0x00,0x49,0x00,0x63,0x00,0x6F,0x00,0x6E,0x00,0x50,0x00,0x72,0x00,0x6F,0x00,0x78,0x00,0x79,0x00,0x45,0x00,0x6E,0x00,0x67,0x00,0x69,0x00,0x6E,0x00,0x65,0x00,0x00,0x00,0x14,0x00,0x74,0x00,0x65,0x00,0x78,0x00,0x74,0x00,0x2D,0x00,0x70,0x00,0x6C,0x00,0x61,0x00,0x69,0x00,0x6E,0x00,0x00,0x00,0x0A,0x00,0x62,0x00,0x6C,0x00,0x6F,0x00,0x6F,0x00,0x6D,0x00,0x00,0x00,0x14,0x00,0x74,0x00,0x65,0x00,0x78,0x00,0x74,0x00,0x2D,0x00,0x70,0x00,0x6C,0x00,0x61,0x00,0x69,0x00,0x6E }
❌ 剪贴板Formats(byte[102]):
x-dfm-copied/file-icons
❌ 剪贴板Formats(unknown):
Files
Avalonia.Platform.Storage.IStorageItem[]
❌ 剪贴板Formats(byte[74]):
text/x-moz-url
{0x66,0x00,0x69,0x00,0x6C,0x00,0x65,0x00,0x3A,0x00,0x2F,0x00,0x2F,0x00,0x2F,0x00,0x68,0x00,0x6F,0x00,0x6D,0x00,0x65,0x00,0x2F,0x00,0x62,0x00,0x72,0x00,0x75,0x00,0x63,0x00,0x65,0x00,0x2F,0x00,0x44,0x00,0x65,0x00,0x73,0x00,0x6B,0x00,0x74,0x00,0x6F,0x00,0x70,0x00,0x2F,0x00,0x73,0x00,0x6F,0x00,0x6D,0x00,0x65,0x00,0x2E,0x00,0x74,0x00,0x78,0x00,0x74,0x00,0x0D,0x00,0x0A,0x00 }
❌ 剪贴板Files:
❌
/home/bruce/Desktop/some.txt
❌ 剪贴板DataTransfer: Avalonia.X11.Clipboard.ClipboardDataTransfer
❌
剪贴板DataTransfer.Item: Avalonia.Input.Platform.PlatformDataTransferItem+SingleFormatItem
❌
剪贴板DataTransfer.Item: Avalonia.X11.Clipboard.ClipboardDataTransferItem
❌ 剪贴板DataTransfer.Formats: Platform: text/plain
❌ 剪贴板DataTransfer.Formats: Item: text/plain, Kind: Platform
❌ 剪贴板DataTransfer.Formats: Universal: Text
❌ 剪贴板DataTransfer.Formats: Item: Text, Kind: Universal
❌ 剪贴板DataTransfer.Formats: Platform: TEXT
❌ 剪贴板DataTransfer.Formats: Item: TEXT, Kind: Platform
❌ 剪贴板DataTransfer.Formats: Platform: x-special/gnome-copied-files
❌ 剪贴板DataTransfer.Formats: Item: x-special/gnome-copied-files, Kind: Platform
❌ 剪贴板DataTransfer.Formats: Platform: x-dfm-copied/file-icons
❌ 剪贴板DataTransfer.Formats: Item: x-dfm-copied/file-icons, Kind: Platform
❌ 剪贴板DataTransfer.Formats: Universal: File
❌ 剪贴板DataTransfer.Formats: Item: File, Kind: Universal
❌ 剪贴板DataTransfer.Formats: Platform: text/x-moz-url
❌ 剪贴板DataTransfer.Formats: Item: text/x-moz-url, Kind: Platform
❌ 剪贴板DataTransfer.Formats: Platform: TIMESTAMP
❌ 剪贴板DataTransfer.Formats: Item: TIMESTAMP, Kind: Platform
Beta Was this translation helpful? Give feedback.
All reactions