Q:

how to add these 3 lines as enviroment variables to .profile bash file

How do I add these 3 lines into .profile as environment variables:
BBSCONFIG /home/tony/majorbbs.cfg    
BBSDISP xwindow   
DISPLAY hostname:0.0

A:

cat >> ~/.profile <<x
export BBSCONFIG=/home/tony/majorbbs.cfg    
export BBSDISP=xwindow   
export DISPLAY=hostname:0.0
x

What this piece of code does is to append the three lines to the end of the .profile file in your home directory. (The <<x tells the cat command to copy from the terminal until it sees a lone x; the >> ~/.profile appends that text to the file`.)
The changes will be effective when you next log in.
You may find that DISPLAY is automatically set when you're using an appropriate display, so it would generally be better not to set that one yourself.

