The X Display Manager (XDM) Part 2 Basic GUI

Published on March 31, 2023 at 7:58 am by LEW

Introduction

In the last post we got x-windows up and working on our base arch install. This gives us a very basic GUI. Once we have x-windows working, we can move on to adding a Window Manager (WM), some helper programs as needed, some basic applications, and our Display Manager (DM). Please refer to the previous post to understand and set the base line from which we will proceed.

Basic X Server with no WM or DM

For my install, as stated last time, I will be choosing JWM as the WM. It is very light weight and has a nice set of features including task bars and menus. If you are using a different WM, you will need to determine what functionality is provided. For example, Openbox does not have a taskbar, and if that is something you need/want, then you will need to use an additional program to provide that functionality (like tint2 for a taskbar example).

With the addition of a WM, you will probably also want some additional Graphical User Interface (GUI) based applications. So we will be installing a basic set.

And finely we will install the DM along with a few additional helper programs

Making the GUI More Usable

Our first step is to install the Window Manager, and any additional files that might be needed. The command looks like this.

# pacman -S jwm xorg-fonts-misc network-manager-applet

Joes Window manager (jwm) has very few dependencies. And while not listed, you will want the xorg-fonts-misc package to initially display text on things like task bars and menus. Once installed, you can configure jwm with nicer fonts (which was covered in this series of posts). The network-managment-applet gives us a nice network icon and menu in the system tray. If you are using more than just a single wired connection, it will make network management much easier.

If you are using Virtualbox, you are probably going to want to use the following commands to create a xorg configuration file. The purpose of this is to get a full screen display (see this post), and also to be able to modify available font directories (see this post).

# Xorg :9 -configure
#cp /root/xorg.conf.new /etc/X11/xorg.conf.d/xorg.conf

Configure startx

One more thing to do before we attempt a reboot. There is a file at /etc/X11/xinit/xinitrc. This is the configuration file used by the startx command. Lets make a backup copy of this file and then open it in our text editor. Scroll all the way to the bottom and you will find about five lines of code.

These lines start some programs for our GUI. First we start the twm program (a window manager that is not installed). Then xclock is started (also not installed at this point). And finely we have three instances of xterm being started, don’t ask me why three, as I do not know.

We need to delete all these lines of code and replace them with one line that is just jwm” Anything beyond that can be done through jwm configuration.

Save the file when you have made these changes.

Reboot the System

Do a reboot at this point and use startx to start the x-server. You should boot into the default jwm, with a taskbar along the bottom of the screen Open the menu system (either by clicking on the lower left button in the task bar or clicking anywhere on the desktop). Run the terminal application, this will start xterm. In a window on the desktop. See this series of posts for configuration of jwm.

From the terminal we will install some additional application. A file manager (pcmanfm), a text editor (geany), and a browser (firefox).

# pacman -S pcmanfm-gtk3 geany firefox

Check the above posts for information about how to add these applications to the menu in jwm. In the mean time they can be run form the terminal, using the “&” option to run them in the background, freeing up the terminal for other uses. For example.

# pcmanfm &

Installing XDM

Now lets install the xdm DM and a few helper programs. We will walk through configuring xdm in the next post. For now use the following command.

# pacman -S xorg-xdm xorg-xmessage xorg-xclock xorg-mkfontdir feh

Xorg-xdm is the DM package. Xorg-message allows us to display both messages and buttons on the root screen. Xorg-xclock is a clock program that can display either analog or digital output to the root screen. Xorg-mkfontdir will help us generate older style font references. The feh program will allow us to display images on the root screen.

We can use the following systemd command to activate xdm.

	# systemctl enable xdm.service

Rebooting after doing this will bring up the xdm window with the authentication widget (name and password). In its default state it is somewhat lackluster. So we will walk through some configuration options in our next post.

Additional Notes

In this example, I am making global changes. If you review some of the other posts, you will find some files copied to the user home folder, and changes done strictly locally for that user.

If you make changes in the /etc directory, said changes will affect all users.

As a side note the local user can still create the appropriate files in their home directory and override global settings, as the home directory file will have precedence over the global file.

For example, you can copy the /etc/X11/xinit/xinitrc file to ~/.xinitrc, And the content of .xinitrc will have precedence over the /etc/X11/xinit/xinitrc file.

Conclusion

In this post we finished installing all the pieces for our GUI. In the next post we will start configuring the Display manager.

Also, or total install size is now 2.9 Gb.

The X Display Manager (XDM) Part 1 Preparation

The X Display Manager (XDM) Part 2 Basic GUI

The X Display Manager (XDM) Part 3 Configuration

Add New Comment

Your email address will not be published. Required fields are marked *