Exit X to Commandline

According to the Handbook description, it seemed like we can exit out of X and back to command line by using vt. We just need to add a line to loader.conf:

Code:
kern.vty=vt

I tried that, but it does not appear to work as described.

Based on my research, if I just start plain X, it will display a blank screen. So, I created the keyboard exit to X based on the Handbook, and it seems to work. I used the following command to create something that's not a blank screen.

X -retro :1

With the keyboard exit command, I seem to be able to exit out it and back to a blank screen.

I am not sure where I should look to find a way to be able to exit X back to command line. Any help/tip will be most welcome!

Please let me know what information you need from me.
 
You don't need to add kern.vty=vt because it is already the default, and I didn't well understood what exactly you trying to accomplish.

However the behavior you describe seems the typical of nvidia drivers. If you actually is using a nvidia card you have two options ( otherwise explain with more details ):
  1. add hw.vga.textmode="1" /boot/loader.conf; or
  2. switch to the old sc console kern.vty="sc".
Cheers!
 
I do not have a nvidia graphics card. It's using intel graphics.

The effect that I want to create is that I want to be able to start X, and then exit X and return to a command line interface without having to restart. Does this help?
 
Those keys should work by default. Start X without any kind xorg.conf ( it should not be necessary in most cases anyway ) and try again. Otherwise wait someone who use Intel ( I don't ).
 
You might try creating the following files in /usr/local/etc/X11/xorg.conf.d:

This one makes CTRL-ALT-BackSpace bring back the prompt:
Code:
section "InputClass"
        Identifier      "KeyboardDefaults"
        Driver          "keyboard"
        MatchIsKeyboard "on"
        Option          "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

Enable Zap:

Code:
Section "ServerLayout"
        Identifier "EnableZap"
        Option     "DontZap" "Off"
EndSection

You might also need to put them in /usr/local/etc/X11/xorg.conf:
Code:
Section "ServerLayout"
        Identifier "EnableZap"
        Option     "DontZap" "Off"
        Screen      0  "Screen0" 0 0
EndSection

Section "InputClass"
        Identifier      "KeyboardDefaults"
        Driver          "keyboard"
        MatchIsKeyboard "on"
        Option          "XkbOptions" "terminate:ctrl_alt_bksp"
EndSection

At most, the above are just clues for you to find your own solution :)
 
I am using version 11.2-RELEASE-p2.

EDIT:
I found out that the version of Xorg that I am using was built on FreeBSD 11.1-RELEASE-p13 amd64.

Does this mean I need to build Xorg on my machine?
 
Back
Top