Display problem

Mike Markley mike@markley.org
Wed, 1 Oct 2003 00:13:23 -0700


On Tue, Sep 30, 2003 at 11:53:29PM -0700, Paul Mackinney <paul@mackinney.net> wrote:
> BTW: I particularly dislike gdm because it keeps ressurecting itself
> even if you ctrl-alt-<minus> to kill X. Instead of running xdm or gdm, I
> have a little script in my .bash_profile to check if I'm logging in via
> ssh. If not, it runs startx. The test is [ -z "$SSH_CLIENT" ]. Anyone
> have a positive test to see if I'm logging in from the console instead
> of remotely?

I use:
case "`tty`" in
    /dev/tty[0-9]*)
        ;;
    /dev/vc/[0-9]*)
        ;;
    *)
        # console only stuff here
        ;;
esac

-- 
Mike Markley <mike@markley.org>
GPG: 0x3B047084 7FC7 0DC0 EF31 DF83 7313  FE2B 77A8 F36A 3B04 7084