-
-
Notifications
You must be signed in to change notification settings - Fork 30
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
PyQt GUI support #43
Comments
I am sorry to not have answered before. What you have in mind? I am not sure how GTK would fix well QT code, but I am open to that. |
I guess no reply probably means you got something else working for you. |
Hello @ericbsd I would still be interested in a Qt frontend to the networkmgr backend. Unfortunately I don't have the time to work on it right now, but if someone does, please let us know. |
Hello @ericbsd I have finally started writing the Qt frontend, and it is beginning to work (i.e., I can see the network I am connected to): However, there is one notable exception that may require a small architectural change: When I select menu items, I see messages like
From looking at the code, it seems like networkmgr is running as root all the time. This is apparently not possible for the Qt equivalent of Gtk.StatusIcon, QSystemTrayIcon. It needs to run as the regular user that is also running the menu bar which is hosting the QSystemTrayIcon. Hence, I think Would you be willing to make this change? Then I should be able to contribute a Qt frontend to this networkmgr repository rather than having to fork it. On a semi-related note, did you consider using |
Hi, @probonopd I started to use sudo to start networkmgr to avoid having service, ifconfig, and other commands in sudoers to avoid spamming system logs like /var/log/auth.log. That is the main reason I prefer to start networkmgr has to root. If you have a way that would prevent spamming system logs I am fine with it. |
Adding Replace If you only want the logging disabled for certain commands, this is also possible. |
Sorry I completely forgot to reply. How do you intend to add the sudo in the code? |
We could either make the commands that need to be invoked by normal users setuid root, or we could use |
NetworkMgr is the only tool in GhostBSD that I wanted to avoid asking for a password in GhostBSD. Could you explain what you mean about |
Wikipedia explains it like this:
So, if So by setting |
I think I prefer to run networkmgr with sudo there network mgr deal with service to and there is more option coming the in the future that will deal. Why you don't like to have networkmgr running with sudo it already does? |
Seems to me like it is best practice not to have long-running GUI processes run as root all the time, in order to reduce the attack vector. |
AFAIK, it is impossible to use 'modern' AppIndicator protocol with an application started under sudo. |
Indeed. Another reason not to run the GUI as root all the time. (Although I find it braindead that root cannot send D-Bus messages to all users, always found that hard to believe, but you seem to be confirming it.) |
The problem is there is not only ifconfig. There is service, wpa_supplicant, dhclient, and others that I probably forgot. I do not think FreeBSD will let NetworkMgr in the ports tree if we modify setuid or setgid. Even though I am a FreeBSD port committer, I am not sure I would like to push that solution to the ports tree. There must be and another way. |
Maybe a solution like mac_ntpd could be implemented for managing the network ? |
I am looking to change how networkmgr is started and go with @probonopd idea. I am looking at changing it so that if a user is not at the wheel, operator, or network group, a password prompt will ask the user to make changes. |
Would you be interested in an optional PyQt GUI?
Looks like
trayicon.py
andauthentication.py
would have to be adjusted. Possibly doable without too much hassle.The text was updated successfully, but these errors were encountered: