You are not logged in.

#1 2005-06-23 12:31:01

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

no access to display as root

anytime I try to run a program as root from a console i get an error opening display.  Can someone let me know how to rectify it:

[root@myhost ryan]# kate /etc/rc.conf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kded: cannot connect to X server :0
kded: ERROR: KUniqueApplication: Registering failed!
kded: ERROR: Communication problem with kded, it probably crashed.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kdeinit: Can't connect to the X Server.
kdeinit: Might not terminate at end of session.
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

kate: cannot connect to X server :0
kate: ERROR: KUniqueApplication: Registering failed!
kate: ERROR: Communication problem with kate, it probably crashed.
[root@myhost ryan]# kedit /etc/rc.conf
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

Offline

#2 2005-06-23 12:34:33

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: no access to display as root

you're not supposed to run a program as root while in regular user.

Offline

#3 2005-06-23 13:04:53

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,487

Re: no access to display as root

Do you mean console (no x sessions started) ore a terminal while user is logged into kde?


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#4 2005-06-23 13:08:07

rdking
Member
From: Halifax NS
Registered: 2005-04-14
Posts: 114

Re: no access to display as root

via terminal while user is signed into wm.  So I have to exit X, sign in as root to simply modify a file not wrtieable by the user?

Offline

#5 2005-06-23 13:17:56

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: no access to display as root

you cant open a display as root while in a regular user is what I meant. If you need to open up that program do it as regular user.

Offline

#6 2005-06-23 13:41:52

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: no access to display as root

like penguin said, it's recommended, highly to not run X apps as root... there is no good reason for it, ever...

that said, running "xhost +localhost" as a user will cause X to accept root connections....

just *don't do it*  -this is informational only

Offline

#7 2005-06-23 16:34:02

xerxes2
Member
From: Malmoe, Sweden
Registered: 2004-04-23
Posts: 1,249
Website

Re: no access to display as root

why am i never having problems with this?
i'm using lazy-pac(pygtk) as root without problems,

there is also a wikipage explaining what phrakture said,


arch + gentoo + initng + python = enlisy

Offline

#8 2005-06-23 16:39:26

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: no access to display as root

Usually, I use emacs as root without any problems.  I use a setup similar (same?)  to the one described in the wiki. 

Also, some X apps like qtparted needs to be run as root. :?

Offline

#9 2005-06-23 16:46:06

Mith
Member
From: out there
Registered: 2004-10-05
Posts: 163

Re: no access to display as root

phrakture wrote:

like penguin said, it's recommended, highly to not run X apps as root... there is no good reason for it, ever...

what about compiling a kernel or editing a system config file with gvim? I think those are very good reasons to have root access X apps


ArchLinux (x86_64) w/ kdemod

Offline

#10 2005-06-23 19:05:45

Karma XXL
Member
From: Budapest, Hungary
Registered: 2005-06-13
Posts: 91

Re: no access to display as root

Are you using KDM? It's default settings block apps running from root. For a quick work-around, try using a CLI based editor like nano or vim, or switch over to GDM. I did the latter.


Ailen:
Kernel: Linux 2.6.14-rc4-ck1 #1 PREEMPT
Built on: Mon Oct 17 14:51:37 CEST 2005
Hardware: Mobile AMD Sempron(tm) Processor 2800+ AuthenticAMD
WM: E17 snapshot 20051016

Offline

#11 2005-06-24 07:48:58

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: no access to display as root

Mith wrote:
phrakture wrote:

like penguin said, it's recommended, highly to not run X apps as root... there is no good reason for it, ever...

what about compiling a kernel or editing a system config file with gvim? I think those are very good reasons to have root access X apps

use vim from a terminal then... the *terminal* can be started as a user, then you just su over

Offline

Board footer

Powered by FluxBB