LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-01-2005, 07:51 PM   #1
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Rep: Reputation: 30
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.
 
Old 04-01-2005, 08:00 PM   #2
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
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.
 
Old 04-02-2005, 01:26 AM   #3
theMayor
LQ Newbie
 
Registered: Mar 2005
Location: Denver, CO
Posts: 19

Rep: Reputation: 0
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
 
Old 04-02-2005, 01:33 AM   #4
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
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?
 
Old 04-02-2005, 02:03 AM   #5
Cornholio
Member
 
Registered: Dec 2004
Location: Alemania
Distribution: Slackware 10.0
Posts: 115

Rep: Reputation: 15
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
 
Old 04-02-2005, 04:10 AM   #6
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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.
 
Old 04-02-2005, 04:33 AM   #7
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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...
 
Old 04-02-2005, 04:37 AM   #8
Cornholio
Member
 
Registered: Dec 2004
Location: Alemania
Distribution: Slackware 10.0
Posts: 115

Rep: Reputation: 15
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...
 
Old 04-02-2005, 04:48 AM   #9
linux-rulz
Member
 
Registered: Dec 2004
Distribution: Windows XP Home, Ubuntu Hoary
Posts: 584

Rep: Reputation: 30
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.
 
Old 04-02-2005, 05:17 AM   #10
Itzac
Member
 
Registered: Feb 2003
Distribution: VectorLinux 5.1
Posts: 116

Rep: Reputation: 15
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.
 
Old 04-02-2005, 06:58 AM   #11
rollo
Member
 
Registered: Apr 2004
Location: France
Distribution: Debian Sid (Kanotix)
Posts: 237

Original Poster
Rep: Reputation: 30
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Display Manager Woes Gonzee Linux - Software 1 02-26-2005 11:15 AM
display auto-shut off amadkow Fedora 8 01-28-2005 05:28 PM
Display Manager aikempshall Mandriva 2 02-12-2004 04:11 PM
Video shut off by power manager, but how? asentell Linux - Newbie 5 12-27-2003 08:05 PM
Display Manager DavidTempler Linux - Newbie 0 08-01-2003 04:50 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration