Trying to move transparently between run level 3 and run level 5 as autologin user

I’ve been able to kludge a kill script which finds the correct pid for the kdeserver (or gnome server) after my system comes up in run level 5 so I can drop back to run level 3 mode.

Lots of experimentation showed me that using telinit 3 and telinit 5 would occasionally leave the video memory in a mess and I would have the black screen of death.

I set the security parameter setting to autologin for me since I am the only user of my machine, but I still have to kludge the default setting under sysconfig (the DEFAULT_WM) under Window Manager to pick a certain window manager, so it takes time to manually switch the desktop.

Right now I can leave the gui and drop back to cli, but painful experimenting showed me that killing the X server is a no no. Right now I kill the kde server, which sends the SIGTERM to the X windows manager, which then figures out that it has to shut down.


Is there a better way of doing this? Apparently openSUSE figures that we have multiple users logging into the gui desktop, so the gui is always kept running and a login window with the desktop manager option forces the user to login in. With autologin, this never happens, but no choice of desktop is possible on the fly.

Can some type of script be set up to painlessly enable this to happen? And what is the best way of bringing either the Gnome or KDE desktop manager down gracefully? I do get lots of error messages as the system attempts to recover and X shuts down.

It appears that apparently the single user with autologin is left out in the cold.

This isn’t really a solution but I wonder why you need to go to level 3. Couldn’t you just bring up a terminal window or switch to one of the virtual consoles?

If you were installing video drivers or wanted to conserve RAM those would be valid reasons. But to get a CLI, there is no need to shutdown the GUI.

I can indeed bring up a terminal window (and consume more resources) but sometimes I do backups and that sort of thing and have found, in the past, that things run much cleaner while in CLI mode.

Perhaps you’re right… maybe we should just dump level 3, like Ubuntu, and keep everyone locked into the GUI? (mild sarcasm)

What backup program are you using?

@OP: You can set the default runlevel to 3 with Yast → System → Runlevel (Expert Mode). Then, after each boot, you have to start the GUI manually from console 6. When you close the GUI, you are back in runlevel 3. No additional script needed.