Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 01-13-2004, 04:16 PM   #1
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Rep: Reputation: 30
how do i close x windows

slackware defaults to runlevel 3 at startup. i start x windows with startx or kdm. so how do i close x windows without changing runlevels?
Old 01-13-2004, 04:20 PM   #2
Senior Member
Registered: Jun 2003
Location: UK
Distribution: Gentoo
Posts: 1,288

Rep: Reputation: 45
You meen logout? Just go to KDE > Logout, or press ctrl + alt + del and logout, or press ctr + alt + backspace and it does it automatically for you
Old 01-13-2004, 04:22 PM   #3
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Original Poster
Rep: Reputation: 30
if i logout then it brings me to the login menu. i want a command that will close x windows and bring me back to the CLI. sort of the opposite of startx...
Old 01-13-2004, 06:04 PM   #4
Registered: Nov 2003
Distribution: slackware 14
Posts: 542

Rep: Reputation: 33
Ctrl+Alt+Fx will take you to a console (Fx can be from F1 to F6)
To come back to GUI Ctrl+Alt+F7.
Old 01-14-2004, 05:21 AM   #5
Registered: Aug 2003
Location: Bcn
Distribution: Slackware
Posts: 93

Rep: Reputation: 15
Stop X server


I had the same problem long time ago: I didn't now how to stop X server (are you trying to install nvidia drivers ?).

The solutions that works for me is to open another tty (alt+ctrl+FX, where X ranges from 1 to 6) and then typw "telinit 3" to go to runlevel 3.

If you where already in runlevel 3 and have started the X server using "startx" then at logut the X server should be closed. Maybe starting with "kdm" prevents the X server to close....

So, maybe you should start X server typing "telinit 4" instead of typing startx or kdm in runlevel 3.

Anyway if you can't close X server on runlevel 3 try to go to runlevel 4 and then go back to runlevel 3.

Hope this helps.


PD: I found out that, by default, in slackware 9.1 when running on runlevel 4 tty's 1 to 5 are not accesible. Sometimes I like to work with different tty's so, to "solve" this you should take a look at /etc/inittab

P.D.: If you want to boot up directly to runlevel 4 instead of runlevel 3 I think that you must change some value in /etc/inittab (I'm no not in front of my Linux box so I can't tell the exact values but find all the needed comments in /etc/inittab or try to look in this forum).

Last edited by snop; 01-14-2004 at 05:24 AM.
Old 01-14-2004, 08:37 AM   #6
Registered: Dec 2003
Location: VA
Distribution: Ubuntu
Posts: 193

Original Poster
Rep: Reputation: 30
i know how to change the default runlevel; i currently have the system booting to runlevel 3. but when i start the system in runlevel 3, x windows is not running, is it? i am looking for a command that will return the system to that state after opening x windows, so i guess it would have to effectively close x windows. i know i can type init 1 or change to a different runlevel and it will kill x windows, but there has to be a better way...
Old 01-14-2004, 01:16 PM   #7
Registered: Oct 2002
Location: Northern Ontario, Canada
Distribution: Slackware 10.0
Posts: 789

Rep: Reputation: 30
First you should edit your /etc/inittab to look like this:

# These are the default runlevels in Slackware:
# 0 = halt
# 1 = single user mode
# 2 = unused (but configured the same as runlevel 3)
# 3 = multiuser mode (default Slackware runlevel)
# 4 = X11 with KDM/GDM/XDM (session managers)
# 5 = unused (but configured the same as runlevel 3)
# 6 = reboot

# Default runlevel. (Do not set to 0 or 6)

If you want it to stay in runlevel 3 by default. Now, if you're in KDE and you can't get back to the CLI by clicking K then Logout, it seems as though the problem is with your KDE and not with your Slackware.

To get into X, you should just type startx and leave out kdm all together. I bet it's your kdm that's causing this problem for you. When you're in KDE, try opening a terminal and seeing if kdm is running by typing ps -a. If it is, kill the process by kill command (man kill for more detailed info). Once you've issued the kill command, type ps -a again to see if it's gone. Now, just click on K then logout or exit. You should be back to the CLI at this point.

I've found some info on quitting kde at which might be useful. To quote that page:

"Quitting will close all windows and return you to your console or display manager."

It sounds like you're going back to the display manager. Honestly, I've never used KDE but after searching around ALOT it seems like this is fairly common with kdm. I would try a different window manager (such as XFCE, blackbox, fluxbox, etc.) rather than using KDE. Even Gnome might be better if you're looking for the bells and whistles.

Since you say your /etc/inittab is already set to runlevel 3, it doesn't make any sense why when logging out of KDE you don't go back to the command line. Hopefully this will help you out. I boot to runlevel 3 and use XFCE. I have no problems going back and forth from CLI to X. Very weird.
Old 01-14-2004, 01:30 PM   #8
LQ Guru
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 47
Type 'ctrl-alt-backspace' to kill X w/o switching runlevels.
1 members found this post helpful.


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
Hotkey to close Firefox (and maybe other windows) jagibbs Linux - Software 1 04-26-2005 11:31 PM
Can't close Konsole windows mittrekkie Debian 2 08-20-2004 10:39 PM
Close the Windows, It's HOT in here! GuruGeek2003 Member Intro 1 08-17-2004 04:36 PM
Windows close immediatly after opening! Help! thebasilisk Linux - Distributions 1 06-04-2004 02:23 PM
Browser windows close after loading... ted22j Linux - Newbie 1 04-24-2003 06:00 PM > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:51 AM.

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