How Can you Disable a Ubuntu Service From Running at Boot?
I had an Ubuntu 11.10 VirtualBox instance which I needed to access just by SSH, so I investigated how to easily disable lightdm (the service that starts up X, the graphical user interface) from running at boot.
Seems like it's pretty easy do disable an upstart service in Ubuntu. Just create an override file and lightdm won't start at boot:
Seems like it's pretty easy do disable an upstart service in Ubuntu. Just create an override file and lightdm won't start at boot:
sudo echo "manual" >> /etc/init/lightdm.overrideTo start lightdm when you need it:
sudo start lightdmTo restore your system so that lightdm is always started on boot:
sudo rm /etc/init/lightdm.override
You are great! THis is exactly what i have been looking for and it works perfectly! Thanks a lot!
ReplyDeleteFor your info:
I have Xubuntu-desktop installed on an Ubuntu 11.10 SERVER and i m using SSH access to this server.
I use Nomachine NX client-node-server in order to graphically remote control the server.
see:
https://help.ubuntu.com/community/NomachineNX?action=fullsearch&context=180&value=linkto%3A%22NomachineNX%22
This works fine and i dont want to popup the lightdm on the server, because i only need the graphical interface from the remote connection.
I tried your solution and it gives me exactly what i need: The server just keep with the TTY prompt and when starting my NX-Client connection from e.g. a Windows PC to this Ubuntu Server, the lightdm is started from the NX Client and i see the desktop from the remote connection.
To achieve this i have to run the custom command on the NX-Client "/usr/bin/xfce4-session"
Note:
DeleteThe command
sudo echo "manual" >> /etc/init/lightdm.override
did not work due to permission error.
My workaround was obvious ( i used an editor instead of the >> operator)
sudo nano /etc/init/lightdm.override
and then i enter the word
manual
and then i save this file