<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Remote Display location in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735339#M585124</link>
    <description>Thanks all; who am i -a / T is what I was looking for!&lt;BR /&gt;</description>
    <pubDate>Fri, 31 May 2002 13:30:21 GMT</pubDate>
    <dc:creator>Robert True</dc:creator>
    <dc:date>2002-05-31T13:30:21Z</dc:date>
    <item>
      <title>Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735332#M585117</link>
      <description>How can I determine the remote IP address a user logs in from with a script?  Need to set the DISPLAY env var with the script to pop some status windows back to a PC running an x-windows product such as 'Reflextions', without user intervention.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 31 May 2002 12:50:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735332#M585117</guid>
      <dc:creator>Robert True</dc:creator>
      <dc:date>2002-05-31T12:50:56Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735333#M585118</link>
      <description>If they're running Reflections in an X-windows environment, the DISPLAY variable should be set.&lt;BR /&gt;&lt;BR /&gt;Pete</description>
      <pubDate>Fri, 31 May 2002 12:58:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735333#M585118</guid>
      <dc:creator>Pete Randall</dc:creator>
      <dc:date>2002-05-31T12:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735334#M585119</link>
      <description>Hi Robert:&lt;BR /&gt;&lt;BR /&gt;# who am i -T|awk '{print $9}'&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Fri, 31 May 2002 12:58:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735334#M585119</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2002-05-31T12:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735335#M585120</link>
      <description>Try who -R&lt;BR /&gt;&lt;BR /&gt;export DISPLAY=`who am i -R | cut -f2 -d'(' | cut -f1 -d')'|cut -f1 -d':'`:0.0&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill&lt;BR /&gt;</description>
      <pubDate>Fri, 31 May 2002 12:59:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735335#M585120</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2002-05-31T12:59:00Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735336#M585121</link>
      <description>Example ..&lt;BR /&gt;&lt;BR /&gt;# who am i -a&lt;BR /&gt;jim ttyp2 May 24 07:05 . 17773 121.101.162.27&lt;BR /&gt;# who am i -a | awk '{print $8}'&lt;BR /&gt;121.101.162.27&lt;BR /&gt;&lt;BR /&gt;would be that IP address you're loking for..</description>
      <pubDate>Fri, 31 May 2002 13:03:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735336#M585121</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-05-31T13:03:26Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735337#M585122</link>
      <description>Hi Robert,&lt;BR /&gt;&lt;BR /&gt;Here's what I use:&lt;BR /&gt;&lt;BR /&gt;set +u&lt;BR /&gt;if [ "$DISPLAY" ]&lt;BR /&gt;then&lt;BR /&gt;        :&lt;BR /&gt;else&lt;BR /&gt;        term=`tty | cut -c6-`&lt;BR /&gt;        export DISPLAY=`who -u | grep "$term " | awk '{print $1}'`":0.0"&lt;BR /&gt;fi&lt;BR /&gt;set -u&lt;BR /&gt;&lt;BR /&gt;The reason for "set +u" is explained in:&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xab497b8d1de3d5118ff40090279cd0f9,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xab497b8d1de3d5118ff40090279cd0f9,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Fri, 31 May 2002 13:15:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735337#M585122</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-05-31T13:15:03Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735338#M585123</link>
      <description>Hi Robert&lt;BR /&gt;&lt;BR /&gt;who am i -T is an excellent one , also you may try grep on the user name using who ,&lt;BR /&gt;&lt;BR /&gt;who -T | grep user name | awk '{print $9}'&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Manoj Srivastava</description>
      <pubDate>Fri, 31 May 2002 13:26:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735338#M585123</guid>
      <dc:creator>MANOJ SRIVASTAVA</dc:creator>
      <dc:date>2002-05-31T13:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735339#M585124</link>
      <description>Thanks all; who am i -a / T is what I was looking for!&lt;BR /&gt;</description>
      <pubDate>Fri, 31 May 2002 13:30:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735339#M585124</guid>
      <dc:creator>Robert True</dc:creator>
      <dc:date>2002-05-31T13:30:21Z</dc:date>
    </item>
    <item>
      <title>Re: Remote Display location</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735340#M585125</link>
      <description>Hi again,&lt;BR /&gt;&lt;BR /&gt;"who am i -T" looks real good!&lt;BR /&gt;&lt;BR /&gt;Looking back I see my reply doesn't make much sense without some explanation.  I wrote it like I did to address an issue with rlogin windows from a CDE sesson.&lt;BR /&gt;&lt;BR /&gt;I use this for a small number of people that use Hummingbird Exceed from their PC.  They start their CDE session on one server then open rlogin windows to other servers.  Then they often su to other accounts.  In the rlogin sessions, "who am i -T" will show the CDE server as where they are logged in from.  Setting DISPLAY to that server won't work for displaying on their PC.&lt;BR /&gt;&lt;BR /&gt;To get around that, I ASSUME the user will always log in from his own PC.  I add the login name as an alias in /etc/hosts for his PC.  That way I can pick off the loginname and set DISPLAY to it.&lt;BR /&gt;&lt;BR /&gt;Also, I check to see if DISPLAY is already set in case the user has manually set it.&lt;BR /&gt;&lt;BR /&gt;"who am i -T" (or "-u") is much more simple than getting the tty and grepping who -u output.  I'll definitely start using that.&lt;BR /&gt;&lt;BR /&gt;Darrell</description>
      <pubDate>Fri, 31 May 2002 14:06:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/remote-display-location/m-p/2735340#M585125</guid>
      <dc:creator>Darrell Allen</dc:creator>
      <dc:date>2002-05-31T14:06:56Z</dc:date>
    </item>
  </channel>
</rss>

