LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to shut down the X display manager (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-shut-down-the-x-display-manager-308784/)

rollo 04-01-2005 06:51 PM

How to shut down the X display manager
 
I have been trying to understand the X window system. Can someone tell me if this is the proper way to "shut down" KDE:

1. "Log out" > "End session only"

2. Ctrl-Alt-F2 to get command line.

- What is the difference between Ctrl-Alt-F2 and Ctrl-Alt-F1 here?

- Where do the commands "startx" and "xinit" come into all this?

My objective is to try out a GUI other than KDE, so I figure I will have to get to a "clean" command line first, right?

All pointers really appreciated! Thanks.

linux-rulz 04-01-2005 07:00 PM

What do you mean try a GUI instead of KDE? KDE is a GUI in a sense. Actually, it is a desktop environment. As is Gnome and XFCE. Go to the command line and try the command

init 3

and it will kill x completely. and then init 5 will get x running again.

I don't understand what you mean by trying out a GUI though.

theMayor 04-02-2005 12:26 AM

Hello,
I am using RedHat 9 and I fiddled around with the same issue, or at least what I think is the same. In the gui I opened up a terminal and typed in "switchdesk" and it popped up with a dialog box that stated the diffrent gui's available. Select it and then OK it and hopefuly that should take care of it.

take care,
-theMayor

linux-rulz 04-02-2005 12:33 AM

Why don't you try a more up to date distro. The Desktop Environments that ship with Red Hat 9 are incredibly outdated.

I really wish that all the mirrors would pull down Red Hat 9. Why not throw up the 7.x series of SUSE and Debian 1.0 while you're at it. People install it, come here, and are told to upgrade. Why not at least put up a notice that Red Hat 9 is no longer maintained or supported?

Cornholio 04-02-2005 01:03 AM

My understanding is, that you want to try another desktopmanager, not KDE but gnome, fluxbox, enlightment or some like that?

If so, you have to log out - trhis should bring you to the login screen... where you type your username and password. This should be graphical, not console.

Here is a button somewhere (where exactly depends o nthe loginmanager use use) where you can select what kind of "session" you want to run .Typically you can select the above mentioned desktopmanagers...

If this is not what you wanted ... if you just wanted to turn of the omplete graphical environment, that go to some conle, no matter which and become root. Save all open files and stuff and... Then do

# init 3

This changes your runlevel to numer 3, which is multiuser-mode without X-server. To go back to X you can do:

# init 4

and switch back to the Runlevel 4, where you came from ... or you can call X directly, for you oly by:

# startx

I hope I could give a kind of answer to you, if not, be a bit more detailed in your request,ok ?:-)

Greetings, Sascha

rollo 04-02-2005 03:10 AM

More questions...
 
Thanks very much for those responses. Cornholio - trust me, I tried very hard to make my question as "correct" as possible. The issue here is that I don't know as much as you do about all this! :)

So... Tried advice...

Code:

go to some conle, no matter which and become root. Save all open files and stuff and... Then do
 
 # init 3
 
 This changes your runlevel to numer 3, which is multiuser-mode without X-server. To go back to X you can do:
 
 # init 4
 
 and switch back to the Runlevel 4, where you came from ... or you can call X directly, for you oly by:
 
 # startx

"init 3" did as said. Then I typed "startx" and got taken straight back into KDE - but it was into a cut-down version of KDE with warning signs everywhere, and the options for logging out no longer included "shut down". What was going on here?

So I chose "log out" and was taken back to the text console login. At this point I tried "init 4" and "init 5" but got "command not recognized" - only "startx" worked. Can anyone explain this?

Yes, my objective is to try a new desktop environment (not GUI) such as XFCE. That's why I want to understand how to close KDE completely (and get back in!).

Thanks for ideas. :)

rollo 04-02-2005 03:33 AM

Clarifications
 
1. Okay, the reason for all the warning signs in KDE was (obviously) that I was running it as root.

2. The reason I no longer had the option to shut down directly from KDE is that, by logging out, killing X (using "init 3") and using "startx" to load KDE, I had bypassed the X display manager (in this case KDM). Does that sound correct?

3. If so, is is possible to load KDM from the console at runlevel 3? I get the X display manager at every startup, so it should be possible. (I tried "kdm" in the console logged in as user; it said "log in as root first"; as root I got "command not recognized".)

Thanks again...

Cornholio 04-02-2005 03:37 AM

1) correct
2) correct
3) don't know about that...

...but if you ever get into kdm ... I thing by booting normally, there is a button i nthe lower right where you can choose your session...

linux-rulz 04-02-2005 03:48 AM

Do you have anything other than KDE installed, such as Gnome or XFCE? Gnome is a very easy to use desktop environment. It is also the default on Red Hat and the second most widely used on Linux. Make sure you have installed an alternative first.

Itzac 04-02-2005 04:17 AM

If you log in as root into KDE, there will probably be a choice of display managers in a system settings dialog somewhere. The you'll be able to switch to KDM from XDM. GDM might also work for you. Then you'll have a choice of window managers and desktop environments that you can run on login. That's probably the Suse way to do it, anyway.

If you can't find the a settings panel somewhere to change it, then you need to go fishing for scripts inside of /etc. They'll probably be inside of a directory like rc.d, and there should be a script for each runlevel (at least that's the way Slack does it). You want to find the script for runlevel 4 or 5, whichever includes X, and change it to start KDM instead of XDM. If you're lucky, the code will be there already and you just need to uncomment it or change the ordering of the lines.

And just because, here's a quick rundown on runlevels. The system runlevel basically determines how much of the operating system is running. X usually runs at 4 or 5, depending on which distro you're using. Below that is 3, where pretty well everything except X is running. 2 has fewer services running, maybe not network connection or something, but I'm not really sure. Runlevel 1 is single user mode. In this case only root can log in, but you don't need the root password. Of course, you need to be root or have physical access to the machine to be able to change the runlevel. Runlevels 0 and 6 are reserved for shutdown and reboot respectively. There is also a file called /etc/inittab which contains information about each of the runlevels and which one the system should use upon startup.

When you run init N you tell the OS to switch to runlevel N, though you should actually use telinit which is designed specifically for that purpose.

And also just because: Virtual Terminals: a crash course.
Virtual Terminals (VTs) are a throw-back to the mainframe days where you had one computer and a bunch of terminals connected to it. Each terminal consisted of only a keyboard and a monitor. A user would sit down at a terminal, log in, do his/her thing, and log out. The mainframe was still doing all the work for all the terminals. Virtual terminals are virtual because, tho you can have a different user logged in to each one, they are all actually using the same monitor and keyboard. Most distros setup 6 VTs which are mapped to Alt + Ctrl + [1-6].

Hope I haven't bored you. Good luck. :D

rollo 04-02-2005 05:58 AM

Thanks you three for that - I understand the whole thing better now.

linux-rulz: No I haven't got another desktop environment installed yet but I want to install XFCE. Hoping this won't be too tricky.

Itzac - no of course you didn't bore me, I read everything and learnt stuff from it. The Suse directory for runlevel scripts turns out to be /etc/init.d - which I will investigate.

Thanks again, guys. :)


All times are GMT -5. The time now is 04:45 AM.