How to switch to command line from GUI

freeink

New Member


Messages: 17

How can I switch from XFCE desktop environment to pure text terminal like in Linux do, using command "init 5" and "init 3"?
 

unitrunker

Active Member

Reaction score: 87
Messages: 233

How did you get an X windows desktop environment? FreeBSD does not provide this in the base install. You start from a shell prompt and then install packages to get a GUI.

Try this:
control + alt + F2 to get a virtual terminal.
control + alt + F9 to go back to X.

This works for me on jwm.
 

scottro

Daemon

Reaction score: 526
Messages: 1,458

I am guessing you use some sort of display manager to boot up. (I don't use XFCE, maybe the package itself supplies that.) Generally though, if you don't use a display manager, you will boot up in text mode and start your desktop or window manager with startx or perhaps xinit. unitrunker's suggestions should work if you're booting up into X. If you turn off the display manager (sorry, don't know how to do that) you will boot into text mode.

As for Linux, most systems no longer use init 3 and init 5. With systemd you have to do something like set target multiuser or similar (I forget the exact syntax and am too lazy to look it up.) I imagine non systemd systems still use init 3 and 5 but I haven't used a display manager in so many years I've forgotten the syntax on systemd and non-systemd systems.
 

teo

Aspiring Daemon

Reaction score: 22
Messages: 535

How did you get an X windows desktop environment? FreeBSD does not provide this in the base install. You start from a shell prompt and then install packages to get a GUI.

Try this:
control + alt + F2 to get a virtual terminal.
control + alt + F9 to go back to X.

This works for me on jwm.
Do you use the jwm window manager? I wanted to use it but the configuration of jwm is very difficult.
 

OJ

Daemon

Reaction score: 382
Messages: 1,248

unitrunker gave the right answer. However, if you don't need a "pure" terminal then it's convenient to set a shortcut for a virtual terminal such as Qterminal. For me it's a quick Ctrl-t to the command line.

Don't forget the convenience of drop-down terminals. I use Guake Terminal for that. What's convenient for me is it pops right up with the last screen I was on. (single key toggle, on off) That makes it a nice quick reference window for wherever I am.
 

unitrunker

Active Member

Reaction score: 87
Messages: 233

Do you use the jwm window manager? I wanted to use it but the configuration of jwm is very difficult.
I do. Relevant line in my '~/.xinitrc' file.
Code:
exec /usr/local/bin/jwm
'~/.jwmrc' is the XML config file with all my menus. One of the default menu choices opens this file in an editor so you can customize your menus.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 8,055
Messages: 31,638

using command "init 5" and "init 3"?
Runlevels are a typical System V Unix construct, BSD doesn't have or use them. That said, there is some form of runlevel on BSD but there's only 0, 1 and 6. 0 is halt, 1 is single user mode and 6 is reboot. See init(8). Older Linux' used runlevel 3 for 'normal' multi-user operation and 4 (or higher) for a graphical environment (Xorg for example). I do believe modern Linux' stopped using it.

 

teo

Aspiring Daemon

Reaction score: 22
Messages: 535

I do. Relevant line in my '~/.xinitrc' file.
Code:
exec /usr/local/bin/jwm
'~/.jwmrc' is the XML config file with all my menus. One of the default menu choices opens this file in an editor so you can customize your menus.
This topic I opened some time ago, if you see the configuration I had, however it was quite complicated configuration and customization that gave errors. Would you be so kind as to publish your .jwmrc configuration and customization file?

 

Phishfry

Son of Beastie

Reaction score: 1,527
Messages: 4,436

@unitrunker gave the right answer
While I agree he gave a right answer I would like to expand on it for a fuller understanding.
Try this:
control + alt + F2 to get a virtual terminal.
control + alt + F9 to go back to X.
There are 7 virtual terminals available when using Xorg.
Under Xorg there are separate virtual terminals located at all these spots.
control + alt + F2
control + alt + F3
control + alt + F4
control + alt + F5
control + alt + F6
control + alt + F7
control + alt + F8

This terminal contains all the inner workings of an Xorg session
control + alt + F1

And as mentioned above
control + alt + F9 gets you back to an Xorg window.

You can see the settings yourself in /etc/ttys
Code:
#
ttyv0    "/usr/libexec/getty Pc"        xterm    onifexists secure
# Virtual terminals
ttyv1    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv2    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv3    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv4    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv5    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv6    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv7    "/usr/libexec/getty Pc"        xterm    onifexists secure
ttyv8    "/usr/local/bin/xdm -nodaemon"    xterm    off secure
 

unitrunker

Active Member

Reaction score: 87
Messages: 233

Would you be so kind as to publish your .jwmrc configuration and customization file?
Don't want to take this thread too far off topic. I'll post an example in the jwm thread you linked above.
 
Top