You are not logged in.

#1 2009-01-25 03:15:59

sio
Member
Registered: 2009-01-25
Posts: 9

Can't start X as non-root user

Hey,

I'm a complete newbie to Arch, finished my first install last night, to my EEE PC. But I'm having one problem with my shiny new system: I can only start X as root. This is a rather large problem which stops me from using my system for everyday stuff.

This is the error I get:

Could not init font path element /usr/share/fonts/Type1, removing from list!

waiting for X server to shut down .error setting MTRR (base=0xd0000000, size =
 0x10000000, type = 1) Invalid argument (22)

I'm not sure where it's getting the first message from (the Type1 one), because there's only one line in my xorg.conf that contains the string "Type1", and it's commented out:

[sio@trisana ~]$ cat /etc/X11/xorg.conf | grep Type1
#    FontPath    "/usr/share/fonts/Type1"

My xorg.conf, copied from the EEE PC tutorial on the Arch wiki (with a couple of changes):

Section "ServerLayout"
    Identifier     "ArchLinux"
    Screen      0  "Screen0"
    InputDevice    "keyboard"
    InputDevice    "mouse"
    InputDevice    "synaptics"
EndSection

Section "Files"
#    RgbPath      "/usr/share/X11/rgb"
    ModulePath   "/usr/lib/xorg/modules"
    FontPath     "/usr/share/fonts/misc"
    FontPath     "/usr/share/fonts/100dpi:unscaled"
    FontPath     "/usr/share/fonts/75dpi:unscaled"
    FontPath     "/usr/share/fonts/TTF"
#    FontPath     "/usr/share/fonts/Type1"
EndSection

Section "Module"
    Load  "glx"
    Load  "dri"
    Load  "extmod"
    Load  "synaptics"
EndSection

Section "ServerFlags"
    Option        "AllowMouseOpenFail"
    Option        "BlankTime" "5"
    Option        "AIGLX"   "false"
    Option        "AutoAddDevices" "false"
EndSection

Section "InputDevice"
    Identifier  "keyboard"
    Driver      "kbd"
    Option        "CoreKeyboard"
    Option        "XkbRules" "xorg"
    Option      "XkbLayout" "us"
    Option      "XkbVariant" ""
EndSection

Section "InputDevice"
    Identifier  "mouse"
    Driver      "mouse"
    Option        "Device" "/dev/input/mice"
    Option        "Protocol" "IMPS/2"
    Option        "Emulate3Buttons" "yes"
    Option        "ZAxisMapping" "4 5"
    Option        "CorePointer"
EndSection

Section "InputDevice"
    Identifier  "synaptics"
    Driver      "synaptics"
    Option      "Device"           "/dev/psaux"
    Option      "Protocol"         "auto-dev"
    Option      "LeftEdge"         "1000"
    Option      "RightEdge"        "5400"
    Option      "TopEdge"          "1000"
    Option      "BottomEdge"       "4900"
    Option      "PalmDetect"       "0"
    Option      "SHMConfig"        "true"
    Option      "SendCoreEvents"   "yes"    
    Option      "HorizEdgeScroll"  "1"
    Option      "VertEdgeScroll"   "1"  
    Option      "RBCornerButton"   "0"
    Option      "RTCornerButton"   "0"
    Option      "MaxSpeed"         "0.9"

  # You will also need the following 3 lines if you're using Xorg 1.5RC6 or newer
    Option      "TapButton1"       "1"
    Option      "TapButton2"       "2"
    Option      "TapButton3"       "3"
EndSection

Section "Monitor"
    Identifier   "Monitor0"
    VendorName   "ASUS"
    ModelName    "eeePC P701"
    Modeline     "800x480"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync # 60 Hz
EndSection

Section "Device"
    Identifier  "Card0"
    Driver      "intel"
    VendorName  "Intel Corporation"
    BoardName   "Mobile 915GM/GMS/910GML Express Graphics Controller"
    BusID       "PCI:0:2:0"
    Option      "AccelMethod" "EXA"
    Option      "MigrationHeuristic" "greedy"
EndSection

Section "Screen"
    Identifier "Screen0"
    Device     "Card0"
    Monitor    "Monitor0"
    DefaultDepth     24
    SubSection "Display"
        Viewport   0 0
        Depth     8
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     15
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     16
    EndSubSection
    SubSection "Display"
        Viewport   0 0
        Depth     24
    EndSubSection
EndSection

Section "DRI"
    Mode         0666
EndSection

I've Googled for the error messages to no avail.

Any advice would be much appreciated. Thanks in advance.

Offline

#2 2009-01-25 03:45:39

pyther
Member
Registered: 2008-01-21
Posts: 1,395
Website

Re: Can't start X as non-root user

How are you trying to use X as a user? (ie. startx, gdm, kdm, X, etc...)


Website - Blog - arch-home
Arch User since March 2005

Offline

#3 2009-01-25 03:59:10

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

pyther wrote:

How are you trying to use X as a user? (ie. startx, gdm, kdm, X, etc...)

startx.

Offline

#4 2009-01-25 13:21:58

woodykiang
Member
Registered: 2009-01-25
Posts: 13

Re: Can't start X as non-root user

Maybe the problem is your xinitrc...

Can you show your user xinitrc?

Offline

#5 2009-01-25 13:35:16

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

woodykiang wrote:

Maybe the problem is your xinitrc...

Can you show your user xinitrc?

Ah, perhaps this is the problem - I wasn't aware that I needed one. I assumed that if no user xinitrc was specified it would default to the one in /etc/X11/xinit.

Here's that one, anyway:

#!/bin/sh
# $Xorg: xinitrc.cpp,v 1.3 2000/08/17 19:54:30 cpqbld Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap
sysresources=/etc/X11/xinit/.Xresources
sysmodmap=/etc/X11/xinit/.Xmodmap

# merge in defaults and keymaps

if [ -f $sysresources ]; then







    xrdb -merge $sysresources

fi

if [ -f $sysmodmap ]; then
    xmodmap $sysmodmap
fi

if [ -f "$userresources" ]; then







    xrdb -merge "$userresources"

fi

if [ -f "$usermodmap" ]; then
    xmodmap "$usermodmap"
fi

# start some nice programs

openbox-session

#twm &
#xclock -geometry 50x50-1+1 &
#xterm -geometry 80x50+494+51 &
#xterm -geometry 80x20+494-0 &
#exec xterm -geometry 80x66+0+0 -name login

It's essentially just the default with the twm entries commented out and openbox added.

Offline

#6 2009-01-25 13:42:31

woodykiang
Member
Registered: 2009-01-25
Posts: 13

Re: Can't start X as non-root user

Is there any error in your log when you start X?

Offline

#7 2009-01-25 13:58:08

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

woodykiang wrote:

Is there any error in your log when you start X?

According to cat /var/log/Xorg.0.log | grep "(EE)", there are none. A few warnings though:

Open ACPI failed (/var/run/acpid.socket) (No such file or directory)
Bad V_BIOS checksum
Register 0x61200 (PP_STATUS) changed from 0xc0000008 to 0xd0000009
PP_STATUS before: on, ready, sequencing idle
PP_STATUS after: on, ready, sequencing on
Option "XkbVariant" requires a string value

Offline

#8 2009-01-25 14:18:12

u_no_hu
Member
Registered: 2008-06-15
Posts: 453

Re: Can't start X as non-root user

May be an "exec  openbox-session" ... dont know whether it will make any difference


Don't be a HELP VAMPIRE. Please search before you ask.

Subscribe to The Arch Daily News.

Offline

#9 2009-01-25 14:21:24

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

u_no_hu wrote:

May be an "exec  openbox-session" ... dont know whether it will make any difference

Thanks for the suggestion, but same problem.

Offline

#10 2009-01-25 14:33:30

woodykiang
Member
Registered: 2009-01-25
Posts: 13

Re: Can't start X as non-root user

Are you sure the openbox-session executes successfully?
Try this to test the openbox-session:

echo "Before openbox-session." >> ~/foo
date >> ~/foo
openbox-session
echo "The exit code of openbox is $?. " >> ~/foo
date >> ~/foo 
echo "" >> ~/foo

And btw, just an idea, many problem solved by removing the xorg.conf and use hal instead.
Maybe you can try it when you are really no idea... (I know this is a bit stupid...)  =.="

Offline

#11 2009-01-25 14:55:21

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

woodykiang wrote:

Are you sure the openbox-session executes successfully?
Try this to test the openbox-session:

echo "Before openbox-session." >> ~/foo
date >> ~/foo
openbox-session
echo "The exit code of openbox is $?. " >> ~/foo
date >> ~/foo 
echo "" >> ~/foo

And btw, just an idea, many problem solved by removing the xorg.conf and use hal instead.
Maybe you can try it when you are really no idea... (I know this is a bit stupid...)  =.="

Intriguing! No, it doesn't execute successfully (exit code 1). It seems that openbox-session was trying to create a subdirectory of ~/.local, which for some reason my user didn't own. I chowned it - still got an error, something about a missing package (pyxdg), which I installed and now the only error openbox-session (when run directly from the terminal) is not being able to connect to X.

However, startx still gives me exactly the same error message.

I've tried removing xorg.conf entirely, but then I have no mouse or keyboard response.

Offline

#12 2009-01-25 15:17:46

woodykiang
Member
Registered: 2009-01-25
Posts: 13

Re: Can't start X as non-root user

That is the cause of the startx error. X server shutdowns after xinitrc exits.  Now your openbox-session exits immediately with error, so your X server shutdowns immediately after startup.

I know nothing about openbox. Sorry. You should solve the openbox issue.

Offline

#13 2009-01-25 15:20:17

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

woodykiang wrote:

That is the cause of the startx error. X server shutdowns after xinitrc exits.  Now your openbox-session exits immediately with error, so your X server shutdowns immediately after startup.

I know nothing about openbox. Sorry. You should solve the openbox issue.

As I said, I did. openbox-session now exits with code 0.

Offline

#14 2009-01-26 04:24:17

woodykiang
Member
Registered: 2009-01-25
Posts: 13

Re: Can't start X as non-root user

You said that openbox-session now *exits* with code 0?
Is it exits immediately?
The problem is, a window manager should not exit immediately if it really runs correctly.

Offline

#15 2009-01-26 04:40:41

sio
Member
Registered: 2009-01-25
Posts: 9

Re: Can't start X as non-root user

woodykiang wrote:

You said that openbox-session now *exits* with code 0?
Is it exits immediately?
The problem is, a window manager should not exit immediately if it really runs correctly.

Yes, it exits immediately, due to it not being able to connect to an X server, due to it not being running (or at least that's how I understand it) - here's the error:

Openbox-Message: Couldn't set locale from environment.
Openbox-Message: Failed to open the display from the DISPLAY environment variable.

I think that this error would not occur if I actually started it from xinitrc, as the manual says.

To show that the problem is not with Openbox, I ran startx using the default xinitrc (no Openbox, starting twm) as a normal user and I get the same error.

Offline

#16 2009-02-09 22:15:36

Richer
Member
Registered: 2008-02-26
Posts: 19

Re: Can't start X as non-root user

I have exactly the same problem, with an eeepc too. Don't know how to fix it. I try all the stuff in the forum post

Offline

#17 2009-02-16 19:10:27

kugar
Member
Registered: 2008-12-14
Posts: 5

Re: Can't start X as non-root user

I'm just having the same problem with my eeepc 901, did you find a solution ?

Offline

#18 2009-02-18 17:07:25

JesusRifle
Member
Registered: 2008-08-27
Posts: 14

Re: Can't start X as non-root user

Same problem here with an aspire one, fresh install followed the aspire one wiki to the letter. :s

Offline

#19 2009-02-18 17:42:45

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: Can't start X as non-root user

Are your users in the video group?

Offline

#20 2009-02-18 19:48:34

thisperishedmin
Member
Registered: 2008-11-04
Posts: 164

Re: Can't start X as non-root user

Ranguvar wrote:

Are your users in the video group?

this was my first thought after reading the thread title...may be something very simple that was overlooked earlier in the thread...

Offline

#21 2009-04-16 13:33:55

gangrelsurf
Member
Registered: 2009-04-16
Posts: 2

Re: Can't start X as non-root user

I had the exact same problem on my acer aspire one, and got it to work, though it's a hack and a half.

The problem is with the /usr/bin/xinit binary. I arrived at this conclusion by doing the following as a normal user (after doing many, many other things):
# X
(Skipping all the options, just starting X. X starts to a blank screen, then switch back to a tty to start something:)
# export DISPLAY=:0
# xterm
(back to the X session, and I've got an xterm running. Then back to the tty to ctrl-C the X session for the next step)

If, however I start X with startx or xinit as a normal user, I got the exact error discussed above.

Now the hack.
#mv /usr/bin/xinit /usr/bin/xinit.orig
grab an xinit binary from some other running system with a 2.6 kernel. I grabbed the one from ubuntu 8.10. Put it at /usr/bin/xinit

#cd
#echo "exec twm" >> .xinitrc
(assuming you don't already have a wm defined.)
#startx

Works!
(until the next upgrade...)

Offline

#22 2009-04-16 14:56:00

fuscia
Member
Registered: 2008-04-21
Posts: 398

Re: Can't start X as non-root user

don't you have to edit .xinitrc as root, or using sudo? i always have and it just occurred to me i don't know why that is.

Offline

#23 2009-04-16 15:04:51

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: Can't start X as non-root user

I always create a .xinitrc without sudo under /home/$USER. Try creating a new .xinitrc and just put exec openbox-session in it. Nothing else. start with the basic. At least that will help you know whether the problem is with xinitrc or not


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#24 2009-05-26 16:51:48

ebal
Member
From: Athens, Greece
Registered: 2009-05-26
Posts: 224
Website

Re: Can't start X as non-root user

Hi,
I've just installed archlinux.

I had the same problem.
I've read the xorg guide - installed dbus & hal

removed every /etc/X11/xorg.conf* there was
and i did this: rm -f .x* as a non-root user in my home dir (~ebal/.x*)

after that startx worked perfectly for me.

hope thats helpful for someone


https://balaskas.gr
Linux System Engineer - Registered Linux User #420129

Offline

Board footer

Powered by FluxBB