zoukankan      html  css  js  c++  java
  • slax自启动程序

    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 &

  • 相关阅读:
    MySQL的B+树索引底层构成
    Mybatis 使用注解和Provider类实现动态条件查询
    EF批量插入数据耗时对比
    NOPI Excel 读取公式生成后的数据
    EF 记录执行的sql语句
    c# Redis操作类
    c# ExpandoObject动态扩展对象
    微信小程序干货
    mysql中将多行数据合并成一行数据
    Flask 学习系列(四)---Jinjia2 模板继承
  • 原文地址:https://www.cnblogs.com/guochaoxxl/p/11677047.html
Copyright © 2011-2022 走看看