Cannot open files as Dolphin Superuser

I can’t open files with anything using Dolphin as superuser. For example with Kate:

KDEinit cannot launch /usr/bin/kate

Also, I can’t launch kwrite or kate as root per below:

what am I doing wrong?

john@vostro:~> su
Password:        
vostro:/home/john # kate
kate(3007): Session bus not found 

KCrash: Application 'kate' crashing...
sock_file=/root/.kde4/socket-vostro/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash cannot reach kdeinit, launching directly.      
drkonqi(3008): Session bus not found                  

vostro:/home/john # kwrite
kwrite(3039): Session bus not found 

KCrash: Application 'kwrite' crashing...
sock_file=/root/.kde4/socket-vostro/kdeinit4__0
Warning: connect() failed: : No such file or directory
KCrash cannot reach kdeinit, launching directly.      
drkonqi(3040): Session bus not found                  

vostro:/home/john # exit

Thanks for both questions…it seems they are related.

Create a text file. Name it something like root_window_allow

#!/bin/bash

Allows root to open windows on your display. Example: KWrite and Kate

xhost +local:0

Save it in your /home/yourname/.kde4/Autostart/

RightClick on the file
Click Properties
Click Permissions
Tick the box Is Executable
Click OK

It will autostart on the next login, or you can run it by clicking on it.

Oh yeah.

Don’t do su
Do su -

:wink:

Thanks, I’m doing that now…I remember su - from Fedora…what does adding the dash do?

thanks

Without a - or -l You get a kind of hybrid environment with some from root and some from user. With - or -l you get a login shell. This is more pure root. See info su for more information

ok…that’s kind of what I thought…

Wilson-philips:

that did the trick…i had to save it as a script file and mark it executable…thanks

btw…using one of your wallpapers…the one that looks like saturn getting it’s rings…have you posted that to KDE-look.org?

Glad it worked.

No. I have not put any of them on KDELook. Have not seen any reason to. Besides, I would rather folks went to my site to get them. :slight_smile: