求助:deepin linux 如何设置某个程序始终以管理员身份运行?
Tofloor
poster avatar
89******81@qq.com
deepin
2018-01-16 19:11
Author
我使用APiCloudstudio2,但是这个软件需要管理员权限读写文件,我已经将软件目录设置为chown root:root 了,但是貌似还是不行,在命令行里面,用root用户打开程序就可以正常使用!

想指导如何一直用root用户权限去打开,不用命令行,直接点击应用图标就可以,最好是可以配置desktop文件,直接以管理员权限运行。求大神指导!我是Linux新手,谢谢!
Reply Favorite View the author
All Replies
2 / 2
To page
avatar
catubibu
deepin
2026-01-14 15:12
#21
shenyue
我添加上 pkexec 后,启动软件,输入密码之后,就没有反应了。

文件:
[Desktop Entry]
Name=Visual Studio Code
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=pkexec /usr/share/code/code --unity-launch %F
Icon=code
Type=Application
StartupNotify=true
StartupWMClass=Code
Categories=Utility;TextEditor;Development;IDE;
MimeType=text/plain;inode/directory;
Actions=new-empty-window;
Keywords=vscode;

X-Desktop-File-Install-Version=0.23

[Desktop Action new-empty-window]
Name=New Empty Window
Exec=pkexec /usr/share/code/code --new-window %F
Icon=code


我跟你的情况一样啊,输入密码后就没反应了。

我的是万象拼音的更新工具,更新状态提示权限不够,更新失败。有没有万象拼音的小伙伴说道说道?

Reply View the author
2 / 2
To page