LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Looking for info on X startup (https://www.linuxquestions.org/questions/slackware-14/looking-for-info-on-x-startup-310536/)

shilo 04-06-2005 07:30 PM

Looking for info on X startup
 
I have been working on a new project building a dedicated MythTV box using Slackware 10.1. I am looking for info on how X starts up in runlevel 4.

I start runlevel 4, with GDM as my login manager. I have it set to automatically log in a user at boot-up.

What I need to know is how X comes to be started. I notice that a ~/.xinitrc file seems to be ignored when booting runlevel 4. If I telinit 3 and startx, it seems that the ~/.xinitrc file is used, but that doesn't really help me, since I need to boot runlevel 4. (unless someone has a guide to logging in a user automatically and starting X in runlevel 3, thereby skipping the whole GDM route).

I am planning on using fluxbox or blackbox to start, but I will later attempt using something more minimal (ie xinit with no WM), so what I am really looking for is a generic guide to the "process flow" of starting X in runlevel 4.

Any links or anybody just know and care to describe it in detail?

datadriven 04-06-2005 08:55 PM

/etc/rc.d/rc.4 is called from /etc/inittab. If you use Slackware you should be famliar with the files in /etc/rc.d

DaHammer 04-06-2005 11:45 PM

Have a look at /etc/X11/gdm/Xsession. If the session is speficied when it runs then it executes /etc/X11/xinit/xinitrc without ever checking for a ~/.xinitrc. You could modify it to do what you want though.

With "startx" it first checks for the ~/.xinitrc file existance and parses it if it's there. It is also just a script, so check out /usr/X11R6/bin/startx to see how it does it.

shilo 04-06-2005 11:49 PM

Quote:

/etc/rc.d/rc.4 is called from /etc/inittab
:) Thanks. I know. /etc/rc.d/rc.4 is a very simple script. It (in order) calls GDM, KDM, XDM or gives a message that you don't have an X dispklay manager. That is not the issue. I have GDM loading and it is set to automatically log in a user at boot time.

Quote:

If you use Slackware
Well, I just started using it yesterday for the first time, but I am learning incredibly fast. :D

Quote:

you should be famliar with the files in /etc/rc.d
Oh, I think I have those down pretty well. My question has nothing to do with the files in /etc/rc.d. They are all well commented and easy to follow along.

Maybe I have not phrased my question clearly, I'll try again.

It seems that starting X via startx and starting X via a display manager result in different sets of init files being used.

I have been working almost exlusively with Dropline Gnome till now, and there appear to be some differences in the way that X is started with a Dropline system vs. a stock Slackware system.

I can find plenty of info on the init files being used when starting X via startx, but I am at a loss for figuring out the exact route to take for adding startup programs to the startup sessions for window managers when calling them from GDM.

I do not want DE or WM specific methods, as I will be experimenting with many different WMs adn would like something that works regardless of which I call.

I can elaborate further if that does not make sense.


***EDIT***

Just saw your post, DaHammer. Thanks. That might be just what I need. I'll check it out and get back tomorrow.

shilo 04-07-2005 09:27 PM

DaHammer-

Thanks for the tip.

Quote:

If the session is speficied when it runs then it executes /etc/X11/xinit/xinitrc without ever checking for a ~/.xinitrc.
I don't know that this is exactly right. Looking at /etc/X11/gdm/Xsession, it seems that gdm passes it an argument with the session name. For instance, if the sesssion name is blackbox, Xsession simply executes blackbox. I simply changed that to /etc/X11/xinit/xinitrc.blackbox, and lo and behold, my cutom changes were FINALLY parsed. Though I am not 100% yet, I have a functional system.

Next step, create a custom /etc/X11/xinit/xinitrc.mythtv. For anyone looking at using MythTV, the default recommended desktop environment is KDE. I want to stay as trim as possible. There is a blurb about running rat poison or blackbox, but it looks to me like you can actually run without a window manager at all. Not good for debugging, but perfect for using as little system resources as possible.

DaHammer 04-07-2005 11:58 PM

Yeah, if it's passed the option then it starts whatever. That's what I meant by specified. Also, /etc/X11/xinit/xinitrc is just a link to one of the other scripts in that folder in a default Slackware installation. So if changing that fixed your problem, then you could have just changed the link instead.

Anyway, glad you got it going.

piscikeeper 04-08-2005 12:06 AM

Quote:

Originally posted by shilo
Well, I just started using it yesterday for the first time, but I am learning incredibly fast. :D
:tisk: fibber :tisk:

gbonvehi 04-08-2005 12:37 AM

Re: Looking for info on X startup
 
Quote:

Originally posted by shilo
(unless someone has a guide to logging in a user automatically and starting X in runlevel 3, thereby skipping the whole GDM route).
Well, I cheated sometime using rc.local to start a X server with my user with a command like:
Code:

su - gbonvehi -c 'source /etc/profile; source /home/gbonvehi/.bash_profile; startx&'
I know it's not the way to do it, but it works :)

You may also take a look at this thread that has some info about XDM configuration: http://www.linuxquestions.org/questi...hreadid=308765

As far as I understood (not used graphical login managers too much), they look for a ~/.xsession or ~/.Xsession file (the xsession files i've seen execute .xinitrc as their "latest choice") instead of the .xinitrc (actually XDM was the one that I used that readed this latest file..).

shilo 04-08-2005 02:28 AM

Quote:

So if changing that fixed your problem, then you could have just changed the link instead.
No, that was what was bugging me. I had already changed the link, but the session selection is passed to Xsession. In the case of just about everything but xfce, this causes the xinitrc.* (or the symlink) to be skipped. That was the breakthrough.

Quote:

:tisk: fibber :tisk:
Happy birthday!!! :D

Quote:

Well, I cheated sometime using rc.local to start a X server with my user with a command
That was my backup plan!!! I'll check that out, along with the link you provided. Thanks. I don't know how much useful info I will find, as my understanding is that xdm does not allow auto-login. I may convert to the rc.local solution, though, as that saves me the overhead of the display manager. I had already had the idea to use su, but I am glad to see that some one else has tried it and it works.

datadriven 04-08-2005 08:04 AM

I'm a little confused. Doesn't everybody just change the default runlevel in /etc/inittab from 3 to 4? Why would you go through all this extra work to get X to start?

piscikeeper 04-08-2005 09:09 AM

Quote:

Originally posted by datadriven
I'm a little confused. Doesn't everybody just change the default runlevel in /etc/inittab from 3 to 4? Why would you go through all this extra work to get X to start?
true for the most part.but i believe the plan is to build something like KnoppMyth that is slack based.(might be wrong,probably am,but i'm used to it :rolleyes: )

shilo 04-08-2005 01:20 PM

Quote:

I'm a little confused. Doesn't everybody just change the default runlevel in /etc/inittab from 3 to 4?
You are completely missing the point. I AM booting runlevel 4. All that booting runlevel 4 does is start a Display Manager!!! The question is really about what the Display Manager does. The answer is (for GDM), it runs /etc/X11/gdm/Xsession, and it also passes an argument to it. Based on that argumant, different stuff happens.

Running GDM allows auto-login.

Running runlevel 3 with something like gbonvehi suggested also does an auto-login. This may be a better solution, because really, who needs an x display manager?

Quote:

Why would you go through all this extra work to get X to start?
piscikeeper is pretty close to right on. Except for now I am aiming my sites a little lower and just trying to get my HTPC working exactly like I want with Slackware.


All times are GMT -5. The time now is 06:23 AM.