PDA

View Full Version : Is it possible to disable X-server?


ruipedroca
2008-06-02, 02:20 PM CDT
Hi,

I'm running a Fedora 7 server virtual machine and i'm very satisfied.

My question is:
Is it possible to disable X-server, by default?

I mean, is it possible to program Fedora 7 so when it starts it doesn't start X, but instead just to terminal.
Then, if needed one could start manually X-server.
This would be useful for saving resources that X normally wastes.
And when we have more than one virtual machine, savings become necessary.

I need X server because i need it to install and configure initially all the applications.

Regards

tjvanwyk
2008-06-02, 02:33 PM CDT
Hi,

I'm running a Fedora 7 server virtual machine and i'm very satisfied.

My question is:
Is it possible to disable X-server, by default?

I mean, is it possible to program Fedora 7 so when it starts it doesn't start X, but instead just to terminal.
Then, if needed one could start manually X-server.
This would be useful for saving resources that X normally wastes.
And when we have more than one virtual machine, savings become necessary.

I need X server because i need it to install and configure initially all the applications.

Regards
The easiest way would be to change the default runlevel the kernel boots into.

Log in as root and edit the file "/etc/inittab". There should be a line that reads:

id:5:initdefault:


Change that to:

id:3:initdefault:

That will change the boot runlevel. But after editing that, you'll still be in runlevel 5. So, to switch the current runlevel, you can use:

telinit 3

To go to the runlevel without X, or:

telinit 5

... to go back to the runlevel with X.

ruipedroca
2008-06-02, 02:46 PM CDT
Hi,

Thanks very much for your fast reply!

I've been in /etc/inittab and i can see the "id:5:initdefault:" line.

As to the "telinit 3", could you please clarify?
Is it a command i need to run at the terminal?
Or is it in the /etc/inittab also (i can't see it)?...


Regards

tjvanwyk
2008-06-02, 07:09 PM CDT
Sorry to be vague. Yes, telinit is a command that can be run as needed from bash (terminal) to change your current runlevel.

savage
2008-06-04, 08:23 PM CDT
Just to top up on that, if you don't want to keep switching to runlevel 5 to get X loaded, you can use 'startx' from the command line.