当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 11 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 12:25 
头像

注册: 2008-02-17 23:47
帖子: 22120
地址: 美丽富饶的那啥星球
送出感谢: 11
接收感谢: 84
我用源里的slim,现在是 1.3.2-1,可是一直存在一个烂问题,就是虽然设定为自动登录了,但是每次开机都显示 “fails login commande”,然后就退回登录界面,一定要等我按F1选定WM之后再登录才会正常进入桌面。

我知道肯定是slim.conf或者xinitrc里什么地方不对劲,但是就是没看出问题所在,各位帮忙瞅瞅咋整喔

这是slim.conf
代码:
# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments   -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
#login_cmd           exec /bin/bash -login /etc/X11/xinit/xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd   some command
# sessionstop_cmd   some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon   yes

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions        Openbox,E17,KDE,pekwm,blackbox

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session:

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user        adagi0

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
auto_login          yes


# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme      archlinux-darch-grey

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log

# Path, X server and arguments (if needed)
# Note: -xauth $authfile is automatically appended
default_path        /bin:/usr/bin:/usr/local/bin
default_xserver     /usr/bin/X
xserver_arguments   -nolisten tcp vt07

# Commands for halt, login, etc.
halt_cmd            /sbin/shutdown -h now
reboot_cmd          /sbin/shutdown -r now
console_cmd         /usr/bin/xterm -C -fg white -bg black +sb -T "Console login" -e /bin/sh -c "/bin/cat /etc/issue; exec /bin/login"
#suspend_cmd        /usr/sbin/suspend

# Full path to the xauth binary
xauth_path         /usr/bin/xauth

# Xauth file for server
authfile           /var/run/slim.auth


# Activate numlock when slim starts. Valid values: on|off
# numlock             on

# Hide the mouse cursor (note: does not work with some WMs).
# Valid values: true|false
# hidecursor          false

# This command is executed after a succesful login.
# you can place the %session and %theme variables
# to handle launching of specific commands in .xinitrc
# depending of chosen session and slim theme
#
# NOTE: if your system does not have bash you need
# to adjust the command according to your preferred shell,
# i.e. for freebsd use:
# login_cmd           exec /bin/sh - ~/.xinitrc %session
login_cmd           exec /bin/bash -login ~/.xinitrc %session

# Commands executed when starting and exiting a session.
# They can be used for registering a X11 session with
# sessreg. You can use the %user variable
#
# sessionstart_cmd   some command
# sessionstop_cmd   some command

# Start in daemon mode. Valid values: yes | no
# Note that this can be overriden by the command line
# options "-d" and "-nodaemon"
# daemon   yes

# Available sessions (first one is the default).
# The current chosen session name is replaced in the login_cmd
# above, so your login command can handle different sessions.
# see the xinitrc.sample file shipped with slim sources
sessions        Openbox,E17,KDE,pekwm,blackbox

# Executed when pressing F11 (requires imagemagick)
screenshot_cmd      import -window root /slim.png

# welcome message. Available variables: %host, %domain
welcome_msg         Welcome to %host

# Session message. Prepended to the session name when pressing F1
# session_msg         Session:

# shutdown / reboot messages
shutdown_msg       The system is halting...
reboot_msg         The system is rebooting...

# default user, leave blank or remove this line
# for avoid pre-loading the username.
default_user        adagi0

# Focus the password field on start when default_user is set
# Set to "yes" to enable this feature
#focus_password      no

# Automatically login the default user (without entering
# the password. Set to "yes" to enable this feature
auto_login          yes


# current theme, use comma separated list to specify a set to
# randomly choose from
current_theme      archlinux-darch-grey

# Lock file
lockfile            /var/lock/slim.lock

# Log file
logfile             /var/log/slim.log


这是~/.xinitrc,我要那种可启动多个WM,但默认会自动登录Openbox的效果,就从arch的wiki里抄来这个脚本,难道这里有问题?
貌似DEFAULT_SESSION=Openbox这一句不起作用,但下面的case语句又没问题
代码:
#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)
#

setxkbmap -option terminate:ctrl_alt_bksp
xrdb -merge $HOME/.Xresources
xrdb -merge $HOME/.Xdefaults
export LANGUAGE=zh_CN.utf8
export LC_MESSAGES=zh_CN.utf8
export PATH=$PATH:/home/Scripts
numlockx &
export _JAVA_OPTIONS='-Dawt.useSystemAAFontSettings=lcd'

export XMODIFIERS="@im=ibus"
export GTK_IM_MODULE=ibus
export QT_IM_MODULE=ibus


DEFAULT_SESSION=Openbox
case $1 in
    Openbox)
      exec ck-launch-session openbox-session
      ;;
    Fluxbox)
      exec ck-launch-session startfluxbox
      ;;
    Xfce4)
      exec ck-launch-session startxfce4
      ;;
    KDE)
      exec ck-launch-session startkde
      ;;
    Gnome)
      exec ck-launch-session gnome-session
      ;;
    E17)
      exec ck-launch-session /usr/bin/enlightenment_start
      ;;
    E16)
      exec ck-launch-session /usr/bin/starte16
      ;;
    pekwm)
      exec ck-launch-session /usr/bin/pekwm
      ;;
    ratpoison)
      exec ck-launch-session ratpoison
      ;;
    awesome)
      exec ck-launch-session $HOME/bin/run_awesome
      ;;
    dwm)
      exec ck-launch-session $HOME/bin/dwm_run
      ;;
    wmii)
      until wmii; do true ; done
      ;;
    icewm)
      exec icewm-session
      ;;
    xmonad)
      exec ck-launch-session xmonad
      ;;
    blackbox)
      exec ck-launch-session blackbox
      ;;
   *)
   exec $session
   ;;
esac


_________________
明天就换大三八!
——8核CPU、8G内存、8T硬盘……
8卡交火,80寸大屏放8个……
IPv8的光纤要8条……

---------------------------------------------------------------------------------
[图片版]新手当自强(续)FAQ
[新手进阶]挂载、fstab、调整linux分区
[图片版]E17桌面环境配置手把手


页首
 用户资料  
 
2 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 12:30 
头像

注册: 2007-02-02 18:14
帖子: 30702
系统: debian sid
送出感谢: 1
接收感谢: 34
没看出来 :em01


_________________
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)


页首
 用户资料  
 
3 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 12:34 

注册: 2008-10-31 22:12
帖子: 6546
系统: 践兔
送出感谢: 18
接收感谢: 25
代码:
*)exec $DEFAULT_SESSION;;
其实吾都只有一个session.


_________________
代码:
] ls -ld //


页首
 用户资料  
 
4 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 13:24 
头像

注册: 2005-08-14 19:53
帖子: 4000
送出感谢: 1
接收感谢: 2
你就判断一下$1有没有内容就好了啊


页首
 用户资料  
 
5 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 16:48 

注册: 2010-05-23 18:26
帖子: 68
地址: China
送出感谢: 0 次
接收感谢: 0 次
startx看看有什么提示


_________________
好吧


页首
 用户资料  
 
6 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 17:03 
头像

注册: 2005-08-14 21:55
帖子: 58428
地址: 长沙
送出感谢: 4
接收感谢: 274
auth不对?

这啥rp。咋老出问题。


_________________
● 鸣学


页首
 用户资料  
 
7 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 17:27 
头像

注册: 2008-04-14 23:29
帖子: 2114
地址: 曾也在NB大学呆过
送出感谢: 3
接收感谢: 10
我以前 好像 是把case语句直接去掉的
引用:
case $1 in
Openbox)
exec ck-launch-session openbox-session
;;
Fluxbox)
exec ck-launch-session startfluxbox
;;
Xfce4)
exec ck-launch-session startxfce4
;;
KDE)
exec ck-launch-session startkde
;;
Gnome)
exec ck-launch-session gnome-session
;;
E17)
exec ck-launch-session /usr/bin/enlightenment_start
;;
E16)
exec ck-launch-session /usr/bin/starte16
;;
pekwm)
exec ck-launch-session /usr/bin/pekwm
;;
ratpoison)
exec ck-launch-session ratpoison
;;
awesome)
exec ck-launch-session $HOME/bin/run_awesome
;;
dwm)
exec ck-launch-session $HOME/bin/dwm_run
;;
wmii)
until wmii; do true ; done
;;
icewm)
exec icewm-session
;;
xmonad)
exec ck-launch-session xmonad
;;
blackbox)
exec ck-launch-session blackbox
;;
*)
exec $session
;;
esac


全去掉,中只留了
引用:
Openbox)
exec ck-launch-session openbox-session
;;


页首
 用户资料  
 
8 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 17:27 
头像

注册: 2008-04-14 23:29
帖子: 2114
地址: 曾也在NB大学呆过
送出感谢: 3
接收感谢: 10
错了勿怪


页首
 用户资料  
 
9 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 18:13 
头像

注册: 2008-02-17 23:47
帖子: 22120
地址: 美丽富饶的那啥星球
送出感谢: 11
接收感谢: 84
那不是不能选择进入其他WM了? :shock:


_________________
明天就换大三八!
——8核CPU、8G内存、8T硬盘……
8卡交火,80寸大屏放8个……
IPv8的光纤要8条……

---------------------------------------------------------------------------------
[图片版]新手当自强(续)FAQ
[新手进阶]挂载、fstab、调整linux分区
[图片版]E17桌面环境配置手把手


页首
 用户资料  
 
10 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 18:16 
头像

注册: 2007-02-02 18:14
帖子: 30702
系统: debian sid
送出感谢: 1
接收感谢: 34
估计有得选了不可以自动登录吧?一眼格格 :em06


_________________
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)


页首
 用户资料  
 
11 楼 
 文章标题 : Re: slim的脚本,到底怎么写才好捏?
帖子发表于 : 2010-08-29 18:30 
头像

注册: 2008-02-17 23:47
帖子: 22120
地址: 美丽富饶的那啥星球
送出感谢: 11
接收感谢: 84
不是吧 :em21


_________________
明天就换大三八!
——8核CPU、8G内存、8T硬盘……
8卡交火,80寸大屏放8个……
IPv8的光纤要8条……

---------------------------------------------------------------------------------
[图片版]新手当自强(续)FAQ
[新手进阶]挂载、fstab、调整linux分区
[图片版]E17桌面环境配置手把手


页首
 用户资料  
 
显示帖子 :  排序  
发表新帖 回复这个主题  [ 11 篇帖子 ] 

当前时区为 UTC + 8 小时


在线用户

正在浏览此版面的用户:没有注册用户 和 2 位游客


不能 在这个版面发表主题
不能 在这个版面回复主题
不能 在这个版面编辑帖子
不能 在这个版面删除帖子
不能 在这个版面提交附件

前往 :  
本站点为公益性站点,用于推广开源自由软件,由 DiaHosting VPSBudgetVM VPS 提供服务。
我们认为:软件应可免费取得,软件工具在各种语言环境下皆可使用,且不会有任何功能上的差异;
人们应有定制和修改软件的自由,且方式不受限制,只要他们自认为合适。

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
简体中文语系由 王笑宇 翻译