LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to change X startup parameters? (https://www.linuxquestions.org/questions/linux-software-2/how-to-change-x-startup-parameters-617860/)

darthfoolish 02-01-2008 01:43 AM

How to change X startup parameters?
 
Hi.

I know that editing /etc/inittab (fc8) changes my default runlevel.

But what file contains the parameters for X?

At the moment I have in /etc/rc.local a line that kills X and another that starts it again the way I want it.

Obviously, this is suboptimal, so I would like to change how X is launched at source.

Can anyone help please?

Lenard 02-01-2008 05:34 AM

The configuration file is /etc/X11/xorg.conf

Since you provide no details what so ever about your video card or anything else further help starts with you. The more information you can provide is helpful, the video card in question is a good start. What you have added to the /etc/rc.d/rc.local file (/etc/rc.local is a symbolic link to this file BTW).

The typed command /sbin/lspci -v will provide your hardware details, please post the revelant portion about you VGA compatible controller

darthfoolish 02-01-2008 11:13 AM

No, that's not what I'm looking for. I've already had a wrestling match with xorg.conf and sort of won.

What I'm looking for is what actually launches X, so you don't need any details of my video card.

If I have my default runlevel at 3, X will not start, I would have to type startx at the command prompt.

If I have it at 5, X starts automatically. But I don't see what it is about /etc/inittab that causes X to launch. So there must be a file somewhere else that has a line in it with 'startx' or 'usr/bin/X' or something like that

What I have at the moment is a kludge to start x with the parameters I want.

When I boot my machine with my kludge commands commented out, and do ps ax|grep Xorg

I see the following

/usr/bin/Xorg -br -s off -dpms -v -nolock -logfile /etc/rhgb/temp/xorg.log -extension XFree86-DRI :9 vt8

and I've no idea where some of these parameters came from, particularly the logfile part. When I first installed the system, the log was at /etc/X11/Xorg.0.log, then I must have done something that caused it to be specified elsewhere.

As said above, I now have a line in rc.local that kills this process, and another with startx. This works for me, but clearly it is not ideal.

If you really want to know, my video card is a Geforce FX 5200

darthfoolish 02-05-2008 01:35 AM

Bump.

I can't believe no-one here knows the answer.

Lepakko 02-05-2008 02:39 AM

Quote:

Originally Posted by darthfoolish (Post 3042603)
If I have my default runlevel at 3, X will not start, I would have to type startx at the command prompt.

If I have it at 5, X starts automatically. But I don't see what it is about /etc/inittab that causes X to launch. So there must be a file somewhere else that has a line in it with 'startx' or 'usr/bin/X' or something like that

It sounds to me you're looking for the directory /etc/rc3.d (or /etc/init.d/rc3.d in some systems). All the init scripts (the scripts that can be started in boot time) are located in /etc/init.d, and the directories /etc/rc?.d have links to these scripts, determining which scripts are started in which order on which runlevel. S in the beginning of the name means the script will be run, K means it won't. The number after the letter determines the order in which the scripts will be run.

You probably want to look at the script named something like /etc/init.d/x11-common or such and see if you find the X parameters there.

darthfoolish 02-05-2008 05:03 AM

Nope, theres nothing in any of those directories that obviously has anything to do with X starting.

These are all services aren't they? Is X usually run as a service?

maroonbaboon 02-05-2008 06:06 AM

Quote:

Originally Posted by darthfoolish (Post 3046595)
Nope, theres nothing in any of those directories that obviously has anything to do with X starting.

I think xdm, kdm or gdm will be what you are looking for. These are the different 'display managers' which give you the graphical login. They are responsible for starting the X server, and typically give you a choice of window managers/users to select from.

darthfoolish 02-05-2008 08:20 AM

There are no instances of gdm, kdm or xdm running (should there be after login?)

I don't see anything in /etc/init.d pertaining to these either.

maroonbaboon 02-05-2008 04:55 PM

If you are killing X in /etc/rc.local that seems to imply that X is running when you log in. So something has to start up to handle the login - usually this is the display manager (DM). This keeps running, so you can log out/in again without restarting X. I only recall x/k/gdm but there are probably others.

The only alternative I've seen is that the user logs in at the console and then starts the X server from the command line or from some login script like .bash_profile.

Exactly how X gets set up depends on the version of linux. e.g. Debian has a link from /usr/bin/x-window-manager to the actual wm that gets started.

What version of linux are you using?

darthfoolish 02-07-2008 05:37 AM

It's fedora core 8

pixellany 02-07-2008 07:24 AM

On my system (PCLOS), it starts with a link in rc5.d which goes to a script in init.d named "dm". This either starts X directly or starts a window manager. "dm" quickly calls /etc/X11/prefdm. Among other things, this checks the variable $DISPLAYMANAGER to see what has been set.

Start in rc5.d and follow the breadcrumbs. (Easier to say than to do.....;))


All times are GMT -5. The time now is 11:28 AM.