It's probably something simple but..... I can't login to Root anymore in GUI

I know… There are HUNDREDS of posts asking for help with root, but this one is a little different. (I hope) :slight_smile:

About one month ago, I was logged in as root, made some changes to my users and think I may have inadvertently changed root somehow. Ever since then, my machine runs just fine, I can sudo, Yast, etc without any issues. (Root password is fine) but when I try to log in as root, the system changes the screen display, as if it’s going to login, then returns me back to the login prompt without error. If I “ctl+alt+F1”, I drop out to the console and can login as root, but cannot startx because the display is already in use… So, I removed the .X0-lock, but still cannot get the GUI to load. (after running rm /tmp/./X0-lock, I get a fatal error, “can’t establish any listening sockets…” “Ctl+Alt+F7” brings me back to the GUI where I am logged in as myself in Gnome) if I login with my user account, everything runs fine and all is well.

I have read and read, and read… Now, I ask for help.

I am running Suse 11.2. Where do I begin to diagnose this???

First off, I have never logged in as root and I can’t imagine why you even need to.

well, this is the “get help” section… Right?

Admittedly, I am a Linux newbie. Maybe I should just re-install the distribution and go from there.

It’s just, I’d rather figure out what is happening, so I can fix it and not have to waste time reconfiguring my system, adding repositories, updating software, grabbing my addons, etc. again.

I really expected more than cold judgment from this forum.

It is really hard to tell what the problem is. You may have corrupted something in the /root directory. /root is the root users home. Can you log in as root in a terminal? At boot screen press 3 then boot as normal. This will take you to terminal mode. Try logging in as root there.

Try deleting the /root/.gnome directory. This will bring gnome back to default for the root account.

You can reinstall and tell the installer to NOT format the /home partition where your personal data and settings are.

Last DO NOT LOG INTO A GUI AS ROOT! There is nothing you can do in a GUI as root that you can not do as a normal user becoming root. And you have a wonderful chance of randomly messing things up as you have found out.

On 08/29/2010 11:36 AM, swatcop wrote:
>
> well, this is the “get help” section… Right?
>
> Admittedly, I am a Linux newbie. Maybe I should just re-install the
> distribution and go from there.
>
> It’s just, I’d rather figure out what is happening, so I can fix it and
> not have to waste time reconfiguring my system, adding repositories,
> updating software, grabbing my addons, etc. again.
>
> I really expected more than cold judgment from this forum.

First of all, there are many, many posts here that tell users NEVER NEVER NEVER
log into the GUI as root, thus your inability to log into the GUI as root is not
a problem from our point of view, but a feature. You could probably fix it with
an update from the DVD or NET install media without doing a full install.

The usual effect of logging into the GUI as root is to destroy the user’s login,
which is obviously a problem. You were lucky here.

To have access as root in some way not covered by sudo, you should issue the “su
-” command (the minus is important) or switch to an alternate console
(CTRL-ALT-FX, where X is 1-6) and login there. CTRL-ALT-F7 gets you back to the
X window and CTRL-ALT-F10 gets a logging console.

swatcop wrote:

>
>
> I really expected more than cold judgment from this forum.
>
It is one of the big sins to login from the gdm or kdm as root :wink:
A decade ago I did the same due to laziness and happily destroyed my system
(I had not even the excuse at that time to be a complete newbie after 5
years playing with linux, but obviously I still was).
The tendency to try things which are possible (but should not be done) is
always there and therefore I do not judge on what you did.

First thing: Do not use the root login to the gui in the future.
Second thing: You want to find out what is screwed, most likely something
which has to do with some of your configuration files, maybe problems with
the rights on some files changed by the root login.
The first attempt to find the files which are in question is: login as root
from the command line.
Go to the /root folder (the “home directory” of root) and show all files
including the hidden ones (the ones which start with a . dot).
Open a terminal


su -
pwd # should show /root
ls -al

there should not be to much, post it here.


openSUSE 11.2 64 bit | Intel Core2 Quad Q8300@2.50GHz | Gnome 2.28 | GeForce
9600 GT | 4GB Ram
openSUSE 11.3 64 bit | Intel Core2 Duo T9300@2.50GHz | Gnome 2.30 | Quadro
FX 3600M | 4GB Ram

Did you look in ~root/.xsession-errors when you log in from the console? That should give the history of the last root GUI login.

Remember: outside of the kernel, root is Just Another User. If you have login problems, they should be fixed with the same methods as other users; and if something is broken, you may need to file a bug report.

swatcop wrote:
> I really expected more than cold judgment from this forum.

no, it wasn’t a cold judgement…well, i guess it sounded that way,
but i know caf and it wasn’t!

all you need to do is to never ever log into Gnome (or KDE or LXDE or
anyother Linux DE) as root…

and, since that is your ‘problem’ you have no problem EXCEPT figuring
out how to do root required things without ever breaking that rule…

so, instead always log in as yourself and become root by either
using a console and the “su -” command OR by running the kind of
application you need to use to do what you need to do as root…

like, you can run Nautilus as root by:

-hold down Alt and press F2
-in the pop up type/enter


gnomesu nautilus

-give the root pass when asked
-bingo, up pops Nautilus with magic root powers!!

wanna edit a config file as root? just do the same but

gnomesu gedit

etc etc etc

lots about that here: http://en.opensuse.org/SDB:Login_as_root


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

Its forbidden to login into the root gui!

GeoBaltz wrote:
> Did you look in

i just sent you a private message via the forum…


DenverD
CAVEAT: http://is.gd/bpoMD [posted via NNTP w/openSUSE 10.3]

On 2010-08-29 18:36, swatcop wrote:
>
> well, this is the “get help” section… Right?
>
> Admittedly, I am a Linux newbie. Maybe I should just re-install the
> distribution and go from there.

Root should never login as such in a graphical session. Period >:-)

Others have said why, so I will not go there. However… besides checking for errors like GeoBaltz
has said, it is possible to lock root out.

For example, in “/etc/sysconfig/displaymanager”, there is this:

DISPLAYMANAGER_ROOT_LOGIN_REMOTE=“no”

but this is not your case. Another place I know that would have this effect is having set security
to “paranoid” - but then you would have a lot more problems, and you would have complained very
loudly >:-)

/etc/gdm/custom.conf could perhaps be another place.

Difficult to know without knowing what you changed.

You can, for instance, make a list of all the files in your disk, and sort them by date. The one you
changed will be one of the last files - hopefully. Ask if you want to know how.

Another place would be “pam” - I still do not know how to handle pam, after many years, so don’t ask me.

Disclaimer: :-! :wink:


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))

Okay, okay… (LOL) I’ll never login as root in GDK or KDE again! I promise :shame:

I appreciate the helpful advice given in the replies and, after reading the words of wisdom here (and in the PM) I admit, I misunderstood the original reply to my post to be somewhat pointed.

I have been slammed at work for the last few days and don’t have my laptop with me at the moment. I will take a look at all of your suggestions and see what I can come up with to remedy the problem. If I don’t get it fixed within a day or so of fussing with it, I may just consider myself lucky that I didn’t “really” mess things up and continue to utilize root through SU or consoles.

Again, Thank you for your suggestions, I’ll report back if I get it straightened out.

Thanks again for all of the great suggestions! I really liked the wisdom from DenverD, that “gnomesu nautilus” trick is pretty cool… I will remember that always when apps are needed as root.

I took a look in /root, like Gogalthorp said and didn’t see any real glaring errors.
I did however review my “.xsession-errors” file as well as the old one, like Geoblatz advised. Initially it was indicating that there was a session already in progress and advised me to delete “/tmp/.x0-lock”.

I removed /tmp/.x0-lock and it still won’t come up in the GUI. I have posted the errors below, as listed in the files now.

I will not be logging in as root in the graphical environment anymore, definitely! However, I want to try to fix it, just because it’s bugging me and I want to understand what I did or what’s happening.

Here’s a C&P from the files:

.xsession-errors
/etc/X11/xim: Checking whether an input method should be started.
/etc/X11/xim: use GDM_LANG=en_US.UTF-8
sourcing /etc/sysconfig/language to get the value of INPUT_METHOD
INPUT_METHOD is not set or empty (no user selected input method).
Trying to start a default input method for the locale en_US.UTF-8 …
There is no default input method for the current locale.
Dummy input method “none” (do not use any fancy input method by default)

**
.xsession-errors.old**
xauth: creating new authority file /root/.serverauth.7092

_XSERVTransSocketUNIXCreateListener: …SocketCreateListener() failed
_XSERVTransMakeAllCOTSServerListeners: server already running

Fatal server error:
Cannot establish any listening sockets - Make sure an X server isn’t already running

Thanks again for the help!

Look at the file ownership in /root they should all be root. Not from a root logged GUI but as root delete the .iceauthority and Xauthority files

After a few hours and a bit of a headache, I still haven’t gotten it to work. It’s just as well though. I will not login as root to the GUI ever again :wink:

Gogalthorp, I deleted the two authority files as you stated and verified the ownership within the root directory. All appears fine.

I found a great reference to my .xsession-errors problem in a post here: Xsession-errors

I still get:
/etc/X11/xim: Checking wether an input method should be started.
INPUT_METHOD is not set or empty (no user selected input method).
Trying to start a default input method for the locale en_US.UTF-8 …
There is no default input method for the current locale.

so, I followed the advice there but still have the same error.

I think I’ll put this one to bed. If I ever figure it out, I’ll be that much smarter because of it… lol

Until then, the system is stable and useable, and as stated by you super-users, the fact that I cannot login to root in a GUI is really NOT a problem.

I thank you all.

Well the last thing I can think of is to delete the .kde4 or .gnome directories in /root depending on which desktop you use. But really even logging in to the GUI as root just to see if it works is a possible danger though if you stay away from any user home it is some what mitigated. And it would only really be informational to see if that fixes it.

On 2010-09-02 03:36, swatcop wrote:
>
> After a few hours and a bit of a headache, I still haven’t gotten it to
> work. It’s just as well though. I will not login as root to the GUI ever
> again :wink:

You could try “startx” while in runlevel 3.

You can also try a different desktop: gnome, kde, or one of the simple ones.

One reason to use the root gui is wanting to configure the appearance while using root programs. It
becomes difficult to do without full GUI, perhaps knowing the menu entry for several programs but
not the command line name. Just keep it to the minimum, no internet browsing, no manipulating user’s
dirs.


Cheers / Saludos,

Carlos E. R.
(from 11.2 x86_64 “Emerald” GM (Elessar))