歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Ubuntu 14.04自動登錄到桌面

Ubuntu 14.04自動登錄到桌面

日期:2017/2/28 14:32:56   编辑:Linux教程

無須輸入用戶名密碼讓Ubuntu 14.04自動登錄到桌面,每個Linux用戶都必須設有密碼,這與Windows不同,對於非專業使用Linux的用戶來說,已經解決了自動鎖屏輸密 碼問題,如果每次登錄系統也不用輸入密碼 ,豈不是讓我們的工作更加輕松更加easy。注意這裡的免密碼登錄系統並不是說用戶沒有密碼了,密碼還在只是系統把密碼記住了自動用你的密碼登錄而已。

推薦閱讀

Ubuntu 14.04 下載、安裝、配置的相關知識 http://www.linuxidc.com/Linux/2014-04/100370.htm

Ubuntu 14.04系統下載地址:http://www.linuxidc.com/Linux/2014-04/100352.htm

Windows 7下硬盤安裝Ubuntu 14.04圖文教程 http://www.linuxidc.com/Linux/2014-04/100369.htm

U盤安裝Ubuntu 14.04 LTS正式版 http://www.linuxidc.com/linux/2014-04/100446.htm

解決方案:

(1)系統設置裡找到“用戶賬戶”

(2)然後點擊右上角的“解鎖”,輸入當前用戶的密碼解鎖認證

(3)解鎖成功後,開啟自動登錄功能,即“自動登錄 ”開關打開,保存設置即可。

附:

注意事項:較低版本的Ubuntu可能沒有該設置選項,那麼可以通過配置文件設置自動登錄:

在/etc/gdm/目錄下有個custom.conf或者gdm.conf或gdm.conf-custom文件,比如我的Ubuntu9.11下的gdm下有這些文件:

打開gdm.conf-custom,截取最前面的幾句注釋說明如下:

# GDM Configuration Customization file.
#
# This file is the appropriate place for specifying your customizations to the
# GDM configuration. If you run gdmsetup, it will automatically edit this
# file for you and will cause the daemon and any running GDM GUI programs to
# automatically update with the new configuration. Not all configuration
# options are supported by gdmsetup, so to modify some values it may be
# necessary to modify this file directly by hand.
#
# Older versions of GDM used the "gdm.conf" file for configuration. If your
# system has an old gdm.conf file on the system, it will be used instead of
# this file - so changes made to this file will not take effect. Consider
# migrating your configuration to this file and removing the gdm.conf file.

文件中後面說到如果有gdm.conf老配置文件,那麼該文件中的值就不會起作用。那麼我們就去gdm.conf裡配置吧,打開後找到下面這一段:

[daemon]
# Automatic login, if true the first attached screen will automatically logged
# in as user as set with AutomaticLogin key.
AutomaticLoginEnable=false
AutomaticLogin=

上面的意思很好理解,將AutomaticLoginEnable變量值改為true就可以了。
當然,通過上面的提示我們知道還有一種方法修改該配置文件,就是使用sudo gdmsetup這個命令,運行後會出現設置界面,進入“Security”選項卡:


將“Enable Automatic Login“選上,然後選擇你自己的用戶名即可。

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved