You are not logged in.

#1 2010-01-25 12:40:59

foret
Member
Registered: 2010-01-25
Posts: 12

[SOLVED] - Xorg can only be started by root

Hello, everyone.
Had Arch long time ago and now i decided to try it again. Installed Arch without problems, installed also: xf86-video-ati, xf86-input-keyboard+mouse, hal, dbus, xorg.
created new user "foret". this user is in these groups: video, audio, users, dbus, hal, foret
And the problem is: root can start Xorg, foret can't.
if foret do "startx" than xorg end itself (i dont see xterm or anything). if foret do ("X") than i see only blank black screen without mouse. However i can switch back to console Ctrl-Alt-F1.

The question is: WTF and how i can make things work?

PS: googled around 30 mins, found only smth like "delete .Xauthority and everything will be fine". Well... it won't )

Last edited by foret (2010-01-27 12:04:01)

Offline

#2 2010-01-25 12:44:46

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] - Xorg can only be started by root

Offline

#3 2010-01-25 12:49:39

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

well, it is not DE specific. i dont have neither kde nor gnome installed, the only things are: firefox, tint2 and openbox.

Offline

#4 2010-01-25 12:52:14

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] - Xorg can only be started by root

foret wrote:

well, it is not DE specific. i dont have neither kde nor gnome installed, the only things are: firefox, tint2 and openbox.

Hmm. It's got to be a permissions issue. Did you edit the ~/.xinitrc for the root user or the normal user? If so, you either need to edit the ~/.xinitrc of the normal user or edit /etc/X11/xinit/.xinitrc to make it system-wide. If you're root, it is looking at root's ~/.xinitrc, as apposed to if you are a regular user, who has a separate home directory.

Last edited by cesura (2010-01-25 12:56:36)

Offline

#5 2010-01-25 12:58:47

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

made it from normal user. Here is ls -al from foret home dir:
---
[root@archid foret]# ls -al
total 36
drwx------ 4 foret foret 4096 Jan 25 16:26 .
drwxr-xr-x 4 root  root  4096 Jan 25 15:19 ..
-rw------- 1 foret foret  155 Jan 25 16:20 .bash_history
-rw-r--r-- 1 foret foret   16 Oct 30 06:58 .bash_profile
-rw-r--r-- 1 foret foret  108 Oct 30 06:58 .bashrc
drwx------ 2 foret foret 4096 Jan 25 15:25 .links
drwx------ 3 foret foret 4096 Jan 25 15:22 .local
-rw------- 1 foret foret    0 Jan 25 16:26 .Xauthority
-rw-r--r-- 1 foret foret  222 Jan 25 16:16 .xinitrc
-rw-r--r-- 1 foret foret  100 Nov 21 19:01 xsession
---
The .xinitrc file was in 2 configurations: empty or "exec openbox-session &"

Offline

#6 2010-01-25 13:05:03

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

Made an experiment and copied contents of /etc/X!!/xinit/xinitrc to ~/.xinitrc
Everything is the same.

Offline

#7 2010-01-25 13:20:23

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

Made second experiment - renamed ~/.xinitrc and Xorg started!
but: it didn't create new .xinitrc automatically, and if i create it i.e. by cat xinitrcRenamed > .xinitrc, than xorg doesn't want to start.
Here is content of my .xinitrc:
---
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice
exec openbox-session &
exec tint2 &
---

Offline

#8 2010-01-25 14:47:35

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: [SOLVED] - Xorg can only be started by root

I am not sure why openbox session is put in background. try this

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)


ck-launch-session openbox-session

#exec xterm
# exec gnome-session
# exec startkde
# exec startxfce4
# ...or the Window Manager of your choice

start the tint panel from autostart.sh also go thro' beginners' wiki. smile

Edit: As pointone pointed below .xinitrc is to be executable and missed that from OP post. Also copy the .xinitrc from /etc/skel an not from the place you mentioned.

Last edited by kgas (2010-01-25 16:01:49)

Offline

#9 2010-01-25 14:48:16

ZaQ
Member
Registered: 2009-12-12
Posts: 106

Re: [SOLVED] - Xorg can only be started by root

http://wiki.archlinux.org/index.php/Tint2

I think your .xinitrc is wrong.

tint2 &
exec openbox-session &

Offline

#10 2010-01-25 15:36:24

pointone
Wiki Admin
From: Waterloo, ON
Registered: 2008-02-21
Posts: 379

Re: [SOLVED] - Xorg can only be started by root

.xinitrc must be executable, IIRC:

chmod +x ~/.xinitrc

M*cr*s*ft: Who needs quality when you have marketing?

Offline

#11 2010-01-25 17:15:54

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] - Xorg can only be started by root

.xinitrc does not have to be executable to work.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#12 2010-01-25 20:56:39

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

1. i made chmod 777 for xinitrc. Didnt help.
2. it really doesn't need to be executable cuz it is file with written config, not a program or script.
3. 2ZaQ. i've told that i even made xinit empty. Didn't help.
I looked more closely at the messages from xorg, there smth like this: "inappropriate ioctl for device (25)". Googled it, there were really few results and one link was written as a bug-report. Ocasionally, it is rare problem, so... i did not have the whole day to deal with this problem, so i went back to Windows. And yes, i knew that i can find old repos for arch and download old Xorg, but i decided to do it when i'll have more time.

2All: thanks for your help and attention to my problem.
2Admins|moderators|everyone: As you can understand, this problem doesn't concern me anymore, so should i mark topic as [SOLVED]/[UNSOLVED] or smth, or not?

Offline

#13 2010-01-25 21:14:05

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] - Xorg can only be started by root

foret wrote:

1. i made chmod 777 for xinitrc. Didnt help.
2. it really doesn't need to be executable cuz it is file with written config, not a program or script.
3. 2ZaQ. i've told that i even made xinit empty. Didn't help.
I looked more closely at the messages from xorg, there smth like this: "inappropriate ioctl for device (25)". Googled it, there were really few results and one link was written as a bug-report. Ocasionally, it is rare problem, so... i did not have the whole day to deal with this problem, so i went back to Windows. And yes, i knew that i can find old repos for arch and download old Xorg, but i decided to do it when i'll have more time.

2All: thanks for your help and attention to my problem.
2Admins|moderators|everyone: As you can understand, this problem doesn't concern me anymore, so should i mark topic as [SOLVED]/[UNSOLVED] or smth, or not?

Oh no! Please! Anything but Windoze! How bout fedora or ubuntu if you can't use arch?

Offline

#14 2010-01-25 21:32:38

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

Well, me likey winduz!
Seriously, windows is pretty good and convenient system. The most appealing thing in linux for me is its minimalism and speed. Ubuntu & Fedora etc. are not minimalistic distros. Moreover, i knew that if i have windows, i spend time to work/have fun in it, if i have linux - half of my time goes directly to it's customization.
And that's enough about win7 and linux. i promise i will return to linux smile

Offline

#15 2010-01-25 23:06:45

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: [SOLVED] - Xorg can only be started by root

foret wrote:

Well, me likey winduz!
Seriously, windows is pretty good and convenient system. The most appealing thing in linux for me is its minimalism and speed. Ubuntu & Fedora etc. are not minimalistic distros. Moreover, i knew that if i have windows, i spend time to work/have fun in it, if i have linux - half of my time goes directly to it's customization.
And that's enough about win7 and linux. i promise i will return to linux smile

Oh, I just mentioned them because of their ease of use and the fact that I've never had a driver issue with them, but I prefer arch over the two. I don't even want to remember how hard it was to get gentoo installed. wink Arch is slackware with a package manager. I also like the BSD-style init scripts because it makes editing daemons and such a breeze

Last edited by cesura (2010-01-25 23:07:37)

Offline

#16 2010-01-26 01:44:53

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: [SOLVED] - Xorg can only be started by root

Try deleting the user xinitrc to see if twm loads. I had a ioctl error that caught me off guard because apparently there is a default xinitrc that causes Xorg to crash.

Offline

#17 2010-01-26 06:27:06

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

Good morning, egan.
My post #7 can tell you that i've already done it. Twm loads in this case. However i do want to have user-specific xinitrc. And i tried to create it with "touch" or "cat renamedXinitrc > .xinitrc", but if xorg sees it, it doesn't want to start.

Offline

#18 2010-01-26 14:54:34

egan
Member
From: Mountain View, CA
Registered: 2009-08-17
Posts: 273

Re: [SOLVED] - Xorg can only be started by root

Well we know Xorg works then. Try adding the programs to xinitrc one-by-one. Make sure that all the commands it calls actually exist. Also, in my xinitrc (where I use xmonad), I don't background it.

Try the xinitrc with:
exec openbox-session
Without the &. Most likely tint2 should be backgrounded, but see if you can get openbox to load.

Offline

#19 2010-01-26 16:46:02

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

egan, i wrote already that even if xinitrc is empty, xorg fails to start. the problem is not in other programs or xinitrc syntax or smth else connected with xinitrc contents.

Offline

#20 2010-01-26 17:32:20

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [SOLVED] - Xorg can only be started by root

.xinitrc is a script that gets executed by xinit - that's why it has #!/bin/sh (or similar) at the start.

Points to remember when writing/debugging .xinitrc:

1) When .xinitrc finishes, so does the X session - whether or not the started applications in have finished.
2) Any application that is not backgrounded will "block" execution of any subsequent apps, until it has finished.

So an empty .xinitrc will seem to fail as it will end rather quickly. You may also get issues if you've set x to respawn on end (though that's not the case here, it seems).

So for example:

#!/bin/sh

application &
application &

windowmanager

is the (basic) format you're looking for, note no & on last line.

You could try:

xinit /full/path/to/window-manager

at the command prompt to see if that works.

See http://wiki.archlinux.org/index.php/Xinitrc for more information


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#21 2010-01-27 06:22:12

Bysshe
Member
Registered: 2004-12-10
Posts: 271

Re: [SOLVED] - Xorg can only be started by root

This may be from way out in left field, but it's worth a shot.

From my viewpoint, ever since Xorg 7 came out, I have a "problem" with missing dependencies for Xorg in Arch.  Of course, I use the term "problem" loosely, as it may be on purpose, or it may be a rare problem only a few people have.  The answer can be found in an unrelated section of the Xorg wiki:

http://wiki.archlinux.org/index.php/Xor … sing_files

Some of those are not getting pulled in on a fresh install even to this day.  In particular xorg-xinit which I think provides .xinitrc ability to begin with.  I believe that if you had to create your .xinitrc from scratch, you are missing that (xorg-xinit), along with several other of those dependencies.  So, it seems slightly misleading at this point to single it out to upgrading from testing to extra.  It also happens on a fresh install, at least to me.  Every single time.  I just thought it meant maybe alot of users do not use xorg-xinit or some of the other dependencies.  Or maybe that I was crazy.  Or maybe there is something I totally missed out on and would be happy to learn.

Offline

#22 2010-01-27 12:03:33

foret
Member
Registered: 2010-01-25
Posts: 12

Re: [SOLVED] - Xorg can only be started by root

i dont have arch installed right now so i cant check your solution. however it might work, so i mark topic as [solved]

Offline

Board footer

Powered by FluxBB