linux - 使用 alt+f2 启动 shell 脚本 (debian/mate)

标签 linux shell symlink

我有运行应用程序的脚本

#!/bin/bash
wine /opt/winbox.exe

文件夹

/home/myuser/scripts/winbox.sh

我为它创建了符号链接(symbolic link)

sudo ln -s /home/myuser/scripts/winbox.sh /usr/local/bin/winbox

但运行后

alt+f2 --> winbox

我有错误

Error when getting information for file '/home/myuser/winbox': No such file or directory

我在哪里犯了错误以及如何使用 alt+f2 运行脚本?

最佳答案

问题已解决。使用 gksudo 对话框设置指令

#!/bin/sh
exec 2>~/winbox.log
set -x
sh -c "gksudo wine /opt/winbox/winbox.exe"

关于linux - 使用 alt+f2 启动 shell 脚本 (debian/mate),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39048516/

相关文章:

linux - 未找到 Openssl header - 错误

php - 从外部拥有的服务器检查目录或文件

即使 cpu 处于空闲状态,Linux Ram 也不是空闲的

bash - 如何在 Bash 中执行 "tail this file until that process stops"?

linux - 有没有办法仍然为.gitignore 使用符号链接(symbolic link)?为什么不再支持它作为符号链接(symbolic link)?

linux - Grep - 返回文件的行号和名称

linux - 使用 INTERFACE 选项通过 SOCAT 的 PPPd

python - 如何逃避 os.system() 调用?

node.js - 正确配置依赖于本地包的NPM包

php - 如何在 php 中检查带有符号链接(symbolic link)的目录是否存在以及是否不存在