- 论坛徽章:
- 0
|
本帖最后由 feiniao222 于 2011-11-02 14:48 编辑
各位好!
我使用网上找来的方法,如下:
进入root 用户
1. 关闭默认的cde服务
# svcadm disable cde-login
#ps-ef|grep dtlogin
应该看不到dtlogin进程了
2. 编译配置文件
进入/etc/X11/gdm
编辑gdm.conf文件 编辑如下2个地方
找到[xdmcp]字段.
将Enable=flase改为true
将Port=177前的注释取消
然后保存退出.
3.查看进程
#ps -ef|grep gdm
确认目前没有gdm进程.如有杀之
#kill -9 psNum
4. 启动gdm服务
# svcs -a|grep gdm
show: disabled Aug_07 svc:/application/gdm2-login:default
# svcadm enable svc:/application/gdm2-login:default
但当我启动gdm服务的时候,出现一下报错信息:
bash-3.00# svcadm enable svc:/application/gdm2-login:default
bash-3.00# Nov 2 14:26:10 YFYB10 svc.startd[7]: application/gdm2-login:default failed: transitioned to maintenance (see 'svcs -xv' for details)
然后我检查了一下服务的状态,结果maintenance,郁闷,不知道怎么的。
bash-3.00# svcs -a|grep gdm
maintenance 14:26:10 svc:/application/gdm2-login:default
bash-3.00#
我用命令svcs -xv查看了服务内容,如下:
bash-3.00# svcs -xv
svc:/application/print/server:default (LP print server)
State: disabled since Wed Nov 02 14:15:11 2011
Reason: Disabled by an administrator.
See: http://sun.com/msg/SMF-8000-05
See: man -M /usr/share/man -s 1M lpsched
Impact: 2 dependent services are not running:
svc:/application/print/rfc1179:default
svc:/application/print/ipp-listener:default
svc:/application/gdm2-login:default (GNOME Display Manager)
State: maintenance since Wed Nov 02 14:26:10 2011
Reason: Start method failed repeatedly, last exited with status 1.
See: http://sun.com/msg/SMF-8000-KS
See: man -M /usr/share/man -s 1 gdm
See: /var/svc/log/application-gdm2-login:default.log
Impact: This service is not running.
svc:/network/smtp:sendmail (sendmail SMTP mail transfer agent)
State: maintenance since Wed Nov 02 14:21:32 2011
Reason: Start method failed repeatedly, last died on Killed (9).
See: http://sun.com/msg/SMF-8000-KS
See: man -M /usr/share/man -s 1M sendmail
See: /var/svc/log/network-smtp:sendmail.log
Impact: This service is not running.
bash-3.00#
然后我再检查gdm的日志信息,居然说一些环境变量无效,如下:
bash-3.00# cat /var/svc/log/application-gdm2-login:default.log
[ Nov 1 13:22:42 Disabled. ]
[ Nov 1 13:22:42 Rereading configuration. ]
[ Nov 2 12:28:26 Enabled. ]
[ Nov 2 12:28:26 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:28:26 Method "start" exited with status 1 ]
[ Nov 2 12:28:26 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:28:26 Method "start" exited with status 1 ]
[ Nov 2 12:28:26 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:28:26 Method "start" exited with status 1 ]
[ Nov 2 12:30:58 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:30:58 Method "start" exited with status 1 ]
[ Nov 2 12:30:58 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:30:58 Method "start" exited with status 1 ]
[ Nov 2 12:30:58 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:30:58 Method "start" exited with status 1 ]
[ Nov 2 12:51:35 Leaving maintenance because disable requested. ]
[ Nov 2 12:51:35 Disabled. ]
[ Nov 2 12:51:49 Enabled. ]
[ Nov 2 12:51:49 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 12:51:49 Method "start" exited with status 1 ]
[ Nov 2 12:52:03 Leaving maintenance because disable requested. ]
[ Nov 2 12:52:03 Disabled. ]
[ Nov 2 13:05:32 Enabled. ]
[ Nov 2 13:05:33 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 13:05:33 Method "start" exited with status 1 ]
[ Nov 2 13:05:41 Leaving maintenance because clear requested. ]
[ Nov 2 13:05:41 Enabled. ]
[ Nov 2 13:05:41 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 13:05:41 Method "start" exited with status 1 ]
[ Nov 2 13:06:51 Leaving maintenance because clear requested. ]
[ Nov 2 13:06:51 Enabled. ]
[ Nov 2 13:06:51 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 13:06:51 Method "start" exited with status 1 ]
[ Nov 2 13:06:53 Leaving maintenance because clear requested. ]
[ Nov 2 13:06:53 Enabled. ]
[ Nov 2 13:06:53 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 13:06:53 Method "start" exited with status 1 ]
[ Nov 2 13:06:54 Leaving maintenance because clear requested. ]
[ Nov 2 13:06:54 Enabled. ]
[ Nov 2 13:06:54 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 13:06:54 Method "start" exited with status 1 ]
[ Nov 2 13:09:04 Leaving maintenance because disable requested. ]
[ Nov 2 13:09:04 Disabled. ]
[ Nov 2 13:15:56 Enabled. ]
[ Nov 2 13:15:56 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 13:15:56 Method "start" exited with status 1 ]
[ Nov 2 13:16:28 Leaving maintenance because disable requested. ]
[ Nov 2 13:16:28 Disabled. ]
[ Nov 2 14:26:10 Enabled. ]
[ Nov 2 14:26:10 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 14:26:10 Method "start" exited with status 1 ]
[ Nov 2 14:26:10 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 14:26:10 Method "start" exited with status 1 ]
[ Nov 2 14:26:10 Executing start method ("/usr/bin/gdm") ]
/usr/bin/gdm: PATH=/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin: is not an identifier
[ Nov 2 14:26:10 Method "start" exited with status 1 ]
bash-3.00#
我查看了一下,我的PATH环境变量,显示是这个:
bash-3.00# echo $PATH
/usr/sbin:/usr/bin
bash-3.00#
但我明明在/etc/profile 添加了/usr/bin/gdm 内容,为什么还不行,郁闷:
bash-3.00# cat /etc/profile
#ident "@(#)profile 1.19 01/03/13 SMI" /* SVr4.0 1.3 */
# The profile that all logins get before using their own .profile.
trap "" 2 3
export LOGNAME PATH
if [ "$TERM" = "" ]
then
if /bin/i386
then
TERM=sun-color
else
TERM=sun
fi
export TERM
fi
# Login and -su shells get /etc/profile services.
# -rsh is given its environment in its .profile.
case "$0" in
-sh | -ksh | -jsh | -bash)
if [ ! -f .hushlogin ]
then
/usr/sbin/quota
# Allow the user to break the Message-Of-The-Day only.
trap "trap '' 2" 2
/bin/cat -s /etc/motd
trap "" 2
/bin/mail -E
case $? in
0)
echo "You have new mail."
;;
2)
echo "You have mail."
;;
esac
fi
esac
export PATH=$PATH:/usr/sbin:/usr/bin:/usr/sbin:/usr/bin:/usr/ccs/bin:/usr/sfw/bin:/usr/bin/gdm
umask 022
tra p 2 3 |
|