Turning off the CDE

I am running Solaris 9 and wanted the CDE stopped when my users login. Can this be done by adding something to the .profile? Basically when they login they should be at the command line and have to start the CDE themselves.

Thanks

solaris has the concept of runlevels right ?
look t osee if you have the file
/etc/inittab

look for a line that looks like id:5:initdefault:

the number 5 maybe be another number, but this is where you default runlevel is defined. you are booting into whatever runlevel is set upt to startx. look in yout inittab file, and it should have some comments telling you whats what on your system. it might tell you what runlevel is networking without x, that is the runlevel you want. so if it is runlevel 3, full multiuser with network, you will want to change the line i mentioned to this:

id:3:initdefault:

hope that helps!

hiho,
looking into the /etc/rc2.d/S99dtlogin script you will find:

When placed in the /etc/rc2.d directory and named appropriately, such as
"S99dtlogin", this script will automatically start the dtlogin window after the solaris(TM) system boots to its multi-user level.

so
# mv /etc/rc2.d/S99dtlogin /etc/rc2.d/noS99dtlogin

greetings Pre�y

I will agree with the second reply, however, solaris 9 default level for X is level 3, if you edit the "/etc/inittab" file, change "is:3:initdefault:" to "is:2:initdefault:" and reboot the machine.

pressy's solution might work i suppose (i have no experience with solaris), however i would not suggest changing your system like that. its not gonna hurt anything by doing that, but one of the purposes of the runlevel concept is to allow the machine differnet modes of operation. just as you have single user mode, your have non networking mode, and you have full multiuser with X, and you have full multiuser with out X. this is one of the things i like about system V style unices over the BSD's.

its easier just to change your default run level.

Pressy's solution will work, however, when the system boots to level two init will attemp to execute the script and echo an error on the screen, this is a poor administration technique! No offence pressy, in my earlier post I meant to say I agree with the second post.

I changed the inittab setting to run level 2 but the CDE still came on. There seems like there should be a simpler way to do this. I would actually prefer to have them logon through the CDE but then have the CDE shut down. Is there any command you can give while in the CDE environment that will simply kill the CDE without losing network support or changing the run level?

then runlevel 2 is not the right runlevel you want. it really makes no sense to have x start up if you are just gonna have them logon only to get dumped to a prompt.

look in your inittab file, theres no comments explaining what runlevel is what?

" There seems like there should be a simpler way to do this. "

this is as simple as it gets :smiley: ! all you have to do is change a number in a configuration file.

This page has information about the run levels, inittab and scripts.
http://docs.sun.com/db/doc/817-1658/6mhcgstod?q=run\+levels&a=view

I do not see a run level that would do what i need. Maybe one of you could look this over and assist? Thanks

2 looks like what you want, however if you tried that and it dosnt work....:
then pressy's solution IS best because you dont have a predefined runlevel for fullmultiusers WITHOUT X. find what scripts on your system start the GUI on boot up and move them ( DONT DELETE THEM! ) so they dont get run on boot for the run level you want.

I stumbled onto this solution and it works quiet well.

/usr/dt/bin/dtconfig -d (disables auto-start)
/usr/dt/bin/dtconfig -e (enables auto-start)

You have to reboot to go back and forth between the CDE and the Command line though.

Thanks

well if you disable x starting by default on bootup, when you type startx and after your x session log out, you should be dumped back to your shell.