Fluxbox 本身提供了自启动程序的功能。~/.fluxbox/startup 文件是一个像启动 Fluxbox 一样自启动应用程序的脚本。# 标记是注释。

一个简单的例子:

 #!/bin/sh
#
# fluxbox startup-script:
#
# Lines starting with a '#' are ignored. # Change your keymap:
xmodmap "/root/.Xmodmap" # merge xresource settings
xrdb -merge ~/.Xresources # set keyboard layout
fbsetkb $(cat ~/.fluxbox/kblayout) # setup bookmarks for file manager
gtk-bookmarks-update # Share common directories with guest user. This is necessary
# because some apps like chromium must be running under guest
for dir in Desktop Documents Downloads Music Pictures Public Templates Videos; do
if ! mountpoint /root/$dir; then
mount --bind /home/guest/$dir /root/$dir
fi
done # set background color and big wait mouse cursor
xsetroot -solid '#111111'
xsetroot -xcf /usr/share/icons/breeze_cursors/cursors/watch 37 # disable screen blanking
xset s off
xset -dpms # volume icon in system tray. Can fail if no soundcard is detected
volumeicon &
tilda & //add tilda startup # preload compton and fluxbox to cache
(compton --help; fluxbox --help) >/dev/null 2>&1 # Keep black screen for first second while the sound plays.
# This slows startup a little, but it is nicer effect.
SND=/usr/share/sounds/startup.wav
if [ -r $SND ]; then
cat $SND > /dev/null # preload
aplay $SND &
sleep 1 &
SOUNDPID=$!
fi # Debian-local change:
# - fbautostart has been added with a quick hack to check to see if it
# exists. If it does, we'll start it up by default.
which fbautostart > /dev/null
if [ $? -eq 0 ]; then
fbautostart
fi # We need to postpone compton after fluxbox starts, else it won't set
# the transparency of toolbar properly... So we check the fehbg file,
# which is created by fluxbox at the phase when it sets background.
# Once the file exist, fluxbox-toolbar is already started SIGNAL1=~/.fehbg
SIGNAL2=~/.fehbg2 rm -f $SIGNAL1 2>/dev/null
rm -f $SIGNAL2 2>/dev/null (
while [ ! -e $SIGNAL1 ]; do
sleep 0.1
done

tilda &

slax自启动程序的更多相关文章

  1. Android开机自启动程序

    背景知识:当Android启动时,会发出一个系统广播,内容为ACTION_BOOT_COMPLETED,它的字符串常量表示为 android.intent.action.BOOT_COMPLETED. ...

  2. windows服务与自启动程序的区别(转载)

    转载:http://blog.csdn.net/anddy926/article/details/8464142 在客户端服务器项目实践中,作为服务端必须保持程序的24小时不间断运行,需要做一个监控, ...

  3. 管理windows自启动程序

    1. 点击开始,在运行程序框中输入msconfig,然后回车. 在弹出的对话框中,点击”启动“选项卡,在启动项目列表中,把不需要的启动项目前面的对号去掉. 然后切换到”服务“选项卡,这里的服务项目列表 ...

  4. 系统开启UAC情形下开机自启动程序如何以管理员权限启动

    系统开启UAC情形下开机自启动程序如何以管理员权限启动 题记:本文阐述的是在Windows系统开启UAC的情况下,开机自启动程序需要以管理员权限启动, 系统弹出UAC对话框,用户同意的情形下启动程序 ...

  5. Fedora 16设置开机自启动程序与Ubuntu的区别

    Ubuntu设置开机自启动脚本的方法是:修改/etc/init.d/rc.local这个文件,添加需要启动的程序即可,相关函数如下: void SetSysAutoBoot() { ] = {}; ; ...

  6. centos7下的/etc/rc.local自启动程序

    在centos6中有一个/etc/rc.local的启动文件,只要把需要经常启动的程序添加到此文件下并执行source /etc/rc.local就可以实现开机启动了. 在centos7中不知道也是如 ...

  7. win10设置开机自启动程序

    问题情境:前两天刚刚给自己的win10系统美化了一下,但发现一个问题,每次开机都需要双击启动一个程序,才能达到一个我想要的效果,所以就在思考能不能将这个程序设为开机自启动项呢? 1.首先,找到启动文件 ...

  8. WINDOWS自启动程序的10大隐身之所

    Windows启动时通常会有一大堆程序自动启动.不要以为管好了“开始→程序→启动”菜单就万事大吉,实际上,在Windows XP/2K中,让Windows自动启动程序的办法很多,下文告诉你最重要的两个 ...

  9. linux_设置开机自启动程序脚本

    设置开机自启动

随机推荐

  1. MySQL中You can't specify target table '表名'('sn_app_label') for update in FROM clause错误解决办法

    在有些时候有级联关系的数据放在了同一张表中,在写sql语句的时候可能会遇到这样的场景:我要插入两条数据,第一条是父节点,第二条是子节点,关联关系是父节点的自增长id:在写这样的sql语句时有可能就会出 ...

  2. js中的BOM和DOM常用事件方法

    笔记: window对象 ● window.innerHeight - 浏览器窗口的内部高度 ● window.innerWidth - 浏览器窗口的内部宽度 ● window.open() - 打开 ...

  3. day24-python之面向对象

    1.面向对象 # name='元昊' # # gender='母' # # type='藏獒' #狗的特征 dog1={ 'name':'元昊', 'gender':'母', 'type':'藏獒' ...

  4. [LeetCode] 76. 最小覆盖子串 ☆☆☆☆☆(滑动窗口)

    https://leetcode-cn.com/problems/minimum-window-substring/solution/hua-dong-chuang-kou-suan-fa-tong- ...

  5. Android笔记(八) Android中的布局——相对布局

    RelativeLayout又称为相对布局,也是一种常用的布局形式.和LinearLayout的排列规则不同,RelativeLayout显得更加随意一下,它通常通过相对定位 的方式让控件出现在布局的 ...

  6. python生成器学习

    python生成器学习: 案例分析一: def demo(): for i in range(4): yield i g=demo() g1=(i for i in g) #(i for i in d ...

  7. Codeforces #496 (Div. 3) Polycarp and Div 3

    思路1: https://blog.csdn.net/qq_41730082/article/details/80984316 题目的意思是给你一串数字长度为(1-2e5),当然由于它的这一串数字是不 ...

  8. Activity之launchMode理解

    对于Activity中的四个lauchMode[standard(默认).singleTop.singleTask.singleInstance]的介绍网上已经有大把的文章了,但是在实际应用开发时,对 ...

  9. NodeJS开发博客(三) 数据的保存

    什么是cookie 存储在浏览器的一段字符串(最大5k) 跨域不共享 格式如 k1=v1 k2=v2 因此可以存储结构化数据 每次发送http请求,会将请求域的cookie一起发送给server se ...

  10. element-ui upload组件 onchange事件 传自定义参数

     <el-upload     class="upload-demo"     list-type="picture"     accept=" ...