How does a graphical front-end control a daemon?

I'm developing a file sync daemon on Ubuntu as a hobby project, and I'm thinking I might want to develop a graphical front-end at some point which will let me control it. How can a GUI control and communicate with a daemon program? What methods are available / recommended?

In this particular case, I'm using C++, but a general answer applicable to any language would also be fine.

1 Answer

You can:

  1. Communicate using D-Bus which is very popular this days.
  2. Just change a configuration file and signal your daemon to reload it (SIGUSR1, SIGUSR2 and SIGHUP have exactly this purpose).
  3. Write your own protocol with something like Thrift or Protocol Buffers.
  4. Use a low level IPC mechanism.

In your place I would go with D-Bus

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like