-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot open Help menu links in gsmartcontrol-root #7
Comments
Hello, GSmartControl uses |
I can see why it's not a good idea to run a browser as root! I know very little about this, but maybe you can (fork a process and?) drop root at runtime before calling gtk_show_uri etc.? |
Yes, a helper process with less privileges is one possibility, but the hard part is to make launching it portable (at least across Linux distributions, because the root escalation is also distribution-dependent). |
It would be good for security in general to launch the GUI as a normal user, then use pkexec to run smartctl when required, with a rule in /usr/share/polkit-1/actions to display an authentication dialog to the user with a nice message about what the privileges are needed for. This would help on the more modern systems that don't allow X11 windows to run as root, and possibly avoids issues with Wayland in the future as well: https://wiki.archlinux.org/title/Running_GUI_applications_as_root#Wayland |
While it's a good idea in principle, last time I checked polkit did not allow you to specify the "keep" timeout after gaining the rights. There is only mention of a "brief" period in the specification, which is suggested to be 5 minutes. Asking for a password every 5 minutes while the program is running would be bad. The proper solution would be to have a single privileged subprocess (elevated via pkexec or some other way), let it do everything related to the system, and communicate back and forth with the GUI. Implementing this (especially in a cross-platform way) will take considerable amount of resources though. |
That's a fair point. I wonder how that could be done in a cross-platform way. On Linux I guess DBUS could be used, or maybe a socket, but I'm not sure how this might work on other platforms. |
Hi, many thanks for this app. I am using 1.1.3 on Ubuntu Mate 21.04.
I notice that all links in the Help menu (Help, Support, About/Website and the mailto: links in About/Credits) do not work when using
gsmartcontrol-root
(they work in non-rootgsmartcontrol
).Running
gsmartcontrol-root -v
I see:The text was updated successfully, but these errors were encountered: