Bug 1185893

Summary: KDE root apps fail to render using X w/o root rights
Product: [Fedora] Fedora Reporter: Andrew <travneff>
Component: xorg-x11-serverAssignee: Hans de Goede <hdegoede>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 21CC: awilliam, fedora, hdegoede, mgraesslin, rdieter, robatino, travneff, xgl-maint
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-04-20 14:49:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1236528    
Bug Blocks: 1043130    

Description Andrew 2015-01-26 15:01:13 UTC
Related to RHBZ #1078902

When X server runs without root rights, (some?) KDE apps launched from root don't work. They just don't paint their UI.
Besides that, there are errors in console which might be related.
Screenshot attached here: https://bugzilla.redhat.com/show_bug.cgi?id=1078902#c18

X apps (xclock e.g.) and GTK apps (GIMP) seem fine.

Giving root privileges back to X fixes this.

xorg-x11-server-Xorg-1.16.2.901-1.fc21.x86_64
xorg-x11-xinit-1.3.4-3.fc21.x86_64
kernel 3.17.8-300.fc21.x86_64

Comment 1 Hans de Goede 2015-01-29 09:22:34 UTC
I've send a mail about this to the xorg-devel list to discuss this further, as said already I believe this ultimately is a Qt/KDe bug, but lets see where the discussion goes first.

Comment 2 Martin Gräßlin 2015-01-29 09:51:12 UTC
Please try to run the kde application with
--graphicssystem native

e.g: kcalc --graphicssystem native

The native graphicssystem might bypass the shm extension.

Comment 3 Andrew 2015-01-29 09:55:47 UTC
It works, thanks!

Comment 4 Adam Williamson 2015-04-20 14:26:29 UTC
This is affecting some non-KDE apps that are fairly significant, I think (thanks Andrew):

https://bugzilla.redhat.com/show_bug.cgi?id=1212180 - liveusb-creator
https://bugzilla.redhat.com/show_bug.cgi?id=1196237 - hplip (HP printer utilities)

Comment 5 Adam Williamson 2015-04-20 14:26:58 UTC
*** Bug 1212180 has been marked as a duplicate of this bug. ***

Comment 6 Hans de Goede 2015-04-20 14:49:13 UTC
Hi Adam,

(In reply to awilliam from comment #4)
> This is affecting some non-KDE apps that are fairly significant, I think
> (thanks Andrew):
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=1212180 - liveusb-creator
> https://bugzilla.redhat.com/show_bug.cgi?id=1196237 - hplip (HP printer
> utilities)

I'm afraid that there is nothing which we can do about this from the Xorg side, this is really an apllication side bug, specifically the application / toolkit is not doing proper error checking of the MIT SHM extension related X calls. And more in general people should really not be running gui apps as root (I realize this is sometimes easiest, but at least we should not ship anything setup this way ootb).

Since this really is an application bug I'll add a comment to the bugs in question and re-open them where necessary.

Note I've also discussed this with the some qt people and it is fixed in qt5, and currently there are no plans to fix this for qt4, there answer to this problem is: Do not run gui apps as root.

Regards,

Hans

Comment 7 Adam Williamson 2015-05-06 23:26:48 UTC
As this affects multiple Qt apps - at least, liveusb-creator and hp-plugin - should we figure it's a Qt bug?

Comment 8 Adam Williamson 2015-05-06 23:27:25 UTC
oh, never mind, just saw the end of c6.