Bug 913000

Summary: launching kwrite from terminal gives cannot connect to X server
Product: [openSUSE] openSUSE Distribution Reporter: Forgotten User SpTvqxsYZX <forgotten_SpTvqxsYZX>
Component: BasesystemAssignee: E-mail List <bnc-team-screening>
Status: RESOLVED INVALID QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: bwiedemann, chcao, forgotten_SpTvqxsYZX, nwr10cst-oslnx
Version: 13.2Flags: chcao: needinfo? (forgotten_SpTvqxsYZX)
Target Milestone: ---   
Hardware: Other   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Forgotten User SpTvqxsYZX 2015-01-14 00:23:46 UTC
User-Agent:       Mozilla/5.0 Firefox/31.0
Build Identifier: 

When logging into a terminal as root, then typing in kwrite, it gives the error "kwrite: cannot connect to X server" instead of launching the kwrite program

Reproducible: Always
Comment 1 Neil Rickert 2015-01-14 14:32:03 UTC
It works for me.

It depends on how you got your root terminal.  If you used "sudo", then "$DISPLAY" is not present in the root session so you cannot start X applications.  If you use "su -", then $DISPLAY should be suitably defined.

In KDE, if I open "superuser terminal" from the menu, then "$DISPLAY" is defined.
Comment 2 Bernhard Wiedemann 2015-01-14 15:02:49 UTC
I agree, that this might the intended behaviour.
You can use as a workaround:
export DISPLAY=:0
Comment 3 Forgotten User SpTvqxsYZX 2015-01-15 02:26:41 UTC
I was using sudo. I googled for the answer and tried export display, after trying that I "No protocol specified
kwrite: cannot connect to X server :0"

It does work from su -.  I was never able to find any documentation about that.
Comment 4 Chenzi Cao 2015-01-20 05:14:12 UTC
Hi there, does it work fine now? If this issue has been fixed, would you please kindly help to close the issue? Thank you!
Comment 5 Forgotten User SpTvqxsYZX 2015-01-20 06:06:59 UTC
    a