Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
* [Q] X remote display detection on login
@ 1998-10-20  4:00 John Stephen Haro
  1998-10-21  4:00 ` David Stanaway
  1998-10-21  4:00 ` Alan J. Wylie
  0 siblings, 2 replies; 3+ messages in thread
From: John Stephen Haro @ 1998-10-20  4:00 UTC (permalink / raw)


Anyone have a chuck of a .login script for DUX4.0D they can zing me that
will set the DISPLAY variable automatically on remote login?

-- 
Thanks,
pls. email back or call me, I don't read news that often.
John S. Haro
Boeing Defense and Space Group, Seattle, WA
john.s.haro@boeing.com



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Q] X remote display detection on login
  1998-10-20  4:00 [Q] X remote display detection on login John Stephen Haro
  1998-10-21  4:00 ` David Stanaway
@ 1998-10-21  4:00 ` Alan J. Wylie
  1 sibling, 0 replies; 3+ messages in thread
From: Alan J. Wylie @ 1998-10-21  4:00 UTC (permalink / raw)
  To: john.s.haro

John Stephen Haro wrote:
> 
> Anyone have a chuck of a .login script for DUX4.0D they can zing me that
> will set the DISPLAY variable automatically on remote login?
> 

The following (korn/bash) script works for me,
across all the common platforms.

Are you really still using csh? - Translation
left as an exercise for the reader.

The who in /usr/local/bin would be the gnu one.
As it is one of those code fragments that, like topsy, just grow,
It could probably be greatly improved.

Hope this helps

---------<cut here>---------------------
if [ -z "$DISPLAY" ]
then
    if [ `which who` = "/usr/local/bin/who" ]
    then
            DISPLAY=`who am i`
    else
        case `uname` in
        HP-UX)
            DISPLAY=`who -R am i`
            ;;
        OSF1)
            DISPLAY=`who -M am i`
            ;;
        *)
            DISPLAY=`who am i`
        esac
    fi

    DISPLAY=`IFS="()" ; set $DISPLAY; echo $2`

    case `uname` in
    AIX|Linux)
        # truncated to 16 chars, so strip off domain
        DISPLAY=`echo $DISPLAY | sed 's/\..*//'`
        ;;
    esac

    DISPLAY=$DISPLAY:0.0
    export DISPLAY

    echo "export DISPLAY=$DISPLAY"
fi
---------<cut here>---------------------

-- 
Alan J. Wylie (Cyrano UK Ltd.) | mailto:awylie@cyrano.com
http://www.cyrano.com          | http://www.zen.co.uk/home/page/alan.wylie
It's much easier to design in reliability, then add in ease of use,
than the other way round.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Q] X remote display detection on login
  1998-10-20  4:00 [Q] X remote display detection on login John Stephen Haro
@ 1998-10-21  4:00 ` David Stanaway
  1998-10-21  4:00 ` Alan J. Wylie
  1 sibling, 0 replies; 3+ messages in thread
From: David Stanaway @ 1998-10-21  4:00 UTC (permalink / raw)


In article <362D0E43.7D5D@boeing.com>, John Stephen Haro wrote:
>Anyone have a chuck of a .login script for DUX4.0D they can zing me that
>will set the DISPLAY variable automatically on remote login?
>


If you use ssh, one gets set for you.


David Stanaway



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-10-21  4:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1998-10-20  4:00 [Q] X remote display detection on login John Stephen Haro
1998-10-21  4:00 ` David Stanaway
1998-10-21  4:00 ` Alan J. Wylie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox