Topic on automatic system loading without DM

A place to share tips, guides, application configurations and scripts about all elements of ArchLabs

Moderator: Founder

Topic on automatic system loading without DM

PostPosted by appath » Thu Jun 22, 2017 10:34 am

Let's get acquainted.
Boris241 or appath Me is so called in the global web.
I will not say my old nickname.
It's in the past.
Well, that's all.
The less information about a person the more interesting it is, is not it?

Today with you I want to share a manual for beginners or a memo.
We are all human beings and we will sooner or later forget to slope.
Let's start small, and so that you know and do not forget about the commits ...
# Root user
$ Usual user.

Theme about automatic loading of the system without DM.
R: Less rubbish.

Without using DM
Because the implementation of autoloading the environment is via the startx command in the terminal.
You will need to download and install the package if you do not have it installed: xorg-xinit

Code: Select all
$ sudo pacman -S xorg-xinit

In the / home / ... folder of the user who needs the autologin file and the startup of our environment with you
The responding file ~ / .xinitrc

Code: Select all
 # start some nice programs
   if [ -d /etc/X11/xinit/xinitrc.d ] ; then
    for f in /etc/X11/xinit/xinitrc.d/?*.sh ; do
        [ -x "$f" ] && . "$f"
    unset f

   exec openbox-session

If you do not have it in the user's root directory
You can create it or copy it.
Let's copy it with you.
Open the terminal and enter

Code: Select all
$ cp /etc/X11/xinit/xinitrc ~/.xinitrc

Now we will automatically start the Iks in the desired virtual console after the login of our user.
For this, if you use the Bash shell, you need to write in the folder of our user in the .bash_profile file

Code: Select all
[[ -f ~/.bashrc ]] && . ~/.bashrc
[[ -z $DISPLAY && $XDG_VTNR -eq NomerVirtConsole ]] && exec startx

If the .bash_profile file does not exist, then copy it.

Code: Select all
$ cp /etc/skel/.bash_profile ~/.bash_profile

Variable NomerVirtConsole we change to number of the necessary virtual console one or three

The last step is to use Systemd to make the autologin of the desired user into the desired virtual console.
For this we need to create the necessary Unit for Systemd

Code: Select all
$ systemctl edit user@ttyNomerVirtConsole

NomerVirtConsole is the console number, it must be equal to a variable.
And the variable Username ..
: : : : : : :: :: : : ::: : :: :: 112 :: : :
DeviantArt // GitHub ...
Posts: 7
Joined: Thu Jun 22, 2017 10:16 am
Location: Current Residence: Russia [black hole]
Running Release: 4.0

Return to Configs, Scripts, Tutorials and Tips

Who is online

Users browsing this forum: No registered users and 0 guests