The machine name should be my windows 2000 machine right.
> -----Original Message-----
> From: Shridhar Daithankar [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, June 11, 2001 5:10 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [Fwd: Re: [LIH] VNC]
>
>
>
> Suresh Ramasubramanian wrote:
> > Better than adding it to /etc/profile - $DISPLAY need be exported only
> when
> > you fire up a remote xterm, rather than just ssh / telnet into the
> machine.
>
> Well if it's a remote exterm, then it's good to set the display to machine
> name:0. Machine name can be obtained as last field of who -u. Something
> 'who
> -u|grep tty| cut -f<last fields>' should do the trick.
>
> From .profile of our HP machines..
> --------------------------------------------------------------------------
> ---
> Thistty=`tty | sed 's:^/dev/::'`
> dis=`
> who -u |
> awk -v Thistty=$Thistty '$2 == Thistty {print $8}' |
> sed 's/:.*$//'
> `
> if [ -z "$dis" ]; then
> unset DISPLAY
> else
> export DISPLAY=$dis":0.0"
> fi
> echo "DISPLAY=$DISPLAY"
> --------------------------------------------------------------------------
> ---
>
> This is bit lengthier than I expected but works. God knows who hacked
> this...
>
> >
> > --suresh
>
> Shridhar
>
> _______________________________________________
> linux-india-help mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/linux-india-help
WARNING: The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this message
by anyone else is unauthorised. If you are not the intended recipient, any
disclosure, copying, or distribution of the message, or any action or
omission taken by you in reliance on it, is prohibited and may be unlawful.
Please immediately contact the sender if you have received this message in
error. Thank you.----------------- HCL Perot Systems
_______________________________________________
linux-india-help mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/linux-india-help