Skip to content
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

Improve scrollbar functionality #60

Closed
thebyrdman-git opened this issue Sep 17, 2019 · 14 comments
Closed

Improve scrollbar functionality #60

thebyrdman-git opened this issue Sep 17, 2019 · 14 comments
Assignees

Comments

@thebyrdman-git
Copy link

I started trying to use termshark to analyze packet captures for my work. I noticed that I am unable to change the scrollbar position by clicking on the scrollbar itself. The scrollbar only seems to function by clicking either the box on the bar or by clicking on the arrows. I'm referring to being able to click on a different position on the scrollbar in order to jump to that position, i.e. jump quickly to the end of the file. I'm using Tilix terminal, Fedora 29, xorg session (in case this information is helpful).

@pocc
Copy link
Collaborator

pocc commented Sep 17, 2019

Please provide these things:

  • tshark -v
  • Gif of it happening

@thebyrdman-git
Copy link
Author

$ tshark -v
TShark (Wireshark) 3.0.3 (Git commit 6130b92b0ec6)

Copyright 1998-2019 Gerald Combs gerald@wireshark.org and contributors.
License GPLv2+: GNU GPL version 2 or later http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with libpcap, with POSIX capabilities (Linux), with libnl 3,
with GLib 2.58.3, with zlib 1.2.11, with SMI 0.4.8, with c-ares 1.13.0, with Lua
5.1.5, with GnuTLS 3.6.7 and PKCS #11 support, with Gcrypt 1.8.4, with MIT
Kerberos, with MaxMind DB resolver, with nghttp2 1.34.0, without LZ4, without
Snappy, without libxml2.

Running on Linux 5.2.11-100.fc29.x86_64, with Intel(R) Core(TM) i7-8650U CPU @
1.90GHz (with SSE4.2), with 15687 MB of physical memory, with locale
en_US.UTF-8, with libpcap version 1.9.0-PRE-GIT (with TPACKET_V3), with GnuTLS
3.6.7, with Gcrypt 1.8.4, with zlib 1.2.11, binary plugins supported (0 loaded).

Built using gcc 8.3.1 20190223 (Red Hat 8.3.1-2).

@thebyrdman-git
Copy link
Author

Screenshot from 2019-09-17 16-43-58

Currently, I'm having trouble just getting the program to not crash on a small pcap file.

@thebyrdman-git
Copy link
Author

Screenshot from 2019-09-17 16-41-31

@pocc
Copy link
Collaborator

pocc commented Sep 17, 2019

It looks like you're using 100% of CPU and termshark is using 2/3 of available CPUs. Is the problem that the program is not responsive and the scrollbar doesn't work because of that? If so, we should change the title.

@pocc pocc added the bug Confirmed to be a bug label Sep 17, 2019
@thebyrdman-git
Copy link
Author

The purpose of this request was to communicate that clicking on the scrollbar does not take you to that part of the pcap file. The issue is hampered by poor performance.

@pocc
Copy link
Collaborator

pocc commented Sep 17, 2019

Yeah I'm seeing the same thing where clicking a region of the scrollbar moves you in that direction but doesn't take you there (i.e. confirmed). Thanks for providing info for this issue.

Termshark should not be so resource intensive (i.e. separate issue), so I would create another issue for that one with the images provided.

@gcla
Copy link
Owner

gcla commented Sep 18, 2019

Hi @thebyrdman-git - yes, the scrollbar is lacking... Currently, clicking in the area between e.g. the down button and the "thumb" will issue a page down, and clicking on the down button will issue a cursor down. To make sure I understand - you'd like clicking in that same region to jump you to a different region of the pcap, right? e.g. clicking 75% of the way down should move you to 75% through the pcap?

@gcla
Copy link
Owner

gcla commented Jan 11, 2020

Hi @thebyrdman-git - I made a small change to the scrollbar. Now you can right click on it to navigate more directly. If you right click 3/4 of the way down the bar, the UI should navigate to roughly 3/4 of the way through the data e.g. the list of packets. Let me know what you think. If you want to build it, you can do this

export GO111MODULE=on
go get github.com/gcla/termshark/v2/cmd/termshark@3b048fd

@gcla gcla self-assigned this Jan 11, 2020
@gcla gcla added please try it and removed bug Confirmed to be a bug labels Jan 11, 2020
@gcla
Copy link
Owner

gcla commented Jan 18, 2020

Hi @thebyrdman-git - I'll mark this as resolved, let me know if you think further work is needed.

@gcla gcla closed this as completed Jan 18, 2020
@thebyrdman-git
Copy link
Author

I can install the @3b048fd release on Fedora 31 and run it but it doesn't appear to have fixed the scrollbar issue. I also removed the released version of termshark before testing this version, but I noticed no change in behavior as it relates to the scrollbar functionality. I ran it in the following manner after running the provided commands:

$ ~/go/bin/termshark /path/to/test.pcap

Also, in case you need it, here is the verbose output for tshark:

$ tshark -v
TShark (Wireshark) 3.2.0 (Git commit e0ed4cfa3d72)

Copyright 1998-2019 Gerald Combs gerald@wireshark.org and contributors.
License GPLv2+: GNU GPL version 2 or later https://www.gnu.org/licenses/gpl-2.0.html
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with libpcap, with POSIX capabilities (Linux), with libnl 3,
with GLib 2.62.3, with zlib 1.2.11, with SMI 0.4.8, with c-ares 1.15.0, with Lua
5.1.5, with GnuTLS 3.6.11 and PKCS #11 support, with Gcrypt 1.8.5, with MIT
Kerberos, with MaxMind DB resolver, with nghttp2 1.39.2, without brotli, without
LZ4, without Zstandard, without Snappy, without libxml2.

Running on Linux 5.3.16-300.fc31.x86_64, with Intel(R) Core(TM) i7-6600U CPU @
2.60GHz (with SSE4.2), with 11837 MB of physical memory, with locale
en_US.UTF-8, with libpcap version 1.9.1 (with TPACKET_V3), with GnuTLS 3.6.11,
with Gcrypt 1.8.5, with zlib 1.2.11, binary plugins supported (0 loaded).

Built using gcc 9.2.1 20190827 (Red Hat 9.2.1-1).

@gcla gcla reopened this Jan 28, 2020
@gcla
Copy link
Owner

gcla commented Jan 28, 2020

Hi @thebyrdman-git - thanks for trying it! I just tried again at my end. Here's a link to a quick video. I did this:

rm ~/go/bin/termshark
cd termshark
git checkout 3b048fd
go install ./...

Then when I run termshark, I can right-click my mouse inside the scrollbar at various positions, and have termshark scroll to (roughly) that point.

https://drive.google.com/open?id=1mErAa9agOJyxSorXE3FoQtHJ_LsaXLbr

This is inside a regular xterm. Any chance your terminal does something funny with mouse clicks?

@thebyrdman-git
Copy link
Author

@gcla - Ok, I'm not not sure what I was doing wrong before, but yes, I was able to get that version running, and this scrollbar feature is functional in various terminal emulators now. Please let me know if you need me to do any more testing.

@gcla
Copy link
Owner

gcla commented Jan 30, 2020

Thanks @thebyrdman-git , I'll close this issue

@gcla gcla closed this as completed Jan 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants