We help IT Professionals succeed at work.

Check out our new AWS podcast with Certified Expert, Phil Phillips! Listen to "How to Execute a Seamless AWS Migration" on EE or on your favorite podcast platform. Listen Now

x

tmout for xwindows on AIX

sminfo
sminfo asked
on
Medium Priority
1,294 Views
Last Modified: 2013-11-17
Here I go again :-)

How to:

1- Set a TMOUT variable for all Xwindows-DTLOGIN on AIX6.1?
2- Set a lock screen after X segs to any user if IDLE on a Xwindows session?

ALL AIX are 6.1 TL6

Thanks.
Comment
Watch Question

CERTIFIED EXPERT

Commented:
use /etc/.dtprofile or $home/.dtprofile

export TMOUT= <seconds>
DTSOURCEPROFILE=true

Author

Commented:
Hi dfke,

I read about DT_TTSESSION_TIMEOUT variable on the dtprofile..isn't it neccesary?
CERTIFIED EXPERT

Commented:
No DT_TTSESSION_TIMEOUT is a time frame needed setup a connection with ToolTalk Message Server when you login to CDE.

Author

Commented:
Also, I have no /etc/.dtprofile file.

I see all users have in their $HOME an .dtprofile. How can I set the TMOUT Var globaly?

And what about the second question? How to lock the screen after X seconds?

Thanks.
TomuniqueSr. AIX Admin

Commented:
To create it, and have all read it (globally)

echo export TMOUT={seconds} >> /etc/.dtprofile
echo readonly TMOUT              >> /etc/.dtprofile             << -- Recommended, so others dont disable it in their local .dtprofile
echo export DTSOURCEPROFILE=true >> /etc/.dtprofile

I'm not an X expert, we rarely use it... but, I'm not sure you can force the x-windows to lock

Hopefully someone will correct me, as I'd like to set this also, for those who do use X.

Tom
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
Sorry, forgot to mention that you'll have to copy /usr/dt/config/[language]/sys.resources to
/etc/dt/config/[language]/sys.resources.
Create the directory structure if needed.

Author

Commented:
Hi guys,

SOrry the delay but I'm very busy..
to Tomunique:
  - I created the file, insert TMOUT but it didn't logout my session.

to wmp:
  - I did exactly what you said but either the saver or lock didn't work :-(

But, there's one thing I havent done... restart the dtlogin process

Is it necessary?

If true, I've to wait later because there're a lot of users working now....

I will restart later and let you know...

Thanks
TomuniqueSr. AIX Admin

Commented:
The TMOUT value is set when a user logs in.

open an xterm window and echo $TMOUT, is it set?
I'm going on dfke's response that .dtprofile is the proper file to modify.
There may be another variable that says that this .dtprofile should be executed.

Author

Commented:
I have made the test on another server, create all below, restart dtlogin but unsuccessful..:-(

root@repo: /etc/dt # cat /etc/.dtprofile
export TMOUT=300
readonly TMOUT
DTSOURCEPROFILE=true

root@repo: /etc/dt/config # ls -lR
total 0
drwxr-xr-x    2 root     bin             256 Dec 16 13:51 Xsession.d
drwx------    2 root     system          256 Apr 29 16:40 en_US
./Xsession.d:
total 0

./en_US:
total 8
-r--r--r--    1 bin      bin            4064 Apr 29 15:52 sys.resources

root@repo: /etc/dt/config # cat en_US/sys.resources
!##################################################################
!#
!#   Common Desktop Environment (CDE)
!#
!#   sys.resources:     The Default Session Resource File
!#
!#   Placed In:         /usr/dt/config/<LANG>/sys.resources
!#
!#   (c) Copyright 1993, 1994 Hewlett-Packard Company
!#   (c) Copyright 1993, 1994 International Business Machines Corp.
!#   (c) Copyright 1993, 1994 Sun Microsystems, Inc.
!#   (c) Copyright 1993, 1994 Novell, Inc.
!#
!###################################################################

#include "/usr/dt/config/C/sys.font"

*sessionVersion:        3.0
*multiClickTime:        500
*ttyModes:              erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z
*promptDialog.bboard.frame.form.text.columns: 45


dtsession*saverTimeout:  1
dtsession*lockTimeout:   3
dtsession*cycleTimeout:  3
dtsession*saverList: StartDtscreenBlank
!# Dtsession*KeyClickPercent:      0

!#################################################################
!#
!#  display dependent resources
!#
!#################################################################
#if WIDTH > 1200

#else
#if WIDTH > 1023

#else
Dtwm*resizeBorderWidth: 5
Dtfile*view:            small_icon
Dtfile*desktopIcon:     small
Dtfile*dirWidth:        400
Dtfile*dirHeight:       300
#endif
#endif

!#################################################################
!#
!#  Motif resources
!#
!#   These resources are provided as an example of how get
!#   Motif 1.1 clients and Motif 1.2 clients linked with an
!#   archived Motif 1.2 library to display with the CDE enhanced
!#   visuals.  Just put the client name in and uncomment the
!#   resources and the non-CDE client will get the enhanced
!#   CDE visual effect.
!#
!#################################################################
!#
!# <client_name>*XmCascadeButton*shadowThickness:               1
!# <client_name>*XmCascadeButtonGadget*shadowThickness:         1
!# <client_name>*XmDrawnButton*shadowThickness:                 1
!# <client_name>*XmList*shadowThickness:                        1
!# <client_name>*XmPanedWindow*sashShadowThickness:             1
!# <client_name>*XmPushButton*shadowThickness:                  1
!# <client_name>*XmPushButtonGadget*shadowThickness:            1
!# <client_name>*XmScale*shadowThickness:                       1
!# <client_name>*XmScrollBar*shadowThickness:                   1
!# <client_name>*XmSelectionBox*shadowThickness:                1
!# <client_name>*XmText*shadowThickness:                        1
!# <client_name>*XmTextField*shadowThickness:                   1
!# <client_name>*highlightThickness:                            1
*DtTerm*shadowThickness:                1
*enableThinThickness:                   True
*enableBtn1Transfer:                    button2_transfer
*enableButtonTab:                       True
*enableDefaultButton:                   True
*enableEtchedInMenu:                    True
*enableMenuInCascade:                   True
!# *enableMultiKeyBindings:             True
*enableToggleColor:                     True
*enableToggleVisual:                    True
*enableDragIcon:                        True
*enableCDEColorFactors:                 True

!#################################################################
!#
!#  CDE translations for the text widget and text field widget
!#
!#    - provides basic EMACS editor functionality
!#
!#################################################################
*XmText*Translations:#override\n\
        Ctrl<Key>u:delete-to-start-of-line()\n\
        Ctrl<Key>k:delete-to-end-of-line()\n\
        Ctrl<Key>a:beginning-of-line()\n\
        Ctrl<Key>e:end-of-line()\n\
        Ctrl<Key>p:process-up()\n\
        Ctrl<Key>b:backward-character()\n\
        Ctrl<Key>n:process-down()\n\
        Ctrl<Key>f:forward-character()
*XmTextField*Translations:#override\n\
        Ctrl<Key>u:delete-to-start-of-line()\n\
        Ctrl<Key>k:delete-to-end-of-line()\n\
        Ctrl<Key>a:beginning-of-line()\n\
        Ctrl<Key>e:end-of-line()\n\
        Ctrl<Key>b:backward-character()\n\
        Ctrl<Key>f:forward-character()

!#################################################################
!#
!#  CDE environment variable mapping for remote COMMAND actions
!#
!#################################################################
*dtEnvMapForRemote:     DTAPPSEARCHPATH:DTHELPSEARCHPATH:DTDATABASESEARCHPATH:XMICONSEARCHPATH:XMICONBMSEARCHPATH

!################             eof          #######################

TomuniqueSr. AIX Admin

Commented:
Reference to /usr/dt/config/sys.dtprofile  
found in https://www-304.ibm.com/support/docview.wss?uid=isg3T1000389


Additional configuration information
Make CDE read your .profile.

   1. Uncomment DTSOURCEPROFILE = TRUE in .dtprofile, or /usr/dt/config/sys.dtprofile for global.
   2. Ensure that all dtterm/aixterms source the .profile. Using your preferred editor, open /etc/dt/config/$LANG/sys.resources and add the following line:

           *loginShell:  true

   3. Log out.
   4. Log in.
   5. Invoke dtterm from front panel.
   6. To have your kshrc sourced, insert the following line in .profile.

           export ENV=$HOME/.kshrc

CERTIFIED EXPERT
Most Valuable Expert 2013
Top Expert 2013

Commented:
Maybe the user has its own config in

$HOME/.dt/sessions/current.old/dt.resources

?

Author

Commented:
Hi wmp..

regarding this file $HOME/.dt/sessions/current.old/dt.resources... I see all users have this file in its HOME with data, but don't understand why? Should I remove this file? It's not enough to edit  file /usr/dt/config/[language]/sys.resources?

It does not work for me  :-(

Author

Commented:
Also,

I saw this error:

dtsession: Screen lock when the screen saver is turned on is not available on this server.  Your screen will not be locked when the screen saver is turned on.

:-(
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.