How to capture with wireshark from not root

Hi, tying to run wireshark, but have this errors:

root@ihorr:~ # sudo wireshark
12:27:47.009 Main Warn could not connect to display
12:27:47.009 Main Info Could not load the Qt platform plugin "xcb" in "" even though it was found.
Abort

Is it possible to run wireshark from simple user and not to login from root?
 
Code:
pkg info -D wireshark
wireshark-3.4.8:
On install:
In order for wireshark be able to capture packets when used by unprivileged
user, /dev/bpf should be in network group and have read-write permissions.
For example:
# chgrp network /dev/bpf*
# chmod g+r /dev/bpf*
# chmod g+w /dev/bpf*
In order for this to persist across reboots, add the following to
/etc/devfs.conf:
own  bpf* root:network
perm bpf* 0660
 
Code:
pkg info -D wireshark
wireshark-3.4.8:
On install:
In order for wireshark be able to capture packets when used by unprivileged
user, /dev/bpf should be in network group and have read-write permissions.
For example:
# chgrp network /dev/bpf*
# chmod g+r /dev/bpf*
# chmod g+w /dev/bpf*
In order for this to persist across reboots, add the following to
/etc/devfs.conf:
own  bpf* root:network
perm bpf* 0660
That solution works perfectly, also added my user to group network? Should I do it, or it was not necessary?
 
Back
Top