Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Mar 2010 07:38:47 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Programmer In Training <pit@joseph-a-nagy-jr.us>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: xorg, xdm, desktop env
Message-ID:  <20100306073847.54a0daef.freebsd@edvax.de>
In-Reply-To: <4B91F1F0.5020605@joseph-a-nagy-jr.us>
References:  <ed7803cf1003040030sca49614i6c4a87b479f3aa95@mail.gmail.com> <20100305002520.c06d7d20.freebsd@edvax.de> <alpine.BSF.2.00.1003041638030.46217@wonkity.com> <4B9048F9.1060907@joseph-a-nagy-jr.us> <20100305144625.GA43010@orange.esperance-linux.co.uk> <4B91F1F0.5020605@joseph-a-nagy-jr.us>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 06 Mar 2010 00:10:56 -0600, Programmer In Training <pit@joseph-a-nagy-jr.us> wrote:
> On 03/05/10 08:46, Frank Shute wrote:
> <snip>
> > If you read the manpage for xdm(1) you will see that the script that
> > is run on login is ~/.xsession
> > 
> > Try putting "exec wmaker" in there.
> > 
> > To run xdm from boot, you have to edit /etc/ttys and then:
> > 
> > # kill -HUP 1
> > 
> > Look at this:
> > 
> > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/x-xdm.html
> > 
> > 
> > Regards,
> > 
> 
> Thank you kind sir.

A small addition: In order to be able to use X with an initialisation
file even when not using XDM (i. e. starting X by "startx") AND not
having to maintain two startup files (.xsession and .xinitrc) AND
furthermore incorporating shell settings for the shell of choice
(default: the C shell), you can use this approach:

~/.xsession
	#!/bin/csh
	source ~/.cshrc
	exec ~/.xinitrc

It incorporates the shell settings and then continues running
as .xinitrc - so xdm can pick this up.

If you run "startx", .xsession isn't used, but .xinitrc is used.
So this script contains what you want to automate, e. g.

~/.xinitrc
	#!/bin/sh
	[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc
	xrandr --fb 1400x1050
	xrandr --size 1400x1050
	xsetroot -solid rgb:3b/4c/7a
	xset b 100 1000 15 &
	xset r rate 250 30 &
	xset s off &
	xset -dpms &
	exec wmaker

The "#!/bin/sh" at the beginning isn't needed, according to
the documentation.



> Now to figure out how to set the ~/.xsession file up
> automatically upon account creation (not an issue now, but might be later).

You can use /usr/share/skel for the templates, it will be used by
the adduser program. Create "dot.xsession" in this directory
and modify it according to your default settings.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100306073847.54a0daef.freebsd>