Ubuntu – Remove LXDM and start DE via startx/startlxde

lxdelxdm

I want to remove lxdm and start lxde with just startx or startlxde.

I previously just had an openbox installation and was building that up. I then installed lxde, but wanted to get rid of lxdm, so I uninstalled it. Upon doing so, typing startx or startlxde kicks me into the previous openbox session and not into the lxde session. How do I fix this?

Best Answer

My understanding is that you've removed lxdm and booting into command line. Why not install another desktop manager, instead of lxdm ? For instance sudo apt-get install gdm or sudo apt-get install lightdm ? In fact, if you installed lxde after installing ubuntu, lightdm should be on your machine already. You chould switch to it with sudo dpkg-reconfigure lightdm and change the session from there.

You could also specify the default desktop session in the file /var/lib/AccountsService/users/yourusernamehere , specifically on line 12, where it says XSession

enter image description here

If what you want is to boot into command line and then start x server manually, here's what you can do:

Open /etc/default/grub with your favorite text editor (note, you must use sudo)

and edit line GRUB_CMDLINE_LINUX="text", which is in screenshot bellow is line 12

enter image description here

Save the file, run sudo update-grub and reboot once done. Once you boot up, you will be prompted to login into tty, run sudo service lightdm start, where lightdm is whatever greeter/desktop manager you want to use or have

Alternatively you could start openbox session with the following command: openbox --replace directly from lxde (wont work in tty)

Among other things, you could do sudo service lightdm start && openbox --replace as oneliner, or put it into a script

Related Question