One of the benefits of using Void Linux is its minimalism, it comes with very few packages installed and lets you decide what you need. However, this means that it does come pre-installed with a graphical session and is simply a terminal. I will show you how to install the Xorg session and point you in the right direction for installing a window manager like i3 or desktop environment like KDE Plasma.
Firstly, graphical drivers for your GPU need to be installed. Since I have a Nvidia GPU I will be installing that. If you have a different GPU/Integrated graphics, check out the Void Linux documentation.
Personally, I will use the proprietary NVIDIA drivers as they offer better performance, this means enabling the nonfree repository. Doing this is simple, just install the void-repo-nonfree package and update your repositories.
Now we can install the driver itself, if you are using a 400/500 series NVIDIA GPU, install the nvidia390 package. If you a 600+ series NVIDIA GPU, install the nvidia package. Since I have a GTX 1060, I will choose the nvidia package.
Now we can install the Xorg graphical session, there are two packages to choose from, the comprehensive xorg package that installs Xorg, fonts and some base applications and the xorg-minimal package that only installs the server and will require you to install extra packages. I will be choosing for xorg package as it is easier and quicker.
Window Manager Or Desktop Environment
Now, we need to install a window manager or desktop environment. The difference between a window manager or a desktop environment is that window managers are very minimal, lightweight and customizable where as desktop environments come with many packages installed like a settings app, a web browser, an application launcher and other apps that you may need.
Personally, I prefer using a window manager so I will show you how to install the I3 tiling window manager for the sake of this tutorial as it is easy to setup, however you are free to choose what you use. The packages I’m going to install initially to get setup are i3, i3status, firefox the kitty terminal emulator and dmenu.
xbps-install i3 i3status firefox kitty dmenu
To launch i3, create the .xinitrc file in your home directory and open it in an editor like nano. If you do not have a text editor installed, you can install nano
Inside this file, simply write:
If you are using nano, save and exit with Ctrl + X, then press y and enter.
Now, when you want to launch your Xorg graphical session, type startx in the terminal and i3, or whatever window manager or desktop environment you chose, will launch.
You have now installed graphical drivers, the Xorg graphical session and a window manger/desktop environment. There is plenty more to do in terms of customization, installing packages and improving your Void Linux experience. If you found this helpful, please consider supporting me via my buymeacoffee account and checking out my other posts on medium such as Setting Up Doom Emacs In Void Linux.