deepin-smb-sidebar
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "deepin-smb-sidebar" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-efdcde345b18613cd5af64c63a3ce1e66e80574b2cdc6d7b6d76f72fc1f366b7. Verify the upstream source and version against https://skillhub.cn/skills/user_1e091b22/deepin-smb-sidebar-bookmark-qijie before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Skill to add Windows SMB shared-folder bookmarks to the Deepin/UOS file manager sidebar. Follows an Agent-led flow: first ask whether the Windows-side SMB share is already configured — if not, guide the user to enable SMB on Windows, set up the share, and check the Windows machine IP; only after the user confirms the Windows side is ready, prompt for IP, share name, username, and password in sequence and run the commands to complete configuration on the Linux side. The flow must not skip step 1 and jump directly to step 2. Packaging/share supports zip (SkillHub compatible) and tar.gz (Hermes-to-Hermes).
Introduction source: third_party · user_1e091b22 · 1.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: deepin-smb-sidebar
title: Deepin 文件管理器侧边栏添加 SMB 共享书签(可配置)
description: "[Agent引导流程] 在 Deepin/UOS 文件管理器侧边栏添加 Windows SMB 共享文件夹书签。加载此 skill 后,Hermes Agent 必须按以下顺序依次引导用户操作:(1) 先问 Windows 端 SMB 共享是否已配置好——如果没有,引导用户去 Windows 启用 SMB、设共享、查 IP;(2) 当用户确认 Windows 端已就绪后,再让用户输入 IP/共享名/用户名/密码,逐个执行命令完成 Linux 端配置。不可跳过步骤1直接到步骤2。打包分享支持 zip(SkillHub 兼容)和 tar.gz(Hermes-to-Hermes)两种格式。"
tags: [deepin, dde-file-manager, smb, cifs, sidebar, bookmark, configurable, agent-guide]Deepin 侧边栏 SMB 共享书签
使用本 skill 的正确方式(给 Hermes Agent 的指令)
当你加载这个 skill 后,必须按以下流程执行,不能跳过任何步骤:
Step 1 — 先问 Windows 端
问用户:"你的 Windows 电脑上 SMB 共享文件夹已经设置好了吗?"
如果用户回答"没设好"或"不清楚":
- 引导用户看下面「第一部分:Windows 端开启 SMB 共享」的步骤
- 告诉用户去 Windows 上依次完成:
- 启用 SMB 功能
- 设置文件夹共享
- 网络设为专用网络
- 用 ipconfig 查出 Windows IP
- 记下 4 项信息:IP、共享名、用户名、密码
- 用户去 Windows 操作完成后,回来告诉你已经配好了
如果用户回答"已经配好了":
- 让用户提供 4 项信息:Windows IP、共享文件夹名、Windows 用户名、Windows 密码
- 不能假设 IP 是你熟悉的某个局域网地址,必须问用户实际的 IP
Step 2 — 配置 Linux 端
拿到 4 项信息后,按「第二部分:Linux 端配置流程」依次执行:
- 确认 Linux 用户名(whoami)
- 验证 ping 通 Windows
- 创建凭据文件
- 添加 fstab
- 挂载测试
- 添加侧边栏书签
- 重启文件管理器
执行过程中如果遇到 sudo 提示输入密码,告诉用户需要输入密码。
Step 3 — 验证
挂载成功后,让用户打开文件管理器,点击侧边栏"NAS共享"确认能访问。
适用场景
- 局域网内 Windows 电脑共享了一个文件夹,想在 Deepin 文件管理器侧边栏添加一个入口
- Windows 开关机后,点一下侧边栏自动重连,无需手动挂载
- 想分享给朋友使用,每个人只需输入自己的局域网配置即可
第一部分:Windows 端开启 SMB 共享(详细教程)
如果你的 Windows 已经配好共享,跳到「第二部分:Linux 端配置流程」。
步骤 1:启用 Windows SMB 功能
Windows 10/11:
- 打开 控制面板 → 程序和功能
- 点击左侧 "启用或关闭 Windows 功能"
- 在弹出的列表中找到 "SMB 1.0/CIFS 文件共享支持"
- 展开它,勾选:
- SMB 1.0/CIFS 客户端
- SMB 1.0/CIFS 服务器
- SMB 直通
- 点击确定,等待安装完成
- 重启电脑
Windows 10/11 默认已支持 SMB 2.0/3.0,但部分 Linux 发行版连接旧版 Windows 时仍需 SMB 1.0。如果 SMB 2.0 直连成功可跳过此步。
步骤 2:设置文件夹共享
假设你想共享 D:\Linuxfile 这个文件夹:
- 在 Windows 上找到要共享的文件夹(如
D:\Linuxfile) - 右键 → 属性
- 切换到 "共享" 选项卡
- 点击 "共享..." 按钮
- 在下拉框中选择用户:
- 如果希望所有人都能访问:选 "Everyone",点击 "添加"
- 如果只允许特定账号:选你的 Windows 登录用户名
- 设置权限级别:
- 读取:只能看不能改
- 读取/写入:可以增删改(推荐)
- 点击 "共享" → 显示共享路径为
\\你的电脑名\Linuxfile - 点击 "完成"
步骤 3:网络配置
- 打开 设置 → 网络和 Internet → 以太网 或 Wi-Fi
- 点击当前连接的网络,将网络配置文件设为"专用网络"(不要设为"公用")
- 回到 控制面板 → 网络和共享中心 → 高级共享设置
- 在"专用网络"下开启:
- 启用网络发现
- 启用文件和打印机共享
步骤 4:确认 Windows IP 地址
打开命令提示符(cmd),输入:
ipconfig
找到你的网络适配器,记下 IPv4 地址(如 192.168.x.x)。
步骤 5:(可选)关闭防火墙或放行 SMB 端口
如果 Linux 端 ping 通但挂载失败,可能是 Windows 防火墙拦截了 SMB 端口(445)。
方法一:放行 SMB 端口 控制面板 → Windows Defender 防火墙 → 高级设置 → 入站规则 → 找到"文件和打印机共享 (SMB-In)" → 启用
方法二:临时关闭防火墙测试 控制面板 → Windows Defender 防火墙 → 启用或关闭防火墙 → 暂时关闭专用网络防火墙
Windows 端配置完成后,你手里需要有以下信息:
| 信息 | 示例 | 说明 |
|---|---|---|
| Windows IP 地址 | 192.168.x.x |
上一步记下的 IPv4 |
| 共享文件夹名 | Linuxfile |
右键共享时设置的名字 |
| Windows 用户名 | admin |
Windows 登录账号 |
| Windows 密码 | ****** |
Windows 登录密码 |
第二部分:Linux 端配置流程(交互式)
配置前确认:Linux 端能 ping 通 Windows IP。
第 1 步:收集信息
打开终端,执行以下命令查看你的 Linux 用户名:
whoami
记下这个用户名(后面要用)。然后确认 Windows 能 ping 通:
ping -c 3 你的WindowsIP地址
如果 ping 不通,先排查网络和 Windows 防火墙。
第 2 步:替换以下变量,逐条执行
将命令中的占位符替换为你的实际信息,然后逐条复制运行:
| 变量 | 替换为 | 示例值 |
|---|---|---|
你的WindowsIP |
Windows 的 IP 地址 | 192.168.x.x |
你的共享名 |
共享文件夹名称 | Linuxfile |
你的Windows用户名 |
Windows 登录账号 | admin |
你的Windows密码 |
Windows 登录密码 | mypassword |
你的Linux用户名 |
whoami 的输出 | your-linux-username |
(2a)创建凭据文件:
cat > ~/.smbcredentials << EOF
username=你的Windows用户名
password=你的Windows密码
EOF
chmod 600 ~/.smbcredentials
验证:
cat ~/.smbcredentials
ls -la ~/.smbcredentials
(2b)创建挂载点:
sudo mkdir -p /mnt/smb
(2c)添加到 /etc/fstab:
echo '//你的WindowsIP/你的共享名 /mnt/smb cifs credentials=/home/你的Linux用户名/.smbcredentials,vers=3.0,uid=你的Linux用户名,gid=你的Linux用户名,file_mode=0755,dir_mode=0755,noauto,x-systemd.automount 0 0' | sudo tee -a /etc/fstab
(2d)手动挂载测试:
sudo mount /mnt/smb
ls /mnt/smb
如果挂载失败,查常见问题章节。
(2e)添加到侧边栏书签:
python3 << 'PYEOF'
import json, os
config_path = os.path.expanduser("~/.config/deepin/dde-file-manager.json")
with open(config_path) as f:
config = json.load(f)
items = config.setdefault("QuickAccess", {}).setdefault("Items", [])
max_index = max((i.get("index", 0) for i in items), default=0)
exists = any(i.get("url") == "file:///mnt/smb" for i in items)
if not exists:
items.append({
"created": "",
"defaultItem": False,
"index": max_index + 1,
"lastModified": "",
"mountPoint": "",
"name": "NAS共享",
"url": "file:///mnt/smb"
})
with open(config_path, "w") as f:
json.dump(config, f, indent=2)
print("侧边栏书签已添加")
else:
print("侧边栏书签已存在,跳过")
PYEOF
(2f)重启文件管理器:
pkill dde-file-manager
DISPLAY=:0 nohup dde-file-manager > /dev/null 2>&1 &
disown
第三部分:验证
- 打开 Deepin 文件管理器
- 检查侧边栏是否出现 "NAS共享"
- 点击它 → 应该直接显示 Windows 共享文件夹的内容
- 关闭 Windows 再打开 → 点击侧边栏自动重新挂载
常见问题
Q: 点侧边栏提示"找不到访问目录"
A: 检查 Windows 是否开机;尝试 sudo mount /mnt/smb 看报错
Q: mount error(112): Host is down A: Windows 可能没开机,或防火墙拦截了 445 端口
Q: mount error(115): Operation now in progress A: Windows 端 SMB 1.0/2.0 未启用,或防火墙拦截
Q: mount error(13): Permission denied
A: 凭据文件中的用户名或密码错误。重新编辑 ~/.smbcredentials,检查大小写
Q: mount error(2): No such file or directory
A: 挂载点 /mnt/smb 不存在,运行 sudo mkdir -p /mnt/smb 创建
Q: 侧边栏书签不见了
A: 重新检查 ~/.config/deepin/dde-file-manager.json,确保 JSON 格式正确(逗号不遗漏)
Q: 怎么修改侧边栏显示名称?
A: 编辑 ~/.config/deepin/dde-file-manager.json,把 "name" 字段改成你要的文字
Q: 怎么删除这个侧边栏书签?
A: 编辑 ~/.config/deepin/dde-file-manager.json,删除对应的那个 JSON 对象
Q: /etc/fstab 写错了怎么恢复?
A: sudo cp /etc/fstab /etc/fstab.bak(先备份),然后用 sudo nano /etc/fstab 编辑删掉加的那行
Q: Deepin 换到 UOS,配置会保留吗? A: 配置在用户主目录下,重装系统后需要重新配;凭据文件和 fstab 条目都需要重新设置
Q: 可以用图形化界面配吗?
A: Deepin 文件管理器本身支持 smb://IP/共享名 地址栏访问,但不支持保存到侧边栏持久化。本 skill 是全命令行方案
Current listing version
1.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 解决 Deepin/UOS 用户访问 Windows SMB 共享文件夹的高频刚需
- 提供端到端自动化配置流程,显著提升日常文件共享效率
Highlights
- description 明确描述 Agent 引导流程和核心功能
- 触发词覆盖完整,边界清晰
Highlights
- 文档结构清晰,分步骤引导用户操作
- 包含详细示例和常见问题解答,frontmatter 完整
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常场景,不可逆操作有确认和恢复机制
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Save or modify files
Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.
Mentioned in main document · lines 224 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 188 -
Administrator or elevated privileges
Elevate only when necessary. Keep protection and certificate validation enabled and avoid broad system access.
Mentioned in main document · lines 43, 182, 188, 194, 255
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.