<?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: auto logout in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356629#M345511</link>
    <description>Thnaks! It dodn't work.&lt;BR /&gt;&lt;BR /&gt;.profile with exec ./run_the_application&lt;BR /&gt;doesn't stopped opening/executing the application from xterm. Then&lt;BR /&gt;I have done the following.But its not existing out the $ prompt in the xterm.&lt;BR /&gt;&lt;BR /&gt;.profile :&lt;BR /&gt;exec ./call_run&lt;BR /&gt;&lt;BR /&gt;call_run has the following lines.&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;exec ./run_the_application&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 11 Feb 2009 16:48:04 GMT</pubDate>
    <dc:creator>HPquestion</dc:creator>
    <dc:date>2009-02-11T16:48:04Z</dc:date>
    <item>
      <title>auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356627#M345509</link>
      <description>Hi there,&lt;BR /&gt;We are calling an X-windows based application from the .profile via reflection X automatically . Once the user exit out the application , I want to logoff the shell automatically as we don't want them to get the $ prompt at all.&lt;BR /&gt;&lt;BR /&gt;Tried with kill -9 $$ and some thing like &lt;BR /&gt;shown below. Buit the $ prompt still remain.How to logout the users automatically after he/she is done with the application?&lt;BR /&gt;&lt;BR /&gt;.profile code to execute the application.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;cd /home/somestuff&lt;BR /&gt;./run_the_application&lt;BR /&gt;./kill_it&lt;BR /&gt;--------&lt;BR /&gt;kill_it has the following lines&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;MYUSER=`whoami`&lt;BR /&gt;for MYPID in `ps -ef | grep $MYUSER | awk '{ print $(2) }' | sort -r`&lt;BR /&gt;do&lt;BR /&gt;`kill -9 $MYPID`&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2009 15:45:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356627#M345509</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T15:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356628#M345510</link>
      <description>&lt;!--!*#--&gt;How about something like this?:&lt;BR /&gt;&lt;BR /&gt;      cd /home/somestuff&lt;BR /&gt;      exec ./run_the_application&lt;BR /&gt;&lt;BR /&gt;"exec" causes "./run_the_application" to&lt;BR /&gt;replace the shell, so when it exits, the&lt;BR /&gt;process should die.&lt;BR /&gt;&lt;BR /&gt;HP-UX-free example:&lt;BR /&gt;&lt;BR /&gt;ALP $ rsh /user = root sol&lt;BR /&gt;Last login: Wed Feb 11 10:04:53 from alp-l.antinode.&lt;BR /&gt;Sun Microsystems Inc.   SunOS 5.10      Generic January 2005&lt;BR /&gt;You have new mail.&lt;BR /&gt;sol# pwd&lt;BR /&gt;/root&lt;BR /&gt;sol# exec pwd&lt;BR /&gt;/root&lt;BR /&gt;&lt;BR /&gt;%RSH-S-REMCLOSED, Remote connection closed&lt;BR /&gt;ALP $</description>
      <pubDate>Wed, 11 Feb 2009 16:07:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356628#M345510</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-02-11T16:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356629#M345511</link>
      <description>Thnaks! It dodn't work.&lt;BR /&gt;&lt;BR /&gt;.profile with exec ./run_the_application&lt;BR /&gt;doesn't stopped opening/executing the application from xterm. Then&lt;BR /&gt;I have done the following.But its not existing out the $ prompt in the xterm.&lt;BR /&gt;&lt;BR /&gt;.profile :&lt;BR /&gt;exec ./call_run&lt;BR /&gt;&lt;BR /&gt;call_run has the following lines.&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;exec ./run_the_application&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2009 16:48:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356629#M345511</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T16:48:04Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356630#M345512</link>
      <description>sorry made some typos.I meant to say&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;.profile with exec ./run_the_application&lt;BR /&gt; stopped opening/executing the application itself from xterm. So I have done the following.But its not existing out the $ prompt in xterm.&lt;BR /&gt;&lt;BR /&gt;.profile :&lt;BR /&gt;exec ./call_run&lt;BR /&gt;&lt;BR /&gt;call_run has the following lines.&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;exec ./run_the_application &lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2009 16:57:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356630#M345512</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T16:57:51Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356631#M345513</link>
      <description>Just put an 'exit' after the './run_the_application' in the .profile.&lt;BR /&gt;&lt;BR /&gt;When you exit the application, it will proceed to the next statement in the .profile file and exit out.&lt;BR /&gt;&lt;BR /&gt;cd /home/somestuff&lt;BR /&gt;./run_the_application&lt;BR /&gt;exit&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2009 17:03:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356631#M345513</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-02-11T17:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356632#M345514</link>
      <description>I tried the the exit earlier. If I put exit in the .profile, it doesn't open the application from Xterm at all.</description>
      <pubDate>Wed, 11 Feb 2009 17:06:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356632#M345514</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T17:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356633#M345515</link>
      <description>What kind of errors are you getting when it doesn't run?&lt;BR /&gt;&lt;BR /&gt;The 'exit' after the 'run_the_application' should have no effect on the command, UNLESS you are doing a './run_the_application &amp;amp;', in which case the exit will kill the application when the shell exits.&lt;BR /&gt;&lt;BR /&gt;Verify you are not trying to run the command in the background.</description>
      <pubDate>Wed, 11 Feb 2009 17:19:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356633#M345515</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-02-11T17:19:48Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356634#M345516</link>
      <description>no error. It doesn't open the Xterm window at all if I put exit in the .profile</description>
      <pubDate>Wed, 11 Feb 2009 17:21:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356634#M345516</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T17:21:54Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356635#M345517</link>
      <description>Thanks Parick. I am not running it in the background. If I put exit in .profile , xterm windown doesn't open at all</description>
      <pubDate>Wed, 11 Feb 2009 18:31:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356635#M345517</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T18:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356636#M345518</link>
      <description>&amp;gt; [..] But its not existing out the $ prompt&lt;BR /&gt;&amp;gt; in the xterm.&lt;BR /&gt;&lt;BR /&gt;What xterm?  I think that you're hiding too&lt;BR /&gt;many details.  Like who creates an xterm.&lt;BR /&gt;&lt;BR /&gt;If you can provide a sample script which&lt;BR /&gt;really does something, then it might be&lt;BR /&gt;possible to suggest some changes.  With no&lt;BR /&gt;information about who creates which process&lt;BR /&gt;how, running what, I'm lost.</description>
      <pubDate>Wed, 11 Feb 2009 19:01:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356636#M345518</guid>
      <dc:creator>Steven Schweda</dc:creator>
      <dc:date>2009-02-11T19:01:00Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356637#M345519</link>
      <description>What is "./run_the_application"?  Is that an executable or is it another script?  If it is a script, please post the contents.  There may be some code in there that is affecting us.</description>
      <pubDate>Wed, 11 Feb 2009 19:08:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356637#M345519</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-02-11T19:08:10Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356638#M345520</link>
      <description>&lt;BR /&gt;We are using reflection X software.&lt;BR /&gt;&lt;BR /&gt;Reflection x is passing&lt;BR /&gt;&lt;BR /&gt;/usr/bin/X11/xterm -fn 6x13 -sb -ls -display %IP#% -name %T% &amp;amp;)&lt;BR /&gt;&lt;BR /&gt;command to open the xterm</description>
      <pubDate>Wed, 11 Feb 2009 19:08:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356638#M345520</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T19:08:11Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356639#M345521</link>
      <description>"./run_the_application" is a binary executable.&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2009 19:10:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356639#M345521</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T19:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356640#M345522</link>
      <description>What you should do is put all of this in its own script and call it with the '-e' option to xterm.&lt;BR /&gt;&lt;BR /&gt;Create a small scripts and "run_the_application.sh" and put it somewhere.&lt;BR /&gt;&lt;BR /&gt;The contents would be:&lt;BR /&gt;&lt;BR /&gt;# cat run_the_application.sh&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;cd /home/somestuff&lt;BR /&gt;./run_the_application&lt;BR /&gt;&lt;BR /&gt;Be sure to take the lines out of the .profile, and make sure you make run_the_application.sh executable for the appropriate users.&lt;BR /&gt;&lt;BR /&gt;Now modify your xterm line to be:&lt;BR /&gt;&lt;BR /&gt;/usr/bin/X11/xterm -fn 6x13 -sb -ls -display %IP#% -name %T% -e /path/to/run_the_application.sh &amp;amp;)</description>
      <pubDate>Wed, 11 Feb 2009 19:38:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356640#M345522</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2009-02-11T19:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356641#M345523</link>
      <description>Thanks Patrick...its working now :-)&lt;BR /&gt;</description>
      <pubDate>Wed, 11 Feb 2009 20:34:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356641#M345523</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-02-11T20:34:38Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356642#M345524</link>
      <description>It worked..now I have a related question.&lt;BR /&gt;&lt;BR /&gt;usr/bin/X11/xterm -fn 6x13 -sb -ls -display %IP#% -name %T% -e /path/to/run_the_application.sh &amp;amp;)&lt;BR /&gt;&lt;BR /&gt;My unix auditor doesn't like to see startup program as /usr/bin/csh in the /etc/passwd file as these users are not allowed to open a shell and do anyting. They are just allowed to run the application using x windows directly.&lt;BR /&gt;&lt;BR /&gt;But if I put the startup program as /usr/bin/false instead of /usr/bin/csh for these user, the above command doesn't open the desired application.&lt;BR /&gt;What to do? &lt;BR /&gt;&lt;BR /&gt;Thanks again!</description>
      <pubDate>Thu, 30 Apr 2009 19:24:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356642#M345524</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-04-30T19:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356643#M345525</link>
      <description>It sounds like you want just the Xprogram to run and then disappear. Rather than put a real shell for a restricted user, create a shell script that starts your Xprogram followed by exit. Then the user's shell will actually be the script. Most Unix sysadmins do everything they can to prevent the scummy csh from ever running anywhere. Your shell script should look like this:&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;export DISPLAY+$(who -muR | awk '{print $NF}'):0.0&lt;BR /&gt;/full/pth/to/your/Xprogram some-params&lt;BR /&gt;exit&lt;BR /&gt; &lt;BR /&gt;Save it and use chmod 755 yourScript. Run it interactively to make sure it works. Note that if any other variables are required for this program to run, be sure to include them in this script.</description>
      <pubDate>Fri, 01 May 2009 01:17:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356643#M345525</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-05-01T01:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356644#M345526</link>
      <description>&amp;gt;Bill: export DISPLAY+$(who -muR | awk '{print $NF}'):0.0&lt;BR /&gt;&lt;BR /&gt;Slight typo: export DISPLAY=$(who -muR ...</description>
      <pubDate>Fri, 01 May 2009 04:04:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356644#M345526</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-05-01T04:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356645#M345527</link>
      <description>Tried something like below as suggested. but its not opening the application at all.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;export DISPLAY=$(who -muR | awk '{print $NF}'):0.0&lt;BR /&gt;/full/pth/to/your/Xprogram some-params&lt;BR /&gt;exit&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks for any help on this</description>
      <pubDate>Wed, 13 May 2009 18:44:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356645#M345527</guid>
      <dc:creator>HPquestion</dc:creator>
      <dc:date>2009-05-13T18:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: auto logout</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356646#M345528</link>
      <description>Tried something like below as suggested. but its not opening the application at all.&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;export DISPLAY=$(who -muR | awk '{print $NF}'):0.0&lt;BR /&gt;/full/pth/to/your/Xprogram some-params&lt;BR /&gt;exit&lt;BR /&gt; &lt;BR /&gt;Try something is known to work:&lt;BR /&gt; &lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;export DISPLAY=$(who -muR | awk '{print $NF}'):0.0&lt;BR /&gt;/usr/bin/X11/xclock&lt;BR /&gt;exit&lt;BR /&gt; &lt;BR /&gt;This should bring up the Xwindows clock. Your application should follow the $DISPLAY variable but if it does not, set the display according to their documentation.</description>
      <pubDate>Thu, 14 May 2009 02:30:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/auto-logout/m-p/4356646#M345528</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2009-05-14T02:30:01Z</dc:date>
    </item>
  </channel>
</rss>

