I'm using Raspbian, which is based on Debian. My Raspberry automatically boots into the desktop. I have a small program written in C and compiled with g++ as executable. The program needs a running network connection and outputs some data to the terminal. Nothing fancy.
To use it, I have to open a LXterminal window and run the program manually with sudo rights
My question is: How do I automatically start a terminal based program after a network connection is established?
I use wvdial to connect a 3G dongle automatically via
/etc/network/interface. The connection works. I can ping and surf
auto ppp0 iface ppp0 inet wvdial
I followed this tutorial to set up wvdial if it matters
I saw a method which uses the
post-up method in
/etc/network/interfaces to call a bash (?) script. But I couldn't get this method to run a non-GUI application
My last attempt before I gave up was
auto ppp0 iface ppp0 inet wvdial post-up LXterminal "sudo ./Desktop/rpiMainProgram"