I have a server program written in Java. When started the program needs to run in a loop to keep listening for clients to connect.
I want to have this program running when the user boots up the PC and Linux is running in runlevel 5. What should happen is that the server program runs in a bash shell within the desktop.
I tried placing the command line [which in my case is java myserver] in the .bashrc script file in the user's directory. Of course all the paths and classpaths for JRE have been set before this line.
What happens, however, is that when I bootup, the blue desktop in X11 appears and hangs there. The other desktop components do not appear. Apparently what has happened is that Linux is in X11, the .bashrc script has run, and because my program is running, the other desktop components in Gnome cannot execute. I know my program is running when I take a look at the processes running from another terminal.
When I switch to runlevel 3, during bootup, my program runs (in command line mode, it shows 'Myserver is running in <ip> at <port>), and everything stops there.
So, how do I boot up in graphical mode and haev my server program running in a separate shell at the end.