Bug 340544

Summary: launching kate as user root results in kate crashing
Product: [Applications] kate Reporter: Ubu the Tech Guru <ubuntuaddictedubu>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: crash    
Priority: NOR    
Version: Git   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ubu the Tech Guru 2014-11-01 00:45:59 UTC
i like to use kate to edit conf files. i tried to setup kdesu and thought i set it up correctly but when issuing kdesu kate /etc/dhcpd.conf nothing ever happens and then i have a defunct process of kdesu so to get around that i first switch user to root using su, then after i'm root i type in kate in my bash terminal and kate will crash the first time I try it but if i type in kate again it opens without crashing.

Reproducible: Always

Steps to Reproduce:
1.open konsole as normal user
2. switch user to root
3. type in kate and hit the enter key

Actual Results:  
kate crashes and the kde crash handler opens.

Expected Results:  
kate should open with root privileges allowing me to edit any file owned by root

it may be important to note that I installed my arch system from another linux system using chroot and I choose to only install kdebase versus the entire KDE package. root has a ~/.profile file and within it i have                                                                                                                                                                
export DISPLAY=:0.0

here's the output from the konsole terminal as well
QDBusConnection: session D-Bus connection created before QCoreApplication. Application may misbehave.
kate(25209)/kdeui (kdelibs): Session bus not found 
To circumvent this problem try the following command (with Linux and bash) 
export $(dbus-launch) 
KCrash: Application 'kate' crashing...
KCrash: Attempting to start /usr/lib/kde4/libexec/drkonqi from kdeinit
KCrash: Connect sock_file=/root/.kde4/socket-archytahr/kdeinit4__0

[1]+  Stopped                 kate
Comment 1 Christoph Feck 2014-11-01 14:47:41 UTC
> kate(25209)/kdeui (kdelibs): Session bus not found

There is your problem. KDE applications need a D-Bus session.

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