Services Admin dialog redesign


The current "Services" administration dialog is very useful, but not extremely intuitive. It merges the current state of the service (is it running, currently) and the fact that it should be launched at startup time. This specs describes how we could enchance this.


The dialog should provide, for each service it lists, two options:

  • Start/stop the service immediately (button).
  • Enable/disable launch of the service at startup (checkbox).

(See the "Design" section).

Use cases

  • Bob is very confused with what the dialog does in its current shape. When he unchecks a box, does it stop the service automatically (AFAIK, yes)? Will it be activated again at next startup (AFAIK, no)? What if he unchecks a box (service stops), then clicks the "Cancel" button to close the dialog, will the service be relaunched (AFAIK, no), and will it be launched again at next startup (AFAIK, yes)?
  • John is a web designer, and likes to try things locally before he uploads them to his dedicated web server. Therefore, he has installed a web server on his local machine (e.g. apache). He wants to be able to launch apache and load pages from http://localhost when he wants, but he doesn't want to turn his box into a real server all the time. To do this, he can leave the "Launch at startup" checkbox unchecked, and whenever he wants to try something locally, he just presses the "Start" button of the apache service. Then he can either stop it by pressing the button again, or just leave it on if he plans to shut his computer down soon (the service won't be restarted at boot time).

  • Jane has the same kind of problem with ssh, ntpdate, etc. She might want to run these services just once for a special purpose, without activating the service always (she'll just press Start/Stop), or she might want to be able to stop a service (e.g. ntpdate) whenever she wants, while still sure that it will start again at boot time.


To be discussed

Should the dialog have a "Cancel" button, since it has "instant-apply" changes? If it should have one, what should this button cancel: the launch-at-startup part, or the "start/stop" part (is that very hard to do?), or both? How can we let the user know what it will do exactly ?

sklp: gnome prefs windows normally have instant-apply and simply a close-button, should be the case here aswell (IMO)

bcreitz: Could/should this spec be broadened to include a commandline service editor, a la RHEL's chkconfig? I normally install sysv-rc-conf immediately to fulfill that need, AFAIK Ubuntu doesn't ship with one.


I'll be glad to do the coding if this spec is accepted.

It turns out that knowing whether a service is currently running is not trivial. Update: a good way to know this is to run something like:

sudo start-stop-daemon --exec which klogd --test --start

(Woops, I don't know how to make those back quotes appear normally)

If the service (klogd here) is running, it ouputs "... already running", and if not, it outputs "Would start ...". However, upstart might be able to do this more easily next cycle (ie edgy + 1).


ServicesAdminRedesign (last edited 2008-08-06 16:29:25 by localhost)