Setting "DISPLAY"

I have set up FreeBSD with X many times but am trying to create a fresh system from scratch and find tha "DISPLAY" does not get set but don't ever remember having to set it, just assumed it was automatically set somehow. It has never been an issue AFAICS.

What have I overlooked?

The guides I have just gone through don't mention anything about setting "DISPLAY".
 
The value of DISPLAY gets set for you by startx(1), which you either run manually from the console or gets run for you by your login manager, eg sddm, when you log in. See the description of 'DISPLAY' in the startx manpage. Usually on a single-user system like a laptop it will be set to ':0'. You don't need to set it yourself, startx sets it for you.

So the answer is to start X11 by running 'startx', or using a login manager like sddm that calls startx internally.
 
Come on balanga . You've been here long enough to know that you didn't give enough information in your OP to help you.

What desktop are you running there, how do you start it and what terminal is missing the variable?
 
What has ever been the requirement of this apparent manual setting? It has never been clear to me. Like, X11 is unable to determine the display device and needs human help to get it right. Ok...
How about trying what ":0." stands for by default to avoid "bad display" errors?
 
What I am wondering is where is the distinction or split between ‘:0’ for the “DISPLAY” screen on console when console is rendering as a text user interface (TUI) or a graphical user interface (GUI).
 
What I am wondering is where is the distinction or split between ‘:0’ for the “DISPLAY” screen on console when console is rendering as a text user interface (TUI) or a graphical user interface (GUI).
The console has no $DISPLAY variable, but you can set one.
 
That's not a good idea. The variable is supposed to be set somewhere and if it doesn't it is better to get an error message.
I think X.org should just explain what's going on on hardware-level instead of referring to its own configuration design. ":0." means primary display on the local machinne. That still has to be specfied if there's only 1 physical monitor present anyway?
"Invalid display variable" as error is no information. It looks like a bit childish resisting of the PC standard. Assuming a default home setup is a problem? PC's with 1 monitor are +90% of the cases.
 
X(7)
Code:
ENVIRONMENT
     DISPLAY
        This is the only mandatory environment variable. It must point to an
        X server. See section "Display Names" above.
XOpenDisplay(3)
Code:
On a POSIX-conformant system, if the display_name is NULL,
it defaults to the value of the DISPLAY environment variable.
 
I haven't had to do anything with $DISPLAY as long as I've used Linux and FreeBSD (likely the only time I typed that :p); closest is DISPLAY="" for Wine and Wayland
 
Back
Top