[Tutorials] 输大神指教运行问题
Tofloor
poster avatar
SamuelCrystal
deepin
2022-05-15 07:05
Author

我想写个像windows中的关机和重启批处理程序,希望双击程序就重启或者关机,

到实际上不管什么格式,如.sh

双击后都提示是要运行还是显示

默认是显示,还有取消-运行-在终端中运行,

我只想要运行,或者默认选择运行也行

有没大神支招

Reply Favorite View the author
All Replies
Ziggy
deepin
2022-05-15 07:06
#1

再写个desktop执行

Reply View the author
寰宇ζ
deepin
2022-05-15 07:18
#2
Reply View the author
red13
deepin
2022-05-15 07:59
#3

关机

init 0

重启

init 6

Reply View the author
陌生人
deepin
2022-05-15 18:36
#4

可以找找文件管理器里有没有类似的选项,所有可执行文件直接执行

Reply View the author
安洛
deepin
2022-05-15 20:16
#5
陌生人

可以找找文件管理器里有没有类似的选项,所有可执行文件直接执行

没有。应该加一个。

Reply View the author
寰宇ζ
deepin
2022-05-15 23:37
#6
安洛

没有。应该加一个。

加一个,然后.....岂不是有时候忘了,很容易出错?

Reply View the author
陌生人
deepin
2022-05-16 05:45
#7
寰宇ζ

加一个,然后.....岂不是有时候忘了,很容易出错?

不用desktop的话应该只能这样了,我个人还是比较建议用desktop或者是直接图形界面关机的

Reply View the author