LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (http://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   Why can't I start a X application from Konsole root logged ? (http://www.linuxquestions.org/questions/linux-desktop-74/why-cant-i-start-a-x-application-from-konsole-root-logged-899255/)

MaikoID 08-24-2011 04:36 PM

Why can't I start a X application from Konsole root logged ?
 
Hi, I'm using Kubuntu 11.04. In all Ubuntu's versions I always did the login with root in a terminal using the command:

Code:

sudo su -
then I put my password, after this I could do everything until I close the terminal. In Kubuntu 11.04 I can't do that.
Code:

maiko@maiko-laptop:~$ sudo su -
[sudo] password for maiko:
root@maiko-laptop:~# kate
No protocol specified
kate: cannot connect to X server :0
root@maiko-laptop:~# kpackagekit
unnamed app(2644): KUniqueApplication: Cannot find the D-Bus session server:  "//bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
"

unnamed app(2643): KUniqueApplication: Pipe closed unexpectedly.

root@maiko-laptop:~#

Could anyone explain to me why can't I start a X application from root's terminal in Kubuntu?

andrewthomas 08-24-2011 05:23 PM

Use kdesu

Quote:

sudo frontend for KDE
KdeSudo is a graphical frontend for the sudo utility, which allows users to run programs as root (or another user) by giving their own password.
http://packages.ubuntu.com/natty/kdesudo

MaikoID 08-24-2011 05:28 PM

Same error:

Code:

root@maiko-laptop:~# kdesudo kate
No protocol specified
kdesudo: cannot connect to X server :0
root@maiko-laptop:~#


andrewthomas 08-24-2011 05:31 PM

Try running

Code:

kdesudo kate
as a user that has sudo privileges not as root.

MaikoID 08-24-2011 05:35 PM

I don't want to start my applications as a normal user, I want to do that with root privilegies without exit from my current terminal session or write the password again. I always did that in ubuntu why is it different in Kubuntu ?

andrewthomas 08-24-2011 06:35 PM

Quote:

Originally Posted by MaikoID (Post 4452546)
I don't want to start my applications as a normal user, I want to do that with root privilegies without exit from my current terminal session or write the password again. I always did that in ubuntu why is it different in Kubuntu ?

You will be running the application with root privileges, using sudo to elevate your user.

Code:

kdesudo kate
then enter your user password to run kate as root.

MaikoID 08-24-2011 08:02 PM

Quote:

Originally Posted by andrewthomas (Post 4452560)
You will be running the application with root privileges, using sudo to elevate your user.

Code:

kdesudo kate
then enter your user password to run kate as root.

you aren't understand me. I don't want to leave my current opened root shell session, I would like to have a behavior similar to Ubuntu.

I don't want to type root's password again.

MTK358 08-26-2011 08:44 AM

You run "kdesudo" as a normal user, not as root.

And by the way, isn't it "kdesu", not "kdesudo"?

andrewthomas 08-26-2011 11:50 AM

Quote:

Originally Posted by MTK358 (Post 4454072)
You run "kdesudo" as a normal user, not as root.

And by the way, isn't it "kdesu", not "kdesudo"?

That is what I thought, but I guess not.
http://packages.ubuntu.com/natty/amd64/kdesudo/filelist
Code:

/usr/bin/kdesudo
/usr/share/doc/kdesudo/changelog.Debian.gz
/usr/share/doc/kdesudo/copyright
/usr/share/man/man1/kdesudo.1.gz



All times are GMT -5. The time now is 09:38 AM.