LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 08-01-2005, 07:45 AM   #1
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Rep: Reputation: 30
.xinitrc vs. .Xdefaults vs .Xsession


Can someone please explain to me differences between the following configuration files:

.xinitrc, .Xdefaults and .Xsession

What about .Xresources?

Thanks.


Last edited by frankie_DJ; 08-01-2005 at 07:52 AM.
 
Old 08-01-2005, 04:28 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
.Xdefaults is the old version of .Xresources
.Xresources is used by xrdb the x preference database utility
Most X clients use the RESOURCE_MANAGER and SCREEN_RESOURCES properties to get user preferences
see man xrdb
xinit (/usr/X11R6/bin/xinit) the program that starts x gets or can get it's argumants/parameters from xinitrc (/usr/X11R6/lib/X11/xinit/xinitrc)
like what programs to start what window managers to run and like that
xinit itself i believe needs a client program as an argument to start x.
when the client dies x dies.
try
emacs `which startx`
emacs /usr/X11R6/lib/X11/xinit/xinitrc
look in /etc/X11/xdm/
emacs /etc/X11/xdm/Xsession
or find where these files are on your machine and read them
to begin to understand

basically versions of files in your $HOME override defaults
by default Xsession is only used if you use a display manager i think (xdm,gdm.kdm)
but these scripts can be written a million ways and i bet in some distros are quite different
 
Old 08-01-2005, 10:01 PM   #3
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
Thanks for a response.

A quick follow up question before I check the files you recommended: My main confusion is with their functionality. My machine doesn't have any of the .X* files by default, but automatically writes .xinitrc when I first use startx for a particular user.

Does it mean that I don't really use or need to use .Xdefaults? Cause it seems that I can set all the preferences in .xinitrc.

Also, are .Xdefaults (.Xresources) and .Xsession also two versions of the same thing or do they do different jobs?

Last edited by frankie_DJ; 08-01-2005 at 10:04 PM.
 
Old 08-02-2005, 02:23 AM   #4
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
well Xsession has something to do with display manager sessions so it's not the same as
.Xresources
(.Xdefaults does nothing anymore it's defunct like a dinocritter)

perhaps an example of what .Xresources can do is in order
make this a file ~/.Xresources
read it in with this command
xrdb ~/.Xresources (this is what the xinit files do at login)
now in a terminal type
xterm
and in another terminal type
xterm -name xterm-big
that's what ~/.Xresources can do and the posibilities are endless
Code:
#ifdef COLOR
*customization: -color
#endif
xterm*background: Black
xterm*geometry: 80x10+160+60
xterm*foreground: Wheat
xterm*cursorColor: Orchid
XTerm*reverseVideo: false
XTerm*rightScrollBar: true
XTerm*reverseWrap: true
xterm*font: *fixed-bold-r-*-15-*-*
XTerm*fullCursor: true
XTerm*scrollTtyOutput: off
XTerm*scrollKey: on
XTerm*VT100.Translations: #override\n\
	<KeyPress>Prior : scroll-back(1,page)\n\
	<KeyPress>Next : scroll-forw(1,page)
XTerm*titleBar: false
XTerm*loginShell:            true
! Use color for underline attribute
XTerm*VT100*colorULMode: on
XTerm*VT100*underLine: off
! Use color for the bold attribute
XTerm*VT100*colorBDMode: on
! Love that scrollback
XTerm*VT100*saveLines: 5000
XTerm*VT100*scrollBar: true
xterm-big*geometry: 90x30+40+10
xterm-big*font:  -*-lucidatypewriter-bold-r-normal-sans-17-*-*-*-*-*-*
xterm-big*background: Blue3
xterm-big*foreground: Black
xterm-big*cursorColor: Orange
 
Old 08-02-2005, 06:39 AM   #5
frankie_DJ
Member
 
Registered: Sep 2004
Location: NorCal
Distribution: slackware 10.1 comfy, Solaris10 learning
Posts: 232

Original Poster
Rep: Reputation: 30
I see. Thanks a lot.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
.xinitrc and .xsession ignored Whitman Debian 2 09-18-2005 01:11 PM
Make KDM run .xinitrc or .xsession asrisk Linux - Newbie 7 08-01-2005 07:20 AM
.Xsession .xinitrc a10392 Linux - Newbie 2 12-10-2004 03:34 PM
.xinitrc/.xsession - Where are they? Fluxbox the_rydster Slackware 3 03-07-2004 02:45 PM
No .Xdefaults, .xsession, .xinitrc madchmst82 Linux - Newbie 3 09-23-2003 08:05 PM


All times are GMT -5. The time now is 02:21 PM.

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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration