Articles & Code Snippets

Temporarily stopping the X server

Temporarily stopping the X server

Close the graphical session by selecting “System -> Logout” in the top menu.

This shuts down the X server, and we land in an alphanumerical window. However, the windows manager is still running at this point. Login as root and run the command “/etc/init.d/gdm3 stop” (you may need to replace “gdm3″ with the actual name of the script corresponding to the windows manager installed in your system: “gdm”, “kdm”, xdm”,etc…)

Start again the X server

To start again the X server and the windows manager, we use the same command as in step 3 above, passing it the argument “start” instead of “stop”:
/etc/init.d/gdm3 start

How to prevent the X server from running at boot time

We can disable the execution of the X server and windows manager at system boot time with the command:
# update-rc.d -f gdm3 remove
once again, substitute “gdm3″ with the name of the windows manager actually installed (“gdm”, “kdm”, “xdm”,… )
To start manually the X server, login as root and execute
/etc/init.d/gdm3 start
And to configure again the execution of the X server at system boot time:
# update-rc.d -f gdm3 defaults