Bug 1403041 - Can't run gui apps with sudo - Cannot open display:
Summary: Can't run gui apps with sudo - Cannot open display:
Keywords:
Status: CLOSED DUPLICATE of bug 1414766
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: 26
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Radovan Sroka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-09 00:27 UTC by Steven Usdansky
Modified: 2017-10-23 11:26 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-10-23 11:26:05 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Steven Usdansky 2016-12-09 00:27:36 UTC
Description of problem: sudo <gui-app> gives the error message
<gui-app>: Cannot open display: 
for values of gui-app equal to everything I've tried in my Rawhide-Mate installation and todays Rawhide mate and LXDE live isos.


Version-Release number of selected component (if applicable):
pam-1.3.0-1.fc25.x86_64


How reproducible:
100%

Steps to Reproduce:
1. Boot to Mate or LXDE desktop
2. Open terminal window
3. sudo leafpad or sudo pluma or sudo any-gui-app

Actual results: (shown for leafpad from LXDE live session)
[liveuser@localhost-live pam.d]$ sudo leafpad
leafpad: Cannot open display: 

Expected results:
leafpad runs as root and opens as expeced

Additional info:
Found the two lines below online. Adding these lines to /etc/pam.d/sudo made the problem vanish. However, I don't know what I'm doing here and have no idea why it works.

# Forward xauth keys between users if invoker is root or UID 1000 or higher
session optional pam_xauth.so systemuser=999

Comment 1 Arnaud Kleinveld 2017-02-12 04:02:35 UTC
Possible duplicate of bug 1273255

Comment 2 Fedora End Of Life 2017-02-28 10:45:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 3 Radovan Sroka 2017-10-23 11:26:05 UTC
Closing as duplicate and it seems like it is working now in latest fedora.

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


Note You need to log in before you can comment on or make changes to this bug.