点击桌面图标打开软件的时候怎么以root权限打开?
Tofloor
poster avatar
dameng
deepin
2018-05-11 23:48
Author

比如编辑器
Reply Favorite View the author
All Replies
avatar
WENWEN
deepin
2018-05-11 23:51
#1
deepin 暂不支持 root 登录 那就不能直接 赋予
Reply View the author
avatar
ckurobac
deepin
2018-05-12 18:34
#2
1 文件管理器选择以管理员身份打开,这时候再打开文件就是root身份
2 终端用sudo,比如说sudo gedit .bashrc,不知道程序名字是什么的话可以开系统监视器看
Reply View the author
avatar
nevershow
deepin
2018-05-12 18:53
#3
编辑桌面快捷方式,把Exec=COMMAND改成 Exec=gksudo COMMAND
Reply View the author
avatar
dameng
deepin
2018-05-15 05:21
#4
https://bbs.deepin.org/post/156323
编辑桌面快捷方式,把Exec=COMMAND改成 Exec=gksudo COMMAND

改过,不行的
Reply View the author
avatar
iminto
deepin
2018-05-15 06:00
#5
本帖最后由 iminto 于 2018-5-14 22:01 编辑

试试这个,编辑desktop文件即可,参考:
  1. TryExec=su-to-root
  2. Exec=su-to-root -X -c xxx
Copy the Code

xxx换成你的命令。
这个肯定是可以的,除非你理解错了root
Reply View the author
avatar
dameng
deepin
2018-05-16 00:06
#6
https://bbs.deepin.org/post/156323
试试这个,编辑desktop文件即可,参考:

xxx换成你的命令。

真的不行,sublime-text-dev 你试一下。。。在命令行用gksu sublime-text-dev是可以的,但是修改desktop文件怎么搞都不行
Reply View the author
avatar
nevershow
deepin
2018-05-16 03:16
#7
https://bbs.deepin.org/post/156323
真的不行,sublime-text-dev 你试一下。。。在命令行用gksu sublime-text-dev是可以的,但是修改desktop ...

Exec=gksu /opt/sublime_text/sublime_text

换成你sublime_text的路径
Reply View the author
avatar
iminto
deepin
2018-05-16 04:39
#8
https://bbs.deepin.org/post/156323
Exec=gksu /opt/sublime_text/sublime_text

换成你sublime_text的路径

哈哈哈,我猜也是。。。sublime里的这个路径是写死的
Reply View the author
avatar
dameng
deepin
2018-05-17 07:14
#9
https://bbs.deepin.org/post/156323
Exec=gksu /opt/sublime_text/sublime_text

换成你sublime_text的路径

果然论坛大神多,以前我一直再找sublime_text_dev,没想到来opt下面看看。。多谢了。。最后再问一下,能不能解决点击图标后提示输密码的框,就是让他自动输入?提前谢啦
Reply View the author
avatar
dameng
deepin
2018-05-17 07:14
#10
https://bbs.deepin.org/post/156323
哈哈哈,我猜也是。。。sublime里的这个路径是写死的

哎,sublime的包名字搞得我很迷
Reply View the author