Question How to display a message box through a background script?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Whats the error output say? It could be that kdialog is unable to run due to lack of a running X server, or is unable to find the server, or possibly other conditions of its starting.
SciYro is correct. When rc.local runs at boot time, there is no locally running X server upon which to display the output. You could set up a remote X server that will accept connections over the net, and then set $DISPLAY in rc.local to point to the X server. Or, if you don't actually need to see the output dialog, you could run a virtual X server like Xvfb, which will allow the application to run, albeit invisibly. Dialog boxes usually require user interaction in order to carry on, which usually makes them unsuitable for use in the boot process.
--- rod.
I have managed a similar situation, where I want a perpetually running application that also has an interactive console to be launched at boot time, on a headless machine. I accomplished this by running Xvfb, which can then host an xterm that hosts a Gnu screen session, running in multi-user mode. In rc.local, I use screen's 'stuff' command to start my application, which then runs. All of this is done in rc.local.
Later, from anywhere, I can attach to the screen session to monitor and interact with the application. Multiple users can do this, concurrently. Its a monumental hack, but it works.
--- rod.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.