Beta 5 not able to login to X as root

Now in B5, you cannot login to X as root. You get a message that root is not allowed to login. Any suggestions on re-enabling root login for X?

Did not see anything in xorg.conf or /usr/share/kde4/config/apps/kdm/kdmrc that block root logins.

I found this the other day on the forum (I didn’t record the member’s name to give him credit, sorry):

Due to increased security concerns, the Xorg server does not accept
connections from users other than whomever started it. This can be
changed.

To enable ‘sudo xxx’ to work:

sudo visudo

and edit the line starting with ‘Defaults env_keep = "LANG…’

add DISPLAY within the quotes

(there is a second occurrence of this line a few lines down, it’s commented
out and can be ignored)

This change causes the DISPLAY variable to be retained, and only needs to be
performed once.

You need to tell (ask?) the X server to accept connections from other users
(root in this case) by running:

xhost +

This disables access controls and allows any user to connect to the
currently running X server. No, not very secure, but if you’re the only
user on a machine, it’s acceptable. I tried with ‘xhost +localhost’ and
variants, no luck.

The ‘xhost +’ command must be executed at least once per session, so once
it’s run, you needn’t do it again unless you log out.

No, it’s not really a ‘simple fix’… but you’re trying to defeat
security… and with that in mind, it’s appropriate that it’s not simple.

A better solution (which I use) is to ‘su - root -c xxx’, which will prompt
you for root’s password, then run whatever command. This doesn’t subvert
security, and allows you to use the power of root to perform tasks.

you could of course alias that command:

alias xsudo=‘su - root -c’

and then

xsudo gedit xxx

You can only edit “visudo” with vi.

“vi” needs some guidance too
when you do “sudo visudo” (assumes you installed the sudo rpm):
“i” for insert
Type “DISPLAY” in the appropriate place
hit “Esc”
type “:x” & return – saves & exits
Probably should logout & back in

Should work:
“xhost +”
“su -” – there’s a space there
“command” – like konqueror for file-manager superuser

Have fun;)

Read this before you even tryto login in X as root:
SDB:Login as root - openSUSE