Linux系统入门学习:Linux 上 Wireshark 界面僵死解决

问题: 当我试图在 Ubuntu 上的 Wireshark 中打开一个 pre-recorded 数据包转储时,它的界面突然死机,在我运行 Wireshark 的终端出现了下面的错误和警告。我该如何解决这个问题?

  1. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">WARNING </span><span class="pun">**:</span><span class="pln"> invalid unclassed pointer </span><span class="kwd">in</span><span class="pln"> cast to </span><span class="str">'GObject'</span>
  2. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">CRITICAL </span><span class="pun">**:</span><span class="pln"> g_object_set_qdata_full</span><span class="pun">:</span><span class="pln"> assertion </span><span class="str">'G_IS_OBJECT (object)'</span><span class="pln"> failed</span>
  3. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">WARNING </span><span class="pun">**:</span><span class="pln"> invalid unclassed pointer </span><span class="kwd">in</span><span class="pln"> cast to </span><span class="str">'GtkRange'</span>
  4. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">Gtk</span><span class="pun">-</span><span class="pln">CRITICAL </span><span class="pun">**:</span><span class="pln"> gtk_range_get_adjustment</span><span class="pun">:</span><span class="pln"> assertion </span><span class="str">'GTK_IS_RANGE (range)'</span><span class="pln"> failed</span>
  5. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">WARNING </span><span class="pun">**:</span><span class="pln"> invalid unclassed pointer </span><span class="kwd">in</span><span class="pln"> cast to </span><span class="str">'GtkOrientable'</span>
  6. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">Gtk</span><span class="pun">-</span><span class="pln">CRITICAL </span><span class="pun">**:</span><span class="pln"> gtk_orientable_get_orientation</span><span class="pun">:</span><span class="pln"> assertion </span><span class="str">'GTK_IS_ORIENTABLE (orientable)'</span><span class="pln"> failed</span>
  7. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">WARNING </span><span class="pun">**:</span><span class="pln"> invalid unclassed pointer </span><span class="kwd">in</span><span class="pln"> cast to </span><span class="str">'GtkScrollbar'</span>
  8. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">WARNING </span><span class="pun">**:</span><span class="pln"> invalid unclassed pointer </span><span class="kwd">in</span><span class="pln"> cast to </span><span class="str">'GtkWidget'</span>
  9. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">WARNING </span><span class="pun">**:</span><span class="pln"> invalid unclassed pointer </span><span class="kwd">in</span><span class="pln"> cast to </span><span class="str">'GObject'</span>
  10. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">GLib</span><span class="pun">-</span><span class="typ">GObject</span><span class="pun">-</span><span class="pln">CRITICAL </span><span class="pun">**:</span><span class="pln"> g_object_get_qdata</span><span class="pun">:</span><span class="pln"> assertion </span><span class="str">'G_IS_OBJECT (object)'</span><span class="pln"> failed</span>
  11. <span class="pun">(</span><span class="pln">wireshark</span><span class="pun">:</span><span class="lit">3480</span><span class="pun">):</span><span class="typ">Gtk</span><span class="pun">-</span><span class="pln">CRITICAL </span><span class="pun">**:</span><span class="pln"> gtk_widget_set_name</span><span class="pun">:</span><span class="pln"> assertion </span><span class="str">'GTK_IS_WIDGET (widget)'</span><span class="pln"> failed</span>

Wireshark 是一个基于 GUI 的数据包捕获和嗅探工具。该工具被网络管理员普遍使用,网络安全工程师或开发人员对于各种任务的数据包级的网络分析是必需的,例如在网络故障,漏洞测试,应用程序调试,或逆向协议工程是必需的。 Wireshark 允许实时记录数据包,并通过便捷的图形用户界面浏览他们的协议首部和有效负荷。

Linux系统入门学习:Linux 上 Wireshark 界面僵死解决

这是 Wireshark 的 UI,尤其是在 Ubuntu 桌面下运行时,当你向上或向下滚动分组列表视图时,或开始加载一个 pre-recorded 包转储文件时,有时会挂起或冻结,并出现以下错误。

Linux系统入门学习:Linux 上 Wireshark 界面僵死解决

显然,这个错误是由 Wireshark 和叠加滚动条之间的一些不兼容造成的,在最新的 Ubuntu 桌面还没有被解决(例如,Ubuntu 15.04 的桌面)。

一种避免 Wireshark 的 UI 卡死的办法就是 暂时禁用叠加滚动条。在 Wireshark 上有两种方法来禁用叠加滚动条,这取决于你在桌面上如何启动 Wireshark 的。

 

命令行解决方法

叠加滚动条可以通过设置"LIBOVERLAY_SCROLLBAR"环境变量为“0”来被禁止。

所以,如果你是在终端使用命令行启动 Wireshark 的,你可以在 Wireshark 中禁用叠加滚动条,如下所示。

打开你的 .bashrc 文件,并定义以下 alias。

  1. <span class="kwd">alias</span><span class="pln"> wireshark</span><span class="pun">=</span><span class="str">"LIBOVERLAY_SCROLLBAR=0 /usr/bin/wireshark"</span>

 

桌面启动解决方法

如果你是使用桌面启动器启动的 Wireshark,你可以编辑它的桌面启动器文件。

  1. <span class="pln">$ </span><span class="kwd">sudo</span><span class="kwd">vi</span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">applications</span><span class="pun">/</span><span class="pln">wireshark</span><span class="pun">.</span><span class="pln">desktop</span>

查找以"Exec"开头的行,并如下更改。

  1. <span class="typ">Exec</span><span class="pun">=</span><span class="kwd">env</span><span class="pln"> LIBOVERLAY_SCROLLBAR</span><span class="pun">=</span><span class="lit">0</span><span class="pln"> wireshark </span><span class="pun">%</span><span class="pln">f</span>

虽然这种解决方法可以在系统级帮助到所有桌面用户,但升级 Wireshark 后被覆盖就没用了。如果你想保留修改的 .desktop 文件,如下所示将它复制到你的主目录。

  1. <span class="pln">$ </span><span class="kwd">cp</span><span class="pun">/</span><span class="pln">usr</span><span class="pun">/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">applications</span><span class="pun">/</span><span class="pln">wireshark</span><span class="pun">.</span><span class="pln">desktop </span><span class="pun">~</span><span class="str">/.local/</span><span class="pln">share</span><span class="pun">/</span><span class="pln">applications</span><span class="pun">/</span>

Wireshark 的详细介绍:请点这里
Wireshark 的下载地址:请点这里

相关推荐