File howtorun.md of Package sniffnet
# Post install
Normally sniffnet not working properly because system have some restrict on network device.
You can fix it using setcap or using sudo.
Partically, I don't know how to put setcap on spec on OBS, and then I make this note.
## 1. `setcap`
- Permanently allow the `sniffnet` binary its required privileges (called "capabilities" in Linux).
- Do this if you want to give all unprivileged users full access to sniffnet's monitoring capabilities.
- This is the **recommended** setup **for single user machines**, or **if all users are trusted**.
- This is **not recommended** if you want to **ensure users cannot see others' traffic**.
- This method will be needed for every newer package installed.
```bash
# install libcap-progs
sudo zypper install libcap-progs
# assign capabilities
sudo setcap cap_net_raw,cap_net_admin=eip /usr/bin/sniffnet
# run as unprivileged user
sniffnet
```
### Capabilities explained
- `cap_net_raw,cap_net_admin`: allow capturing packets on your system.
## 2. `sudo`
- Require privilege escalation every time.
- Do this if you are an administrator of a multi-user environment.
1. X11
```bash
sudo sniffnet
```
2. wayland
```bash
sudo -E sniffnet
```