-
Notifications
You must be signed in to change notification settings - Fork 25
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
Externalise all commands from code #31
Comments
@btd1337 Thanks for your interest in nutty. At the moment I’m building for Elementary OS, but longer term plan is to make it compatible with other distros. Please update this ticket and the aur link above with the features which are not working and depending on what needs fixing either I or the aur maintainer will take a look. Probably the AUR maintainer would suggest if the code has an issue or if it’s a library in Arch that is missing... |
I believe the problem is the commands used. Network commands for Arch Linux are a bit different from Ubuntu. I believe that something like this would solve the problem and it would be easier to get helpers:
|
@btd1337 This is very helpful. I have externalized most of the commands that Nutty executes in script files. So the actual commands can be modified in the scripts like nmap, nethogs, etc. Probably you can modify them to get most of the application working. The scripts are installed in the |
It's a good way! |
@btd1337 I have now got all the command line programs that nutty uses externalised into scripts located in the You can get the changes by running the following commands:
Try and replace the commands - for example in nutty_nethogs_script.sh with the Arch equivalent for the same - and see if the code is able to parse the output. I'm assuming that the arch equivalent for nethogs will be producing the same output format as the one on Ubuntu and the code should parse the command output correctly. Once you have got the Arch equivalents of all the scripts in the Let me know how it goes, and thanks again for your interest in Nutty. |
Looks like you have the latest code as I introduced the error message bar recently. If I understand correctly the error is around permissions to execute the script which is odd. Can you try executing the script in terminal ? |
The problem is apparently permission. I think Nutty could ask for root password to solve this problem. |
Yes, I use pkexec in the code to let Nutty ask for the sudo password when invoking the scripts that use it. Are you saying pkexec is not working on Arch and is not prompting you a dialog like the below? Do we need to install pkexec for Arch to make this work? |
In this section, none of the commands require root permissions to run. Is this a problem in the way the scripts are installed and it does not let the user with which Nutty is being run execute the script? That might be the issue. Here is the ls- l on the scripts dir on my system:
It has got execute permissions for root, group and all - can you check yours? |
pkexec version 0.116 is installed but Nutty doesn't runs him |
@btd1337 Looks three scripts (ports, traceroute and vnstat) are missing execute permissions - could you please provide the execute permissions by running: also try manually running the command from terminal like: I am suspecting that the missing execute permissions are the cause of those three scripts not working.
|
Is it possible to set the permissions correctly in the MESON installer? And add this program |
Yes, just spotted that the meson build is missing the permissions for the scripts install - i will make the fix. vnstat is already mentioned as part of the dependencies in the debian/control file. Maybe you installed from source and missed the dependencies, best to ensure the following are installed: |
Not sure about the vnstat error you are getting, can you check this to see if it resolves the issue: |
Please, add too |
Vmstat is already in Debian/control so it should be automatically installed along with nutty when installing via ppa or by appcenter .... When building from source all the dependent programs need to be installed manually....I will update the manual instructions details on github to mention the dependant programs Did you get vnstat to work for you on Arch? |
No, the error persists. |
looks like the issue is due to vnstat not finding the eth0 interface. This page lists the steps on how to create the directory and vnstat database and then refresh the daemon by running a few commands. If you are able to give it a try and get vnstat running then I might do a check inside nutty and run these commands automatically to resolve the issue. https://www.2daygeek.com/install-vnstat-to-monitor-network-interface-traffic-on-linux/ |
Thanks for the PR - did |
Thanks for the update...is all functionality of nutty working now on arch? ...did you have to change any of the scripts with arch specific commands ?..if yes, the please attach the updated script here, so that I can build an arch set of scripts |
I didn't have to make any adjustments. The errors were those mentioned above. |
Thanks for the update, I will add some logic to spot the error of vnstat not starting and run the start daemon command with sudo... Closing this issue and will raise a separate one to handle the vnstat error |
@babluboy Thank you for your support! |
@babluboy Congratulations on your great work on Nutty!
Is It possible you to add support to Arch Linux? Some features aren't working...
The text was updated successfully, but these errors were encountered: