码迷,mamicode.com
首页 > 系统相关 > 详细

Mac下安装Wireshark,双击闪退

时间:2015-12-15 14:29:23      阅读:499      评论:0      收藏:0      [点我收藏+]

标签:

Mac下安装Wireshark

/Applications/Wireshark.app/Contents/MacOS/Wireshark

root# export DISPLAY=:0.0

 

系统:OS X 10.9 Mavericks
Wireshark安装包:Wireshark 1.10.2 Intel 64_0.dmg
 
首先安装X11 (即XQuartz);
安装Wireshark.dmg;
 
报错:

The domain/default pair of (kCFPreferencesAnyApplication, AppleAquaColorVariant) does not exist

2013-10-28 23:04:03.650 defaults[4205:507] 

The domain/default pair of (kCFPreferencesAnyApplication, AppleHighlightColor) does not exist

 

(process:4187): Gtk-WARNING **: Locale not supported by C library.

Using the fallback ‘C‘ locale.

 

 

(wireshark-bin:4187): Gtk-WARNING **: cannot open display: 

 
(注意以上最后一个提示)
 
切换到root账户;
执行以下命令:

root# export DISPLAY=:0.0

root# xhost +

root# xhost +localhost

root# xhost + localhost

root# hostname

shuiyouren.local

root# xhost + shuiyouren.local

root# export XAUTHORITY=/Users/[shuiyouren(你的用户主目录)]/.Xauthority 

启动X11程序,然后以root账户运行Wireshark:

root# /Applications/Wireshark.app/Contents/MacOS/Wireshark

 
到此将运行Wireshark,如果失败,退出重新运行。
技术分享

本文相关错误信息:(wireshark-bin:1336): Gtk-WARNING **: cannot open display: :0.0
将以上操作添加到profile文件方便以后运行。
注意点:一定要先运行X11,然后再通过命令行运行Wireshark!
建议:chmod g+rw /dev/bpf* (这样可以以普通用户运行,至于是否需要相关参数的配置自己再琢磨)
网上其它的方法尝试未果,原因不详,主要还是理解不深O(∩_∩)O哈!
 

 

Mac下安装Wireshark,双击闪退

标签:

原文地址:http://www.cnblogs.com/muyushifang07/p/5048060.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!