无法使用启动管理器禁用cups服务

在启动管理器中 ,我已经禁用了杯子,因为我的笔记本电脑没有连接任何打印机。 但是,杯子服务仍然会自动启动。 如何禁用此类服务​​? 顺便说一句,我使用的是14.04。

在此处输入图像描述

我将/etc/init.d/cups*文件的权限更改为000并且仍在重启时我在运行ps -aef | grep -i cups时看到了服务 ps -aef | grep -i cups命令。

 praveensripati@MyUbuntuLaptop:/etc/init.d$ ls -ltr cups* ---------- 1 root root 3184 Apr 3 22:19 cups ---------- 1 root root 1961 Apr 7 21:04 cups-browsed praveensripati@MyUbuntuLaptop:/etc/init.d$ ps -aef | grep -i cups root 1154 1 0 18:26 ? 00:00:00 /usr/sbin/cups-browsed root 3083 1 0 18:26 ? 00:00:00 /usr/sbin/cupsd -f lp 3087 3083 0 18:26 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus:// lp 3088 3083 0 18:26 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus:// lp 3089 3083 0 18:26 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus:// lp 3090 3083 0 18:26 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus:// lp 3091 3083 0 18:26 ? 00:00:00 /usr/lib/cups/notifier/dbus dbus:// praveen+ 3466 3129 0 18:33 pts/14 00:00:00 grep --color=auto -i cups 

要通过upstart禁用cups服务,请尝试 root 身份运行以下命令:

 echo "manual" > /etc/init/cups.override 

你可以通过运行sudo -ssu来成为root用户

取自Upstart Cookbook

本节将告诉Upstart忽略节上的开始/停止。 它有助于在系统上保持作业的逻辑和function,而不会在启动时自动启动。

例:

 manual