This question already has an answer here:
- Run a GUI program at startup 3 answers
I've been trying to figure out how to start an application after Debian (Wheezy) is done booting up and on an LXDE desktop session. It is a mono C# application. The script I have is simply
I then added this script to init.d and from there did update-rc.d add myapp. This did not work because it would return
(myapp:4820): Gtk-WARNING **: cannot open display:
As apparently not everything is yet set up to be able to use a GTK application. This is why I'd like to start the application AFTER everything has been set up. I've also tried adding it to crontab (-e) by adding this line:
I've also added
#! /bin/sh ### BEGIN INIT INFO # Provides: beheertool # Should-Start: console-screen dbus network-manager # Required-Start: $all # Required-Stop: $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: start beheertool ### END INIT INFO #
To the original script to perhaps make it launch later (with the Required-start: $all part).
None of these have worked, any help would greatly be appreciated.
EDIT 1: The application is a C# Mono application that uses GTK-sharp. The environment itself boots to a GUI (LXDE) without requiring login. When normally running the application outside of the boot script X seems to be running (when checked with pidof X). Adding /usr/bin/startX to the script changed nothing, however.