LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-06-2005, 07:30 PM   #1
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Rep: Reputation: 50
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?
 
Old 04-06-2005, 08:55 PM   #2
datadriven
Member
 
Registered: Jun 2003
Location: Holly Hill, Florida
Distribution: Slackware 10.1
Posts: 317

Rep: Reputation: 30
/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
 
Old 04-06-2005, 11:45 PM   #3
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.
 
Old 04-06-2005, 11:49 PM   #4
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
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.

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.

Last edited by shilo; 04-06-2005 at 11:51 PM.
 
Old 04-07-2005, 09:27 PM   #5
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
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.
 
Old 04-07-2005, 11:58 PM   #6
DaHammer
Member
 
Registered: Oct 2003
Location: Planet Earth
Distribution: Slackware, LFS
Posts: 561

Rep: Reputation: 30
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.
 
Old 04-08-2005, 12:06 AM   #7
piscikeeper
Member
 
Registered: Jul 2003
Location: Pennsylvania USA
Distribution: SuSE
Posts: 430

Rep: Reputation: 30
Quote:
Originally posted by shilo
Well, I just started using it yesterday for the first time, but I am learning incredibly fast.
fibber
 
Old 04-08-2005, 12:37 AM   #8
gbonvehi
Senior Member
 
Registered: Jun 2004
Location: Argentina (SR, LP)
Distribution: Slackware
Posts: 3,145

Rep: Reputation: 53
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..).

Last edited by gbonvehi; 04-08-2005 at 12:41 AM.
 
Old 04-08-2005, 02:28 AM   #9
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
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:
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.
 
Old 04-08-2005, 08:04 AM   #10
datadriven
Member
 
Registered: Jun 2003
Location: Holly Hill, Florida
Distribution: Slackware 10.1
Posts: 317

Rep: Reputation: 30
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?
 
Old 04-08-2005, 09:09 AM   #11
piscikeeper
Member
 
Registered: Jul 2003
Location: Pennsylvania USA
Distribution: SuSE
Posts: 430

Rep: Reputation: 30
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 )
 
Old 04-08-2005, 01:20 PM   #12
shilo
Senior Member
 
Registered: Nov 2002
Location: Stockton, CA
Distribution: Slackware 11 - kernel 2.6.19.1 - Dropline Gnome 2.16.2
Posts: 1,132

Original Poster
Rep: Reputation: 50
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert an info file(bash.info.gz) to a single html file Darwish Linux - Software 2 09-24-2005 06:51 AM
Startup log info puishor Linux - General 3 06-21-2005 02:24 AM
My Redhat Linux 9 machine won't startup but gives a startup error" njugs79 Linux - Newbie 2 03-23-2005 12:50 AM
why does eth01 fail on startup and delay startup? infantpenguin Linux - Newbie 3 01-28-2005 10:45 AM
ALSA Startup error, MPlayer startup error, Sid andymadigan Debian 4 08-03-2004 04:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration