Enable the image interface on Ubuntu by default.

Source: Internet
Author: User
Preface

Environment: ubuntu12.04

 

I. Ubuntu settings default boot Interface

 

You have checked several methods on the Internet. The convenient or useful method for the current environment is to set the/etc/default/GRUB file.

1. Default boot command line interface

File:/etc/default/GRUB File

Replace grub_cmdline_linux_default = "quiet Splash" with grub_cmdline_linux_default = "text"

Update grub. cfg

$ Sudo Update-grub

 

2. Default Boot Image Interface

File:/etc/default/GRUB file remove "text" from parameter grub_cmdline_linux_default"

Update grub. cfg

$ Sudo Update-grub

3./etc/default/GRUB parameter description

Grub code

 

 1 # If you change this file, run ‘update-grub‘ afterwards to update                                                                                                                   2 # /boot/grub/grub.cfg. 3 # For full documentation of the options in this file, see: 4 #   info -f grub -n ‘Simple configuration‘ 5   6 GRUB_DEFAULT=0 7 GRUB_HIDDEN_TIMEOUT=0 8 GRUB_HIDDEN_TIMEOUT_QUIET=true 9 GRUB_TIMEOUT=1010 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`11 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"12 GRUB_CMDLINE_LINUX=""13  14 # Uncomment to enable BadRAM filtering, modify to suit your needs15 # This works with Linux (no patch required) and with any kernel that obtains16 # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)17 #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"18  19 # Uncomment to disable graphical terminal (grub-pc only)20 #GRUB_TERMINAL=console21  22 # The resolution used on graphical terminal23 # note that you can use only modes which your graphic card supports via VBE24 # you can see them in real GRUB with the command `vbeinfo‘25 #GRUB_GFXMODE=640x48026  27 # Uncomment if you don‘t want GRUB to pass "root=UUID=xxx" parameter to Linux28 #GRUB_DISABLE_LINUX_UUID=true29  30 # Uncomment to disable generation of recovery mode menu entries31 #GRUB_DISABLE_RECOVERY="true"32  33 # Uncomment to get a beep at grub start34 #GRUB_INIT_TUNE="480 440 1"

 

Grub_hidden_timeout = 0

------------------------------------------

This configuration affects menu display. If this option is set, the menu is hidden and the boot screen is displayed. The menu will be hidden unless a # sign is added at the beginning of this line. (# Grub_hidden_timeout = 0 ).

When grub is executed for the first time, it will look for other operating systems. If no other operating system is detected, the menu is hidden. If other operating systems are identified, the menu is displayed.

If the value is an integer greater than 0, the system will pause Based on the configured number of seconds, but the menu will not be displayed.

If it is equal to 0, the menu is not displayed and there is no delay.

PS: You can press and hold the Shift key at startup to forcibly display the menu. During startup, the system checks the Shift key status. If the button status cannot be identified, there will be a short delay so that you can press ESC to display the menu.

 

Grub_hidden_timeout_quiet = true

------------------------------------------

True: No countdown is displayed. The screen will be blank.

False indicates the time configured in grub_hidden_timeout. A countdown timer is displayed on the blank screen.

 

Grub_timeout = 10

------------------------------------------

This command will comply with the grub_hidden_timeout configuration unless grub_hidden_timeout is commented out (#). If grub_hidden_timeout is enabled, grub_timeout is executed only once when the menu is displayed.

If this value is set to-1, the menu will be displayed until the user selects it.

The GRUB menu is hidden by default, unless it is detected by other operating systems. If no other operating system exists, this line will be commented out unless the user modifies it. To display the menu at each startup, remove the comments of this line and use a value of 1 or greater.

 

Grub_cmdline_linux_default

------------------------------------------

You can set the following parameters:

Quiet refers to the simplified prompt information during kernel startup.

Splash means to use a graphical progress bar to replace the init character output process at startup.

Text indicates entering the command line interface after startup. If this parameter is not set, the image interface is displayed by default.

 

2. Enable the image interface under the command line

 

Using startx directly under ubuntu12.04 fails to enable the graphic interface normally. Use the following method:

View pstree in the graphic interface. We can see that the graphic interface is started through lightdm.

     ├─lightdm─┬─Xorg───6*[{Xorg}]     │         ├─lightdm─┬─gnome-session─┬─bluetooth-apple───2*[{bluetooth-apple}]     │         │         │               ├─deja-dup-monito───2*[{deja-dup-monito}]     │         │         │               ├─gdu-notificatio───2*[{gdu-notificatio}]     │         │         │               ├─gnome-fallback-───2*[{gnome-fallback-}]     │         │         │               ├─gnome-screensav───2*[{gnome-screensav}]     │         │         │               ├─gnome-settings-───2*[{gnome-settings-}]     │         │         │               ├─ibus-daemon─┬─ibus-engine-pin───{ibus-engine-pin}     │         │         │               │             ├─ibus-gconf───{ibus-gconf}     │         │         │               │             ├─python───2*[{python}]     │         │         │               │             └─2*[{ibus-daemon}]     │         │         │               ├─metacity───3*[{metacity}]     │         │         │               ├─nautilus───2*[{nautilus}]     │         │         │               ├─nm-applet───2*[{nm-applet}]     │         │         │               ├─polkit-gnome-au───2*[{polkit-gnome-au}]     │         │         │               ├─ssh-agent     │         │         │               ├─telepathy-indic───2*[{telepathy-indic}]     │         │         │               ├─unity-2d-panel───2*[{unity-2d-panel}]     │         │         │               ├─unity-2d-shell───6*[{unity-2d-shell}]     │         │         │               ├─update-notifier───2*[{update-notifier}]     │         │         │               └─3*[{gnome-session}]     │         │         └─{lightdm}     │         └─2*[{lightdm}]

  

Enter sudo lightdm start in the command line to enter the graphical interface. Press enter to enter the logon interface, and enter the password.

If you cannot enter the graphic desktop after entering the logon password, you can still return to the logon interface. You can press CTRL + ALT + F1 to return to the command line and find one. the Xauthority file is denied to be written, so there is no way to change the permission of this file. Run the following command:

After sudo chmod 646. Xauthority is complete, run sudo lightdm restart to enter the logon interface. after entering the password, the desktop will be started normally.

 

 

 

 

Reference: http://blog.csdn.net/yuyin86/article/details/8255061#t10

Http://www.2cto.com/ OS /201306/217198.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.