xdm questions

Polytropon freebsd at edvax.de
Wed Nov 26 21:08:45 UTC 2014

On Wed, 26 Nov 2014 12:01:18 -0800, Mike Kupfer wrote:
> Polytropon wrote:
> > On Wed, 26 Nov 2014 10:30:43 -0800, Mike Kupfer wrote:
> > > 1. I tried running xdm without setting ~/.xsession to run Xfce.  Upon
> > > logging in, I expected to get a simple session with twm and/or an xterm.
> > 
> > No, because twm needs to be installed additionally, as
> > it's not part of the xdm package. Furthermore, ~/.xsession
> > needs to be set accordingly - I'm not sure the system's
> > default xsession file will even call twm.
> But I already had twm and xterm installed, apparently as a result of
> doing "pkg install xorg".

I don't see it as a dependency in the (meta-)port's
Makefile, but maybe one of the contained ports did
install it. At least it's worth recognizing that twm
is an individual package, not a part of X itself.

> After installing xorg and before installing xfce or xdm, I had started X
> using startx(1).  That gave me a simple X session with twm and 3 xterm
> windows.  It is surprising to me that I didn't get a similar default
> session after activating xdm.

This is because startx reads the user's .xinitrc, and
if none is found, the system's default xinitrc is being
used. On the other hand, xdm reads .xsession similarly.

Personally, I use the following "cascading" approach,
so I just have to maintain _one_ file, no matter if I
use startx or xdm. Furthermore it makes sure that your
C shell settings (working for a login shell) will also
be available in terminal sessions.

My ~/.xsession:

	source ~/.cshrc
	exec ~/.xinitrc

My ~/.xinitrc:

	[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc
	# ... lots of other stuff, "autostart", xset ...
	exec wmaker

Note that the #!/bin/sh in that file is not required,
but it doesn't hurt either. :-)

> If the user really needs to create a .xsession file for xdm to be
> usable, it seems like this should be made more explicit in Section 6.7
> of the Handbook.

See table 6.1 here:

> > > Unfortunately, Ctrl+Alt+F1 causes the VirtualBox *host* to switch to a
> > > different virtual terminal.  Is it possible to configure FreeBSD to use
> > > a key combination other than Ctrl+Alt+Fn?
> > 
> > Probably yes, but you can also configure VirtualBox to
> > accept and relay those keys "as is" to the emulated
> > environment.
> Hmm.  I don't see how to do this in the GUI or in the VirtualBox user
> manual (4.1.18).  A web search suggests that I could use the Guest
> Additions (GuestControl) to bind some other key, and have that key
> generate the Ctrl+Alt+Fn sequence.  Is that what you're referring to?

That "key translation" sounds possible - a good way to
avoid interference with the host's X. You just need to
find a key combination that doesn't do anything to the
X session of your Linux host.

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

More information about the freebsd-questions mailing list