LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Disabling X. (https://www.linuxquestions.org/questions/linux-newbie-8/disabling-x-846630/)

pinga123 11-25-2010 11:30 PM

Disabling X.
 
As a Security practice I wanted to disable X from loading.
So i modified following line from /etc/inittab.
id:3:initdefault:
I was then able to start my machine in terminal mode(runlevel 3).

I wasn't satisfied at this stage as i was able to get the graphical console by merely typing
Code:

#init 5
So i search and find out that the reason for loading the graphical user interface was a script resided in
Code:

/etc/X11/prefdm
So i renamed it thinking OS will fail in finding it when invoked by inittab file .
To my surprise i was able to get the terminal back even if i hit
#init 5
but then i realize i keep on getting following error lines.
Code:

INIT: cannot execute "/etc/X11/prefdm"
INIT: cannot execute "/etc/X11/prefdm"
INIT: Id "x" respawning too fast: disabled for 5 minutes
respawn

I found out the reason behind this was a line in /etc/inittab
Code:

x:5:respawn:/etc/X11/prefdm -nodaemon
(respawn The process will be restarted whenever it terminates)
Since the file prefdm was renamed and respawned the OS was keep on trying to execute it considering it is terminated.

Now i have made the above line commented and removed execute bit of the file .
System is now behaving as i wish it would.

Will it make any difference?
I m not using any application that explicitly use graphical user interface and i can work in runlevel 3.

foodown 11-26-2010 12:15 AM

No. The only difference it will make is the one that you wanted.


All times are GMT -5. The time now is 01:29 AM.