Bug 1266792

Summary: Graphical applications as root don't work
Product: [Fedora] Fedora Reporter: František Zatloukal <fzatlouk>
Component: waylandAssignee: Adam Jackson <ajax>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: ajax, fedora, kparal, mike.fleetwood, samuel-rhbugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-26 18:14:29 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:    
Bug Blocks: 1277927, 1266771    

Description František Zatloukal 2015-09-27 23:45:00 UTC
Description of problem:
Graphical applications (both native Wayland and XWayland) don't work if launched as root.

Version-Release number of selected component (if applicable):
wayland-1.9.0-1.fc23

How reproducible:
Always

Steps to Reproduce:
1. Run any graphical app as root (sudo appname) when running on Wayland

Actual results:
Fails with "No protocol specified" and some other app-specific messages.

Expected results:
Graphical apps should work even when launched as root.

Additional info:
I hope I've selected the right package to report against (I am little unsure), if no, let me know and I'll report it to right place.

Comment 1 Christian Stadelmann 2015-09-29 21:08:39 UTC
I don't know whether this is intended, but I think it is a feature. The rule is: "Never start GUI applications as root with sudo". For reasons why see https://help.ubuntu.com/community/RootSudo#Graphical_sudo , https://askubuntu.com/questions/270006/why-user-should-never-use-normal-sudo-to-start-graphical-application

Have you tried policykit? See `man pkexec`.

Comment 2 František Zatloukal 2015-10-04 20:54:12 UTC
Thanks for your reply.

pkexec doesn't work (server init failed in gedit, other non-gnome apps have their specific errors).

Comment 3 Kamil Páral 2015-11-26 18:14:29 UTC
I believe this is the same as bug 1274451.

*** This bug has been marked as a duplicate of bug 1274451 ***