Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Environment test

From: Bill Tangren <bjt(at)usno.navy.mil>
Date: Thu Oct 11 2007 - 13:52:03 EDT


Michael Scully wrote:
> Greetings:
>
> I have users who connect via ssh to run a particular application.
> For those, I have their .bash_profile set to run this application and exit
> when they close it. But I often need those same users to login at the
> console or via an X-Windows session for other things. If they try to log in
> via the console or X-client, it will fail because it tries to run this
> application instead.
>
> What environment variable or tty test would work easiest to make
> this "autorun" conditional? If they are using X and create a terminal
> session somewhere on the desktop, I DO NOT want that one to launch the
> application either. Thanks in advance.
>
> Scully
>
>
>
>

I did this hack to (to /etc/profile) have a user session time out if they ssh but not if they log in at the console:

if (grep ^"sshd: " /proc/$PPID/cmdline >/dev/null 2>&1); then

    export TMOUT=900
fi

You might try something like that.

-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Received on Thu Oct 11 13:52:23 2007

This archive was generated by hypermail 2.1.8 : Fri May 30 2008 - 14:21:07 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library