Xfce Exit XFCE4 to command prompt

oalanjones

New Member

Reaction score: 2
Messages: 5

I have FreeBSD 12.0-Release installed on my pc. I also have Slim and XFCE4 installed. I want to be able to completely quit XFCE4 and go to a command prompt. XFCE4 does not give an option to quit XFCE4 and exit to command prompt. I would prefer to have FreeBSD boot to command prompt only first and then type "startxfce4". But so far I have not been successful in getting everything configured properly. --Orv
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,886
Messages: 31,157

Fix your ~/.xinitrc and use startx to start XFCE. Also remove the slim_enable from rc.conf.

My ~/.xinitrc:
Code:
[ -f "${HOME}/.Xresources" ] && xrdb "${HOME}/.Xresources"

# This is for SLiM:
[ -n "$1" ] && [ -x "$1" ] && exec $1

# This is for startx ($1 won't be set)
exec ck-launch-session dbus-launch startxfce4
 
OP
OP
oalanjones

oalanjones

New Member

Reaction score: 2
Messages: 5

Thanks for the help! I followed your instructions and now my pc boots to command prompt just like I wanted.
After I type "startx" I see the Slim wallpaper flash for a split second and then XFCE4 launches.
I commented out slim_enable in rc.conf
 

xtaz

Well-Known Member

Reaction score: 117
Messages: 429

If you want to continue to use slim then you can simply type "exit" into the box that asks for your username and it will exit back to the command prompt.

Other commands that you can type there are console (brings up an xterm), halt, reboot, and suspend.
 

Terpentijn

Member

Reaction score: 8
Messages: 77

Fix your ~/.xinitrc and use startx to start XFCE. Also remove the slim_enable from rc.conf.

My ~/.xinitrc:
Code:
[ -f "${HOME}/.Xresources" ] && xrdb "${HOME}/.Xresources"

# This is for SLiM:
[ -n "$1" ] && [ -x "$1" ] && exec $1

# This is for startx ($1 won't be set)
exec ck-launch-session dbus-launch startxfce4
I use exec /usr/local/bin/startxfce4 --with-ck-launch in .xinitrc
I was under the impression that xfce does not need dbus. I don’t use it in rc.conf and xfce runs just fine. Or is this info specific too using slim?
 

Phishfry

Son of Beastie

Reaction score: 1,482
Messages: 4,290

Xfce4 does require dbus to generate a Machine-ID. You only need to run it once. service dbus onestart

For the Xfce4 logoff menu to work you do indeed need dbus running.

Also calling up ck-launch is not needed. Take a look at the script you are running /usr/local/bin/startxfce4
It runs ck-launch for you.
ck-launch is typically only needed on window managers like OpenBox and FluxBox.
 

Sevendogsbsd

Aspiring Daemon

Reaction score: 284
Messages: 580

Xfce4 provides the xfce4-session-logout command. If you pass it --logout and assign that command to a key combination like "ctrl+alt+del", or whatever you choose, it will end the xfce4 session and drop you straight to a command line. Is this what you were looking for?
 

userxbw

Active Member

Reaction score: 21
Messages: 188

do you got this in your rc.conf?

dbus_enable="YES"

then just 'startxfce4' in .xinitrc might ought'a work for you...
 
Top