<?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: C-Shell dynamic DISPLAY variable setting problem. in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438319#M206887</link>
    <description>Perfect, the last one worked very well.&lt;BR /&gt;&lt;BR /&gt;Thanks all for your quick responses.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Gulam.</description>
    <pubDate>Tue, 07 Dec 2004 13:06:09 GMT</pubDate>
    <dc:creator>Gulam Mohiuddin</dc:creator>
    <dc:date>2004-12-07T13:06:09Z</dc:date>
    <item>
      <title>C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438308#M206876</link>
      <description>We have hard coded the value of DISPLAY shell environment variable  the in the .cshrc file. So my X Client works from the workstation who’s IP is there, but I if I try to work from any other workstation it doesn’t work.&lt;BR /&gt;&lt;BR /&gt;Is there any way to dynamically set the IP address in DISPLAY variable in users login C-shell file .cshrc. This will help me to use my X client from any workstation.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Gula</description>
      <pubDate>Tue, 07 Dec 2004 12:01:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438308#M206876</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2004-12-07T12:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438309#M206877</link>
      <description>setenv DISPLAY=`getip "$(who -um|awk '{print NF}'")`:0.0&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Tue, 07 Dec 2004 12:04:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438309#M206877</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-12-07T12:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438310#M206878</link>
      <description>Thanks for your quick reply, but I got the following error:&lt;BR /&gt;{belfast- peel20} 23&amp;gt;&amp;gt;setenv DISPLAY=`getip "$(who -um|awk '{print NF}'")`:0.0&lt;BR /&gt;setenv: Too few arguments.&lt;BR /&gt;{belfast- peel20} 24&amp;gt;&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Gulam.</description>
      <pubDate>Tue, 07 Dec 2004 12:08:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438310#M206878</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2004-12-07T12:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438311#M206879</link>
      <description>setenv DISPLAY="`getip "$(who -um|awk '{print NF}')"`:0.0"&lt;BR /&gt;&lt;BR /&gt;Syntax errors in earlier post. This should work.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Tue, 07 Dec 2004 12:12:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438311#M206879</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-12-07T12:12:23Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438312#M206880</link>
      <description>It should be $NF rather than NF and you should also add some syntax to see if the hostname returned by who -um already has a ":0.0" appended before appending the ":0.0".</description>
      <pubDate>Tue, 07 Dec 2004 12:14:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438312#M206880</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-12-07T12:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438313#M206881</link>
      <description>Now it gives me syntax error:&lt;BR /&gt;&lt;BR /&gt;{belfast- peel20} 35&amp;gt;&amp;gt;setenv DISPLAY="`getip "$(who -um|awk '{print NF}')"`:0.0"&lt;BR /&gt;Variable syntax.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Gulam</description>
      <pubDate>Tue, 07 Dec 2004 12:14:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438313#M206881</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2004-12-07T12:14:45Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438314#M206882</link>
      <description>Doesn't know C shell a lot, but I believe you do not need = sign.&lt;BR /&gt;&lt;BR /&gt;Now, as Clay said, if you already come with a XDMCP connection you may already have a :0.0 part. So you will have this : IP:0.0:0.0...&lt;BR /&gt;&lt;BR /&gt;Solution may be something like that :&lt;BR /&gt;setenv DISPLAY "$(who -um|awk '{print $NF}'|cut -d : -f1)"&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 12:29:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438314#M206882</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-07T12:29:10Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438315#M206883</link>
      <description>Thanks, but still not working complains about some kind of Variable syntax:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;{belfast- peel20} 17&amp;gt;&amp;gt;setenv DISPLAY "$(who -um|awk '{print $NF}'|cut -d : -f1)"&lt;BR /&gt;Variable syntax.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;&lt;BR /&gt;Gulam.</description>
      <pubDate>Tue, 07 Dec 2004 12:33:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438315#M206883</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2004-12-07T12:33:01Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438316#M206884</link>
      <description>$() doesn't seem to work with csh.&lt;BR /&gt;# setenv DISPLAY "$(who -um|awk '{print $NF}'|cut -d : -f1)"&lt;BR /&gt;Variable syntax.&lt;BR /&gt;# setenv DISPLAY `who -um|awk '{print $NF}'|cut -d : -f1`&lt;BR /&gt;&lt;BR /&gt;Second syntax works fine.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Fred&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 12:41:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438316#M206884</guid>
      <dc:creator>Fred Ruffet</dc:creator>
      <dc:date>2004-12-07T12:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438317#M206885</link>
      <description>Thanks, last one works but it gives me hostname but I need the ip address instead.&lt;BR /&gt;&lt;BR /&gt;Thnaks for your help.&lt;BR /&gt;&lt;BR /&gt;Gulam.</description>
      <pubDate>Tue, 07 Dec 2004 12:46:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438317#M206885</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2004-12-07T12:46:02Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438318#M206886</link>
      <description>This should be a fairly bulletproof version but be warned all of these solutions fail if you are telnetting from an intermediate host. As long as you are directly connected to a particular host then this should work. &lt;BR /&gt;&lt;BR /&gt;PS. C shell should be avoided like the plague.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;set XX=`who -um | awk '{ split($NF,x,":"); print x[1] }'`&lt;BR /&gt;setenv DISPLAY `getip ${XX}`:0.0&lt;BR /&gt;unset XX&lt;BR /&gt;&lt;BR /&gt;The intermediate variable XX simplifies the task and is undefined afterwards. This also takes care of the case where who -um return "hostname:0.0" or "hostname" or "10.1.2.3" or "10.1.2.3:0.0". If I got all the single quotes and backticks correct that should do you.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 12:59:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438318#M206886</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-12-07T12:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438319#M206887</link>
      <description>Perfect, the last one worked very well.&lt;BR /&gt;&lt;BR /&gt;Thanks all for your quick responses.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;Gulam.</description>
      <pubDate>Tue, 07 Dec 2004 13:06:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438319#M206887</guid>
      <dc:creator>Gulam Mohiuddin</dc:creator>
      <dc:date>2004-12-07T13:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: C-Shell dynamic DISPLAY variable setting problem.</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438320#M206888</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try&lt;BR /&gt;&lt;BR /&gt;setenv DISPLAY `who am i -R |awk '{print $6}'|tr -d "()"`:0.0&lt;BR /&gt;&lt;BR /&gt;There is a space after setenv and after DISPLAY.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;Regds&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 07 Dec 2004 13:09:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-shell-dynamic-display-variable-setting-problem/m-p/3438320#M206888</guid>
      <dc:creator>Sanjay_6</dc:creator>
      <dc:date>2004-12-07T13:09:43Z</dc:date>
    </item>
  </channel>
</rss>

