在我的应用程序中,我需要将一些文件写入 Linux 文件系统文件夹,这需要
super 用户访问权限。
那么,我如何调用该对话框,以便当前用户拥有 super 用户权限,直到
写操作完成。我正在使用 glib 相关的 API。
问候, 列宁
最佳答案
GKSu is a library that provides a Gtk+ frontend to su and sudo. It supports login shells and preserving environment when acting as a su frontend. It is useful to menu items or other graphical programs that need to ask a user's password to run another program as another user.
关于linux - 运行一个应用程序时启动授权对话框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6777637/