Some times, after a reboot, some of my apps that have a GUI close. These apps provide web interface as well, but only if their gui potion is open.
If the unit is physically available to me, I can start a screen with the screen command, detach from it and if i ever need to open anything else that requires a gui, I can reconnect to that same screen to achieve the task.
IE > while on the server (physically)

screen -S display

then, I can be on any computer (remotely via ssh)

screen -r display
transmission-gtk&

The above code then would open transmission-gtk

but, if i dont have a screen attached to the physical machine, transmission-gtk will output

error, no display attached.

Note: I know there are commandline transmission as well as most other apps. however, this is the way I want to do it.

So here is the question!
How to I create that "screen" on boot. Which RC do I put it in.

3 Answers
3

I think the "error, no display attached" happens because you are trying to start a GUI program from a screen terminal. I could be wrong, but as far as I know, screen has no connection to GUI displays.

But to answer your question, @rlduffy's suggestion of using rc.local is a good place to start. You would need to add a line to the rc.local like the following that would start the screen process in detached mode: