You are not logged in.

#1 2008-04-28 08:50:32

BluntBox
Member
Registered: 2008-04-28
Posts: 7

Openbox, startx vs xinit.

Hello all.

I'm pretty new to Arch, but so far have everything working great and love it! Simple question though, what is the difference between using startx and xinit *whatever?

Right now I have OpenBox installed and working fine, which I can start via "startx" or "xinit openbox-session". The difference is that "startx" takes about 20 seconds to get to a working desktop, while "xinit openbox-session" takes about 3 seconds.

Is there a reason to use startx instead of xinit? Is the extra time artificial or is it actually doing extra things? (My understanding of startx is that it just looks for .xinitrc which then triggers xinit with the appropriate parameter)

Last edited by BluntBox (2008-04-28 09:04:51)

Offline

#2 2008-04-28 14:50:42

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

Re: Openbox, startx vs xinit.

BluntBox wrote:

(My understanding of startx is that it just looks for .xinitrc which then triggers xinit with the appropriate parameter)

I *think* that's about the gist of it...except that the .xinitrc file usually contains more than just the window manager execution (e.g. exec openbox-session).  For example, a lot of users place all their extra startup utilities into the .xinitrc as well, such as conky, nitrogen, gajim, etc.  Is there any chance that your .xinitrc contains extra lines of info that could be hanging things up a bit?


thayer williams ~ cinderwick.ca

Offline

#3 2008-04-29 00:30:46

BluntBox
Member
Registered: 2008-04-28
Posts: 7

Re: Openbox, startx vs xinit.

My .xinitrc file only has the 1 line, "exec openbox-session". Surely it doesn't take 10-15 seconds for startx to find and open that file. Anyway it doesn't really matter, xinit works fine as far as I can tell so I will continue using it. Just found this rather odd.

Offline

#4 2008-04-29 01:52:46

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: Openbox, startx vs xinit.

I use xinit because it is more versatile, and startx is merely a simplified front-end for xinit anyway. A dev would be more qualified to answer why xinit is so much faster for you, but I would venture to say that the less bash code separation, the better. i.e.: xinit is what startx is calling, so why not use it to begin with.
xinit is more versatile because it can call DE's/WMs without an .xinitrc in ~/ or /etc/X11/xinit/, by merely specifying it, as you are doing with 'xinit /usr/bin/openbox-session'. smile

EDIT: Note that you must specify the path to the WM. Otherwise, xinit ignores the arguments after it, and simply runs the .xinitrc script.

Last edited by Misfit138 (2008-04-29 02:10:22)

Offline

#5 2008-04-29 02:42:18

BluntBox
Member
Registered: 2008-04-28
Posts: 7

Re: Openbox, startx vs xinit.

Misfit138 wrote:

EDIT: Note that you must specify the path to the WM. Otherwise, xinit ignores the arguments after it, and simply runs the .xinitrc script.

Ah yes, that's right. I just removed my .xinitrc to test it and X fails to start. Which makes it doubly confusing, as "startx" and the "xinit openbox-session" commands are doing the exact same thing (looking for .xinitrc for what to do). Except xinit is doing it in much less time.

Oh well, I'll just use the correct xinit line and enjoy the fast load times.

Last edited by BluntBox (2008-04-29 02:43:21)

Offline

#6 2008-04-30 06:36:14

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: Openbox, startx vs xinit.

Curious you should mention this problem, as I have a similar one. I use Gnome with Openbox and if I use startx then it takes about 17 seconds before my desktop and all startup applications load. If I use xinit, it takes about 7 seconds.

I'm really curious, what gives? I just have a startxq script to start X up using xinit, because it's noticeably faster than using startx.

Offline

Board footer

Powered by FluxBB