How Does a Graphical Front-End Control a Daemon?

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

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

David Miller
Author

David Miller

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.