LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-18-2004, 11:49 PM   #1
TreeDragon60
LQ Newbie
 
Registered: Feb 2004
Location: Eastern PA
Distribution: Fedora Core
Posts: 16

Rep: Reputation: 0
Question Does Ctl-Alt-F1 kill X, or just put in background?


First off, thanks to all the people that are smarter than me that post here - I've been using Fedora for about a month now, and have a game server, web server, file server, and all the basic apps running smoothly - thanks mostly to this forum and it's great members.

Now that the mushy stuff is out of the way...

I have looked but can't find a basic answer to this question...if I am in X Gui, when I hit ctl-alt-F1, does it kill the X gui, or is it still running in the background (and still using resources)?.

The reason I ask...I only have a 933mhz machine with 512 RAM, and want to use all the resources for running the above servers, and am learning how to do stuff from the shell so I don't use any of my computer's resources with the GUI.

So can I do ctl-alt-F1 to kill the gui, or is it better to change to init 3 and then back to init 5 when I want to work in the gui? Also, does it make a difference if I kill the gui as opposed to rebooting in init 3 when it comes to recovering available resources? (From all I have learned about how Linux uses resources I think the answer to this is no, but....not sure). Or is there an easier way to do it that I don't know about yet?

Thanks again for all the great help here!!!
 
Old 03-19-2004, 12:09 AM   #2
flv7a
LQ Newbie
 
Registered: Apr 2003
Posts: 20

Rep: Reputation: 0
Ctrl-Alt-F1 merely switches to one of the other ttys.
By default Ctrl-Alt-(F1-F6) are the text based ttys, with X running on the 7th (Ctrl-Alt-F7)

If you are concerned with resources, it is far better to switch to runlevel 3 vs. simply killing X as there are other processes that start in support of the X environment.

Perhaps ideally you might want to change your default boot runlevel from 5 to 3:
Look for this line in /etc/inittab:
id:5:initdefault:
and simply change the 5 to a 3.

After doing so your machine will simply boot to a text based login. After you're logged in you can start X simply by typing 'startx', and when you log out of Gnome/KDE you'll be back to the text tty.

Hope this helps.
 
Old 03-19-2004, 01:15 AM   #3
TreeDragon60
LQ Newbie
 
Registered: Feb 2004
Location: Eastern PA
Distribution: Fedora Core
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks for the info...that does help...

I thought that was how it worked, but wanted to make sure...thanks again!!!
 
Old 03-19-2004, 08:07 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
You stop X with <Ctrl>+<Alt>+<Backspace>. Try that and list the processes still alive with ps -a (man ps ) or top. Then look at your free resources. (I have 700 MHz and 640 MB and use frequently three users with their separate GUIs with no problems).

Startx has more possibilities:
When you set initdefault 3 do e.g.
login as root
startx
(that gives root his default GUI under <Ctrl>+<Alt>+<F7>)

<Ctrl>+<Alt>+<F2>
login as user #1
startx -- :2
[with the blanks exactly as shown above]
(that gives user #1 his default GUI under <Ctrl>+<Alt>+<F8>)

<Ctrl>+<Alt>+<F3>
login as user #2
startx -- :3
[with the blanks exactly as shown above]
(that gives user #2 his default GUI under <Ctrl>+<Alt>+<F9>)

You can also change the GUI with the startx-command with something like

startx -gnomestart :3

but here I am not sure of the syntax.

An Ampersand at the end of the startx commands like
startx -- :3 &
will spawn the GUI as background job and you can use the text-terminal as usual without it being blocked by the startx command.

Experiment and enjoy .

Last edited by JZL240I-U; 03-19-2004 at 08:09 AM.
 
Old 03-19-2004, 10:17 AM   #5
TreeDragon60
LQ Newbie
 
Registered: Feb 2004
Location: Eastern PA
Distribution: Fedora Core
Posts: 16

Original Poster
Rep: Reputation: 0
JZL - awesome info - thanks.

I read a bunch of stuff on this and didn't really grasp it until now - thanks for the clear explanation - it all works like a charm.

Geez I love Linux...
 
Old 03-19-2004, 11:37 PM   #6
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
ctrl-alt-bksp actually crashes the X server, you should only do this as a last resort as opposed to using sys rq or pulling the plug out of the wall socket. Log off if you are ending your X session.
 
Old 03-22-2004, 08:15 AM   #7
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
Quote:
Originally posted by DavidPhillips
ctrl-alt-bksp actually crashes the X server...
Huh? Is that different to
Code:
kill -9 X(*)
(*): X standing for whatever name the X-session really uses? On the third hand what does an
Code:
init 3
really do?? (normal stop process "X" perhaps ).

Last edited by JZL240I-U; 03-22-2004 at 08:16 AM.
 
Old 03-22-2004, 09:21 PM   #8
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Cool

kill -9 would be about the same thing as ctrl-alt-bksp

init 3

That's a different story, it depends on your init scripts, how you started X in the first place, and what the runlevel is when you run startx. Also it would matter if you are using a login manager for X and are in runlevel 5.

It could very well do nothing at all.


People who get out of X would be better off starting up in runlevel three and using startx.

Just log off.

Last edited by DavidPhillips; 03-22-2004 at 09:23 PM.
 
Old 03-24-2004, 01:44 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
I see. Thank you.
 
Old 03-29-2004, 08:18 PM   #10
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I just saw this, which explains some more on using kill -9


Don't use kill -9.

It doesn't give the process a chance to cleanly:

1) shut down socket connections

2) clean up temp files

3) inform its children that it is going away

4) reset its terminal characteristics

and so on and so on and so on.

Generally, send 15, and wait a second or two, and if that doesn't
work, send 2, and if that doesn't work, send 1. If that doesn't,
REMOVE THE BINARY because the program is badly behaved!

Don't use kill -9. Don't bring out the combine harvester just to tidy
up the flower pot.




I don't know who wrote it, I found it here.. (with other stuff I'm guilty of)

http://www.sektorn.mooo.com/era/unix/award.html

Last edited by DavidPhillips; 03-29-2004 at 08:21 PM.
 
Old 03-31-2004, 01:08 AM   #11
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
Thanks again, for longer explanation and link .
 
Old 03-31-2004, 01:21 AM   #12
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
I think I should have won the useless use of cat award a few times. For some unknown reason it seems like more fun to use `cat filename| less` than `less filename`. If you don't use cat you would not need a pipe.

Pipes rule.
 
Old 03-31-2004, 01:27 AM   #13
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
Isn't it late night now in Alabama? What are you doing with your computer at this time (except typing atrocities with cats )?

 
Old 03-31-2004, 01:38 AM   #14
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,154

Rep: Reputation: 56
Just checking the emails. I can't get past the stupid elephants on LOTR.

Driving me crazy.
 
Old 03-31-2004, 01:41 AM   #15
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE 13.1 / 12.3_64-KDE, Ubuntu 14.04, Fedora 20, Mint 17, Chakra
Posts: 3,642

Rep: Reputation: Disabled
Quote:
Originally posted by DavidPhillips
LOTR
Lord of the Rings?

 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ctl-alt-F7 = freeze -0- Slackware 4 03-21-2005 01:48 PM
CTRL-ALT-Backspace won't kill X. zzzt Linux - General 4 01-08-2004 08:39 PM
ctl-alt-del equivalent in linux? pekuekfir Linux - General 14 09-20-2003 12:14 PM
ctl-alt-f8 thru f10 give nothing desolat Mandriva 2 09-17-2003 07:28 PM
CTL+ALT+DEL logoff screen gone ScreeminChikin Linux - General 2 09-19-2002 04:16 AM


All times are GMT -5. The time now is 09:55 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration