Jump to content

How can I set default options for X?


coverup
 Share

Recommended Posts

You can do some stuff in /etc/X11/XF86Config-4

check my system specs/sig link below, I have my xf86xonfig file on that page, I use it to make sure that my system always sets things to 100dpi.

 

Basically, you need to set the screensize, and check the log file /var/log/XF86.0.log (or so, just check that dir, you'll see) what dpi setting it chooses. A bit of trying should get you there.

 

 

Edit:

You need to put the right line for your system in there:

DisplaySize 403 302

is the one I use; it's in the

Section "Monitor"

part.

Edited by aRTee
Link to comment
Share on other sites

Thanks, aRTee.

 

Yep, DisplaySize should change dpi settings, I have used this trick before. I am wondering if there is a standard way of passing startx options into init 5 login. I assume that startx runs some scripts, so this should be a matter of editing a config file somewhere...

Link to comment
Share on other sites

startx normally does run some stuff, .xinitrc (in your homedir and in /etc/X11/ there should also be something) is a script that comes to mind...

 

I think startx does more or less the following:

X :1 &

export DISPLAY=:1

startkde

(or gnome-session)

 

Note that the dpi setting is in X, so the only way to do it is to pass the right options to X; in XF86Config-4 is the easiest, but try

man X

or

X --help

for more options.

Note that that way you can start X with a different XF86Config file:

X --xfconfig [alternate config file] :1 &

should do..

Link to comment
Share on other sites

Thanks for clarifying that, aRTee.

 

All those modifications are easy to use if X is started from the console. As for the graphical logon, I tried to add -- -dpi 120 to the last line of xinitrc (copied it from /etc/X11/xinit/ and saved as .xinitrc in my home dir):

# $Id: xinitrc-xinitrc,v 1.2 2002/09/10 05:53:43 flepied Exp $

# Set a background here because it's not done anymore
# in Xsesion for non root users
if [ "`whoami`" != root ]; then
   xsetroot -solid "#21449C"
fi

exec /etc/X11/Xsession -- -dpi 120 $*

For some reason, that did not have any effect... On the hand, there is the following line in startx:

 defaultclientargs=""

Apparently, one could add options between quotes, which will make them system wide. But I would like to make startx options user specific.

 

Cheers.




			
				


	Edited  by coverup
	
	

			
		
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...