How to run ubuntu/xubuntu in a complete non-gui mode
Solution 1:
What you want is can be achieved by installing Ubuntu Server Edition which does not has a display manager, X server etc. But if you do have an Ubuntu or a Xubuntu installation in your computer and want to work in a non-GUI environment, you can use virtual consoles which are called tty.
- Close all opened applications.
- press ctrl+alt+F2
- Log in with you user name and password.
- Stop display server and Xserver by giving
sudo service lightdm stop
command.
To restart GUI, sudo service lightdm start
command is enough.
And you are ready to work in an environment as you described in your post.
Another workaround you can use to remove a lot of packages to obtain "pure Ubuntu" as described in this blog post. For Xubuntu, the command that will leave you with "pure Ubuntu" is
sudo apt-get remove abiword abiword-common abiword-plugin-grammar abiword-plugin-mathview alacarte bison blueman brltty-x11 catfish espeak exo-utils flex fonts-droid fonts-lyx gcalctool gigolo gimp gimp-data gksu gmusicbrowser gnome-desktop-data gnome-system-tools gnome-time-admin gnumeric gnumeric-common gnumeric-doc gstreamer0.10-gnomevfs gthumb gthumb-data gtk2-engines-pixbuf indicator-application-gtk2 indicator-sound-gtk2 libabiword-2.9 libamd2.2.0 libbabl-0.1-0 libbison-dev libblas3 libcolamd2.7.1 libdigest-crc-perl libexo-1-0 libexo-common libexo-helpers libfl-dev libgarcon-1-0 libgarcon-common libgdome2-0 libgdome2-cpp-smart0c2a libgegl-0.2-0 libgimp2.0 libgksu2-0 libglade2-0 libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libgoffice-0.10-10 libgoffice-0.10-10-common libgsf-1-114 libgsf-1-common libgstreamer-perl libgtk2-notify-perl libgtk2-trayicon-perl libgtkmathview0c2a libgtksourceview2.0-0 libgtksourceview2.0-common libgtkspell0 libido-0.1-0 libintl-perl libjavascriptcoregtk-1.0-0 libjpeg-progs libjpeg-turbo-progs libkeybinder0 liblink-grammar4 libloudmouth1-0 libnet-dbus-perl liboobs-1-5 libotr5 libots0 librarian0 libsdl1.2debian libsexy2 libsigsegv2 libtagc0 libthunarx-2-0 libtidy-0.99-0 libtie-ixhash-perl libtumbler-1-0 libumfpack5.4.0 libunique-1.0-0 libvte-common libvte9 libwebkitgtk-1.0-0 libwebkitgtk-1.0-common libwv-1.2-4 libxfce4ui-1-0 libxfce4ui-utils libxfce4util-bin libxfce4util-common libxfce4util6 libxfcegui4-4 libxfconf-0-2 libxml-parser-perl libxml-twig-perl libxml-xpath-perl lightdm-gtk-greeter link-grammar-dictionaries-en locate lp-solve m4 mousepad orage parole pastebinit pavucontrol pidgin pidgin-data pidgin-libnotify pidgin-microblog pidgin-otr plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text python-configobj rarian-compat ristretto screensaver-default-images scrollkeeper shimmer-themes system-tools-backends tcl8.5 tcl8.5-lib thunar thunar-archive-plugin thunar-data thunar-media-tags-plugin thunar-volman ttf-droid tumbler tumbler-common xbrlapi xchat xchat-common xchat-indicator xfburn xfce-keyboard-shortcuts xfce4-appfinder xfce4-cpugraph-plugin xfce4-dict xfce4-indicator-plugin xfce4-mailwatch-plugin xfce4-netload-plugin xfce4-notes xfce4-notes-plugin xfce4-notifyd xfce4-panel xfce4-places-plugin xfce4-power-manager xfce4-power-manager-data xfce4-quicklauncher-plugin xfce4-screenshooter xfce4-session xfce4-settings xfce4-systemload-plugin xfce4-taskmanager xfce4-terminal xfce4-verve-plugin xfce4-volumed xfce4-weather-plugin xfce4-xkb-plugin xfconf xfdesktop4 xfdesktop4-data xfwm4 xscreensaver xscreensaver-data xscreensaver-gl xubuntu-artwork xubuntu-default-settings xubuntu-desktop xubuntu-docs xubuntu-icon-theme xubuntu-wallpapers
I removed the last command, which is apt-get install ubuntu-desktop
, that installs packages like Unity and turn your Xubuntu to Ubuntu. As you can see, there are a lot of packages that is very hard to track and you may need some packages. Since I do not use Xubuntu, I can not say which packages must be kept.
Solution 2:
You can simply disable X from startup. Install rcconf:
sudo apt-get install rcconf
Run it with sudo:
sudo rcconf
And search for the entry x11-common, disable it and select OK. Then reboot.
If you ever change your mind, Xorg will be still installed, but it won't load on startup so you just need to re-run rcconf and re-enable x11-common.
Solution 3:
With Ubuntu 15.10, I had to:
sudo systemctl disable lightdm
The rcconf
and /etc/default/grub
solutions were not cutting it.