当前位置: 代码迷 >> QT开发 >> 关于Qt linux下双击程序即开始询问用户密码获得root权限然后以root身份运行程序 怎么实现
  详细解决方案

关于Qt linux下双击程序即开始询问用户密码获得root权限然后以root身份运行程序 怎么实现

热度:288   发布时间:2016-04-25 03:03:02.0
关于Qt linux下双击程序即开始询问用户密码获得root权限然后以root身份运行程序 如何实现?
网上找到了这个:
QT Creator switch to Projects > "Run Settings" > "Run configuration:" 
select "custom executable"
Executable: sudo /d4/workspace/qt/test2-build-desktop/test2
change the above line to match your project path
但是在Qt5.4界面上:

表示找不到"Run Settings" > "Run configuration:"这些东西啊?

------解决思路----------------------
你的 "运行" 和 “运行配置” 不就是 "Run Settings" > "Run configuration:" 么?

你想做的无非就是,本来要启动程序 A,现在要启动的 sudo或gksudo ,并将你要启动的程序 A 作为参数传入。
  相关解决方案