SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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.
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.
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.
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.
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&'
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..).
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:
fibber
Happy birthday!!!
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.
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?
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 )
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.