SecureCRT issue "Could not open clipboard: Assess is denied" (无法打开粘贴板:访问被拒绝)

本文解决了一个在使用SecureCRT连接Linux终端时遇到的问题:当尝试选择文本进行复制时,会出现错误提示“Could not open clipboard: Access is denied”。通过排查发现是由于某些桌面词典软件(如金山秒译)与SecureCRT之间的冲突导致。卸载此类应用后问题得到解决。

I got an issue when copying some line/word (actually just select the context ) in the Linux terminal via SecureCRT,  error box popped up with message "Could not open clipboard: Assess is denied" as blew.  when I double click a word or just select a piece of context, the terminal got line wrap automatically and printed "^C" on screen.


I tried to change the application setting in SecureCRT in the menu "session options" and "global options" to fixed it,  in the "global options" i canceled the check box for item "Copy on select" but the issue persists. I also found that the issue occurs even the server dnt connect,  then I realised that the issue shd not caused by the application setting.



I seek answers from internet and found that many people encountered this issue but the most common reason is missing clipboard.exe file in windows 7 OS, the solution is to copy and rename clip.exe to let the SecureCRT can invoke it, I had also tried the same but it still does work.

finally, I was enlighten from a blog "http://www.cnblogs.com/zhaojk2010/p/4124924.html", the author claimed a similar case and answer the root cause: that's because of some functionality conflicts from dictionary application in your PC ( 金山词霸,网易翻译,etc.). those app has the capability of translation by selecting content, however, it also work with the capability of copy by selecting content in SecureCRT!

then I found out the arch-criminal is "金山秒译", the issue was fixed after uninstalling the  "金山秒译".

very appreciate for that blog and that's why I write down the blog, I would like to share the case to all the people who encountering the same problem.


### SecureCRT 中运行 MPlayer 出现权限 denied 的解决方案 在 SecureCRT 中运行 MPlayer 时遇到 `Permission denied` 问题,通常是由于以下几种原因导致的:文件权限不足、音频输出设备权限受限或 SecureCRT 的会话配置不正确。以下是针对该问题的详细分析与解决方法[^1]。 #### 1. 检查 MPlayer 文件及目标文件的权限 确保 MPlayer 可执行文件以及目标媒体文件具有正确的读取和执行权限。可以通过以下命令检查并修改权限: ```bash ls -l $(which mplayer) ls -l /path/to/media/file ``` 如果发现权限不足,可以使用以下命令赋予必要的权限: ```bash chmod +x $(which mplayer) chmod +r /path/to/media/file ``` #### 2. 音频输出设备权限问题 MPlayer 默认可能尝试访问系统音频设备(如 `/dev/snd/*` 或 `/dev/dsp`),而这些设备可能需要更高的权限才能访问。可以通过以下方式解决: - **临时提升权限**:以超级用户身份运行 MPlayer。 ```bash sudo mplayer -ao oss /path/to/media/file ``` - **调整音频驱动**:选择不需要特殊权限的音频输出驱动,例如 `null` 或 `pcm`。 ```bash mplayer -ao null /path/to/media/file ``` 这里的 `-ao` 参数指定了音频输出驱动,`null` 表示不实际输出音频,仅用于测试[^1]。 #### 3. SecureCRT 的伪终端配置 SecureCRT 使用伪终端(pseudo-terminal)来模拟本地终端环境。某些情况下,伪终端可能无法正确传递权限或环境变量,导致 MPlayer 报错。可以尝试以下方法: - **启用本地回显和远程回显**:在 SecureCRT 的会话选项中,确保“终端”->“仿真”下的“本地回显”和“远程回显”已启用。 - **禁用流量控制**:在“终端”->“流量控制”中,将“接收流量控制”设置为“无”。 - **使用完整路径调用 MPlayer**:确保在 SecureCRT 中使用 MPlayer 的完整路径,避免因 `$PATH` 环境变量未正确加载而导致的问题。 ```bash /usr/bin/mplayer -ao pcm /path/to/media/file ``` #### 4. 检查 SELinux 或 AppArmor 配置 如果系统启用了 SELinux 或 AppArmor,可能会限制 MPlayer 对某些资源的访问。可以通过以下命令临时禁用 SELinux 来测试: ```bash setenforce 0 ``` 若问题解决,则需要调整 SELinux 策略以允许 MPlayer 的正常运行。 #### 5. 使用调试模式排查问题 MPlayer 提供了详细的日志输出功能,可以帮助定位具体错误原因。可以通过添加 `-v` 参数增加输出信息: ```bash mplayer -v -ao oss /path/to/media/file ``` ```python # 示例代码块(仅作格式演示) print("Debugging MPlayer in SecureCRT") ```
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值