Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Nov 2014 22:08:41 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Mike Kupfer <m.kupfer@acm.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: xdm questions
Message-ID:  <20141126220841.f0d8024f.freebsd@edvax.de>
In-Reply-To: <17096.1417032078@allegro.localdomain>
References:  <20141126194942.382a3c98.freebsd@edvax.de> <17096.1417032078@allegro.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
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:

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

My ~/.xinitrc:

	#!/bin/sh
	[ -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:
https://www.freebsd.org/doc/handbook/x-xdm.html



> > > 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.


-- 
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?20141126220841.f0d8024f.freebsd>