Date: Sun, 1 Nov 2015 18:39:54 +0100 From: Polytropon <freebsd@edvax.de> To: "William A. Mahaffey III" <wam@hiwaay.net> Cc: FreeBSD Questions !!!! <freebsd-questions@freebsd.org> Subject: Re: login question Message-ID: <20151101183954.e88ea993.freebsd@edvax.de> In-Reply-To: <56363B44.1010206@hiwaay.net> References: <56363B44.1010206@hiwaay.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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 be possible: [ ! -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. -- 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?20151101183954.e88ea993.freebsd>