babluboy / nutty

A Network Utility
GNU General Public License v3.0
155 stars 25 forks source link

Discussion Regarding Flatpak Build #100

Closed root-reborn closed 1 month ago

root-reborn commented 2 months ago

The 3 scripts nutty_nethogs_script.sh, nutty_device_monitor.sh, nutty_nmap_script.sh use sudo previlages to execute.Thats the reason other tabs are not displaying any info and are static after building and installing the Nutty flatpak and also giving error Failed to execute child process pkexec.Seems Flatpak doesn't support running application with elevated previlages.Flatpak also doesn't support pkexec which is part of Polkit(PolicyKit) that can be used to run certain commands with elevated privileges without giving full shell access.This behaviour is documented in the flatpak documentation at https://docs.flatpak.org/en/latest/introduction.html.

But I found a workaround.Flatpak applications like AnyDesk and Gnome Builder seems to have implemented polkit.You can see this from their flatpak manifests which are available in flathubs github repository:- https://github.com/flathub/com.anydesk.Anydesk/blob/master/com.anydesk.Anydesk.json https://github.com/flathub/org.gnome.Builder/blob/master/org.gnome.Builder.json Can you help with the polkit implementation in Nutty to make it fully functional @babluboy

root-reborn commented 1 month ago

Added the Flatpak Manifest file(YAML file) and Build guide to the main repo for Nutty flatpak. As discussed via email, work on flatpak to access host OS network interface and execute sudo scripts on host os will be done in future. Closing the issue as of now.