1838619 Members
2143 Online
110128 Solutions
New Discussion

Re: CDE

 
Janet Edwards
New Member

CDE

In a script I need to check if CDE is running. Have any ideas?
6 REPLIES 6
Patrick Wallek
Honored Contributor

Re: CDE

If you look for any of the dt* processes, that should be an indication that CDE is running and folks are able to login.

# ps -ef | grep dt

daemon 1885 1864 0 15:23:47 ? 1:34 /usr/bin/X11/X :0 -auth /var/dt/worf:AAAa01864
root 1914 1864 0 15:23:52 ? 0:00 /usr/dt/bin/dtlogin
root 1864 1847 0 15:23:43 ? 0:00 /usr/dt/bin/dtlogin
root 1847 1 0 15:23:42 ? 0:00 /sbin/sh /usr/dt/bin/dtrc
root 2152 1914 0 15:24:24 ? 2:08 dtgreet -display worf:0
root 6722 1912 2 14:43:37 pts/ta 0:00 grep dt
Helen French
Honored Contributor

Re: CDE

Hi Janet,

Look for all 'dt' processes:

# ps -aef | grep dt

HTH,
Shiju
Life is a promise, fulfill it!
Janet Edwards
New Member

Re: CDE

Guess I didn't make myself clear, if CDE is enabled, I need to shut it down, whether or not somebody is logged in.
Patrick Wallek
Honored Contributor

Re: CDE

To shut down CDE do a:

# /sbin/init.d/dtlogin.rc stop
Helen French
Honored Contributor

Re: CDE

Hi,

Check the /etc/rc.log and see whether the CDE was started when the system booted last time. If it was enabled, then you can stop it if you need:

# /sbin/init.d/cdelogin.rc stop
# /sbin/init.d/dtlogin.rc stop

# ps -aef | grep dt - will tell you whether it's running now or not.

HTH,
Shiju
Life is a promise, fulfill it!
Alex Glennie
Honored Contributor

Re: CDE

fyi :

CDE is started by /sbin/rc3.d/S990/dtlogin.rc which points to /sbin/init.d/dtlogin.rc.

For any system with a local display there will be a :

a) dtlogin (parent) daemon
b) a child dtlogin process running the local CDE session on the local display (for remote connections you'll have additional dtlogin child processes too).

so your script will need to check for dtlogin processes, if true it could run /sbin/init.d/dtlogin.rc stop and check again for dtlogins ..... if they still exist kill them ?