X without Display Manager

Traditionally, the X11 session is started by a display manager. However, when running a single-user system, display managers are not strictly necessary. This article Article description::describes how to start an X11 session without a display manager.

Using startx
See the Using startx section of the Xorg/Guide article.

Using a dedicated session runner
Some of the desktop environments provide their own replacements for. For example, Xfce4 provides :

Starting X11 on console login
To avoid having to run startx after login, logging in to a specific vt may be configured to start X11 automatically. One of the ways to achieve this is to put code into the shell's login script (e.g. ):

systemd
The XDG_VTNR variable specifies the VT number. To use another VT adjust the number accordingly.

The additional DISPLAY check is necessary because the snippet will be executed on both graphical and non-graphical logins. Since XDG_VTNR will be set to the same value in the shells started within the X11 session (e.g. terminals), it is necessary to prevent them from trying to start X11.

The command causes the login shell to be replaced by the X11 session. This means that the user won't be able to use the shell used to start X11 anymore, and whenever the X11 session terminates, user will be logged back out. To remain logged in into vt, remove the word.

Ensure the user has permission to execute the script:

Multiple X Session/Virtual Console
An alternate method is to auto-login to a Window Manager (WM) or a Desktop Environment (DE) depending on the Virtual Console (VT) used to login. A fallback session can be easily achieved in this manner. Just grab the following file excerpts to get going:

First, set up the sessions or WM or DE to use depending on the VT:

And then set up the login shell accordingly:

Or else, a zsh variant could be used instead.

The previous files can be used to login into an Enlightenment or LXDE session without needing any middle man or rather Diplay Manager (DM)! and Openbox session as a fallback session using VT 1, 2, & 3.

Adapt to preffered DE or WM.

Method 1
In order to obtain complete X11 autologin, it is possible to use the getty/login autologin feature along with the aforementioned trick.

First, create a new service file like the following:

username replaced by the user's username, and tty8 being the tty the X11-starting login to be performed on. It should be noted that this tty will be used for login and console output, and X11 can be started on any other tty.

Afterwards, add the previous snippet to bashrc (with the same vt specified), enable the service:

In order to avoid relying on the DISPLAY+XDG_VTNR trick to determine whether to start X11, the two above approaches may be extended by using a dedicated environment variable to distinguish the specific shell where X11 is to be started.

First, create a dedicated login wrapper:

This causes the user to be logged in with START_X11=1 environment variable set. Then, tell getty to use that file instead of the default :

Finally, modify (or equivalent) to use the variable rather than guessing:

Remember to unset the variable before starting X11 -- otherwise all the X11 terminals would have it set and try to spawn another X11 session.

Method 2
An alternative method is to use and  for direct login in X.

Service example:

can be used rather than.

In case X startup fails with the error Xorg.wrap: Only console users are allowed to run the X server then read man Xorg.wrap how to allow any user to do so.

Links

 * http://mywiki.wooledge.org/DotFiles

Automatic user selection
On a 1-user system it's possible to avoid typing the username, so the login prompt will ask only for the password. E.g. adjust so that the third terminal asks about the password only:

Of course, one can have various preselected users on different terminals, e.g. user_a on tty1 and user_b on tty2.

Custom text in console logon
It is possible to create a simple wrapper for to show supplementary information on the console logon screen. E.g. on a 1-user system one may wish to see if there are any new emails without logging in. First, create a simple bash wrapper for :

The last line calls the actual which will do all the heavy lifting. Omit the user name in that line to be prompted for it. Passing a username results in being prompted about the password only.

Finally edit to use  wrapper, here on tty2: