content/blog/2022-10-30-linux-display-manager.org
78 lines · 2409 bytes
1#+date: <2022-10-30 Sun 00:00:00>
2#+title: Method for Disabling or Changing the Display Manager on Void Linux Systems
3#+description: Stepwise instructions to manage and replace the display manager on a Void Linux installation, including service control and configuration editing.
4#+slug: linux-display-manager
5#+filetags: :linux:void:display-manager:
6
7* Display Manager Services
8
9In order to change the
10[[https://en.wikipedia.org/wiki/Display_manager][display manager]] on
11Void Linux - or any other Linux distro - you need to identify the
12currently enabled display manager.
13
14** Disabling the Current Display Manager
15
16Void Linux only has one ISO available for download with a pre-built
17display manager at the time of this post: the XFCE ISO. If you've
18installed this version, the pre-assigned display manager is =lxdm=. If
19you installed another display manager, replace =lxdm= in the following
20command with the display manager you have installed.
21
22To disable =lxdm=, simply remove the service symlink:
23
24#+begin_src sh
25sudo rm /var/service/lxdm
26#+end_src
27
28** Enabling a New Display Manager
29
30If you want to enable a new display manager, you can do so after =lxdm=
31is disabled. Make sure to replace =<new_display_manager>= with your new
32DM, such as =gdm=, =xdm=, etc.
33
34#+begin_src sh
35sudo ln -s /etc/sv/<new_display_manager> /var/service
36#+end_src
37
38* Set Up =.xinitrc=
39
40Depending on your setup, you may need to create a few X files, such as
41=~/.xinitrc=. For my personal set-up, I created this file to launch the
42i3wm as my desktop.
43
44#+begin_src sh
45nano ~/.xinitrc
46#+end_src
47
48#+begin_src sh
49#!/bin/sh
50
51exec i3
52#+end_src
53
54If you run a desktop other than i3, simply replace =i3= with the shell
55command that launches that desktop.
56
57* Set Up Your Shell Profile
58
59Finally, in order to automatically launch an X session upon login, you
60will need to edit the =.bash_profile= (bash) or =.zprofile= (zsh) files
61for your shell:
62
63#+begin_src sh
64nano ~/.zprofile
65#+end_src
66
67Add the following snippet to the end of the shell profile file. This
68will execute the =startx= command upon login.
69
70#+begin_src sh
71if [ -z "${DISPLAY}" ] && [ "${XDG_VTNR}" -eq 1 ]; then
72 exec startx
73fi
74#+end_src
75
76Alternatively, you can ignore this step and simply choose to manually
77execute =startx= upon login. This can be useful if you have issues with
78your desktop or like to manually launch different desktops by choice.