桌面上创建sh文件双击运行没反应
Tofloor
poster avatar
pq12344321
deepin
2020-11-17 00:54
Author

桌面上创建一个sh文件,权限可执行,内容是重启命令,之前1002的版本双击就可以重启,现在更新后执行没有任何反应,在终端中执行这个文件没问题

Reply Favorite View the author
All Replies
derekuang
deepin
2020-11-17 01:39
#1

桌面要可以双击运行是不是要弄成.desktop文件,我自己的程序也是要这样弄才行。。

Reply View the author
funicorn
deepin
2020-11-17 01:57
#2

desktop不是一个文件夹

Reply View the author
Ziggy
deepin
2020-11-17 03:25
#3

重新设置一下权限

Reply View the author
忘记、过去
deepin
2020-11-17 03:54
#4

实际测试了一下,没有遇到楼主说的问题。我的测试脚本 test.sh 内容如下:


#!/bin/sh

reboot


文件需要赋予可执行权限,并在开头写明使用 sh(或者 bash,zsh 等)执行。测试双击后点击运行即可重启。


Reply View the author
灵兮之
deepin
2020-11-17 06:34
#5

chmod +x 文件地址

我也刚设置好,还是习惯双击直接关机,电源键关机步骤真的太多了

Reply View the author