startx
from your profile scripts if tty
returns "/dev/tty0" startx
from /etc/rc.local (i.e using su -l <username> -c startx
) sudo service xdm stop
after the commands in your .xsession file (after configuring sudo
to be able to run that command passwordless) sudo service xdm stop
it doesn't work. It says xdm does not exist in /etc/rc.d or the local startup directories (/usr/local/etc/rc.d), or is not executable
. Is there another way?Thanks for answering. When I dosudo service xdm stop
it doesn't work.
sudo pkill -9 xdm
That will killsudo pkill -9 xdm
xdm(8)
, stone dead, but not it's child, Xorg(1)
(or whatever you use to run your display). init(8)
has a mission to constantly respawn xdm(8)
, in the manner of getty(8)
. xdm(8)
(and all its children) more than once may seen to work, because init(8)
will eventually refuse to respawn xdm(8)
too rapidly. But it will come back after the next reboot. init(8)
take notice of the change:
sudo init q
That will killxdm(8)
, stone dead, but not it's child,Xorg(1)
(or whatever you use to run your display).
To return to the virtual terminal, you have to stopI think thats what the OP wants. They want XDM to start on boot but then disappear so if they exit X11, they are returned to the terminal.
init
re-spawning xdm
every time it exits.How are you starting XDM?
pkg install xorg xdm
, and as the handbook says I modified /etc/ttys with ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
.xterm &
dwm
grep xdm /etc/ttys
may provide the clue. If it's "on" change it to "off".
Then you probably use another display manager. I thought XDM because you wrote so.
Try:
Bash:service sddm stop service gdm stop service slim stop
sudo service xdm stop
doesn't work? Thank you.On some setups, both the rc.local and crontab methods will actually leave your X11 session unable to use the keyboard. This is because if they start X before the command prompt login starts up in the background
@reboot { sleep 15 ; startx ; }
startx
. Just my opinion though.They are mutually incompatible goals.Isn't the "on" needed if I want xdm to start automatically when I boot? I would like to keep this behavior, but also be able to exit X to the system console just by closing the wm.
init(8)
with an entry in /etc/ttys, you have to edit /etc/ttys (and init q
) to stop it. Otherwise it will re-spawn constantly. startx(1)
, it has to be done manually. But you will get the console back when it exits. xdm(8)
exits) using the Ctrl-Alt-F1 through Ctrl-Alt-F7 key combinations (7 different virtual terminals are available)?That's how I do it. Seems to be the simplest and most direct way to operate.Are you aware that you can leave X11 running, and switch to a virtual terminal (of the type you get when xdm(8) exits) using the Ctrl-Alt-F1 through Ctrl-Alt-F7 key combinations (7 different virtual terminals are available)?