OpenSolaris Tips: How to configure Automatic-Login with GDM
How to configure Automatic login on OpenSolaris 2009.06 with GDM
OpenSolaris 2009.06 を LiveCD(LiveUSBでも)でスタートアップしたときに自動的にログインしてGNOME Desktop が表示される。
この一連の動作をハードディスクにインストールした OpenSolaris 2009.06 で実現させるための設定方法についてのメモ。
この設定は一意のユーザのみに適用される。複数のユーザで一台のマシンを共有する場合には、セキュリティ上お勧めしない。
LiveCD で自動ログインしたときの、GNOME desktop 上の GNOME端末を開いて、/etc/X11/gdm 以下のファイルを覧る。
ここで custom.conf に注目。これが GDM をカスタマイズするための設定ファイルである。
jack@opensolaris:~$ ls /etc/X11/gdm
Init PostSession XKeepsCrashing custom.conf locale.alias
PostLogin PreSession Xsession gdmprefetchlist modules
jack@opensolaris:~$ cat /etc/X11/gdm/custom.conf
----------------------------------------------------------------
# GDM Custom Configuration 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.
#
# This file overrides the default configuration settings. These settings
# are stored in the GDM System Defaults configuration file, which is found
# at the following location.
#
# /usr/share/gdm/defaults.conf.
#
# This file contains comments about the meaning of each configuration option,
# so is also a useful reference. Also refer to the documentation links at
# the end of this comment for further information. In short, to hand-edit
# this file, simply add or modify the key=value combination in the
# appropriate section in the template below this comment section.
#
# For example, if you want to specify a different value for the Enable key
# in the "[debug]" section of your GDM System Defaults configuration file,
# then add "Enable=true" in the "[debug]" section of this file. If the
# key already exists in this file, then simply modify it.
#
# 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.
#
# If you hand edit a GDM configuration file, you can run the following
# command and the GDM daemon will immediately reflect the change. Any
# running GDM GUI programs will also be notified to update with the new
# configuration.
#
# gdmflexiserver --command="UPDATE_CONFIG
#
# e.g, the "Enable" key in the "[debug]" section would be "debug/Enable".
#
# You can also run gdm-restart or gdm-safe-restart to cause GDM to restart and
# re-read the new configuration settings. You can also restart GDM by sending
# a HUP or USR1 signal to the daemon. HUP behaves like gdm-restart and causes
# any user session started by GDM to exit immediately while USR1 behaves like
# gdm-safe-restart and will wait until all users log out before restarting GDM.
#
# For full reference documentation see the gnome help browser under
# GNOME|System category. You can also find the docs in HTML form on
# http://www.gnome.org/projects/gdm/
#
# NOTE: Lines that begin with "#" are considered comments.
#
# Have fun!
[daemon]
AutomaticLoginEnable=true ←自動ログインを有効にする
AutomaticLogin=jack ←自動ログインするユーザーアカウントを指定
GdmXserverTimeout=30
[security]
[xdmcp]
[gui]
[greeter]
[chooser]
[debug]
# Note that to disable servers defined in the GDM System Defaults
# configuration file (such as 0=Standard, you must put a line in this file
# that says 0=inactive, as described in the Configuration section of the GDM
# documentation.
#
[servers]
# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the GDM System Defaults configuration
# file. It is currently not possible to disable a [server-foo] section
# defined in the GDM System Defaults configuration file.
#
----------------------------------------------------------------
ハードディスクにインストールした OpenSolaris を起動して GNOME Desktop が表示されたら、上述と同様に GNOME端末を開いて、コマンドラインで
$ pfexec vi /etc/X11/gdm/custom.conf
-------------------------------------------------------------------------------------------
# GDM Custom Configuration 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.
#
-- 中略
#
# 以下の項目
[daemon] の記述がなければ追加・編集する↓
#
[daemon]
# 自動ログインを有効にする↓
AutomaticLoginEnable=true
# 自動ログインするユーザーアカウントを指定↓
AutomaticLogin=hogehoge
# 自動ログインまでの時間(秒)を指定・任意、ここでは 15秒↓
GdmXserverTimeout=15
[security]
[xdmcp]
Enable=true
[gui]
[greeter]
[chooser]
[debug]
# Note that to disable servers defined in the GDM System Defaults
# configuration file (such as 0=Standard, you must put a line in this file
# that says 0=inactive, as described in the Configuration section of the GDM
# documentation.
#
[servers]
# Also note, that if you redefine a [server-foo] section, then GDM will
# use the definition in this file, not the GDM System Defaults configuration
# file. It is currently not possible to disable a [server-foo] section
# defined in the GDM System Defaults configuration file.
#
----------------------------------------------------------
このファイルを保存終了して、システムを再起動させる。
すると、LiveCDから起動したときと同様に、指定した時間が経過すると指定したユーザーアカウントで自動的にログインして、GNOME Desktop 画面が表示される。
ただし、この設定では、自動ログイン後にいったんログアウトした場合には、GDM ログイン画面が表示されて、再ログインする場合にはユーザ名とパスワードを入力する必要がある。
そこで、別法・・・先の設定と同様に GNOME端末を開いて、コマンドラインで赤字部分を編集する。
$ pfexec vi /etc/X11/gdm/custom.conf
--------------------------------------------------------------
# GDM Custom Configuration file.
#
-- 中略 ---
#
[daemon]
# 自動ログインを有効にする
TimedLoginEnable=true
# 自動ログインするユーザーアカウントを指定
TimedLogin=hogehoge
# 自動ログインまでの時間(秒)を指定・任意
TimedLoginDelay=15
[security]
[xdmcp]
Enable=true
-- 後略 ---
--------------------------------------------------------------
テキストエディタを保存終了して、システムを再起動させる。
すると、ログイン画面で「ユーザ hogehoge は 15 秒後にログインします」と表示されるようになり、指定した時間が経過すると指定したユーザーアカウントで自動的にログインする。
0 Comments::
Post a Comment