返回列表 發帖

【角色茶桌】—— Automatic execution of X Window and other applications after boot

If you have any idea, please let us know.

YH

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

TOP

Reserved xxxxxxxxxxxxxxxxxxxx

TOP

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

TOP

TOP

返回列表