LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   X won't start as user, works as root... (https://www.linuxquestions.org/questions/linux-general-1/x-wont-start-as-user-works-as-root-238225/)

gsk 10-03-2004 10:42 AM

X won't start as user, works as root...SOLVED!
 
I am running Debian sarge on a Panasonic toughbook. I have been running this system daily for several months without a problem. I have not recently recompiled my kernel or anything like that. The only thing I have done is update/upgrade the system with apt-get.

Last time I shutdown, everything seemed to be working fine. Next time I boot up, I cannot start X as a user. However, if I su to root and type startx, I get into the X server fine. I have posted my XFree log. What has happened that my user can't get into X, but root does?


/var/log/XFree86.0.log:
Code:

Warning: font renderer for ".pcf" already registered at priority 0
Warning: font renderer for ".pcf.Z" already registered at priority 0
Warning: font renderer for ".pcf.gz" already registered at priority 0
Warning: font renderer for ".snf" already registered at priority 0
Warning: font renderer for ".snf.Z" already registered at priority 0
Warning: font renderer for ".snf.gz" already registered at priority 0
Warning: font renderer for ".bdf" already registered at priority 0
Warning: font renderer for ".bdf.Z" already registered at priority 0
Warning: font renderer for ".bdf.gz" already registered at priority 0
Warning: font renderer for ".pmf" already registered at priority 0
Could not init font path element unix/:7100, removing from list!


gibiman 10-03-2004 01:39 PM

I also had that pb with debian
 
The thing is your /home/$USER/.xinit and /home/$USER/.xserverrc files have been damaged or they have inapropriate access rights.My suggestion is to simply delete them , thus forcing the startx script to load the default ones from /etc/X11/xinit/ .

gsk 10-03-2004 02:58 PM

Re: I also had that pb with debian
 
Quote:

Originally posted by gibiman
The thing is your /home/$USER/.xinit and /home/$USER/.xserverrc files have been damaged or they have inapropriate access rights.My suggestion is to simply delete them , thus forcing the startx script to load the default ones from /etc/X11/xinit/ .
Thanks for your reply...

I checked...and I don't have any files named .xinit and .xserverrc on my system. Not even under the root directory.

gibiman 10-03-2004 05:56 PM

hmmm :-?
 
My guess is that they /etc/X11/xinit do not have the apropriate rights.Try changing their rights . These are my files ...

Code:

-rw-r--r--    1 root    root          xinitrc
-rwxr-xr-x  1 root    root        xserverrc

And second try deleting the user and recreating a new one with the same name and "-m -k /etc/skell".Might be somethin from the .Xauthority file or other Xconfiguration files.
If this fails i'm out of suggestions :D . I'll try to remember if there were other things i tried because i remember i had the same pb and actually solved it !

gsk 10-03-2004 07:09 PM

Re: hmmm :-?
 
Well... no dice.

My permissions are the same as yours.

Deleting the user did not do anything. I even tried creating a new user...but I got an error that there was no .Xauthority file. That is a little disturbing as well.


Quote:

Originally posted by gibiman
My guess is that they /etc/X11/xinit do not have the apropriate rights.Try changing their rights . These are my files ...

Code:

-rw-r--r--    1 root    root          xinitrc
-rwxr-xr-x  1 root    root        xserverrc

And second try deleting the user and recreating a new one with the same name and "-m -k /etc/skell".Might be somethin from the .Xauthority file or other Xconfiguration files.
If this fails i'm out of suggestions :D . I'll try to remember if there were other things i tried because i remember i had the same pb and actually solved it !


quatsch 10-03-2004 09:49 PM

what errors do you see when you do
startx
as a user?

gsk 10-04-2004 10:00 AM

What I originally posted is all that I see when I try startx as a user...other than the typical output from XF86config-4...but there is nothing else unusual.

What makes is strange is that root can get in fine...which means that my X system must be working properly...but something user specific is messed up.

I even tried replacing my .Xauthority file for my user with the one from root...but I get the same errors.

Quote:

Originally posted by quatsch
what errors do you see when you do
startx
as a user?


quatsch 10-04-2004 10:18 AM

maybe it's the fontserver. Do all users have read access to all the font directories?

Also, you probably have something like
fontpath "unix:-7100"
in your X config file. What happens if you replace it with explicit fontpath specifications? Say:
FontPath /usr/X11R6/lib/fonts, /usr/share/fonts, ...
just give a list of all the directories with your fonts.

gsk 10-04-2004 10:40 AM

Quote:

Originally posted by quatsch
maybe it's the fontserver. Do all users have read access to all the font directories?

Also, you probably have something like
fontpath "unix:-7100"
in your X config file. What happens if you replace it with explicit fontpath specifications? Say:
FontPath /usr/X11R6/lib/fonts, /usr/share/fonts, ...
just give a list of all the directories with your fonts.

I guess I should have posted this before...here is my XF86config-4:
Code:

# XF86Config-4 (XFree86 X Window System server configuration file)
#
# This file was generated by dexconf, the Debian X Configuration tool, using
# values from the debconf database.
#
# Edit this file with caution, and see the XF86Config-4 manual page.
# (Type "man XF86Config-4" at the shell prompt.)
#
# This file is automatically updated on xserver-xfree86 package upgrades *only*
# if it has not been modified since the last upgrade of the xserver-xfree86
# package.
#
# If you have edited this file but would like it to be automatically updated
# again, run the following commands as root:
#
#  cp /etc/X11/XF86Config-4 /etc/X11/XF86Config-4.custom
#  md5sum /etc/X11/XF86Config-4 > /var/lib/xfree86/XF86Config-4.md5sum
#  dpkg-reconfigure xserver-xfree86
Section "Files"
        FontPath        "unix/:7100"                    # local font server
        # if the local font server has problems, we can fall back on these
        FontPath        "/usr/lib/X11/fonts/misc"
        FontPath        "/usr/lib/X11/fonts/cyrillic"
        FontPath        "/usr/lib/X11/fonts/100dpi/:unscaled"
        FontPath        "/usr/lib/X11/fonts/75dpi/:unscaled"
        FontPath        "/usr/lib/X11/fonts/Type1"
        FontPath        "/usr/lib/X11/fonts/CID"
        FontPath        "/usr/lib/X11/fonts/Speedo"
        FontPath        "/usr/lib/X11/fonts/100dpi"
        FontPath        "/usr/lib/X11/fonts/75dpi"
EndSection
Section "Module"
        Load    "GLcore"
        Load    "bitmap"
        Load    "dbe"
        Load    "ddc"
        Load    "dri"
        Load    "extmod"
        Load    "freetype"
        Load    "glx"
        Load    "int10"
        Load    "record"
        Load    "speedo"
        Load    "type1"
        Load    "vbe"
EndSection
Section "InputDevice"
        Identifier      "Generic Keyboard"
        Driver          "keyboard"
        Option          "CoreKeyboard"
        Option          "XkbRules"      "xfree86"
        Option          "XkbModel"      "pc104"
        Option          "XkbLayout"    "us"
EndSection
Section "InputDevice"
        Identifier      "Configured Mouse"
        Driver          "mouse"
        Option          "CorePointer"
        Option          "Device"                "/dev/psaux"
        Option          "Protocol"              "PS/2"
        Option          "Emulate3Buttons"      "true"
        Option          "ZAxisMapping"          "4 5"
EndSection

Section "InputDevice"
        Identifier      "Generic Mouse"
        Driver          "mouse"
        Option          "SendCoreEvents"        "true"
        Option          "Device"                "/dev/input/mice"
        Option          "Protocol"              "ImPS/2"
        Option          "Emulate3Buttons"      "true"
        Option          "ZAxisMapping"          "4 5"
EndSection
Section "Device"
        Identifier      "Generic Video Card"
        Driver          "vesa"
EndSection
Section "Monitor"
        Identifier      "Generic Monitor"
        HorizSync      30-57
        VertRefresh    43-72
#      Option          "DPMS"
EndSection
Section "Screen"
        Identifier      "Default Screen"
        Device          "Generic Video Card"
        Monitor        "Generic Monitor"
        DefaultDepth    16
        SubSection "Display"
                Depth          1
                Modes          "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth          4
                Modes          "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth          8
                Modes          "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth          15
                Modes          "1024x768" "800x600" "640x480"
        EndSubSection
        SubSection "Display"
                Depth          16
                Modes          "1024x768"
        EndSubSection
        SubSection "Display"
                Depth          24
                Modes          "1024x768" "800x600" "640x480"
        EndSubSection

EndSection
Section "ServerLayout"
        Identifier      "Default Layout"
        Screen          "Default Screen"
        InputDevice    "Generic Keyboard"
        InputDevice    "Configured Mouse"
        InputDevice    "Generic Mouse"
EndSection
Section "DRI"
        Mode    0666
EndSection

And here are the permissions for my font folders:

Code:

drwxr-xr-x  10 root root  4096 Sep 18 08:45 .
drwxr-xr-x  9 root root  4096 Aug 20 12:00 ..
drwxr-xr-x  2 root root 69632 Aug 20 12:00 100dpi
drwxr-xr-x  2 root root 77824 Aug 21 16:50 75dpi
drwxr-xr-x  2 root root  4096 Aug 20 12:00 Speedo
drwxr-xr-x  2 root root  4096 Aug 20 12:00 Type1
drwxr-xr-x  2 root root  4096 Aug 20 12:00 cyrillic
drwxr-xr-x  3 root root  4096 Aug 20 12:00 encodings
drwxr-xr-x  2 root root 28672 Aug 20 11:59 misc
drwxr-xr-x  2 root root  4096 Aug 20 11:59 util


quatsch 10-04-2004 03:53 PM

hmmm. it looks all right. What happens when you comment out the line FontPath "unix:-7100" and try to start X?

gsk 10-04-2004 04:42 PM

Quote:

Originally posted by quatsch
hmmm. it looks all right. What happens when you comment out the line FontPath "unix:-7100" and try to start X?
No difference....except that last message dissappears.

quatsch 10-04-2004 07:19 PM

hm. When you startx as a user and it fails, there are no error messages on the screen?

How about:
startx /etc/X11/xinit/xinitrc

gsk 10-04-2004 07:28 PM

Quote:

Originally posted by quatsch
hm. When you startx as a user and it fails, there are no error messages on the screen?

How about:
startx /etc/X11/xinit/xinitrc

Yup..no error messages. I get the bit right at startup where it displays what seems to be the last image displayed from the last session (stored in memory still?) then I get the gray screen like it is about to start up...then it pauses for a sec and goes right back to the command line with the messages I put in the first post.

Unfortunately I left my laptop at work this evening, so I will have to try your command tomorrow morning. I had a download running that I didn't want to kill...so I left it at the office. (Although subconsciously I think I needed a break from it. This problem is really driving me CRAZY!)

gsk 10-05-2004 09:46 AM

Quote:

Originally posted by quatsch


How about:
startx /etc/X11/xinit/xinitrc

SAME RESULTS! Damn this sux, Is there a way to completely rebuild a users X related files? Deleting then adding the user did not help.

quatsch 10-05-2004 09:57 AM

the user's x-related files are those hidden files starting with .x and .X. Well not all since there are things like .xine. I have
.xinitrc
.xsession
.Xauthority
.Xdefaults
.Xresources

They can be deleted or backed-up to another place w/o problem since X will replace them with the defaults if not found.

I'm wondering if it's your window/desktop manager that's acting up - if the wm/dm exits, X will exit as well (in general, if the last thing that gets started during X startup exits, X exits with it).

You can start just X with an xterm with
startx /usr/X11R6/bin/xterm
maybe this works?


All times are GMT -5. The time now is 03:54 PM.