run program as root
-
wrote on 9 May 2021, 14:29 last edited by
Hi, what should i do to get my qtwidgets app launching as root?. i'd like it to show password prompt and run as root. On linux
-
wrote on 9 May 2021, 14:51 last edited by
You can just launch it with
kdesudo
(on KDE) or the equivalent for other desktops, however most probably it is not a very good idea.
Why do you want to launch it as root? -
Hi, what should i do to get my qtwidgets app launching as root?. i'd like it to show password prompt and run as root. On linux
wrote on 9 May 2021, 14:55 last edited by@jakubiszon26
As @gde23 says, not a good idea, and why? If the user wants to run your app by setting himself/the launch as root that's one thing. But your app prompting and changing to root is quite another.Anyway, it's moot, because you probably won't be able to do as you ask. If you app runs as non-root, prompts user and gets password, that's not going to help that same app to then change to running as root. At best you might then launch a second app as root....
And finally, beware, there can be issues running a X windows program as root, it may not work right X-wise....
-
wrote on 10 May 2021, 02:04 last edited by
chown root:root program chmod 4755 program
disable selinux NSA spyware if problems persist
no judgement...just syntax. LOL
1/4