Source: computer enthusiasts
Automatically log on to Linux at startup and run the XWindow application automatically. It has a special background, such as the monitoring system based on the Linux platform. authentication is not required after Linux is started, and directly run the monitoring program. This document uses Redhat7.2 as a platform and combines it with the Linux Startup Process. It describes how to avoid automatic logon for identity authentication and directly go to X Window to automatically run the application.
I. Work in the final phase of Linux Startup
In the final phase of the Linux Startup Process (the specific startup steps are omitted), init will follow the last line x: 5: respawn: of the/etc/inittab File: /etc/X11/preofdm-nodaemon run the/etc/X11/preofdm script (Redhat7.2 is short for saving time ). The main task of the preofdm script is to start X Window. There are several methods to start X Window, which are included in the preofdm script. There are several main methods:
Run xdm to start X Window;
Run the running Agent agent (gmtms) to enter the gnome desktop environment;
Run kdm to enter the kde Desktop Environment;
Automatically log on to Linux;
The script framework of preofdm is roughly as follows:
#! /Bin/sh
PATH =/sbin:/usr/sbin:/bin:/usr/X11R6/bin
./Etc/profile. d/lang. sh
# Step 1: Check whether automatic logon is enabled
If [-f/etc/sysconfig/autologin-a-x/usr/sbin/autologin]; then
If/usr/sbin/autologin; then
Exit 0
Fi
Fi
# Step 2: if it is not an automatic logon method, you will find your preferred logon method in/etc/sysconfig/desktop.
......
# It Can Be kdm, TPD, and xdm, and run corresponding kdm, TPD, and xdm