cristianv Posted March 7, 2014 Report Share Posted March 7, 2014 Hello I am writing a Linux applications that should have the following characteristics :- start as a background process at system start-up (before user log in) - no taskbar element- have a GUI (launched by user) for changing some parameters - possibility to show some messages to user (alarms, errors)I thought of building a shared library (embeded) with an infinite loop that does the process, and another application that contains the GUI and implement some kind of communication between them. How should I start the process at start-up?I am pretty new to linux, so any suggestion will be probably helpful.ThanksCristian Quote Link to comment
Rolf Kalbermatter Posted March 7, 2014 Report Share Posted March 7, 2014 A shared library seems like a bad idea to start as self contained background application (deamon). Instead you should simply create a headless executable and add it to your boot sequence. How you can add an executable to the boot sequence depends a bit on your specific Linux distribution and version but you usually add a script that calls your executable somewhere in /etc/rc.d/, /etc/rc.d/init.d, or /etc/init.d, depending on your Linux version. This script is a shell script that takes certain parameters like start and stop and translates that into calls to your executable. Theoretically you could even program your LabVIEW program to simply take those command line parameters and execute accordingly and then just add a symlink to your executable to the right sysinit location. Your LabVIEW deamon really is a headless system as it will normally run directly in the system without any GUI. In order to allow user configuration you would either have to allow some IPC communication between your UI component and your deamon, such as a little TCP/IP server in your deamon program. You don't even have to write that server yourself but could enable the VI server in the LabVIEW application and simply call in the deamon some VIs that update its internal state through the Call By Reference method of VI server. Quote Link to comment
cristianv Posted March 10, 2014 Author Report Share Posted March 10, 2014 Thank you for the ideeas. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.