View previous topic :: View next topic |
Author |
Message |
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
Posted: 2008-Jan-03 Thu, pm3:31 |
|
Post subject: icewm专题 |
|
启动icewm
Code: |
#!/bin/sh
#检查power_key_off文件是否存在,并且执行
test -e /proc/power_key_off && echo "0" >/proc/power_key_off 2>/dev/null
#设置环境变量,存在/etc/profile里边
if [ -e /etc/profile ]; then
. /etc/profile
fi
#设置SCIM,并启动
#export GTK_IM_MODULE=scim
#export QT_IM_MODULE=scim
#export XMODIFIERS="@im=SCIM"
#scim &
#设置UIM,并启动
export GTK_IM_MODULE=uim
export QT_IM_MODULE=uim
export XMODIFIERS="@im=uim"
uim-xim &
uim-toolbar-gtk &
#设置在shell里边显示当前路径,也可以放在/etc/profile里边
export PS1='\w> '
#选择桌面管理软件
#DESKTOP=matchbox
#DESKTOP=rox
DESKTOP=idesk
#检查.icewm配置文件路径是否存在,否则创建
if [ ! -d ~/.icewm ]; then
mkdir -p ~/.icewm
cp -a /usr/share/icewm/defconfig/* ~/.icewm
echo "gtk-font-name = \"SimSun 12\"" >~/.gtkrc-2.0
fi
#建立icewm的系统菜单,因为执行速度慢,这里跳过了
#makeicemenu
#检查并建立/Choice/common子目录
if [ ! -d $HOME/Choices/common ]; then
mkdir -p $HOME/Choices/common
fi
#设置缺省的背光和CPU主频
if [ -f $HOME/Choices/lightnpower.cfg -a -e /usr/bin/lightnpower.py ]; then
lightnpower.py --loadandquit
fi
if [ -f /usr/bin/gconfd-2 ]; then
/usr/bin/gconfd-2 15 &
fi
#分机型装载键盘的map
if [ -e /proc/deviceinfo/product ]; then
MODEL=`cat /proc/deviceinfo/product`
else
MODEL=unknown
fi
case "$MODEL" in
SL-C860|SL-C760|SL-C750|SL-7500|SL-C700)
test -f /etc/X11/kb/corgi.xmodmap && xmodmap /etc/X11/kb/corgi.xmodmap
;;
SL-6000)
test -f /etc/X11/kb/tosa.xmodmap && xmodmap /etc/X11/kb/tosa.xmodmap
;;
SL-C1000|SL-C3000|SL-C3100|SL-C3200)
test -f /etc/X11/kb/akita.xmodmap && xmodmap /etc/X11/kb/akita.xmodmap
;;
*)
cat /proc/cpuinfo | grep 'Sharp-Collie' 2>/dev/null >/dev/null && test -f /etc/X11/kb/collie.xmodmap && xmodmap /etc/X11/kb/collie.xmodmap
;;
esac
#装载用户定义的键盘map
test -f /etc/X11/kb/userdefined.xmodmap && xmodmap /etc/X11/kb/userdefined.xmodmap
test -f /usr/bin/chkhinge && /usr/bin/chkhinge 2>/dev/null >/dev/null
test -f /usr/bin/xkeymouse && /usr/bin/xkeymouse 2>/dev/null >/dev/null &
#启动桌面管理程序
case $DESKTOP in
idesk)
IDESK=`which idesk`
test $IDESK && $IDESK & 2>/dev/null >/dev/null
;;
rox)
ROX=`which rox`
test $ROX && $ROX --pinboard=mypin 2>/dev/null >/dev/null
;;
matchbox)
MATCHBOX=`which matchbox-desktop`
if [ ! "x$MATCHBOX" = "x" ]; then
if [ -f $HOME/.matchbox/mb-desktop-background ]; then
MBBGND=`cat $HOME/.matchbox/mb-desktop-background`
else
MBBGND=""
fi
eval "$MATCHBOX $MBBGND" 2>/dev/null >/dev/null &
fi
;;
*)
;;
esac
#启动icewm,2个wmpid之间构成一个循环
icewm 2>/dev/null >/dev/null & wmpid=$!
#启动icewm的任务条,后台运行
icewmtray & >/dev/null
#启动mb-applet-powerctrl,后台运行
mb-applet-powerctrl & 2>/dev/null >/dev/null
wait $wmpid
#原来matchbox启动留下的语句,现在不用
#GCONF2_PID=`pidof gconfd-2`
#if [ ! "$GCONF2_PID" = "" ]; then
# kill $GCONF2_PID
#fi
#检查power_key_off文件是否存在,并且执行
test -e /proc/power_key_off && echo "1" >/proc/power_key_off 2>/dev/null
|
_________________ SL-C1000, 1G CF, 1G SD
pdaxrom 1.1beta3
Roku Wifi Card(Used in Cacko 1.23 & pdaXrom 1.1 Beta3)
http://ccpaging.blog.ubuntu.org.cn/
http://ccpaging.osall.com/
http://blog.sina.com.cn/zaurus/ |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
ninnd
Joined: 16 Nov 2007 Posts: 167
小企鹅: 5096
|
Posted: 2008-Jan-03 Thu, pm5:00 |
|
Post subject: |
|
顶,你不是不喜欢ICEWM的么 _________________ 7500C,1G SD ,1G CF,pdaXrom 1.1 Beta1
QQ349963519 |
|
Back to top |
|
ccpaging
Joined: 07 Dec 2006 Posts: 757
小企鹅: 16604
|
|
Back to top |
|
ninnd
Joined: 16 Nov 2007 Posts: 167
小企鹅: 5096
|
Posted: 2008-Jan-05 Sat, pm10:40 |
|
Post subject: |
|
哈哈,怎么越听越感觉是在说我呢 _________________ 7500C,1G SD ,1G CF,pdaXrom 1.1 Beta1
QQ349963519 |
|
Back to top |
|
btest
Joined: 22 Nov 2007 Posts: 175
小企鹅: 4014
|
Posted: 2008-Feb-29 Fri, am9:48 |
|
Post subject: Re: icewm专题 |
|
ccpaging wrote: | 启动icewm
Code: |
#!/bin/sh
#检查power_key_off文件是否存在,并且执行
test -e /proc/power_key_off && echo "0" >/proc/power_key_off 2>/dev/null
#设置环境变量,存在/etc/profile里边
if [ -e /etc/profile ]; then
. /etc/profile
fi
#设置SCIM,并启动
#export GTK_IM_MODULE=scim
#export QT_IM_MODULE=scim
#export XMODIFIERS="@im=SCIM"
#scim &
#设置UIM,并启动
export GTK_IM_MODULE=uim
export QT_IM_MODULE=uim
export XMODIFIERS="@im=uim"
uim-xim &
uim-toolbar-gtk &
#设置在shell里边显示当前路径,也可以放在/etc/profile里边
export PS1='\w> '
#选择桌面管理软件
#DESKTOP=matchbox
#DESKTOP=rox
DESKTOP=idesk
#检查.icewm配置文件路径是否存在,否则创建
if [ ! -d ~/.icewm ]; then
mkdir -p ~/.icewm
cp -a /usr/share/icewm/defconfig/* ~/.icewm
echo "gtk-font-name = \"SimSun 12\"" >~/.gtkrc-2.0
fi
#建立icewm的系统菜单,因为执行速度慢,这里跳过了
#makeicemenu
#检查并建立/Choice/common子目录
if [ ! -d $HOME/Choices/common ]; then
mkdir -p $HOME/Choices/common
fi
#设置缺省的背光和CPU主频
if [ -f $HOME/Choices/lightnpower.cfg -a -e /usr/bin/lightnpower.py ]; then
lightnpower.py --loadandquit
fi
if [ -f /usr/bin/gconfd-2 ]; then
/usr/bin/gconfd-2 15 &
fi
#分机型装载键盘的map
if [ -e /proc/deviceinfo/product ]; then
MODEL=`cat /proc/deviceinfo/product`
else
MODEL=unknown
fi
case "$MODEL" in
SL-C860|SL-C760|SL-C750|SL-7500|SL-C700)
test -f /etc/X11/kb/corgi.xmodmap && xmodmap /etc/X11/kb/corgi.xmodmap
;;
SL-6000)
test -f /etc/X11/kb/tosa.xmodmap && xmodmap /etc/X11/kb/tosa.xmodmap
;;
SL-C1000|SL-C3000|SL-C3100|SL-C3200)
test -f /etc/X11/kb/akita.xmodmap && xmodmap /etc/X11/kb/akita.xmodmap
;;
*)
cat /proc/cpuinfo | grep 'Sharp-Collie' 2>/dev/null >/dev/null && test -f /etc/X11/kb/collie.xmodmap && xmodmap /etc/X11/kb/collie.xmodmap
;;
esac
#装载用户定义的键盘map
test -f /etc/X11/kb/userdefined.xmodmap && xmodmap /etc/X11/kb/userdefined.xmodmap
test -f /usr/bin/chkhinge && /usr/bin/chkhinge 2>/dev/null >/dev/null
test -f /usr/bin/xkeymouse && /usr/bin/xkeymouse 2>/dev/null >/dev/null &
#启动桌面管理程序
case $DESKTOP in
idesk)
IDESK=`which idesk`
test $IDESK && $IDESK & 2>/dev/null >/dev/null
;;
rox)
ROX=`which rox`
test $ROX && $ROX --pinboard=mypin 2>/dev/null >/dev/null
;;
matchbox)
MATCHBOX=`which matchbox-desktop`
if [ ! "x$MATCHBOX" = "x" ]; then
if [ -f $HOME/.matchbox/mb-desktop-background ]; then
MBBGND=`cat $HOME/.matchbox/mb-desktop-background`
else
MBBGND=""
fi
eval "$MATCHBOX $MBBGND" 2>/dev/null >/dev/null &
fi
;;
*)
;;
esac
#启动icewm,2个wmpid之间构成一个循环
icewm 2>/dev/null >/dev/null & wmpid=$!
#启动icewm的任务条,后台运行
icewmtray & >/dev/null
#启动mb-applet-powerctrl,后台运行
mb-applet-powerctrl & 2>/dev/null >/dev/null
wait $wmpid
#原来matchbox启动留下的语句,现在不用
#GCONF2_PID=`pidof gconfd-2`
#if [ ! "$GCONF2_PID" = "" ]; then
# kill $GCONF2_PID
#fi
#检查power_key_off文件是否存在,并且执行
test -e /proc/power_key_off && echo "1" >/proc/power_key_off 2>/dev/null
|
|
我加入scim &
后,无法启动桌面,怎么没搞的? |
|
Back to top |
|
|