[Share Experiences] 请问一下深度下对于GUI应用程序如何获取到root权限
Tofloor
poster avatar
suiyunonghen
deepin
2021-10-27 18:10
Author

咨询一下各位大佬,就是深度下面要让GUI程序获取root权限,有没有什么方便的方法,就是类似之前的gksu之类的

目前我要root启动,都要在bash中通过shell来走一遍指令

 

另外就是,如果是自己开发的程序,这程序是必须需要root权限的,怎样在程序运行的时候,就弹出比如系统内部的某些程序,弹出就要求输入密码,然后直接就获取了root权限了呢

Reply Favorite View the author
All Replies
神末shenmo
deepin
Spark-App
Q&A Team
2021-10-27 20:32
#1

pkexec

这个是各个de通用的

Reply View the author
suiyunonghen
deepin
2021-10-27 20:37
#2

,谢谢,我试了一下,用这个执行程序,报告No surch directory or file

Reply View the author
suiyunonghen
deepin
2021-10-27 22:13
#3

额,搞出来了,参考地址

https://github.com/kruizer23/lazpolkit

有点麻烦。

Reply View the author
enforcee
deepin
2021-10-27 23:51
#4
suiyunonghen

,谢谢,我试了一下,用这个执行程序,报告No surch directory or file

命令输错了就是

Reply View the author
gfdgd_xi
deepin
Ecological co-builder
2021-10-30 23:15
#5
suiyunonghen

,谢谢,我试了一下,用这个执行程序,报告No surch directory or file

好像pkexec不可以用相对路径,要用绝对路径

Reply View the author