Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the machine with Ubuntu desktop 7.something ... I want some server-like behavior without my participation. For example I have Azureus torrent-client there and I want it to start with the system like a service. Is it possible or I need another torrent-client?

share|improve this question
up vote 3 down vote accepted

The trick is that a program that relies on a GUI can typically only start after GUI login, unless the app is smart enough to be able to run headless and then display the GUI later (very few apps can do this, and I doubt Azureus can EDIT: Azureus actually can do this, I have linked to instructions for doing so below). If you need it to be a GUI app, then your best bet is to start the app with your Gnome session.

Otherwise, as Jonik mentions, you can add a line to /etc/rc.local that starts the program - anything that you can run from a command line which does not rely on X11 or Gnome should run from rc.local with no trouble. Edit:

Your best bet is The headless swing UI, which would give the best of both worlds, starting headless before you log in and making the GUI available later when you request it. Try either the screen or daemonized method, depending on which you are more comfortable with.

Another option is to start Azureus headless, you could also do this from rc.local. You could use the Azureus telnet UI, and then connect to it latter from the shell, if you are comfortable controlling the app from the command line.

share|improve this answer

To automatically run a command (that e.g. launches some service) when the system starts, an easy way is to add it in /etc/rc.local file.

A more flexible (but not as simple) way is to create an init script under /etc/init.d/. Packaged Ubuntu server software comes with such scripts. To learn more, you could start here.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .