Modify Ubuntu startup items and maximize, minimize, and disable the right button

Source: Internet
Author: User

If the dual system is installed, the system will display the order of the two boot times, the first display of the Order of the Windows boot, and the second display of the Ubuntu boot sequence, it is uncomfortable to repeat.

For Windows:
Right-click my computer (win7 is the right-click computer), select Properties-advanced-start and fault recovery select the default Operating System and menu display time.

Ubuntu:
Run sudo gedit/boot/GRUB/menu. lst.

For example





Default 0
Timeout 10
Title Ubuntu 9.04, kernel 2.6.28-11-generic
Title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
Title Ubuntu 9.04, memtest86 +
Title other operating systems:
Title Microsoft Windows XP Professional

The five titles above are the five startup selection items that you can see at startup. Modify the line "Default 0". Here 0 indicates that the first line is started, 1 indicates the second line, and so on.
In ubuntu 9.04, kernel 2.6.28-11-generic is 0, and Microsoft Windows XP Professional is 4. Here we can change 0 to 4 to set XP to the first startup.
Timeout indicates the display time.


There is no menu. LST file in Ubuntu 10.04 or later versions. The file has been changed to grub. cfg. Type sudo gedit/boot/GRUB/grub. cfg on the terminal.

--------------------------------The content of grub. cfg is as follows:

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

#
# Do not edit this file
#
# It is automatically generated by/usr/sbin/grub-mkconfig using templates
# From/etc/grub. D and settings from/etc/default/GRUB
#

### Begin/etc/grub. d/00_header ###

If [-S $ prefix/grubenv]; then

Load_env
Fi

# If the default start item is XP, set default is changed to 4, that is, set default = "4"

Set default = "0"
If [$ {prev_saved_entry}]; then
Set saved_entry =$ {prev_saved_entry}
Save_env saved_entry
Set prev_saved_entry =
Save_env prev_saved_entry
Set boot_once = true
Fi

Function savedefault {
If [-Z $ {boot_once}]; then
Saved_entry =$ {chosen}
Save_env saved_entry
Fi
}

Function recordfail {
Set recordfail = 1
If [-N $ {have_grubenv}]; then if [-Z $ {boot_once}]; then save_env recordfail; FI
}
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set 27cc65d6-0513-4f68-8c42-901f871052ae
If loadfont/usr/share/GRUB/Unicode. pf2; then
Set gfxmode = 640x480
Insmod gfxterm
Insmod VBE
If terminal_output gfxterm; then true; else
# For backward compatibility with versions of terminal. MOD that don't
# Understand terminal_output
Terminal gfxterm
Fi
Fi
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set 27cc65d6-0513-4f68-8c42-901f871052ae
Set locale_dir = ($ root)/boot/GRUB/locale
Set lang = ZH
Insmod gettext
If [$ {recordfail} = 1]; then
Set timeout =-1
Else
Set timeout = 10

Fi
### End/etc/grub. d/00_header ###

### Begin/etc/grub. d/05_debian_theme ###
Set menu_color_normal = white/black
Set menu_color_highlight = Black/light-gray
### End/etc/grub. d/05_debian_theme ###

### Begin/etc/grub. d/10_linux ###
Menuentry 'ubuntu, with Linux 2.6.32-21-generic '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set 27cc65d6-0513-4f68-8c42-901f871052ae
Linux/boot/vmlinuz-2.6.32-21-generic root = UUID = 27cc65d6-0513-4f68-8c42-901f871052ae Ro quiet splash
Initrd/boot/initrd. img-2.6.32-21-generic
}
Menuentry 'ubuntu, with Linux 2.6.32-21-generic (recovery mode) '-- class Ubuntu -- class GNU-Linux -- class GNU -- class OS {
Recordfail
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set 27cc65d6-0513-4f68-8c42-901f871052ae
Echo 'loading Linux 2.6.32-21-generic ...'
Linux/boot/vmlinuz-2.6.32-21-generic root = UUID = 27cc65d6-0513-4f68-8c42-901f871052ae Ro single
Echo 'loading initial ramdisk ...'
Initrd/boot/initrd. img-2.6.32-21-generic
}
### End/etc/grub. d/10_linux ###

### Begin/etc/grub. d/20_memtest86 + ###
Menuentry "Memory Test (memtest86 + )"{
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set 27cc65d6-0513-4f68-8c42-901f871052ae
Linux16/boot/memtest86 +. Bin
}
Menuentry "Memory Test (memtest86 +, serial console 115200 )"{
Insmod ext2
Set root = '(hd0, 8 )'
Search -- no-floppy -- FS-UUID -- set 27cc65d6-0513-4f68-8c42-901f871052ae
Linux16/boot/memtest86 +. Bin console = ttys0, 115200n8
}
### End/etc/grub. d/20_memtest86 + ###


# Here, the XP startup Item parameter "restart" is added.
### Begin/etc/grub. d/30_os-prober ###
Menuentry "Windows XP (on/dev/sda1 )"{


Insmod NTFS

Set root = (hd0, 1)

Search -- no-floppy -- FS-UUID -- set b2cc3f5fcc3f1cd3

Chainloader + 1

}

### End/etc/grub. d/30_os-prober ###

### Begin/etc/grub. d/40_custom ###

# This file provides an easy way to add custom menu entries.
Simply type
# Menu entries you want to add after this comment.
Be careful not to change
# The 'exec tail' line above.
### End/etc/grub. d/40_custom ###

 

Save and start from! OK...


Maximize, minimize, and close the button to the right:

The location of the window function button depends on a configuration file. We will use the GUI "gconf-Editor" to modify this configuration file.

Press the "Alt + F2" key combination, enter "gconf-Editor" in the pop-up application running dialog box, and click "run.

The configuration page is displayed.

The project we want to modify is in "apps/metacity/General. Click the plus (+) icon and navigate to the General tab.

Find the "button_layout" entry in "general" and double-click it to modify it.

Change its field value:

Menu: Maximize, minimize, close

Click "OK" and then click "OK". The window changes immediately. The function button is displayed in the upper right corner.

Note that the order of buttons in the current window is a little different from that in the typical Window Function buttons. in earlier versions of Ubuntu and windows, the minimization button is on the left of the maximization button, now the minimization button is on the right of the maximization button, which may not be the same as we have always been using.

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.