Search:  
Gentoo Wiki

HOWTO_Manage_services_and_runlevels_via_a_modern_GUI


Please format this article according to the guidelines and Wikification suggestions, then remove this notice {{Wikify}} from the article


Contents

About servant

Servant is a graphical replacement/ alternative for rc-update, rc-status and the traditional way of controlling the services i.e. starting/stopping/zapping them. Userfriendliness has been the ultimate goal. It has been developed in Qt4 and released under GPL. It sports a systray icon that informs you of any occuring changes via baloon messages. It is still in a very early stage of development but yet very usable and stable. It provides easily accessible documentation via tooltips and 'whatsthis' mode, so even newbies that have never been exposed to runlevels and initscripts will feel at home immediately. Here is a video (20MB) showing servant in action. The video is encoded with the theora codec so you need to have it installed to be able to playback the video. On my gentoo-box only mplayer plays the video correctly, whereas xine and vlc -- for whatever reason -- fail to do so :(. On windows vlc is probably best suited for watching this and has been reported to work flawlessly.

Screenshots

Installation

Prerequisitives

Ebuild

The ebuild for servant is not in the portage tree yet, so you have to install it as a thirdparty ebuild .If you are still motivated to install servant using the ebuild, download it here and place it in sys-apps/servant/ of your portage overlay directory, and follow the instructions for installing thirdparty ebuilds.

Using servant

Servants GUI is more or less selfexplanatory. On the top right corner you find a dropdown list with the names of the runlevels in conjunction with 'All' and 'None'. The dropdown list is used to filter the services for the corresponding runlevel. All lists all runlevels regardless of their runlevel. None only shows those services that do not belong to any runlevel. In the bottom right corner of the project there is a search filter. You can type in a string to make servant show only the services that contain the string. The services themselves are showed in the center of the application window.


They each have a statuslight to indicate whether they are running or not. running processes are indicated by a green statuslight whereas stalled processes are red. Furthermore color gradients are used in order to indicate the state of the services. If the service has a green gradient it means the process is at least listed in one runlevel and also running. Blue indicates that the process is running, but not enabled in any runlevel. yellow means the process is neither enabled in any runlevel, nor running whereas stands for a service that is not running even though it is listed in some runlevel.


Double clicking a service opens a dialog in which you can control the state of the service via the buttons on the right side of the windows.

On the top-left side there is a box that contains a short description of the service. If it is empty, that means, that there is no description available at this time. You can help us with writing descriptions and putting them on the discussion site of this page. More on this below in section Adding descriptions;

If you do a right click instead of a double click you get a context menu with similar capabilities but designed for faster access. This is more or less everything you should know to be able to use servant.

What you can do for servant

Developing an application, even a small one like servant requires time and devotion. You can participate in its develompment by giving feedback, reporting bug, translating the userinterface into other languages and by extending the list of initscript descriptions that is shipped with servant.

Adding new Translations

The tools provided with qt4 make translating qt apps a breeze. All you need to do is extracting the servant tarball into a directory of your choice and then modify the servant.pro file located in its src directory to include your language. Then you run lupdate and then open the created translation file from within linuguist (which is also provided by qt4). You can then translate all strings into your language and then save the translation file. In order to create a binary-translation file you must click File>'Release from linguist's File menu. The outputted file then can be used with servant. Beneath is a more detailed step to step description of this process.

tar xvfj servant-0.1.5.tar.bz2 
cd servant
TRANSLATIONS = servant_de.ts \
               servant_fa.ts \
               servant_<language 1>.ts \
               servant_<language 2>.ts

Replace <language 1> and <language 2> with the correct appreviation for your language. de for example stands for german and fa stands for farsi.


In order to test the translation files you generated you can either temporarily put the *.qm files to where servant is installed (/usr/bin/) or build servant manually and experiment with it in the build-directory.

Adding descriptions

In the source directory of servant, there is a xml file named initscripts.xml. In this file you will find all of the initscript descriptions displayed by servant at runtime. Note that modifying this file alone will have not effect on the already compiled servant binary since the file is bein built into the application. You need to recompile the application to benefit from the updated file. The file is a very simple xml file with entries like that:

<service name="vsftpd">
  <description>

vsftp is a widely used ftp server that was build with security, speed and size in mind.

  </description>
  <icon></icon>
</service>

All one needs to do is add a description between the opening and closing description tags. In order to create a whole new entry for a service not listed in the file just copy the above snippet and change the 'name attribute' of the service tag to reflect the new service. When you are satisfied with the description please add it to the discussion and bugs page of this howto.

Troubleshooting

If you receive following error when trying to launch servant:

Opening FAM failed. Use gamin instead or make sure the famd (fam daemon) is running.

this means that app-admin/gamin is not installed. Install it and try again. If fam is blocking app-admin/gamin, then deinstall fam first. Even though it is possible to run servant with fam (the famd must be running -- '/etc/init.d/famd start' ), you should uninstall it and merge gamin instead. Read this for a more thorough understanding of the 'famd vs. gamin' matter.

Bugreports

Bugreports along with suggestions and feature requests go to momesana@yahoo.de.

links

Retrieved from "http://www.gentoo-wiki.info/HOWTO_Manage_services_and_runlevels_via_a_modern_GUI"

Last modified: Mon, 08 Sep 2008 11:18:00 +0000 Hits: 7,676