slax 자동 시작 프로그램

7790 단어
Fluxbox 자체는 자체 부팅 프로그램 기능을 제공합니다~/.fluxbox/startup 파일은 Fluxbox를 시작하는 것처럼 프로그램을 직접 시작하는 스크립트입니다# 표기는 주석입니다.
간단한 예:
 1 #!/bin/sh
 2 #
 3 # fluxbox startup-script:
 4 #
 5 # Lines starting with a '#' are ignored.
 6 
 7 # Change your keymap:
 8 xmodmap "/root/.Xmodmap"
 9 
10 # merge xresource settings
11 xrdb -merge ~/.Xresources
12 
13 # set keyboard layout
14 fbsetkb $(cat ~/.fluxbox/kblayout)
15 
16 # setup bookmarks for file manager
17 gtk-bookmarks-update
18 
19 # Share common directories with guest user. This is necessary
20 # because some apps like chromium must be running under guest
21 for dir in Desktop Documents Downloads Music Pictures Public Templates Videos; do
22    if ! mountpoint /root/$dir; then
23       mount --bind /home/guest/$dir /root/$dir
24    fi
25 done
26 
27 # set background color and big wait mouse cursor
28 xsetroot -solid '#111111'
29 xsetroot -xcf /usr/share/icons/breeze_cursors/cursors/watch 37
30 
31 # disable screen blanking
32 xset s off
33 xset -dpms
34 
35 # volume icon in system tray. Can fail if no soundcard is detected
36 volumeicon &
37 tilda &                                                                                                              //add  tilda startup
38 
39 # preload compton and fluxbox to cache
40 (compton --help; fluxbox --help) >/dev/null 2>&1
41 
42 # Keep black screen for first second while the sound plays.
43 # This slows startup a little, but it is nicer effect.
44 SND=/usr/share/sounds/startup.wav
45 if [ -r $SND ]; then
46    cat $SND > /dev/null # preload
47    aplay $SND &
48    sleep 1 &
49    SOUNDPID=$!
50 fi
51 
52 # Debian-local change:
53 #   - fbautostart has been added with a quick hack to check to see if it
54 #     exists. If it does, we'll start it up by default.
55 which fbautostart > /dev/null
56 if [ $? -eq 0 ]; then
57     fbautostart
58 fi
59 
60 # We need to postpone compton after fluxbox starts, else it won't set
61 # the transparency of toolbar properly... So we check the fehbg file,
62 # which is created by fluxbox at the phase when it sets background.
63 # Once the file exist, fluxbox-toolbar is already started
64 
65 SIGNAL1=~/.fehbg
66 SIGNAL2=~/.fehbg2
67 
68 rm -f $SIGNAL1 2>/dev/null
69 rm -f $SIGNAL2 2>/dev/null
70 
71 (
72    while [ ! -e $SIGNAL1 ]; do
73       sleep 0.1
74    done

    tilda &

좋은 웹페이지 즐겨찾기