FS#42030 - [qt4] unetbootin fails to load properly; an empty grey window appears.
Attached to Project:
Community Packages
Opened by Georgios Tzanakis (geo909) - Friday, 19 September 2014, 22:29 GMT
Last edited by Balló György (City-busz) - Wednesday, 24 January 2018, 06:03 GMT
Opened by Georgios Tzanakis (geo909) - Friday, 19 September 2014, 22:29 GMT
Last edited by Balló György (City-busz) - Wednesday, 24 January 2018, 06:03 GMT
|
Details
Description:
I just installed unetbootin from the community repository. When I try to run it, I get an empty grey window (see screenshot). Additional info: * package version(s) 608-1 * config and/or log files etc. The output is as follows: [code] jorge@flamingo:~$ sudo unetbootin --debug [sudo] password for jorge: X Error: BadAccess (attempt to access private resource denied) 10 Extension: 130 (MIT-SHM) Minor opcode: 1 (X_ShmAttach) Resource id: 0x2200002 X Error: BadShmSeg (invalid shared segment parameter) 128 Extension: 130 (MIT-SHM) Minor opcode: 5 (X_ShmCreatePixmap) Resource id: 0x81 X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x220000b X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x220000b X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x220000b X Error: BadDrawable (invalid Pixmap or Window parameter) 9 Major opcode: 62 (X_CopyArea) Resource id: 0x220000b [/code] Steps to reproduce: Simply try to run unetbootin. This is also being discussed in this forum thread: https://bbs.archlinux.org/viewtopic.php?pid=1458501#p1458501 |
This task depends upon
Closed by Balló György (City-busz)
Wednesday, 24 January 2018, 06:03 GMT
Reason for closing: Won't fix
Wednesday, 24 January 2018, 06:03 GMT
Reason for closing: Won't fix
When trying to reproduce the problem on x86_64, I get no window and no error message. Will look into it.
Previously, unetbootin used deprectated methods for authenticating users, like gksu and gksudo. This was fixed and unetbootin now depends on polkit being properly configured.
FS#38469(Or the full bug history, for interested readers: https://bugs.archlinux.org/index/proj5?do=index&project=5&string=unetbootin&status[0]=closed&order=dateopened&sort=asc&sort2=asc)
By same behaviour, I mean, a window opens asking my username and password. This works normally, but then the same blank window appears.
Not sure if this has anything to do with it, but my applications menu is through pcmanfm. To have those, as per the pcmanfm wiki, I have
`export XDG_MENU_PREFIX="lxde-" in my .xinitrc. Not sure if this is relevant, but just in case.
xfce:
- If I try to run from the menu, nothing happens.
- If I run unetbootin from the terminal, the grey window along with a message comes up (see screenshot; left terminal with two windows underneath)
- If I run unetbootin_polkit, I get an error in the terminal (see right terminal window)
gnome: I run unetbootin from activities, and I get the same grey window.
I installed xfce4 and gnome by `pacman -S xfce4 gnome` and run them from the .xinitrc by puting
`exec startxfce4`, and `exec gnome-session`, respectively, for each try. All these are as written
in the wiki.
gnome.png (379.2 KiB)
I think this is all connected with polkit and how various windowmanagers and desktop environments does or doesn't handle the situation. Previously, I used "guisu" for handling this (same as unetbootin-git in AUR uses), but I received a bug report for that, arguing that problems with polkit were only due to misconfigured systems.
Perhaps the situation has changed, and it's time to reintroduce "guisu"? I wish it was easier to gather predictable results.
My auth.log contains no errors:
Nov 14 13:58:27 wdouglas polkitd[710]: Operator of unix-session:c1 successfully authenticated as unix-user:root to gain ONE-SHOT authorization for action org.archlinux.pkexec.unetbootin for unix-process:15635:140068733 [/bin/bash /usr/bin/unetbootin_polkit] (owned by unix-user:wdouglas)
Nov 14 13:58:27 wdouglas pkexec: pam_unix(polkit-1:session): session opened for user root by (uid=1000)
Nov 14 13:58:27 wdouglas pkexec[15637]: wdouglas: Executing command [USER=root] [TTY=unknown] [CWD=/home/wdouglas] [COMMAND=/usr/bin/unetbootin]
But I see the same X errors when launching the polkit helper.
/usr/lib/polkit-gnome/polkit-gnome-authentication-agent-1 &
unetbootin_polkit
Does it work as expected?
Running unetbootin from the menu (or unetbootin_polkit from the commandline) should work fine as long as a polkit agent is running.
"Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged."
from polkit-gnome when I first run unetbootin and I am asked for authentication..
Window Manager: Fluxbox 1.3.5
Polkit Installed Packages:
extra/polkit 0.112-2 [instalado]
extra/polkit-qt4 0.112-2 [instalado]
When I try to open a Qt4 Based piece of software from a different user on my limited user session (eg. login as limited user, startx and in the graphical session open a console, sustitute user su to root and then run wpa_supplicant (need root access to speak with wpa_supplicant daemon)), or another Qt4 based program I'm getting the same messages of access denied:
<tag>
root@vector-sigma ~ # wpa_gui
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x2200026
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x8f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x220002c
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x194
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0x8f
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2200033
X Error: BadPixmap (invalid Pixmap parameter) 4
Major opcode: 54 (X_FreePixmap)
Resource id: 0x2200033
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 2 (X_ShmDetach)
Resource id: 0x2200033
</tag>
All gtk based software or non QT4 software (even qt3) runs perfectly fine from another user, so i think to reproduce should be something like: Minimalistic window manager as fluxbox, i3 or others, QT4 apps and polkit although really don't know what is generating this issue.
best regards,
xtr.
if I can provide anything else please just ask for it.
Best regards,
xtr.
I meet the same symptoms described above with unetbootin (which requires special rights) and with 'Anki' (learning cards program (1) which does not require any special right).
1 - Starting unetbootin using the various methods above {unetbootin,unetbootin_polkit}, with and without [gk]sudo, user (no window) or root password fails and gives the same output as for others above.
2 - Launching Anki from the user that launched the WM via xinitrc 'exec dbus-launch i3' and Ankiit runs fine. Now and that's what I find interesting:
2' - Login as user 2 from terminal then launching Anki fails with the same output as with unetbootin:
Open an empty grey window with:
***
$ anki
X Error: BadAccess (attempt to access private resource denied) 10
Extension: 130 (MIT-SHM)
Minor opcode: 1 (X_ShmAttach)
Resource id: 0x164
X Error: BadShmSeg (invalid shared segment parameter) 128
Extension: 130 (MIT-SHM)
Minor opcode: 5 (X_ShmCreatePixmap)
Resource id: 0xae
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
X Error: BadDrawable (invalid Pixmap or Window parameter) 9
Major opcode: 62 (X_CopyArea)
Resource id: 0x2600014
***
i3-wm 4.8-3
Anki http://ankisrs.net/
unetbootin 608-1
Arch with kernel Linux 3.18.1-3-ck x86_64
If anki fails in the same way as unetbootin (the gray window issue), perhaps we can conclude that this problem has it roots either in the toolkits used, X or the video driver?
I still haven't seen the gray window issue myself, and I have tried on several different installations.
Co-assigning to the maintainers of qt and X, just to hear if they have any input.
I'll add QT_X11_NO_MITSHM=1 to the unetbootin startup scripts.
Symptoms and error displayed are the same.
Please, let me know if there is anything else I can do.
Thank you.
Update: don't get the error today with unetbootin (have no idea what has changed?!), but i still get this error with tuxboot which is based on unetbootin.
Now that we know it works on Xfce + LightDM (or GDM), but not on Cinnamon or i3, it's a start.
Could the difference be if a polkit agent is running or not? Could lxpolkit be the exception?
More testing is needed, and it's not a given that the root of the problem is with this package.
Today I launched unetbootin on my laptop (which wasn't affected by the problem described above until now) and had the infamous blank window.
In the past weeks I noticed at a certain point, that the blank window was not in what we may call a "freeze" state, actually it was probably working just fine but every GUI element had the same color (text, background, buttons etc). I came to this conclusion when I opened two windows side by side (one with pkexec, the other as a normal user which displays correctly) and, using the latter as a reference, I placed the mouse pointer where I knew there was a GUI element. As a result, the relative tooltips popped out!
So, here is what I did today:
suspecting that the problem could be just related to gtk/qt themes rather than a real problem with the application, I tried to run qtconfig-qt4 preceded by pkexec, the result was "Failed to open display" as you might expect.
After some digging in the forum I came out with a custom polkit policy which I put in /usr/share/polkit-1/actions, (you can see it here: http://pastie.org/10703974). In this way I was able to run pkexec --disable-internal-agent "/usr/bin/qtconfig-qt4", set the GUI Style to "Cleanlooks", save/exit.
With this change I was finally able to run unetbootin_pkexec. :)
I'm using it right now and it's working flawlessly so far.
Felix Yan, Perhaps the /usr/share/polkit-1/actions file could be placed in the qt4 package?
sudo QT_X11_NO_MITSHM=1 unetbootin.elf
sudo QT_GRAPHICSSYSTEM=native unetbootin.elf
su -c 'QT_X11_NO_MITSHM=1 unetbootin.elf'
su -c 'QT_GRAPHICSSYSTEM=native unetbootin.elf'
pkexec, however, doesn't work. It even makes things worse by clearing the environment. I don't know what was in that policy file in the expired pastie, I don't know if that would help.
Main problem here is the wrapper script, imo. It attempts to set QT_X11_NO_MITSHM=1, and if pkexec is installed, it calls it even if running the wrapper script as root. That clears QT_X11_NO_MITSHM. I guess the addition of that variable helped for people who didn't have pkexec installed.
I'm not sure how to make pkexec pass that variable, "pkexec VAR=1 app" tries to execute VAR=1, and "pkexec env VAR=1 app" fails to connect to X at all.
While this issue is something that affects all qt4 apps run as root, unetbootin is a relatively rare case (if not unique) of a qt4 app that requires this, and arch's wrapper script is making the situation worse than just launching unetbootin.elf (which shows a message telling the user to re-run as root with QT_X11_NO_MITSHM=1)
So the attached patch against the wrapper script adds "$(id -u) -ne 0" before trying pkexec. It fixes "sudo unetbootin" and "su -c unetbootin". Trying to run it as an unprivileged user (and trying to use pkexec) remains broken, but it's an improvement to have it working at all imo.
https://aur.archlinux.org/packages/unetbootin
Since no other Qt4 apps using pkexec, I'm closing this task.