35 lines
No EOL
993 B
Bash
35 lines
No EOL
993 B
Bash
#!/bin/bash
|
|
gui () {
|
|
echo switching to graphical display
|
|
sudo systemctl isolate graphical.target
|
|
echo starting display manager
|
|
sudo systemctl start lightdm
|
|
echo starting remote desktop server
|
|
sudo systemctl start nxserver
|
|
}
|
|
|
|
tui () {
|
|
echo switching to text only command line mode
|
|
echo stopping display manager
|
|
sudo systemctl stop lightdm
|
|
echo stopping graphical display
|
|
sudo systemctl isolate multi-user.target
|
|
sleep 3
|
|
sudo chvt ${VTTY:-2}
|
|
echo stopping remote desktop server
|
|
sudo systemctl stop nxserver
|
|
}
|
|
|
|
tui_default () {
|
|
echo curret default display target $(systemctl get-default)
|
|
echo setting boot default to command line only
|
|
sudo systemctl set-default multi-user.target
|
|
echo new default display target $(systemctl get-default)
|
|
}
|
|
|
|
gui_default () {
|
|
echo curret default display target $(systemctl get-default)
|
|
echo setting boot default to graphical
|
|
sudo systemctl set-default graphical.target
|
|
echo new default display target $(systemctl get-default)
|
|
} |