2

I ran tshark on Ubuntu/Windows 10 as follows:

$ tshark -i 6
Capturing on 'usbmon1'
tshark: The capture session could not be initiated on interface 'usbmon1' (Can't open USB bus file /sys/kernel/debug/usb/usbmon/1t: Permission denied). Please check to make sure you have sufficient permissions, and that you have the proper interface or pipe specified.
0 packets captured

Update: Thank you for the advice that I got from this and the wireshark communities. I was able to handle usbmon as suggested and I got to to capture data for it. The way for me to run tshark without errors was by running it through gksudo.

gksudo -- tshark -i 1 -l -a duration:30

The -- between gksudo and tshark are necessary for tshark to interpret the parameters. The only problem is that ^C does not stop the running program.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
jh2222
  • 31
  • 4
  • gksudo tshark -i 6 – jh2222 Jun 04 '17 at 20:23
  • gksudo tshark -i 6 does not give an error message but there is no capture, gksudo -i capture packets. So at least tshark works for me, Thanks – jh2222 Jun 04 '17 at 20:32
  • gksudo tshark only partially works, It appears that gksudo does not pass the parameter list of tshark The question is how to have the entire string of options of tshark get recognized. I tried double quoting the parameter list of tshark. Used gksudo -- tshar options. That did not seem to work. – jh2222 Jun 05 '17 at 16:35
  • If I use gksudo tshark -i 1 -l -a duration:30, there is no output for tshark. I tested it. On the other hand gksudo -- tshark -i 1 -l -a duration:30 leads to – jh2222 Jun 06 '17 at 19:56
  • If I use gksudo tshark -i 1 -l -a duration:30, there is no output for tshark. (I tested it.) On the other hand gksudo -- tshark -i 1 -l -a duration:30 leads to normal tshark output. – jh2222 Jun 06 '17 at 20:27
  • If you solved your problem yourself, please answer your own question and accept your answer. Don’t put the answer in your question or the comments! Send me a message in the comments if you want my up-vote. :-) – David Foerster Jun 06 '17 at 20:57
  • Also, this is now a duplicate of https://askubuntu.com/questions/74059/how-do-i-run-wireshark-with-root-privileges – David Foerster Jun 06 '17 at 20:58

1 Answers1

1

When I used: gksudo -- tshark -i 1 -l -a duration:30, it worked without errors. What seemed to help was the -- between gksudo and tshark. Because I am the only user of the PC hosting Ubuntu, I am not concerned about computer safety of this approach.

jh2222
  • 31
  • 4