当前时区为 UTC + 8 小时



发表新帖 回复这个主题  [ 15 篇帖子 ] 
作者 内容
1 楼 
 文章标题 : SCIM 无法自动启动
帖子发表于 : 2006-08-19 22:25 

注册: 2006-07-23 17:06
帖子: 58
送出感谢: 0 次
接收感谢: 0 次
SCIM 无法自动启动
July 28th, 2006 | Category: Technic

Scim如果无法自动启动可以在终端那里输入
scim -d 然后再CTRL+空格

如果觉得麻烦就通过修改etc/gdm/Xsession文件来实现自动启动
修改/etc/gdm/Xsession文件
找到
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
把以下的修改成
SESSIONFILES=$(run_parts $SYSSESSIONDIR)
if [ -n “$SESSIONFILES” ]; then
export XMODIFIERS=”@im=SCIM”
export GTK_IM_MODULE=”scim”
scim -d
for SESSIONFILE in $SESSIONFILES; do
. $SESSIONFILE
done
fi
重新启动X看看能不能启动SCIM


页首
 用户资料  
 
2 楼 
 文章标题 :
帖子发表于 : 2006-08-19 23:16 

注册: 2006-07-23 17:06
帖子: 58
送出感谢: 0 次
接收感谢: 0 次
不可以,谁把你的/etc/gdm/Xsession文件
找到
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
把以下的 贴出来。。。我 的 要安全模式才可以启动了。。。


页首
 用户资料  
 
3 楼 
 文章标题 :
帖子发表于 : 2006-08-19 23:33 
头像

注册: 2005-03-30 0:27
帖子: 3294
送出感谢: 0 次
接收感谢: 2
去掉你做的其他,
执行一个
代码:
im-switch  -s   scim_xim -z default



( 确保安装了 scim-pinyin im-switch )


_________________
跃过无数的时间断层,只为了在


页首
 用户资料  
 
4 楼 
 文章标题 :
帖子发表于 : 2006-08-19 23:37 

注册: 2006-07-23 17:06
帖子: 58
送出感谢: 0 次
接收感谢: 0 次
我需要/etc/gdm/Xsession文件
找到
# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
以下的的内容,我不知道原来的。。。


页首
 用户资料  
 
5 楼 
 文章标题 :
帖子发表于 : 2006-08-19 23:57 
头像

注册: 2005-03-30 0:27
帖子: 3294
送出感谢: 0 次
接收感谢: 2
楼上先把 Xsession 改回去吧
hua@vgh:eva$ cat /etc/gdm/Xsession
代码:
#!/bin/sh
#
# This is SORT OF LIKE an X session, but not quite.  You get a command as the
# first argument (it could be multiple words, so run it with "eval").  As a
# special case, the command can be:
#  failsafe - Run an xterm only
#  default - Run the appropriate Xclients startup (see the code below)
#  custom - Run ~/.xsession and if that's not available run 'default'
#
# (Note that other arguments could also follow, but only the command one is
# right now relevant and supported)
#
# The output is ALREADY redirected to .xsession-errors in GDM.  This way
# .xsession-errors actually gets more output such as if the PreSession script
# is failing.  This also prevents DoS attacks if some app in the users session
# can be prodded to dump lots of stuff on the stdout/stderr.  We wish to be
# robust don't we?  In case you wish to use an existing script for other DM's,
# you can just not redirect when GDMSESSION is set.  GDMSESSION will always
# be set from gdm.
#
# Also note that this is not run as a login shell, this is just executed.
#
# based on:
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $

PROGNAME=Xsession

message () {
  # pretty-print messages of arbitrary length; use xmessage if it
  # is available and $DISPLAY is set
  MESSAGE="$PROGNAME: $*"
  echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
  if [ -n "$DISPLAY" ]; then
    if [ -n "$zenity" ]; then
      "$zenity" --info --text "`gettextfunc "$MESSAGE"`"
    elif [ -n "$xmessage" ]; then
      echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | $xmessage -center -file -
    fi
  fi
}

message_nonl () {
  # pretty-print messages of arbitrary length (no trailing newline); use
  # xmessage if it is available and $DISPLAY is set
  MESSAGE="$PROGNAME: $*"
  echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
  if [ -n "$DISPLAY" ]; then
    if [ -n "$zenity" ]; then
      "$zenity" --info --text "`gettextfunc "$MESSAGE"`"
    elif [ -n "$xmessage" ]; then
      echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | $xmessage -center -file -
    fi
  fi
}

errormsg () {
  # exit script with error
  message "$*"
  exit 1
}

internal_errormsg () {
  # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
  # One big call to message() for the sake of xmessage; if we had two then
  # the user would have dismissed the error we want reported before seeing the
  # request to report it.
  errormsg "$*" \
           "Please report the installed version of the \"xfree86-common\"" \
           "package and the complete text of this error message to" \
           "<debian-x@lists.debian.org>."
}

run_parts () {
  # until run-parts --noexec is implemented
  if [ -z "$1" ]; then
    internal_errormsg "run_parts() called without an argument."
  fi
  if [ ! -d "$1" ]; then
    internal_errormsg "run_parts() called, but \"$1\" does not exist or is" \
                      "not a directory."
  fi
  for F in $(ls $1); do
    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
      if [ -f "$1/$F" ]; then
        echo "$1/$F"
      fi
    fi
  done
}
# initialize variables for use by all session scripts

OPTIONFILE=/etc/X11/Xsession.options

SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources

SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
ALTUSERXSESSION=$HOME/.Xsession

# this will go into the .xsession-errors along with all other echo's
# good for debugging where things went wrong
echo "$0: Beginning session setup..."

# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"

# Translation stuff
if [ -x "/usr/lib/gdm/gdmtranslate" ] ; then
  gdmtranslate="/usr/lib/gdm/gdmtranslate"
else
  gdmtranslate=
fi

# Note that this should only go to zenity dialogs which always expect utf8
gettextfunc () {
  if [ "x$gdmtranslate" != "x" ] ; then
    "$gdmtranslate" --utf8 "$1"
  else
    echo "$1"
  fi
}

zenity=`which zenity 2>/dev/null`
xmessage=`which xmessage 2>/dev/null`

command="$1"

if [ -z "$command" ] ; then
  command=failsafe
fi

if [ x"$command" = xfailsafe ] ; then
  if [ -n "$zenity" ] ; then
    "$zenity" --info --text "`gettextfunc "This is the failsafe xterm session.  Windows now have focus only if you have your cursor above them.  To get out of this mode type 'exit' in the window in the upper left corner"`"
  else
    echo "$0: Starting the failsafe xterm session."
  fi
  exec xterm -geometry 80x24+0+0
fi

# clean up after xbanner
freetemp=`which freetemp 2>/dev/null`
if [ -n "$freetemp" ] ; then
        "$freetemp"
fi

usermodmap="$HOME/.Xmodmap"
userxkbmap="$HOME/.Xkbmap"

if [ -f "$userxkbmap" ]; then
    setxkbmap `cat "$userxkbmap"`
    XKB_IN_USE=yes
fi

# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
    if [ -f "$usermodmap" ]; then
       xmodmap "$usermodmap"
    fi
fi

unset XKB_IN_USE

# Normalize languages, some places/distros screw us up in /etc/profile,
# so in case the user did select a language
if [ -n "$GDM_LANG" ]; then
  LANG="$GDM_LANG"
  export LANG

  if [ -n "$LC_ALL" ]; then
    if [ "$LC_ALL" != "$LANG" ]; then
      LC_ALL="$LANG"
    fi
  else
    unset LC_ALL
  fi

  if [ -n "$LANGUAGE" ]; then
    if [ "$LANGUAGE" != "$LANG" ]; then
      LANGUAGE="$LANG"
    fi
  else
    unset LANGUAGE
  fi

  if [ -n "$LINGUAS" ]; then
    if [ "$LINGUAS" != "$LANG" ]; then
      LINGUAS="$LANG"
    fi
  else
    unset LINGUAS
  fi
fi

# The default Debian session runs xsession first, so we just do that for
# "custom"
if [ "x$command" = "xcustom" ] ; then
  shift
  set default $*
fi

# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
SESSIONFILES=$(run_parts $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
  for SESSIONFILE in $SESSIONFILES; do
    . $SESSIONFILE
  done
fi

echo "$0: Executing $command failed, will try to run x-terminal-emulator"

if [ -n "$zenity" ] ; then
        "$zenity" --info --text "`gettextfunc "I could not start your session and so I have started the failsafe xterm session.  Windows now have focus only if you have your cursor above them.  To get out of this mode type 'exit' in the window in the upper left corner"`"
fi

exec x-terminal-emulator -geometry 80x24+0+0


_________________
跃过无数的时间断层,只为了在


页首
 用户资料  
 
6 楼 
 文章标题 :
帖子发表于 : 2006-08-24 9:22 

注册: 2006-08-24 9:05
帖子: 22
送出感谢: 0 次
接收感谢: 0 次
不知所雲,到底要改哪裡才能讓SCIM自動啟動?不要寫這麼複雜.直接說要改哪個文件的哪個地方就行了,難道說得清楚明白一點很困難嗎?

huangjiahua 写道:
楼上先把 Xsession 改回去吧
hua@vgh:eva$ cat /etc/gdm/Xsession
代码:
#!/bin/sh
#
# This is SORT OF LIKE an X session, but not quite.  You get a command as the
# first argument (it could be multiple words, so run it with "eval").  As a
# special case, the command can be:
#  failsafe - Run an xterm only
#  default - Run the appropriate Xclients startup (see the code below)
#  custom - Run ~/.xsession and if that's not available run 'default'
#
# (Note that other arguments could also follow, but only the command one is
# right now relevant and supported)
#
# The output is ALREADY redirected to .xsession-errors in GDM.  This way
# .xsession-errors actually gets more output such as if the PreSession script
# is failing.  This also prevents DoS attacks if some app in the users session
# can be prodded to dump lots of stuff on the stdout/stderr.  We wish to be
# robust don't we?  In case you wish to use an existing script for other DM's,
# you can just not redirect when GDMSESSION is set.  GDMSESSION will always
# be set from gdm.
#
# Also note that this is not run as a login shell, this is just executed.
#
# based on:
# $XConsortium: Xsession /main/10 1995/12/18 18:21:28 gildea $

PROGNAME=Xsession

message () {
  # pretty-print messages of arbitrary length; use xmessage if it
  # is available and $DISPLAY is set
  MESSAGE="$PROGNAME: $*"
  echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2
  if [ -n "$DISPLAY" ]; then
    if [ -n "$zenity" ]; then
      "$zenity" --info --text "`gettextfunc "$MESSAGE"`"
    elif [ -n "$xmessage" ]; then
      echo "$MESSAGE" | fold -s -w ${COLUMNS:-80} | $xmessage -center -file -
    fi
  fi
}

message_nonl () {
  # pretty-print messages of arbitrary length (no trailing newline); use
  # xmessage if it is available and $DISPLAY is set
  MESSAGE="$PROGNAME: $*"
  echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} >&2;
  if [ -n "$DISPLAY" ]; then
    if [ -n "$zenity" ]; then
      "$zenity" --info --text "`gettextfunc "$MESSAGE"`"
    elif [ -n "$xmessage" ]; then
      echo -n "$MESSAGE" | fold -s -w ${COLUMNS:-80} | $xmessage -center -file -
    fi
  fi
}

errormsg () {
  # exit script with error
  message "$*"
  exit 1
}

internal_errormsg () {
  # exit script with error; essentially a "THIS SHOULD NEVER HAPPEN" message
  # One big call to message() for the sake of xmessage; if we had two then
  # the user would have dismissed the error we want reported before seeing the
  # request to report it.
  errormsg "$*" \
           "Please report the installed version of the "xfree86-common"" \
           "package and the complete text of this error message to" \
           "<debian-x@lists.debian.org>."
}

run_parts () {
  # until run-parts --noexec is implemented
  if [ -z "$1" ]; then
    internal_errormsg "run_parts() called without an argument."
  fi
  if [ ! -d "$1" ]; then
    internal_errormsg "run_parts() called, but "$1" does not exist or is" \
                      "not a directory."
  fi
  for F in $(ls $1); do
    if expr "$F" : '[[:alnum:]_-]\+$' > /dev/null 2>&1; then
      if [ -f "$1/$F" ]; then
        echo "$1/$F"
      fi
    fi
  done
}
# initialize variables for use by all session scripts

OPTIONFILE=/etc/X11/Xsession.options

SYSRESOURCES=/etc/X11/Xresources
USRRESOURCES=$HOME/.Xresources

SYSSESSIONDIR=/etc/X11/Xsession.d
USERXSESSION=$HOME/.xsession
ALTUSERXSESSION=$HOME/.Xsession

# this will go into the .xsession-errors along with all other echo's
# good for debugging where things went wrong
echo "$0: Beginning session setup..."

# First read /etc/profile and .profile
test -f /etc/profile && . /etc/profile
test -f "$HOME/.profile" && . "$HOME/.profile"
# Second read /etc/xprofile and .xprofile for X specific setup
test -f /etc/xprofile && . /etc/xprofile
test -f "$HOME/.xprofile" && . "$HOME/.xprofile"

# Translation stuff
if [ -x "/usr/lib/gdm/gdmtranslate" ] ; then
  gdmtranslate="/usr/lib/gdm/gdmtranslate"
else
  gdmtranslate=
fi

# Note that this should only go to zenity dialogs which always expect utf8
gettextfunc () {
  if [ "x$gdmtranslate" != "x" ] ; then
    "$gdmtranslate" --utf8 "$1"
  else
    echo "$1"
  fi
}

zenity=`which zenity 2>/dev/null`
xmessage=`which xmessage 2>/dev/null`

command="$1"

if [ -z "$command" ] ; then
  command=failsafe
fi

if [ x"$command" = xfailsafe ] ; then
  if [ -n "$zenity" ] ; then
    "$zenity" --info --text "`gettextfunc "This is the failsafe xterm session.  Windows now have focus only if you have your cursor above them.  To get out of this mode type 'exit' in the window in the upper left corner"`"
  else
    echo "$0: Starting the failsafe xterm session."
  fi
  exec xterm -geometry 80x24+0+0
fi

# clean up after xbanner
freetemp=`which freetemp 2>/dev/null`
if [ -n "$freetemp" ] ; then
        "$freetemp"
fi

usermodmap="$HOME/.Xmodmap"
userxkbmap="$HOME/.Xkbmap"

if [ -f "$userxkbmap" ]; then
    setxkbmap `cat "$userxkbmap"`
    XKB_IN_USE=yes
fi

# xkb and xmodmap don't play nice together
if [ -z "$XKB_IN_USE" ]; then
    if [ -f "$usermodmap" ]; then
       xmodmap "$usermodmap"
    fi
fi

unset XKB_IN_USE

# Normalize languages, some places/distros screw us up in /etc/profile,
# so in case the user did select a language
if [ -n "$GDM_LANG" ]; then
  LANG="$GDM_LANG"
  export LANG

  if [ -n "$LC_ALL" ]; then
    if [ "$LC_ALL" != "$LANG" ]; then
      LC_ALL="$LANG"
    fi
  else
    unset LC_ALL
  fi

  if [ -n "$LANGUAGE" ]; then
    if [ "$LANGUAGE" != "$LANG" ]; then
      LANGUAGE="$LANG"
    fi
  else
    unset LANGUAGE
  fi

  if [ -n "$LINGUAS" ]; then
    if [ "$LINGUAS" != "$LANG" ]; then
      LINGUAS="$LANG"
    fi
  else
    unset LINGUAS
  fi
fi

# The default Debian session runs xsession first, so we just do that for
# "custom"
if [ "x$command" = "xcustom" ] ; then
  shift
  set default $*
fi

# use run-parts to source every file in the session directory; we source
# instead of executing so that the variables and functions defined above
# are available to the scripts, and so that they can pass variables to each
# other
SESSIONFILES=$(run_parts $SYSSESSIONDIR)
if [ -n "$SESSIONFILES" ]; then
  for SESSIONFILE in $SESSIONFILES; do
    . $SESSIONFILE
  done
fi

echo "$0: Executing $command failed, will try to run x-terminal-emulator"

if [ -n "$zenity" ] ; then
        "$zenity" --info --text "`gettextfunc "I could not start your session and so I have started the failsafe xterm session.  Windows now have focus only if you have your cursor above them.  To get out of this mode type 'exit' in the window in the upper left corner"`"
fi

exec x-terminal-emulator -geometry 80x24+0+0


页首
 用户资料  
 
7 楼 
 文章标题 :
帖子发表于 : 2006-08-24 9:36 
头像

注册: 2005-06-11 14:03
帖子: 6226
地址: 不明真相的群众
送出感谢: 0 次
接收感谢: 0 次
人家很明确的说只需要一条命令就行了,不需要手动修改配置文件.


_________________
我的blog,关于技术,软件,linux,vim <---- 所有博客均被河蟹.


页首
 用户资料  
 
8 楼 
 文章标题 :
帖子发表于 : 2006-08-24 10:42 

注册: 2006-08-24 9:05
帖子: 22
送出感谢: 0 次
接收感谢: 0 次
karron 写道:
人家很明确的说只需要一条命令就行了,不需要手动修改配置文件.


不好意思,剛才沒看到im-switch -s scim_xim -z default這一行,偶現在已經運行了這個命令,輸入法可以調出來了,不過,又有新問題.
雖然輸入法調出來了,可是和沒調出來一樣,輸入的還是英文,不管切換成五筆還是拼音或是別的任何輸入法,都不管用,還是英文輸入.這是怎麼回事啊?有誰知道的?


页首
 用户资料  
 
9 楼 
 文章标题 :
帖子发表于 : 2006-08-24 10:54 

注册: 2006-08-24 9:05
帖子: 22
送出感谢: 0 次
接收感谢: 0 次
崖山之後無中國 写道:
karron 写道:
人家很明确的说只需要一条命令就行了,不需要手动修改配置文件.


不好意思,剛才沒看到im-switch -s scim_xim -z default這一行,偶現在已經運行了這個命令,輸入法可以調出來了,不過,又有新問題.
雖然輸入法調出來了,可是和沒調出來一樣,輸入的還是英文,不管切換成五筆還是拼音或是別的任何輸入法,都不管用,還是英文輸入.這是怎麼回事啊?有誰知道的?


鬱悶,重啟了一下居然就好了.信邪...


页首
 用户资料  
 
10 楼 
 文章标题 :
帖子发表于 : 2006-08-24 11:22 
头像

注册: 2006-07-08 9:00
帖子: 269
地址: Deutschland
送出感谢: 0 次
接收感谢: 0 次
崖山之後無中國 写道:
崖山之後無中國 写道:
karron 写道:
人家很明确的说只需要一条命令就行了,不需要手动修改配置文件.


不好意思,剛才沒看到im-switch -s scim_xim -z default這一行,偶現在已經運行了這個命令,輸入法可以調出來了,不過,又有新問題.
雖然輸入法調出來了,可是和沒調出來一樣,輸入的還是英文,不管切換成五筆還是拼音或是別的任何輸入法,都不管用,還是英文輸入.這是怎麼回事啊?有誰知道的?


鬱悶,重啟了一下居然就好了.信邪...

这ID,so 汗!


_________________
做一个良好的灌水公民


页首
 用户资料  
 
11 楼 
 文章标题 :
帖子发表于 : 2006-08-25 9:36 

注册: 2006-08-24 9:05
帖子: 22
送出感谢: 0 次
接收感谢: 0 次
再問一下,如何重啟scim啊?
貌似ubuntu沒有scim-restart這個命令啊!


页首
 用户资料  
 
12 楼 
 文章标题 :
帖子发表于 : 2006-08-31 14:32 

注册: 2006-08-25 11:57
帖子: 5
送出感谢: 0 次
接收感谢: 0 次
你可以打开终端输入pkill scim,然后再打scim -d就OK了。


页首
 用户资料  
 
13 楼 
 文章标题 : ....hai shi bu xing a .........
帖子发表于 : 2006-09-09 22:35 
头像

注册: 2006-09-08 19:59
帖子: 89
送出感谢: 0 次
接收感谢: 0 次
Help


页首
 用户资料  
 
14 楼 
 文章标题 : Re: SCIM 无法自动启动
帖子发表于 : 2008-11-15 17:44 

注册: 2006-01-02 0:37
帖子: 94
送出感谢: 0 次
接收感谢: 0 次
im-switch -s scim_xim -z default
Error: no system wide configuration file "scim_xim" exists.
Error: No action taken.


页首
 用户资料  
 
15 楼 
 文章标题 : Re:
帖子发表于 : 2009-08-10 12:50 
头像

注册: 2009-07-27 11:03
帖子: 239
地址: 广东 深圳
送出感谢: 0 次
接收感谢: 0 次
huangjiahua 写道:
去掉你做的其他,
执行一个
代码:
im-switch  -s   scim_xim -z default



( 确保安装了 scim-pinyin im-switch )


此命令错了!正确的是:

代码:
im-switch  -s   scim xim -z default


_________________
服务器运维与架构 ha97.com


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

当前时区为 UTC + 8 小时


在线用户

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


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

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

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