Linux off / on the graphical interface (X-window) command

Linux off / on the graphical interface (X-window) command

1 Introduction

This article is the interface to achieve the opening and closing system for the graphic linux SAIL-IMX6Q development boards.

2. Prepare

SAIL-IMX6Q boards using a computer connected to serial port 232, and connect the power source.

Opens at the computer terminal and the super complete basic settings (baud rate: 115200, data bits: 8, Parity: None Stop bits: 1, flow control: hardware), after turning the power boards, after root.

                                                                               

3. does not enter the X-window system boot into the graphical user interface screen characters directly into the Console

3.1 Open with vi inittab file and modify

~# cd /etc

/ Etc # vi inittab

Find the file after entering the fourth row, namely id: 5: initdefault, then click on the "i" key on the keyboard to enter edit mode, and id: 5: initdefault changed to id: 3: initdefault, then tap Esc to enter: wq save and then reboot the system.

Note: the command init ID number (eg: init 5) can be immediately switched to the corresponding operating state, but this is only temporary, after the restart will still enter the default (ie level inittab defined in the file).

                                                                              

Principle 3.2 thus set - different run levels

We see, simply to be 5 to 3, will be able to achieve conversion into the X-window graphical user interface or Console character interface at startup, because the Linux operating system has six different operating level (run level) at different stages of operation, the system has a different state, the six-stage operation are as follows:

0: Stop (remember not to initdefault is set to 0, since this would not start Linux)

1: single-user mode, safe mode like Win9X.

2: multi-user, but not NFS.

3: Full multi-user mode, standard operating level.

4: generally do not, in some special cases you can use it to do something.

5: X11, i.e., into the X-window system.

6: Restart (remember not to initdefault set to 6, since this would continually restart Linux).

Which run level 3 is what we want to enter the character interface standard Console mode.

Note: the command init ID number (eg: init 5) can be immediately switched to the corresponding operating state, but this is only temporary, after the restart will still enter the default (ie level inittab defined in the file).

4. Summary

如上述示例,通过修改inittab修改默认运行级,即可实现默认启动下图形界面的开启和关闭,同时也可以通过init id号来临时确定图形界面的打开和关闭。

Guess you like

Origin www.cnblogs.com/dianyu/p/11955935.html