linux - How to deal with DISPLAY=:0.0 -


my x program must started console, default on ubuntu display env var not set. correct include display=:0.0 startmyapp in startup script, or how deal otherwise? , when , how responsible setting display variable properly? why environment not out of box ready once install x or desktop includes x?

the display variable controls x session application communicates with. there can many (or none) of these available @ given moment. can't statically set value , have correct.

it set correctly inside x session (through environment) , can set manually outside of use same session (but have know session want use that).

if know session , know session want use yes, can set in services startup script. otherwise need come other way figure out display value need.


Comments