You are not logged in.

#1 2008-10-29 10:58:01

gnyffel
Member
Registered: 2008-10-29
Posts: 2

xinit does not work with .xinitrc

'Lo

I honestly can't say what made this happen, because it worked just fine a while ago. I must've changed something, but I don't know what that could be. When I execute xinit, it shortly looks to be loading X, then crashes. There are no relevant errors as far as I can see. If I remove my .xinitrc file, X starts fine. It makes no difference, to my surprise, whether or not there is any actual content in the .xinitrc.

I have made strace logs for xinit run with an .xinitrc file present, without one, and I've looked at the X logs as well, though I don't see much difference there. The errors reported in the X log seem harmless enough, and have been present when it worked, too. My .xinitrc looks like this, but it makes no difference whether it is empty or commented out - only when absent will xinit start X. For completeness, here's my xorg.conf as well.

In short:
xinit (nor startx) will start X and not crash when there is any .xinitrc file present. This goes for all users (I've tested it with a newly created user).

Does anyone know what's going on? Let me know if you need more information.

Edit:
root can do xinit and successfully start X. It worked one (1) time, just now, with an .xinitrc also, but when I copied over my ordinary user's .xinitrc, and tried once more it crashed. Now it crashes whatever .xinitrc is present. This might mean something, I think.

Last edited by gnyffel (2008-10-29 11:03:14)

Offline

#2 2008-10-29 12:14:04

ghostHack
Member
From: Bristol UK
Registered: 2008-02-29
Posts: 261

Re: xinit does not work with .xinitrc

Your .xinitrc is wrong, you should only have 'exec' before the final item (ratpoison in your case).

The exec command passes control of the process to the specified command and exits, so in your .xinitrc only trayer as being started.

Offline

#3 2008-10-29 14:09:00

gnyffel
Member
Registered: 2008-10-29
Posts: 2

Re: xinit does not work with .xinitrc

Supposing that is true, why do I see ratpoison start before X dies?

And even then, at this point I've given up and reinstalled. xinit works as expected, and while I cannot say that I know they are necessary, I've written 'exec' before each line - and it works.

I'm still curious as to what, exactly, went wrong. You'll notice I've remarked that xinit failed regardless of whether .xinitrc had any content.

Offline

#4 2008-10-29 14:35:01

thayer
Fellow
From: Vancouver, BC
Registered: 2007-05-20
Posts: 1,560
Website

Re: xinit does not work with .xinitrc

http://wiki.archlinux.org/index.php/.xi … w_it_works

Basically, because you've backgrounded everything with an ampersand (&), your xinitrc is closing immediately after execution--which takes down X with it. And what ghostHack said was right, you only want to 'exec' the last line--and even then it's not always necessary.

Last edited by thayer (2008-10-29 14:39:41)


thayer williams ~ cinderwick.ca

Offline

#5 2008-10-29 14:41:34

fflarex
Member
Registered: 2007-09-15
Posts: 466

Re: xinit does not work with .xinitrc

X quits as soon as the .xinitrc script is done. So you need to make sure that the last item in your script will stay open for as long as you need to use X. That's the point of the exec. Also you should probably not background the last item.

EDIT: thayer edited his post to make mine look really redundant... sad

Last edited by fflarex (2008-10-29 16:23:42)

Offline

Board footer

Powered by FluxBB