# Error: Can't open display:



## senenmut (Feb 8, 2021)

Hello Unix,

I have successful installed the amd64memstick.img to an external HDD.  FreeBSD 12.2
I have fully updated the OS. It's full up to date. 64 bit. all installed.

Now I try to compile a stable MOTIF sourcecode and start it.
The source it is as the follow attachment.

The compilation process is successful.

In the last step I need help because the executable that I have compiled spit out the following error :

```
Error:  Can't open display:
```
Seems that something on the FreeBSD system isn't configured in the proper manner.

SM


----------



## SirDice (Feb 8, 2021)

senenmut said:


> Error: Can't open display:


Are you starting the application from within an X session? 



senenmut said:


> Seems that something on the bsd system isn't configured in the proper manner.











						Chapter 5. The X Window System
					

This chapter describes how to install and configure Xorg on FreeBSD, which provides the open source X Window System used to provide a graphical environment




					docs.freebsd.org


----------



## senenmut (Feb 8, 2021)

hi ,
i start the executable from home folder on.
dont know if there is an x session.
just updated all.


----------



## SirDice (Feb 8, 2021)

senenmut said:


> dont know if there is an x session.


I'm betting you're running this from the console (text screen). Configure and start X (graphical GUI environment). Then run your application there.


----------



## senenmut (Feb 8, 2021)

bsd isnt running anymore.
i must delete it and start new.


----------



## senenmut (Feb 8, 2021)

How to start X graphical environment ?


----------



## SirDice (Feb 8, 2021)

senenmut said:


> How to start X graphical environment ?


Handbook: Chapter 5. The X Window System


----------



## senenmut (Feb 8, 2021)

I'll be back.


----------



## senenmut (Feb 8, 2021)

hello again ,
in the distribution selcet for install.
What are the minimal option for an bsd installing.
base-dbg
kernel-dbg
lib32-dbg
lib32
ports
src
tests
--------------------------------------------------------------
what i want to do is xorg and motif running with display manager.
so i want to install with PKG
that should be on board
only X11 port installation cannot be done i suppose. only all ports.


----------



## SirDice (Feb 8, 2021)

senenmut said:


> What are the minimal option for an bsd installing.


Leave only lib32 and src enabled. Disable everything else. Unless you plan on debugging FreeBSD itself you don't need the debug libraries. 



senenmut said:


> only X11 port installation cannot be done i suppose. only all ports.


The option there is for the ports tree, not the ports themselves. Leave it off. It's easy to do afterwards, and you don't need a ports tree to install packages.

Handbook: 2.5. Using bsdinstall


----------



## senenmut (Feb 8, 2021)

something to learn.
i use all on ub with supergrub boot cd

ALL INSTALLATIONS DONE.

JOB DONE.  startx    xtermGUI is seen.
have started an code editor complete written in motif.


----------



## senenmut (Feb 8, 2021)

Hello SirDice ,

if motif gui are opening in XTerm i think i have to learn more about xterm.
XTerm seems to be the standard for that.

Ready to make a Desktop Environment in pure UNIX.


----------



## SirDice (Feb 9, 2021)

You need to modify your ~/.xinitrc if you want `startx` to start a different window manager or desktop. By default the standard TWM window manager of Xorg is started.









						Chapter 5. The X Window System
					

This chapter describes how to install and configure Xorg on FreeBSD, which provides the open source X Window System used to provide a graphical environment




					docs.freebsd.org


----------



## senenmut (Feb 9, 2021)

thank you , i know the background.
only want to program in C.
searched real UNIX.
found it finally here in freebsd.
honors to the real master Dennis Ritchi.

what i do here is C programming with motif on bare metal freebsd.
a complete desktop environment takes RAM and slowes down.
fits for entuser computer.
even the environments have too many dependencies.

think to programm a kind of "pre - desktop - environment" such like a gui
with very great buttons.


----------

