I've been experimenting XFree86, now after I compiled XFree86 3.3.6 and configured my video card and monitor, I test it by runnig startx, so far I have'nt experience any problem but ofcourse the Xwindows is still empty. Now the problem is everytime I exit from Xwindows session, what Im expecting is to go back to the prompt, but it does'nt happen, my system will just hang-up. What would be the possible cause and how do I fixed it?

Which window manager are you using? In KDE 2.01 there's a problem
with the logout button not working all the time. Sometimes you
can hit it a second time and it will send you back to the prompt
but if it totally hangs, you can always use CTRL+ALT+BACKSPACE to
exit any window manager.

no, not kde2.01, actually this system don't have Xwindows installed before, don't have any window manager or any x-application(s). I've installed XFree86-3.3.6 from port collection particularly from "/usr/ports/x11/XFree86" of FBSD4.2 stable. I think the default WM is "twm". This is really what happen, after I "startx" it then shows twm, then an xclock and 2 (or 3) xterm that comes out, when I click the mouse from the current desktop, the green twm menu pop-up, then I select the exit (so I can go back to the prompt (non-gui prompt) supposedly), but the xwindow (gui thing on my current desktop) does'nt exit, the 2 xterm and an xclock is still there, mouse and kboard is still working (means I can type from my keyboard to those xterms and when I move the mouse from those 3 objects on my desktop, it can still focus from 1 object to another) and when I click again on the desktop, the twm menu does'nt pop-up anymore, so Im concluding that my system hang-up, but I can still execute some commands from the remaining xterm, so I tried to type exit/logout/sync - reboot, then it attempt to exit from the xwindows and yes it does (the console(non gui) came out with some text that I previously typed, b4 starting X), but the thing is, the prompt did'nt came out, and as I observed the whole system is totaly disabled/hang-up, I can't even reboot it using ctrl+alt+del, so I have to hard reboot which is bad for my HD.

Hmmm...probably some more questions. What happens if you CTRL+ALT
+BACKSPACE out of X? Do you return to a prompt? Do you go to a
login prompt if you hit CTRL+ALT+ F2...F8? Does your /etc/XF86Config
file show anything unusual? Do you have the correct video card,
monitor, refresh rates, etc? Are you getting any error messages
in your logs? Have you tried other window managers and getting
the same problems eg in Blackbox, FVWM, Gnome, etc? Is your video
card supported by XFree86 4.0? If so, you could make deinstall your
current XFree and install that. Is your hardware in good
condition...power supply, memory? A lot of things to check but
any error messages would certainly help.

>Hmmm...probably some more questions. What happens if you >CTRL+ALT+BACKSPACE out of X? Do you return to a prompt? Do you go to a

yes, I tried that and unfortunately, the same thing happens. It attempts to exit from the Xwindows, then display the console (non-gui), but does'nt display the shell prompt, all I can see is those xwindows initialization text, the one that scroll after you type startx.

I have Martox Millennium II w/ 2MB mem using XF86_SVGA driver. Monitor? this is not the good part coz I don't have the specs on this old monitor, its toshiba w/ no specs anywhere in the monitor no manual ;(.. from M$windows it can do until 1024x768@24bit, and from xf86config I choose SuperVGA 1024x768 @87Hz interlaced.

>Are you getting any error messages in your logs?

Sorry I don't know where to get the error log for this. From /var/log/messages, I can't see any error regarding X errors. I tried this command:

startx &> mylog.txt ------with csh shell

but my mylog.txt is empty. How do I catch the initialization of startx? maybe this could help.

>Have you tried other window managers and getting the same
>problems eg in Blackbox, FVWM, Gnome, etc?

Yes, I tried only Blackbox and still the same thing happen.

>Is your video card supported by XFree86 4.0?

Yes, it's matrox (mentioned above), Im trying to install both XFree86-3.3.6 and 4 from ports collection with no luck.

>If so, you could make deinstall your current XFree and install that.

Yes I tried that, install XF-3.3.6 w/ no luck, then deinstall, install XF-4 w/ no luck, deinstall again.. then try it again and again and again... :( maybe I just too damn for this, but Im not giving up yet :)

>Is your hardware in good condition...power supply, memory? A >lot of things to check but any error messages would certainly
>help

I think so coz I also tried to install 3.3.6 and 4 from binary and it's working normal.

my purpose of installing from ports collection is because I want to install "gkrellm" which requires for "X11/<somehearderfile>.h" which I can't find it if I'll install the X-binary. Actually right now all things are working. What I did is:

When X start, it reads a xinitrc file found somewhere on your system (try 'locate xinitrc' :).
This file specify what to do after X is launched. By default, it open 3 xterm and 1 xclock. Now, read carefully the default xinitrc : everything is run in background, except the last xterm.

Ok, now when you select Exit in the twm menu, you simply exit twn, not X... To exit X, logout from the biggest xterm. This will ended the 'execution' of the xinitrc file.

To have the behavior you seem to look for, run all xterm in background, and put 'twm' on the last line of the xinitrc file.

In fact, the good way is to copy the default xinitrc in your directory as ~/.xinitrc, and then modify _your_ file.

>Ok, now when you select Exit in the twm menu, you simply exit twn, not X... To
>exit X, logout from the biggest xterm. This will ended the 'execution' of the xinitrc
>file.
Yes, I've tried that, use the twm menu to exit and logout/exit/reboot from the big xterm, but as I said on my previous reply, it only attempts to go back to the console (non-gui) and I saw all the start X init on the non-gui console, but the shell prompt does'nt prompt, no cursor and can't even ctrl+alt+del. :(

>To have the behavior you seem to look for, run all xterm in background, and >put 'twm' on the last line of the xinitrc file.
More or less I tried that but without all those xterm running on a background only the "twm", here's the last part of the xinitrc file that I tried.

but still the same thing happen after I exit any of those wm, the console prompt did'nt show up, I have to press the reset button to reboot. :(

>In fact, the good way is to copy the default xinitrc in your directory as ~/.xinitrc, >and then modify _your_ file.

ok! I'll do that, anyway thank you very much for your great help, maybe I'll do that when nobody is using these computer, I only install X on this computer so that everybody here in our place could shutdown this computer properly, coz they like to shutdown using the mouse like Windoze stuff, if they only saw a text console, they just turn the power off without the proper way, though I already put a note here on how to shutdown properly..... :(

thanks!
still alone here ... but thank God you are there to help/guide me! :)