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:
sudo echo "manual" >> /etc/init/lightdm.override
To start lightdm when you need it:
sudo start lightdm
To restore your system so that lightdm is always started on boot:
sudo rm /etc/init/lightdm.override

Comments

  1. You are great! THis is exactly what i have been looking for and it works perfectly! Thanks a lot!

    For 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"

    ReplyDelete
    Replies
    1. Note:
      The 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

      Delete

Post a Comment

Popular posts from this blog

Protect Your Private Data

Android Üzerinde C/C++ Kullanımı