Board logo

標題: 【角色茶桌】—— Automatic execution of X Window and other applications after boot [打印本頁]

作者: 角色    時間: 2011-10-10 00:35     標題: 【角色茶桌】—— Automatic execution of X Window and other applications after boot

If you have any idea, please let us know.

YH
作者: 角色    時間: 2011-10-10 00:35

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
作者: 角色    時間: 2011-10-10 00:36

Reserved xxxxxxxxxxxxxxxxxxxx
作者: ckleea    時間: 2011-10-10 08:51

YH,

See this can help you

3.1.2. xinitrc

xinitrc is used to set up a suitable X environment, and to launch other programs, a.k.a "clients" that we may want available as soon as X is started. You likely have a system wide xinitrc to start a predefined set off programs. To customize this, create your own in your home directory. Name it .xinitrc, make sure it is an executable script, and chmod +x. An example (slightly modified from the original on my system):

#!/bin/sh
# $XConsortium: xinitrc.cpp,v 1.4 91/08/22 11:41:34 rws Exp $

userresources=$HOME/.Xresources
usermodmap=$HOME/.Xmodmap

# merge in defaults and keymaps
if [ -f $userresources ]; then
    xrdb -merge $userresources
fi

if [ -f $usermodmap ]; then
    xmodmap $usermodmap
fi

if [ -z "$BROWSER" ] ; then
        # we need to find a browser on this system
        BROWSER=`which netscape`
        if [ -z "$BROWSER" ] || [ ! -e "$BROWSER" ] ; then
        # not found yet
                BROWSER=
        fi
fi
if [ -z "$BROWSER" ] ; then
        # we need to find a browser on this system
        BROWSER=`which lynx`
        if [ -z "$BROWSER" ] || [ ! -e "$BROWSER" ] ; then
        # not found yet
                BROWSER=
        else
                BROWSER="xterm -font 9x15 -e lynx"
        fi
fi

export BROWSER

# start some nice programs
if [ -f $HOME/.Xclients ]; then
    exec $HOME/.Xclients
else
    xclock -geometry 50x50-1+1 &
    xterm -geometry 80x50+494+51 &
    if [ -f /usr/X11R6/bin/fvwm ]; then
        exec fvwm
    else
        exec twm
    fi
fi

#eof
作者: ckleea    時間: 2011-10-10 08:51

The website is here

http://tldp.org/HOWTO/XWindow-User-HOWTO/runningx.html




歡迎光臨 電訊茶室 (http://www.telecom-cafe.com/forum/) Powered by Discuz! 7.2