You are not logged in.

#1 2009-02-28 05:25:38

mooreted
Member
Registered: 2009-01-01
Posts: 113

(SOLVED) Wireshark Wont Start

Installed Wireshark. It will start from the user's cli, but from root I get this:

bash-3.2# wireshark
No protocol specified

(wireshark:3962): Gtk-WARNING **: cannot open display: :0.0

From the user cli I can't run any captures because the interfaces can't be put in promiscuous mode as a normal user.

Last edited by mooreted (2009-02-28 05:36:53)

Offline

#2 2009-02-28 05:36:32

mooreted
Member
Registered: 2009-01-01
Posts: 113

Re: (SOLVED) Wireshark Wont Start

Nevermind. Heres how I figured it out though:

bash-3.2# xhost +
No protocol specified
xhost:  unable to open display ":0.0"
bash-3.2# xhost +localhost
No protocol specified
xhost:  unable to open display ":0.0"
bash-3.2# xhost + localhost
No protocol specified
xhost:  unable to open display ":0.0"
bash-3.2# hostname
myhost
bash-3.2# xhost + myhost
No protocol specified
xhost:  unable to open display ":0.0"
bash-3.2# export XAUTHORITY=/home/mooreted/.Xauthority
bash-3.2# wireshark

Offline

#3 2010-04-10 12:22:18

pootzko
Member
From: Nerdvana
Registered: 2008-06-23
Posts: 109
Website

Re: (SOLVED) Wireshark Wont Start

this works, thanks.

I just don't understand what you did (how did you know to export this line) - but oh, well... big_smile


...I put on my robe and a wizard hat...

Offline

#4 2011-10-17 18:02:39

sammyte
Member
Registered: 2010-09-27
Posts: 2

Re: (SOLVED) Wireshark Wont Start

Works amazing. Thank you.

Offline

#5 2011-10-29 18:52:46

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: (SOLVED) Wireshark Wont Start

Terrible idea !

> Installed Wireshark. It will start from the user's cli, but from root I get this:
This is the intended behavior

Launching an app that does not require root privilege with root privileges is a bad idea unless particular reason (that's the purpose of xhost +).

If you want to use wireshark as root, use its CLI binaries :

/usr/bin/capinfos
/usr/bin/dftest
/usr/bin/dumpcap
/usr/bin/editcap
/usr/bin/idl2wrs
/usr/bin/mergecap
/usr/bin/randpkt
/usr/bin/rawshark
/usr/bin/text2pcap
/usr/bin/tshark

But you don't want to run the gtk GUI as root.

Last edited by Wikimig (2011-10-29 18:55:54)

Offline

#6 2011-11-02 14:00:55

maevius
Member
From: Greece
Registered: 2009-09-10
Posts: 135
Website

Re: (SOLVED) Wireshark Wont Start

This error occurs if your user is not in the wireshark group.

# gpasswd -a username wireshark

Log out and log in. then you'll be able to use wireshark as normal user.

It's all in the wiki.

Last edited by maevius (2011-11-02 14:01:55)

Offline

#7 2011-11-02 19:41:28

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: (SOLVED) Wireshark Wont Start

mooreted wrote:

It will start from the user's cli

I understand this as "everything is OK for regular user"

Offline

#8 2011-11-28 01:39:12

JKAbrams
Member
From: Sweden
Registered: 2011-11-07
Posts: 81

Re: (SOLVED) Wireshark Wont Start

maevius wrote:

Log out and log in. then you'll be able to use wireshark as normal user.

Borrowing this thread, I just installed wireshark but I cannot use it. I'm sure it'll work after logging out/in but I don't want to logout right now, which got me thinking about this question:
Why is logging out/in neccecery?
and more to the point:
Is there a way to get changes to groups to stick whitout logging out?

My guess is that the group-rights is handled by the entirely by the kernel, but I should add that I'm using KDE as it's sometimes known to complicate things, making them less KISSy.

Offline

#9 2011-11-28 06:34:41

Wikimig
Developer
From: France
Registered: 2004-12-10
Posts: 77
Website

Re: (SOLVED) Wireshark Wont Start

As you said that's for the kernel to "apply" the group changes. I don't think their would be a mean to avoid the logout/in (at least never heard of one) as this would mean "propagating" rights to some applications which could result in "inconsistent" states.

Offline

Board footer

Powered by FluxBB