Error when trying to start wireshark under X11

Kok-Yong Tan ktan at
Sun Jul 15 21:31:59 PDT 2012

On 7/16/12 00:11, Kok-Yong Tan wrote:
> On 7/15/12 23:27, Brandon Allbery wrote:
>> On Sun, Jul 15, 2012 at 10:39 PM, Kok-Yong Tan 
>> <ktan at <mailto:ktan at>> wrote:
>>     Can anyone tell me what this error means when I try to start
>>     wireshark in an xterm window via the X11 system:
>>     bash-3.2$ sudo wireshark
>>     (wireshark:11767): Gtk-WARNING **: cannot open display: :0.0
>> It means something messed with $DISPLAY, which you should not set on 
>> OS X; launchd sets it correctly and overriding it can cause problems 
>> like this.  You're probably setting it in .bash_profile (or .profile, 
>> or being really wrong and setting it in .bashrc).  Don't.
>> -- 
>> brandon s allbery allbery.b at <mailto:allbery.b at>
>> wandering unix systems administrator (available)     (412) 475-9364 
>> vm/sms
> Thanks for the info.  I went into .bashrc and found an explicit 
> setting for the DISPLAY environment variable which I ripped out.  Then 
> I restarted X11 and did "sudo wireshark" whereupon X11 crashed and 
> took wireshark with it.  I then tried doing the same thing under a 
> Terminal window and the same thing happened, except I got an extra 
> line of error (the last line) and Terminal didn't upchuck:
> Last login: Sun Jul 15 23:47:43 on console
> zeus:~ kytan$ echo $DISPLAY
> /tmp/launch-vuNxLR/:0
> zeus:~ kytan$ sudo wireshark
> Password:
> Xlib:  extension "RANDR" missing on display "/tmp/launch-vuNxLR/:0".
> (wireshark:344): Gdk-WARNING **: shmget failed: error 12 (Cannot 
> allocate memory)
> wireshark: Fatal IO error 35 (Resource temporarily unavailable) on X 
> server /tmp/launch-vuNxLR/:0.
> zeus:~ kytan$
> While wireshark was attempting to come up, it displayed a grey but 
> blank window before X11 died and kicked wireshark's legs out from 
> under it...  Any ideas that don't involve having to reinstall the X11 
> server executables?
It appears that when I changed the default compiler, the "sudo port -v 
install wireshark configure.compiler=gcc-4.2" command might not have 
recompiled the ports that wireshark depends on and also compiled a 
different variant than what I wanted, thus contributing to this 
problem.  So, I've uninstalled the unwanted variants, leaving the one I 
want and try the following command in the meantime and let it do its 
"thing" overnight and will report back on what happens if the build 
succeeds and when I try to run the results:

sudo port -v upgrade wireshark configure.compiler=gcc-4.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6240 bytes
Desc: S/MIME Cryptographic Signature
URL: <>

More information about the macports-users mailing list