#816215 wpagui: When run, wpa_gui just shows an empty grey window

Package:
wpagui
Source:
wpa
Description:
graphical user interface for wpa_supplicant
Submitter:
Riley Baird
Date:
2019-11-06 04:12:03 UTC
Severity:
normal
#816215#5
Date:
2016-02-28 20:15:11 UTC
From:
To:
Hi,

When I run wpa_gui (as root), a window appears, which is just filled with grey.
I have included the terminal output and a screenshot of the problem.

X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x320001e
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xc4
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3200024
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3200024
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x3200024
X Error: BadAccess (attempt to access private resource denied) 10
  Extension:    130 (MIT-SHM)
  Minor opcode: 1 (X_ShmAttach)
  Resource id:  0x140
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 5 (X_ShmCreatePixmap)
  Resource id:  0xc4
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
  Major opcode: 62 (X_CopyArea)
  Resource id:  0x320002b
X Error: BadPixmap (invalid Pixmap parameter) 4
  Major opcode: 54 (X_FreePixmap)
  Resource id:  0x320002b
X Error: BadShmSeg (invalid shared segment parameter) 128
  Extension:    130 (MIT-SHM)
  Minor opcode: 2 (X_ShmDetach)
  Resource id:  0x320002b

Sorry if this turns out to be a problem on my end.

Yours thankfully,

Riley Baird

#816215#10
Date:
2016-02-28 22:22:51 UTC
From:
To:
Hi

I can't quite tell from the screenshot, but which desktop environment/
window manager are you using and which helper do you use for elevating
privileges?

Testing wpa_gui, both as root (using kdesu on a KDE5 desktop) and as
normal/ authorized (member of the netdev group and configuring said
group to allow access using the wpa_supplicant.conf) user, is both
working for me on an up to date unstable system. Therefore I'm
reducing this bug's severity from RC to normal.

In general I strongly recommend not running wpa_gui as root, but to
use netdev membership instead; see

	/usr/share/doc/wpasupplicant/examples/wpa-roam.conf

for reference, but it should work both ways.

In case you do choose to run wpagui as root (please don't), make sure
to use the preferred way of your desktop environment to elevate
privileges for running X11 applications and test some other/ simpler
applications as well (e.g. xclock/ xeyes) using the same approach.
[...]

These error messages point slightly into this direction of 'just'
being an issue with your X11 MIT magic cookie.

So assuming you're be running wpa_gui on a KDE desktop, I'd probably
suggest to use (all as normal user, not root!)

	$ /usr/lib/kde4/libexec/kdesu /usr/sbin/wpa_gui

gtk based desktop environments usually use gksu instead

	$ gksu /usr/sbin/wpa_gui

alternatively using sudo should also work

	$ sudo /usr/sbin/wpa_gui

respectively something like xclock for testing.

Regards
	Stefan Lippers-Hollmann

#816215#19
Date:
2016-03-12 21:39:10 UTC
From:
To:
Hi. I'm also affected by this bug. I'm not running any desktop
environment; just a basic window manager (notion) on top of X. The
failure is as described in the original bug report.

It is reasonable to run applications that configure the network as root,
and many people do that. Prior to the recent changes to X, "sudo
wpa_gui" worked just fine, so I imagine that this particular bug is
experienced by many users of wpa_gui. Furthermore, "sudo xeyes" works
just fine as well, so there's something special about the way wpa_gui
talks to the X server.

Are members of the netdev group supposed to be able to talk to the wpa
supplicant? If so, then that package is currently misconfigured.

If it's not possible to get wpa_gui to work with the latest X server,
it'd be nice for the suggested workarounds to be reported along with the
error messages. Or at the very least, a note in /usr/share/doc/wpagui
would be nice.

Thanks!

#816215#24
Date:
2016-03-12 23:56:30 UTC
From:
To:
Hi

And it still does work for me, using just sudo, but I still strongly
recommend not running wpa_gui, or rather any X11 application, as root.
If this can't be avoided, I'd suggest to use potential desktop
environment specific X.org helpers instead of sudo, but sudo is still
an option.

No, this needs to be enabled explicitly - netdev is just the recommended
group for this. As mentioned in my previous response to Riley Baird, this
configuration setting goes into your wpa-roam.conf, respectively
wpa_supplicant-%s.conf or whatever you call it. Please do read the
documentation under /usr/share/doc/wpa_supplicant/, especially the parts
about:

	ctrl_interface=DIR=/run/wpa_supplicant GROUP=netdev
ago (installed from scratch on a netbook with ath5k wlan), system with
just fluxbox, sudo, and wpa_gui installed (total rootfs size ~1.4 GB), as
shown in the attached screenshot from wpa_gui. I really need something
more to go by to debug this on my end, but so far everything I've tried
is working (without any changes).

Tested combinations, all successful:
- starting wpa_gui as user (member of netdev and configured accordingly).
- starting wpa_gui under KDE5 via kdesu
- starting wpa_gui on a pretty minimal fluxbox based system via sudo

Keep in mind that wpa_gui can only access wireless interfaces that are
already managed by wpa_supplicant (e.g. when you can connect to it via
wpa_cli as well).

From what I see in the screenshot of the original reporter, the problem
seems to be more generic in terms of starting a complex X11/ qt program
under another uid, rather than a bug in wpa_gui itself - but as long as
I can't reproduce it myself, I depend on further information.

Regards
	Stefan Lippers-Hollmann

#816215#29
Date:
2016-03-13 02:14:42 UTC
From:
To:
Stefan Lippers-Hollmann <s.l-h@gmx.de> writes:

Hi. Thank you very much for the reply. That's all useful.

Yes. This is certainly a general issue with qt/different uid:

https://bugzilla.redhat.com/show_bug.cgi?id=1185893

I don't understand it enough to theorize why you can't see the failure.
In any case, I don't think it makes sense to make any code changes to
wpa_gui specifically, since it just uses QT to do its work. But since I
suspect "sudo wpa_gui" is something people do despite it being "wrong",
it'd be good to talk about the issue and workarounds in
/usr/share/doc/wpa_gui/...

Thanks

#816215#34
Date:
2016-04-06 22:24:02 UTC
From:
To:
Hi. Instead of trying to figure out why "sudo wpa_gui" works for you and
not me, I just looked to see what it would take to make wpa_gui for for
the non-root user.

You mentioned something about the netdev group, but none of the wpa
control files have this group; I don't know if this is a bug in the
wpasupplicant package. Specifically, I had

    $ ls -ld /run/wpa_*
    -rw-r--r-- 1 root root  6 Apr  6 15:08 /run/wpa_action.wlp3s0.pid
    drwxr-x--- 2 root root 60 Apr  6 15:08 /run/wpa_supplicant
    -rw-r--r-- 1 root root  6 Apr  6 15:08 /run/wpa_supplicant.wlp3s0.pid

    $ ls -l /run/wpa_supplicant/wlp3s0
    srwxrwx--- 1 root root 0 Apr  6 15:08 /run/wpa_supplicant/wlp3s0

Manually giving access to all users makes this work:

    $ sudo chmod 777 /run/wpa_supplicant
    $ sudo chmod 777 /run/wpa_supplicant/wlp3s0

After this I can run wpa_gui as a regular user, and things continue to
work. Is this closer to how wpa_gui is supposed to be used? Is there a
bug in the supplicant packaging?

If this IS closer to the intent, then wpa_gui should be shipped in
/usr/bin, not /usr/sbin.

Thanks

#816215#39
Date:
2017-01-25 07:52:47 UTC
From:
To:
Greeting !
How are you? My name is Mrs Samirah Abd er Rahman, a Citizen of Syria
lived in Aleppo- Syria., I'm one of the former senior inspector for
Syria National Petroleum Company(Kawkab Oil Company). I have Business
investment transaction worth $8.2 Million.  I will like to relocate out
from Syria, Because here in Syria is serious war here. I wait to hear
from you as soon as you see this message
regards,
Mrs Samirah Abd er Rahman

#816215#44
Date:
2019-11-06 04:09:51 UTC
From:
To:
Hello dear, i have been waiting for your response, kindly check your
inbox and get back to me, i really need your responds as soon as
possible, i look forward to hear from you soon. Thanks

Yours Sincerely
Yusuf