freebsd at edvax.de
Sun Nov 1 17:45:13 UTC 2015
On Sun, 1 Nov 2015 10:23:42 -0553.75, William A. Mahaffey III wrote:
> I am configuring my new 'dev-box'. I have XFCE installed, haven't logged
> in to it yet, I am using SSH across the LAN to access it for now. I
> copied my .login file from this box over there, & whenever I login over
> SSH, I get a bunch of garble about aborted X11 startup, then I am logged
> in. I attach my .login file. Is there a way to discern the type of
> login, i.e. 1st-hand on that box vs. across-the-LAN, so I can decide
> whether or not to boot up XFCE ? TIA & have a nice weekend.
The key to understanding here is that ~/.login will be executed
for _every_ login shell (specific: C shell).
You already have a test against a running instance of X by
checking its lock file; testing $DISPLAY would probably also
[ ! -f /tmp/.X0-lock ] && startx
You might add another test that verifies that the current shell
is executed on a _local_ terminal, /dev/ttyv[0-7]. You can use
the output of the "tty" command to check this: from inside X
or via remote connection, /dev/pts/<something> will be shown.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions