tmout for xwindows on AIX

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.
sminfoAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
woolmilkporcConnect With a Mentor Commented:
OK,

for screen blanking/locking:

Look at /usr/dt/config/[language]/sys.resources

( [language] is e.g. en_US or whatever language you use).

You will find these default settings there:

dtsession*saverTimeout:  10
dtsession*lockTimeout:   30
dtsession*cycleTimeout:  3
dtsession*saverList: StartDtscreenBlank

The first value specifies to start the screensaver after 10 minutes of inactivity, the second one specifies locking of the screen after 30 minutes.
The third value specifies the cycle duration in case there are several different screensavers defined in "saverList".

Adjust as desired.

wmp
0
 
dfkeCommented:
use /etc/.dtprofile or $home/.dtprofile

export TMOUT= <seconds>
DTSOURCEPROFILE=true
0
 
sminfoAuthor Commented:
Hi dfke,

I read about DT_TTSESSION_TIMEOUT variable on the dtprofile..isn't it neccesary?
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
dfkeCommented:
No DT_TTSESSION_TIMEOUT is a time frame needed setup a connection with ToolTalk Message Server when you login to CDE.
0
 
sminfoAuthor 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.
0
 
TomuniqueCommented:
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
0
 
woolmilkporcCommented:
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.
0
 
sminfoAuthor 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
0
 
TomuniqueCommented:
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.
0
 
sminfoAuthor 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          #######################

0
 
TomuniqueCommented:
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

0
 
woolmilkporcCommented:
Maybe the user has its own config in

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

?
0
 
sminfoAuthor 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  :-(
0
 
sminfoAuthor 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.

:-(
0
All Courses

From novice to tech pro — start learning today.