d) Now, you want Ratpoison to be your default session. You can configure this in the .xinitrc
file in your home directory:
nano ~/.xinitrc
e) If there is no .xinitrc file, creating one with the following command:
touch ~/.xinitrc
f) Insert the following line and save the file:
exec ratpoison
g) Give the .xinitrc file the necessary permissions:
chmod +x ~/.xinitrc
h) To ensure Ratpoison starts on boot, you need to install xinit and lightdm, which is a handy and lightweight display manager:
sudo apt-get install xinit
For autologin, edit lightdm as follows:
1. Open a terminal window.
2. To allow automatic login, you need to edit the 'lightdm.conf' file. If it doesn't exist, you need to create it. Use the following command: `sudo nano /etc/lightdm/lightdm.conf`
3. Add the following lines to the file:
Replace 'yourusername' with your actual username.
4. Save the file and exit the editor (in nano, you can do this by pressing `Ctrl+X`, then `Y` to confirm saving changes, then `Enter` to confirm the file name).
5. Restart your system for the changes to take effect.
i) If you want to get rid of the existing window managers or desktop environments, starting with GNOME, execute:
sudo apt-get purge ubuntu-desktop gnome-shell
j) Following that, to remove all the related packages and dependencies, use:
sudo apt-get autoremove
k) To check if other desktop environments or window manager are installed, make sure Aptitude is installed:
sudo apt install aptitude
l) Then run a command like this for each potential desktop package:
aptitude search '?installed(?name(gnome-shell))'
Change “gnome-shell” to the package name of the desktop you are searching for. If it returns nothing, the package isn’t installed.
m) If you find another installed desktop environment or window manager, substitute “gnome-shell” in the purge command above with the corresponding packages.
n) Now, you need to edit the /etc/inittab file to enable automatic login. However, Debian 11 uses systemd by default, which doesn’t use /etc/inittab. Instead, you can create a service to autologin and start xinit. First, create a new service file: